lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231021145110.478744-7-Syed.SabaKareem@amd.com>
Date:   Sat, 21 Oct 2023 20:20:48 +0530
From:   Syed Saba Kareem <Syed.SabaKareem@....com>
To:     <broonie@...nel.org>, <alsa-devel@...a-project.org>
CC:     <Vijendar.Mukunda@....com>, <Basavaraj.Hiregoudar@....com>,
        <Sunil-kumar.Dommati@....com>, <mario.limonciello@....com>,
        <venkataprasad.potturu@....com>, <arungopal.kondaveeti@....com>,
        <mastan.katragadda@....com>, <juan.martinez@....com>,
        Syed Saba Kareem <Syed.SabaKareem@....com>,
        Liam Girdwood <lgirdwood@...il.com>,
        "Jaroslav Kysela" <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
        Nicolas Ferre <nicolas.ferre@...rochip.com>,
        Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>,
        Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>,
        Yang Li <yang.lee@...ux.alibaba.com>,
        "Dan Carpenter" <dan.carpenter@...aro.org>,
        Marian Postevca <posteuca@...ex.one>,
        "V Sujith Kumar Reddy" <vsujithkumar.reddy@....com>,
        open list <linux-kernel@...r.kernel.org>
Subject: [PATCH 07/13] ASoC: amd: acp: add platform and flag data to acp data structure

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@....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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