mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Syed Saba Kareem <Syed.SabaKareem@amd.com>
To: <broonie@kernel.org>, <alsa-devel@alsa-project.org>
Cc: Vijendar.Mukunda@amd.com, Basavaraj.Hiregoudar@amd.com,
	Sunil-kumar.Dommati@amd.com, mario.limonciello@amd.com,
	venkataprasad.potturu@amd.com, arungopal.kondaveeti@amd.com,
	mastan.katragadda@amd.com, juan.martinez@amd.com,
	"Syed Saba Kareem" <Syed.SabaKareem@amd.com>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Jaroslav Kysela" <perex@perex.cz>,
	"Takashi Iwai" <tiwai@suse.com>,
	"Nicolas Ferre" <nicolas.ferre@microchip.com>,
	"Kuninori Morimoto" <kuninori.morimoto.gx@renesas.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Yang Li" <yang.lee@linux.alibaba.com>,
	"Dan Carpenter" <dan.carpenter@linaro.org>,
	"Marian Postevca" <posteuca@mutex.one>,
	"V Sujith Kumar Reddy" <vsujithkumar.reddy@amd.com>,
	"open list" <linux-kernel@vger.kernel.org>
Subject: [PATCH 07/13] ASoC: amd: acp: add platform and flag data to acp data structure
Date: Sat, 21 Oct 2023 20:20:48 +0530	[thread overview]
Message-ID: <20231021145110.478744-7-Syed.SabaKareem@amd.com> (raw)
In-Reply-To: <20231021145110.478744-1-Syed.SabaKareem@amd.com>

add name of the platform and flag data in private data structure.
name of the platform will be used to differentiate platforms where as
flag will be used to know what kind of endpoint configuration is selected
where its legacy(I2S + PDM) or only ACP PDM.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
---
 sound/soc/amd/acp/acp-rembrandt.c | 5 ++++-
 sound/soc/amd/acp/acp-renoir.c    | 3 +++
 sound/soc/amd/acp/acp63.c         | 4 ++++
 sound/soc/amd/acp/amd.h           | 2 ++
 4 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/sound/soc/amd/acp/acp-rembrandt.c b/sound/soc/amd/acp/acp-rembrandt.c
index 1bf7b2e68a11..ef5fe6438efd 100644
--- a/sound/soc/amd/acp/acp-rembrandt.c
+++ b/sound/soc/amd/acp/acp-rembrandt.c
@@ -23,6 +23,8 @@
 #include <linux/pm_runtime.h>
 
 #include "amd.h"
+#include "../mach-config.h"
+#include "acp-mach.h"
 
 #define DRV_NAME "acp_asoc_rembrandt"
 
@@ -226,7 +228,8 @@ static int rembrandt_audio_probe(struct platform_device *pdev)
 	adata->dai_driver = acp_rmb_dai;
 	adata->num_dai = ARRAY_SIZE(acp_rmb_dai);
 	adata->rsrc = &rsrc;
-
+	adata->platform = REMBRANDT;
+	adata->flag = chip->flag;
 	adata->machines = snd_soc_acpi_amd_rmb_acp_machines;
 	acp_machine_select(adata);
 
diff --git a/sound/soc/amd/acp/acp-renoir.c b/sound/soc/amd/acp/acp-renoir.c
index b15cbdf7fa9b..a591482a0726 100644
--- a/sound/soc/amd/acp/acp-renoir.c
+++ b/sound/soc/amd/acp/acp-renoir.c
@@ -22,6 +22,7 @@
 #include <linux/dma-mapping.h>
 
 #include "amd.h"
+#include "acp-mach.h"
 
 #define DRV_NAME "acp_asoc_renoir"
 
@@ -185,6 +186,8 @@ static int renoir_audio_probe(struct platform_device *pdev)
 	adata->dai_driver = acp_renoir_dai;
 	adata->num_dai = ARRAY_SIZE(acp_renoir_dai);
 	adata->rsrc = &rsrc;
+	adata->platform = RENOIR;
+	adata->flag = chip->flag;
 
 	adata->machines = snd_soc_acpi_amd_acp_machines;
 	acp_machine_select(adata);
diff --git a/sound/soc/amd/acp/acp63.c b/sound/soc/amd/acp/acp63.c
index f94348ad863d..0cec6ecaadfa 100644
--- a/sound/soc/amd/acp/acp63.c
+++ b/sound/soc/amd/acp/acp63.c
@@ -21,6 +21,8 @@
 #include <linux/pm_runtime.h>
 #include <linux/pci.h>
 #include "amd.h"
+#include "acp-mach.h"
+#include "../mach-config.h"
 
 #define DRV_NAME "acp_asoc_acp63"
 
@@ -237,6 +239,8 @@ static int acp63_audio_probe(struct platform_device *pdev)
 	adata->dai_driver = acp63_dai;
 	adata->num_dai = ARRAY_SIZE(acp63_dai);
 	adata->rsrc = &rsrc;
