[PATCH 01/13] ASoC: amd: acp: add ACP7.B/7.F SoundWire link count for machine driver

From: Vijendar Mukunda

Date: Wed Oct 14 2026 - 06:20:45 EST


ACP7.B/7.F platforms expose four SoundWire managers, whereas earlier
platforms use two. Add PCI revision constants and ACP7X_SDW_MAX_LINKS
to soc_amd_sdw_common.h, and set max_sdw_links in mc_probe() based on
PCI revision so the machine driver validates DAI links against the
correct manager count.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@xxxxxxx>
---
sound/soc/amd/acp/acp-sdw-sof-mach.c | 10 +++++++++-
sound/soc/amd/acp/soc_amd_sdw_common.h | 3 +++
2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/sound/soc/amd/acp/acp-sdw-sof-mach.c b/sound/soc/amd/acp/acp-sdw-sof-mach.c
index ec3e1f5f1052c..ad8a024321dfa 100644
--- a/sound/soc/amd/acp/acp-sdw-sof-mach.c
+++ b/sound/soc/amd/acp/acp-sdw-sof-mach.c
@@ -382,7 +382,15 @@ static int mc_probe(struct platform_device *pdev)
return -ENOMEM;

amd_ctx->acp_rev = mach->mach_params.subsystem_rev;
- amd_ctx->max_sdw_links = ACP63_SDW_MAX_LINKS;
+ switch (amd_ctx->acp_rev) {
+ case ACP7B_PCI_REV:
+ case ACP7F_PCI_REV:
+ amd_ctx->max_sdw_links = ACP7X_SDW_MAX_LINKS;
+ break;
+ default:
+ amd_ctx->max_sdw_links = ACP63_SDW_MAX_LINKS;
+ break;
+ }
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
if (!ctx)
return -ENOMEM;
diff --git a/sound/soc/amd/acp/soc_amd_sdw_common.h b/sound/soc/amd/acp/soc_amd_sdw_common.h
index 034c9ab6e4ea6..5b9410eff56eb 100644
--- a/sound/soc/amd/acp/soc_amd_sdw_common.h
+++ b/sound/soc/amd/acp/soc_amd_sdw_common.h
@@ -17,12 +17,15 @@

#define ACP63_SDW_MAX_CPU_DAIS 8
#define ACP63_SDW_MAX_LINKS 2
+#define ACP7X_SDW_MAX_LINKS 4

#define AMD_SDW_MAX_GROUPS 9
#define ACP63_PCI_REV 0x63
#define ACP70_PCI_REV 0x70
#define ACP71_PCI_REV 0x71
#define ACP72_PCI_REV 0x72
+#define ACP7B_PCI_REV 0x7b
+#define ACP7F_PCI_REV 0x7f

#define SOC_JACK_JDSRC(quirk) ((quirk) & GENMASK(3, 0))
#define ASOC_SDW_FOUR_SPK BIT(4)
--
2.48.1