summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVijendar Mukunda <Vijendar.Mukunda@amd.com>2024-09-24 11:48:17 +0530
committerMark Brown <broonie@kernel.org>2024-09-30 01:10:38 +0200
commit0eae2c96b49d85b31ab635b9dc6f09b09d3c54de (patch)
treefff6c29351236decf882bfcfade4f0584528b0d4
parent40412a298c77eaa4a22a1aa7030bcc0b2e02c618 (diff)
ASoC: amd: acp: pass acp pci revision id as platform data
Pass acp pci revision id as platform data to machine driver instead of 'platform' variable when ACP PDM configuration is selected. 'acp_rev' should be retrieved from mach params revision id for other configuration. Modify the conditional check for the same. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20240924061821.1127054-6-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/amd/acp/acp-legacy-mach.c5
-rw-r--r--sound/soc/amd/acp/acp-platform.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/sound/soc/amd/acp/acp-legacy-mach.c b/sound/soc/amd/acp/acp-legacy-mach.c
index 2a59f7916e15..3526fbe2c84d 100644
--- a/sound/soc/amd/acp/acp-legacy-mach.c
+++ b/sound/soc/amd/acp/acp-legacy-mach.c
@@ -172,9 +172,10 @@ static int acp_asoc_probe(struct platform_device *pdev)
goto out;
}
if (!strcmp(pdev->name, "acp-pdm-mach"))
- acp_card_drvdata->platform = *((int *)dev->platform_data);
+ acp_card_drvdata->acp_rev = *((int *)dev->platform_data);
+ else
+ acp_card_drvdata->acp_rev = mach->mach_params.subsystem_rev;
- acp_card_drvdata->acp_rev = mach->mach_params.subsystem_rev;
dmi_id = dmi_first_match(acp_quirk_table);
if (dmi_id && dmi_id->driver_data)
acp_card_drvdata->tdm_mode = dmi_id->driver_data;
diff --git a/sound/soc/amd/acp/acp-platform.c b/sound/soc/amd/acp/acp-platform.c
index c772520227c7..a6e5cb263377 100644
--- a/sound/soc/amd/acp/acp-platform.c
+++ b/sound/soc/amd/acp/acp-platform.c
@@ -114,7 +114,7 @@ int acp_machine_select(struct acp_dev_data *adata)
int size, platform;
if (adata->flag == FLAG_AMD_LEGACY_ONLY_DMIC) {
- platform = adata->platform;
+ platform = adata->acp_rev;
adata->mach_dev = platform_device_register_data(adata->dev, "acp-pdm-mach",
PLATFORM_DEVID_NONE, &platform,
sizeof(platform));