+	adata->platform = ACP63;
+	adata->flag = chip->flag;
 	adata->machines = snd_soc_acpi_amd_acp63_acp_machines;
 	acp_machine_select(adata);
 	dev_set_drvdata(dev, adata);
diff --git a/sound/soc/amd/acp/amd.h b/sound/soc/amd/acp/amd.h
index 2ffe1effc6b5..62d0793027f2 100644
--- a/sound/soc/amd/acp/amd.h
+++ b/sound/soc/amd/acp/amd.h
@@ -187,6 +187,8 @@ struct acp_dev_data {
 	u32 tdm_rx_fmt[3];
 	u32 xfer_tx_resolution[3];
 	u32 xfer_rx_resolution[3];
+	unsigned int flag;
+	unsigned int platform;
 };
 
 enum acp_config {
-- 
2.25.1


  parent reply	other threads:[~2023-10-21 14:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-21 14:50 [PATCH 01/13] ASoC: amd: acp: Add acp6.3 pci legacy driver support Syed Saba Kareem
2023-10-21 14:50 ` [PATCH 02/13] ASoC: amd: acp: refactor acp i2s clock generation code Syed Saba Kareem
2023-10-23  7:37   ` Amadeusz Sławiński
2023-10-21 14:50 ` [PATCH 03/13] ASoC: amd: acp: add i2s clock generation support for acp6.3 based platforms Syed Saba Kareem
2023-10-21 14:50 ` [PATCH 04/13] ASoC: amd: acp: add machine driver support for acp6.3 platform Syed Saba Kareem
2023-10-21 14:50 ` [PATCH 05/13] ASoC: amd: acp: add Kconfig options for acp6.3 based platform driver Syed Saba Kareem
2023-10-21 14:50 ` [PATCH 06/13] ASoC: amd: acp: add code for scanning acp pdm controller Syed Saba Kareem
2023-10-21 14:50 ` Syed Saba Kareem [this message]
2023-10-21 14:50 ` [PATCH 08/13] ASoC: amd: acp: add condition check for i2s clock generation Syed Saba Kareem
2023-10-21 14:50 ` [PATCH 09/13] ASoC: amd: acp: add machine driver support for pdm use case Syed Saba Kareem
2023-10-27  8:49   ` Krzysztof Kozlowski
     [not found]     ` <3ec97548-1f91-49d0-adfb-4f8051ca9a97@amd.com>
     [not found]       ` <f8f8017c-4e76-4d70-918f-d7cb45186184@kernel.org>
     [not found]         ` <c0ea139c-9861-4ea1-b547-6e3c380301b3@amd.com>
     [not found]           ` <ZTvkCAYsrS62/82u@finisterre.sirena.org.uk>
2023-10-27 17:32             ` syed saba kareem
2023-10-28  9:14               ` Krzysztof Kozlowski
2023-10-21 14:50 ` [PATCH 10/13] ASoC: amd: acp: change acp-deinit function arguments Syed Saba Kareem
2023-10-21 14:50 ` [PATCH 11/13] ASoC: amd: acp: change acp power on mask macro value Syed Saba Kareem
2023-10-21 14:50 ` [PATCH 12/13] ASoC: amd: acp: Add pci legacy driver support for acp7.0 platform Syed Saba Kareem
2023-10-23  7:50   ` Amadeusz Sławiński
2023-10-26 10:04     ` syed saba kareem
2023-10-21 14:50 ` [PATCH 13/13] ASoC: amd: acp: add machine driver support for acp7.0 Syed Saba Kareem
2023-10-23  8:01 ` [PATCH 01/13] ASoC: amd: acp: Add acp6.3 pci legacy driver support Krzysztof Kozlowski
     [not found]   ` <12c8c0f3-8364-4f25-976e-8cca29b5e17f@amd.com>
2023-10-26 15:00     ` Krzysztof Kozlowski
2023-10-25 16:50 ` Mark Brown
2023-10-26  9:44   ` syed saba kareem
2023-10-26 15:12 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231021145110.478744-7-Syed.SabaKareem@amd.com \
    --to=syed.sabakareem@amd.com \
    --cc=Basavaraj.Hiregoudar@amd.com \
    --cc=Sunil-kumar.Dommati@amd.com \
    --cc=Vijendar.Mukunda@amd.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=arungopal.kondaveeti@amd.com \
    --cc=broonie@kernel.org \
    --cc=dan.carpenter@linaro.org \
    --cc=juan.martinez@amd.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=mastan.katragadda@amd.com \
    --cc=nicolas.ferre@microchip.com \
    --cc=perex@perex.cz \
    --cc=posteuca@mutex.one \
    --cc=tiwai@suse.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=venkataprasad.potturu@amd.com \
    --cc=vsujithkumar.reddy@amd.com \
    --cc=yang.lee@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®