Commit 57e85777 authored by Syed Saba Kareem's avatar Syed Saba Kareem Committed by Mark Brown

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: default avatarSyed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-7-Syed.SabaKareem@amd.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 3a94c8ad
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
#include <linux/pm_runtime.h> #include <linux/pm_runtime.h>
#include "amd.h" #include "amd.h"
#include "../mach-config.h"
#include "acp-mach.h"
#define DRV_NAME "acp_asoc_rembrandt" #define DRV_NAME "acp_asoc_rembrandt"
...@@ -226,7 +228,8 @@ static int rembrandt_audio_probe(struct platform_device *pdev) ...@@ -226,7 +228,8 @@ static int rembrandt_audio_probe(struct platform_device *pdev)
adata->dai_driver = acp_rmb_dai; adata->dai_driver = acp_rmb_dai;
adata->num_dai = ARRAY_SIZE(acp_rmb_dai); adata->num_dai = ARRAY_SIZE(acp_rmb_dai);
adata->rsrc = &rsrc; adata->rsrc = &rsrc;
adata->platform = REMBRANDT;
adata->flag = chip->flag;
adata->machines = snd_soc_acpi_amd_rmb_acp_machines; adata->machines = snd_soc_acpi_amd_rmb_acp_machines;
acp_machine_select(adata); acp_machine_select(adata);
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include "amd.h" #include "amd.h"
#include "acp-mach.h"
#define DRV_NAME "acp_asoc_renoir" #define DRV_NAME "acp_asoc_renoir"
...@@ -185,6 +186,8 @@ static int renoir_audio_probe(struct platform_device *pdev) ...@@ -185,6 +186,8 @@ static int renoir_audio_probe(struct platform_device *pdev)
adata->dai_driver = acp_renoir_dai; adata->dai_driver = acp_renoir_dai;
adata->num_dai = ARRAY_SIZE(acp_renoir_dai); adata->num_dai = ARRAY_SIZE(acp_renoir_dai);
adata->rsrc = &rsrc; adata->rsrc = &rsrc;
adata->platform = RENOIR;
adata->flag = chip->flag;
adata->machines = snd_soc_acpi_amd_acp_machines; adata->machines = snd_soc_acpi_amd_acp_machines;
acp_machine_select(adata); acp_machine_select(adata);
......
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
#include <linux/pm_runtime.h> #include <linux/pm_runtime.h>
#include <linux/pci.h> #include <linux/pci.h>
#include "amd.h" #include "amd.h"
#include "acp-mach.h"
#include "../mach-config.h"
#define DRV_NAME "acp_asoc_acp63" #define DRV_NAME "acp_asoc_acp63"
...@@ -237,6 +239,8 @@ static int acp63_audio_probe(struct platform_device *pdev) ...@@ -237,6 +239,8 @@ static int acp63_audio_probe(struct platform_device *pdev)
adata->dai_driver = acp63_dai; adata->dai_driver = acp63_dai;
adata->num_dai = ARRAY_SIZE(acp63_dai); adata->num_dai = ARRAY_SIZE(acp63_dai);
adata->rsrc = &rsrc; adata->rsrc = &rsrc;
adata->platform = ACP63;
adata->flag = chip->flag;
adata->machines = snd_soc_acpi_amd_acp63_acp_machines; adata->machines = snd_soc_acpi_amd_acp63_acp_machines;
acp_machine_select(adata); acp_machine_select(adata);
dev_set_drvdata(dev, adata); dev_set_drvdata(dev, adata);
......
...@@ -187,6 +187,8 @@ struct acp_dev_data { ...@@ -187,6 +187,8 @@ struct acp_dev_data {
u32 tdm_rx_fmt[3]; u32 tdm_rx_fmt[3];
u32 xfer_tx_resolution[3]; u32 xfer_tx_resolution[3];
u32 xfer_rx_resolution[3]; u32 xfer_rx_resolution[3];
unsigned int flag;
unsigned int platform;
}; };
enum acp_config { enum acp_config {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment