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

From: Vijendar Mukunda

Date: Fri Oct 30 2026 - 05:51:34 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 979048e42424..46c3815a777f 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 0ae85165573d..c98d70a0d6ce 100644
--- a/sound/soc/amd/acp/soc_amd_sdw_common.h
+++ b/sound/soc/amd/acp/soc_amd_sdw_common.h
@@ -16,12 +16,15 @@
#include "acp-mach-common.h"

#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.53.0