mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 00/13] ASoC: amd: acp: ACP7.B/7.F SoundWire machine driver support
@ 2026-10-23  6:50 Vijendar Mukunda
  2026-10-23  6:50 ` [PATCH v3 01/13] ASoC: amd: acp: add ACP7.B/7.F SoundWire link count for machine driver Vijendar Mukunda
                   ` (12 more replies)
  0 siblings, 13 replies; 19+ messages in thread
From: Vijendar Mukunda @ 2026-10-23  6:50 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, lgirdwood, perex, tiwai, pierre-louis.bossart,
	yung-chuan.liao, Basavaraj.Hiregoudar, Sunil-kumar.Dommati,
	venkataprasad.potturu, Syed.SabaKareem, Mario.Limonciello,
	Richard.Gong, Vijendar.Mukunda, Poojitha.N, linux-sound,
	linux-kernel, sound-open-firmware

This series adds SoundWire machine driver support for ACP7.B and ACP7.F
platforms. It extends the existing AMD ACP SoundWire infrastructure with
per-platform CPU pin ID lookup, PDM controller selection via ACPI and DMI
quirks, DMIC DAI link and components string handling, PCI subsystem ID
propagation, and ACPI machine tables for RT721/RT722/RT1320 codec
configurations on both platforms.

Changes in v3:
  - Patch 3: update subject and changelog to accurately describe the new
    PDM controller selection infrastructure being added, as pointed out
    by Sashiko review tool.
  - Patch 5: fix commit subject prefix from "amd: acp7x:" to "amd: acp:"
    since the change is in the generic ACP SoundWire machine driver
    (acp-sdw-sof-mach.c), not the ACP7x-specific SOF driver.

Changes in v2:
  - Patch 6: simplify the DMIC enable condition as suggested by Pierre:
    evaluate the three-way boolean once and nest the ignore_internal_dmic
    check inside, avoiding the double-tested condition from v1.

Vijendar Mukunda (13):
  ASoC: amd: acp: add ACP7.B/7.F SoundWire link count for machine driver
  ASoC: amd: acp: add ACP7.B/7.F SoundWire DAI link support
  ASoC: amd: acp: add PDM controller selection for ACP7.B/7.F SoundWire
    machine driver
  ASoC: amd: acp: log ASOC_SDW_ACP_DMIC1 quirk in SOF SoundWire machine
    driver
  ASoC: amd: acp: enable DMIC DAI link based on PDM controller selection
  ASoC: amd: acp: move ignore_internal_dmic gate to DMIC enable
    condition
  ASoC: amd: acp: add DMIC components string for SOF SoundWire machine
    driver
  ASoC: amd: acp: set PCI subsystem ID for SOF SoundWire machine driver
  ASoC: amd: acp: fix MODULE_AUTHOR missing closing angle bracket
  ASoC: amd: acp: add ACPI machine tables for ACP7.F SoundWire
  ASoC: SOF: amd: add alt_machines for ACP7.F SOF SoundWire
  ASoC: amd: acp: add SoundWire machine table for ACP7.B platform
  ASoC: SOF: amd: register SoundWire alt_machines for ACP7.B

 sound/soc/amd/acp/Makefile               |   2 +-
 sound/soc/amd/acp/acp-sdw-mach-common.c  |  36 +++++
 sound/soc/amd/acp/acp-sdw-sof-mach.c     | 103 ++++++++++--
 sound/soc/amd/acp/amd-acp7x-acpi-match.c | 198 +++++++++++++++++++++++
 sound/soc/amd/acp/soc_amd_sdw_common.h   |  32 ++++
 sound/soc/amd/mach-config.h              |   2 +
 sound/soc/sof/amd/pci-acp7x.c            |   2 +
 7 files changed, 361 insertions(+), 14 deletions(-)
 create mode 100644 sound/soc/amd/acp/amd-acp7x-acpi-match.c

-- 
2.48.1

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v3 01/13] ASoC: amd: acp: add ACP7.B/7.F SoundWire link count for machine driver
  2026-10-23  6:50 [PATCH v3 00/13] ASoC: amd: acp: ACP7.B/7.F SoundWire machine driver support Vijendar Mukunda
@ 2026-10-23  6:50 ` Vijendar Mukunda
  2026-10-25 20:59   ` Pierre-Louis Bossart
  2026-10-23  6:50 ` [PATCH v3 02/13] ASoC: amd: acp: add ACP7.B/7.F SoundWire DAI link support Vijendar Mukunda
                   ` (11 subsequent siblings)
  12 siblings, 1 reply; 19+ messages in thread
From: Vijendar Mukunda @ 2026-10-23  6:50 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, lgirdwood, perex, tiwai, pierre-louis.bossart,
	yung-chuan.liao, Basavaraj.Hiregoudar, Sunil-kumar.Dommati,
	venkataprasad.potturu, Syed.SabaKareem, Mario.Limonciello,
	Richard.Gong, Vijendar.Mukunda, Poojitha.N, linux-sound,
	linux-kernel, sound-open-firmware

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


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v3 02/13] ASoC: amd: acp: add ACP7.B/7.F SoundWire DAI link support
  2026-10-23  6:50 [PATCH v3 00/13] ASoC: amd: acp: ACP7.B/7.F SoundWire machine driver support Vijendar Mukunda
  2026-10-23  6:50 ` [PATCH v3 01/13] ASoC: amd: acp: add ACP7.B/7.F SoundWire link count for machine driver Vijendar Mukunda
@ 2026-10-23  6:50 ` Vijendar Mukunda
  2026-10-25 21:11   ` Pierre-Louis Bossart
  2026-10-23  6:50 ` [PATCH v3 03/13] ASoC: amd: acp: add PDM controller selection for ACP7.B/7.F SoundWire machine driver Vijendar Mukunda
                   ` (10 subsequent siblings)
  12 siblings, 1 reply; 19+ messages in thread
From: Vijendar Mukunda @ 2026-10-23  6:50 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, lgirdwood, perex, tiwai, pierre-louis.bossart,
	yung-chuan.liao, Basavaraj.Hiregoudar, Sunil-kumar.Dommati,
	venkataprasad.potturu, Syed.SabaKareem, Mario.Limonciello,
	Richard.Gong, Vijendar.Mukunda, Poojitha.N, linux-sound,
	linux-kernel, sound-open-firmware

Add CPU pin ID lookup and SoundWire DAI link support for ACP7.B/7.F
platforms with up to 4 SoundWire managers.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
---
 sound/soc/amd/acp/acp-sdw-mach-common.c | 36 +++++++++++++++++++++++++
 sound/soc/amd/acp/acp-sdw-sof-mach.c    |  7 +++++
 sound/soc/amd/acp/soc_amd_sdw_common.h  | 26 ++++++++++++++++++
 3 files changed, 69 insertions(+)

diff --git a/sound/soc/amd/acp/acp-sdw-mach-common.c b/sound/soc/amd/acp/acp-sdw-mach-common.c
index e5f394dc2f4c0..ae6d026d8e0fa 100644
--- a/sound/soc/amd/acp/acp-sdw-mach-common.c
+++ b/sound/soc/amd/acp/acp-sdw-mach-common.c
@@ -93,6 +93,42 @@ int get_acp70_cpu_pin_id(u32 sdw_link_id, int be_id, int *cpu_pin_id, struct dev
 }
 EXPORT_SYMBOL_NS_GPL(get_acp70_cpu_pin_id, "SND_SOC_AMD_SDW_MACH");
 
+int get_acp7x_cpu_pin_id(u32 sdw_link_id, int be_id, int *cpu_pin_id, struct device *dev)
+{
+	switch (sdw_link_id) {
+	case AMD_SDW0:
+	case AMD_SDW1:
+	case AMD_SDW2:
+	case AMD_SDW3:
+		switch (be_id) {
+		case SOC_SDW_JACK_OUT_DAI_ID:
+			*cpu_pin_id = ACP7X_SW_AUDIO0_TX;
+			break;
+		case SOC_SDW_JACK_IN_DAI_ID:
+			*cpu_pin_id = ACP7X_SW_AUDIO0_RX;
+			break;
+		case SOC_SDW_AMP_OUT_DAI_ID:
+			*cpu_pin_id = ACP7X_SW_AUDIO4_TX;
+			break;
+		case SOC_SDW_AMP_IN_DAI_ID:
+			*cpu_pin_id = ACP7X_SW_AUDIO4_RX;
+			break;
+		case SOC_SDW_DMIC_DAI_ID:
+			*cpu_pin_id = ACP7X_SW_AUDIO5_RX;
+			break;
+		default:
+			dev_err(dev, "Invalid be id:%d\n", be_id);
+			return -EINVAL;
+		}
+		break;
+	default:
+		return -EINVAL;
+	}
+	dev_dbg(dev, "sdw_link_id:%d, be_id:%d, cpu_pin_id:%d\n", sdw_link_id, be_id, *cpu_pin_id);
+	return 0;
+}
+EXPORT_SYMBOL_NS_GPL(get_acp7x_cpu_pin_id, "SND_SOC_AMD_SDW_MACH");
+
 MODULE_DESCRIPTION("AMD SoundWire Common Machine driver");
 MODULE_AUTHOR("Vijendar Mukunda <Vijendar.Mukunda@amd.com>");
 MODULE_LICENSE("GPL");
diff --git a/sound/soc/amd/acp/acp-sdw-sof-mach.c b/sound/soc/amd/acp/acp-sdw-sof-mach.c
index ad8a024321dfa..6855141293e34 100644
--- a/sound/soc/amd/acp/acp-sdw-sof-mach.c
+++ b/sound/soc/amd/acp/acp-sdw-sof-mach.c
@@ -145,6 +145,13 @@ static int create_sdw_dailink(struct snd_soc_card *card,
 			if (ret)
 				return ret;
 			break;
+		case ACP7B_PCI_REV:
+		case ACP7F_PCI_REV:
+			ret = get_acp7x_cpu_pin_id(ffs(sof_end->link_mask) - 1,
+						   *be_id, &cpu_pin_id, dev);
+			if (ret)
+				return ret;
+			break;
 		default:
 			return -EINVAL;
 		}
diff --git a/sound/soc/amd/acp/soc_amd_sdw_common.h b/sound/soc/amd/acp/soc_amd_sdw_common.h
index 5b9410eff56eb..9e4c86bed3003 100644
--- a/sound/soc/amd/acp/soc_amd_sdw_common.h
+++ b/sound/soc/amd/acp/soc_amd_sdw_common.h
@@ -34,6 +34,8 @@
 
 #define AMD_SDW0	0
 #define AMD_SDW1	1
+#define AMD_SDW2	2
+#define AMD_SDW3	3
 #define ACP63_SW0_AUDIO0_TX	0
 #define ACP63_SW0_AUDIO1_TX	1
 #define ACP63_SW0_AUDIO2_TX	2
@@ -55,6 +57,29 @@
 #define ACP70_SW_AUDIO1_RX	4
 #define ACP70_SW_AUDIO2_RX	5
 
+/* ACP7.B/7.F SoundWire CPU pin IDs */
+#define ACP7X_SW_AUDIO0_TX	0
+#define ACP7X_SW_AUDIO1_TX	1
+#define ACP7X_SW_AUDIO2_TX	2
+#define ACP7X_SW_AUDIO3_TX	3
+#define ACP7X_SW_AUDIO4_TX	4
+#define ACP7X_SW_AUDIO5_TX	5
+#define ACP7X_SW_AUDIO6_TX	6
+#define ACP7X_SW_AUDIO7_TX	7
+#define ACP7X_SW_AUDIO8_TX	8
+#define ACP7X_SW_AUDIO9_TX	9
+#define ACP7X_SW_AUDIO10_TX	10
+
+#define ACP7X_SW_AUDIO0_RX	11
+#define ACP7X_SW_AUDIO1_RX	12
+#define ACP7X_SW_AUDIO2_RX	13
+#define ACP7X_SW_AUDIO3_RX	14
+#define ACP7X_SW_AUDIO4_RX	15
+#define ACP7X_SW_AUDIO5_RX	16
+#define ACP7X_SW_AUDIO6_RX	17
+#define ACP7X_SW_AUDIO7_RX	18
+#define ACP7X_SW_AUDIO8_RX	19
+
 struct amd_mc_ctx {
 	unsigned int acp_rev;
 	unsigned int max_sdw_links;
@@ -62,5 +87,6 @@ struct amd_mc_ctx {
 
 int get_acp63_cpu_pin_id(u32 sdw_link_id, int be_id, int *cpu_pin_id, struct device *dev);
 int get_acp70_cpu_pin_id(u32 sdw_link_id, int be_id, int *cpu_pin_id, struct device *dev);
+int get_acp7x_cpu_pin_id(u32 sdw_link_id, int be_id, int *cpu_pin_id, struct device *dev);
 
 #endif
-- 
2.48.1


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v3 03/13] ASoC: amd: acp: add PDM controller selection for ACP7.B/7.F SoundWire machine driver
  2026-10-23  6:50 [PATCH v3 00/13] ASoC: amd: acp: ACP7.B/7.F SoundWire machine driver support Vijendar Mukunda
  2026-10-23  6:50 ` [PATCH v3 01/13] ASoC: amd: acp: add ACP7.B/7.F SoundWire link count for machine driver Vijendar Mukunda
  2026-10-23  6:50 ` [PATCH v3 02/13] ASoC: amd: acp: add ACP7.B/7.F SoundWire DAI link support Vijendar Mukunda
@ 2026-10-23  6:50 ` Vijendar Mukunda
  2026-10-23  6:50 ` [PATCH v3 04/13] ASoC: amd: acp: log ASOC_SDW_ACP_DMIC1 quirk in SOF " Vijendar Mukunda
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 19+ messages in thread
From: Vijendar Mukunda @ 2026-10-23  6:50 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, lgirdwood, perex, tiwai, pierre-louis.bossart,
	yung-chuan.liao, Basavaraj.Hiregoudar, Sunil-kumar.Dommati,
	venkataprasad.potturu, Syed.SabaKareem, Mario.Limonciello,
	Richard.Gong, Vijendar.Mukunda, Poojitha.N, linux-sound,
	linux-kernel, sound-open-firmware

Add ASOC_SDW_ACP_DMIC1 quirk bit (BIT(6)) and pdm_sel field to
amd_mc_ctx to support per-controller DMIC DAI selection on ACP7.B/7.F
platforms.

In mc_probe(), read the active PDM controller from mach->pdata
(populated via ACPI acp-audio-ep-port _DSD). When ACPI does not set
pdm_sel, derive it from the quirk bits after dmi_check_system() and
quirk_override are applied: ASOC_SDW_ACP_DMIC1 selects DMIC1;
ASOC_SDW_ACP_DMIC selects DMIC0. Since only one PDM controller is
active at a time, DMIC1 is checked first.

In create_dmic_dailinks(), select the SOF CPU DAI name based on
pdm_sel: "acp-sof-dmic1" for ACP7X_PDM_DMIC1, "acp-sof-dmic0"
otherwise on ACP7.B/7.F; all other platforms use "acp-sof-dmic".

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
---
 sound/soc/amd/acp/acp-sdw-sof-mach.c   | 44 +++++++++++++++++++++++++-
 sound/soc/amd/acp/soc_amd_sdw_common.h |  3 ++
 2 files changed, 46 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 6855141293e34..afc5ac679ce37 100644
--- a/sound/soc/amd/acp/acp-sdw-sof-mach.c
+++ b/sound/soc/amd/acp/acp-sdw-sof-mach.c
@@ -265,11 +265,31 @@ static int create_dmic_dailinks(struct snd_soc_card *card,
 				struct snd_soc_dai_link **dai_links, int *be_id, int no_pcm)
 {
 	struct device *dev = card->dev;
+	struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card);
+	struct amd_mc_ctx *amd_ctx = (struct amd_mc_ctx *)ctx->private;
+	const char *cpu_dai_name;
 	int ret;
 
+	/*
+	 * For ACP7.B/7.F platforms the PDM controller is selected from ACPI
+	 * acp-audio-ep-port and stored in amd_ctx->pdm_sel. Use the
+	 * matching SOF DAI name ("acp-sof-dmic0" or "acp-sof-dmic1").
+	 * All other platforms use the generic "acp-sof-dmic" DAI.
+	 */
+	switch (amd_ctx->acp_rev) {
+	case ACP7B_PCI_REV:
+	case ACP7F_PCI_REV:
+		cpu_dai_name = (amd_ctx->pdm_sel == ACP7X_PDM_DMIC1) ?
+				"acp-sof-dmic1" : "acp-sof-dmic0";
+		break;
+	default:
+		cpu_dai_name = "acp-sof-dmic";
+		break;
+	}
+
 	ret = asoc_sdw_init_simple_dai_link(dev, *dai_links, be_id, "acp-dmic-codec",
 					    0, 1, // DMIC only supports capture
-					    "acp-sof-dmic", platform_component->name,
+					    cpu_dai_name, platform_component->name,
 					    "dmic-codec", "dmic-hifi", no_pcm,
 					    asoc_sdw_dmic_init, NULL);
 	if (ret)
@@ -378,6 +398,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card)
 static int mc_probe(struct platform_device *pdev)
 {
 	struct snd_soc_acpi_mach *mach = dev_get_platdata(&pdev->dev);
+	struct amd_pdm_pdata *pdm_pdata;
 	struct snd_soc_card *card;
 	struct amd_mc_ctx *amd_ctx;
 	struct asoc_sdw_mc_private *ctx;
@@ -398,6 +419,10 @@ static int mc_probe(struct platform_device *pdev)
 		amd_ctx->max_sdw_links = ACP63_SDW_MAX_LINKS;
 		break;
 	}
+	if (mach->pdata) {
+		pdm_pdata = mach->pdata;
+		amd_ctx->pdm_sel = pdm_pdata->pdm_sel;
+	}
 	ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
 	if (!ctx)
 		return -ENOMEM;
@@ -419,6 +444,23 @@ static int mc_probe(struct platform_device *pdev)
 		sof_sdw_quirk = quirk_override;
 	}
 
+	/*
+	 * If ACPI did not set pdm_sel (no acp-audio-ep-port in _DSD), derive
+	 * it from the quirk bits. ACPI takes priority: quirks are only
+	 * consulted when pdm_sel is still zero. PDM controller selection is
+	 * only meaningful on ACP7B/7F platforms.
+	 * ASOC_SDW_ACP_DMIC selects DMIC0 (default); ASOC_SDW_ACP_DMIC1
+	 * overrides to DMIC1.
+	 */
+	if (!amd_ctx->pdm_sel &&
+	    (amd_ctx->acp_rev == ACP7B_PCI_REV ||
+	     amd_ctx->acp_rev == ACP7F_PCI_REV)) {
+		if (sof_sdw_quirk & ASOC_SDW_ACP_DMIC1)
+			amd_ctx->pdm_sel = ACP7X_PDM_DMIC1;
+		else if (sof_sdw_quirk & ASOC_SDW_ACP_DMIC)
+			amd_ctx->pdm_sel = ACP7X_PDM_DMIC0;
+	}
+
 	log_quirks(&pdev->dev);
 
 	ctx->mc_quirk = sof_sdw_quirk;
diff --git a/sound/soc/amd/acp/soc_amd_sdw_common.h b/sound/soc/amd/acp/soc_amd_sdw_common.h
index 9e4c86bed3003..86c8e38a19bb1 100644
--- a/sound/soc/amd/acp/soc_amd_sdw_common.h
+++ b/sound/soc/amd/acp/soc_amd_sdw_common.h
@@ -30,6 +30,7 @@
 #define SOC_JACK_JDSRC(quirk)		((quirk) & GENMASK(3, 0))
 #define ASOC_SDW_FOUR_SPK		BIT(4)
 #define ASOC_SDW_ACP_DMIC		BIT(5)
+#define ASOC_SDW_ACP_DMIC1		BIT(6)	/* select DMIC1 controller for ACP7.B/7.F */
 #define ASOC_SDW_CODEC_SPKR		BIT(15)
 
 #define AMD_SDW0	0
@@ -83,6 +84,8 @@
 struct amd_mc_ctx {
 	unsigned int acp_rev;
 	unsigned int max_sdw_links;
+	/* PDM controller selection, copied from amd_pdm_pdata at probe time */
+	unsigned int pdm_sel;
 };
 
 int get_acp63_cpu_pin_id(u32 sdw_link_id, int be_id, int *cpu_pin_id, struct device *dev);
-- 
2.48.1


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v3 04/13] ASoC: amd: acp: log ASOC_SDW_ACP_DMIC1 quirk in SOF SoundWire machine driver
  2026-10-23  6:50 [PATCH v3 00/13] ASoC: amd: acp: ACP7.B/7.F SoundWire machine driver support Vijendar Mukunda
                   ` (2 preceding siblings ...)
  2026-10-23  6:50 ` [PATCH v3 03/13] ASoC: amd: acp: add PDM controller selection for ACP7.B/7.F SoundWire machine driver Vijendar Mukunda
@ 2026-10-23  6:50 ` Vijendar Mukunda
  2026-10-23  6:50 ` [PATCH v3 05/13] ASoC: amd: acp: enable DMIC DAI link based on PDM controller selection Vijendar Mukunda
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 19+ messages in thread
From: Vijendar Mukunda @ 2026-10-23  6:50 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, lgirdwood, perex, tiwai, pierre-louis.bossart,
	yung-chuan.liao, Basavaraj.Hiregoudar, Sunil-kumar.Dommati,
	venkataprasad.potturu, Syed.SabaKareem, Mario.Limonciello,
	Richard.Gong, Vijendar.Mukunda, Poojitha.N, linux-sound,
	linux-kernel, sound-open-firmware

Add ASOC_SDW_ACP_DMIC1 to log_quirks() so the active PDM controller
selection is visible in boot-time diagnostics alongside the other
ACP quirk bits.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
---
 sound/soc/amd/acp/acp-sdw-sof-mach.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/amd/acp/acp-sdw-sof-mach.c b/sound/soc/amd/acp/acp-sdw-sof-mach.c
index afc5ac679ce37..40df873ec024e 100644
--- a/sound/soc/amd/acp/acp-sdw-sof-mach.c
+++ b/sound/soc/amd/acp/acp-sdw-sof-mach.c
@@ -28,6 +28,8 @@ static void log_quirks(struct device *dev)
 			SOC_JACK_JDSRC(sof_sdw_quirk));
 	if (sof_sdw_quirk & ASOC_SDW_ACP_DMIC)
 		dev_dbg(dev, "quirk SOC_SDW_ACP_DMIC enabled\n");
+	if (sof_sdw_quirk & ASOC_SDW_ACP_DMIC1)
+		dev_dbg(dev, "quirk ASOC_SDW_ACP_DMIC1 enabled\n");
 }
 
 static int sof_sdw_quirk_cb(const struct dmi_system_id *id)
-- 
2.48.1


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v3 05/13] ASoC: amd: acp: enable DMIC DAI link based on PDM controller selection
  2026-10-23  6:50 [PATCH v3 00/13] ASoC: amd: acp: ACP7.B/7.F SoundWire machine driver support Vijendar Mukunda
                   ` (3 preceding siblings ...)
  2026-10-23  6:50 ` [PATCH v3 04/13] ASoC: amd: acp: log ASOC_SDW_ACP_DMIC1 quirk in SOF " Vijendar Mukunda
@ 2026-10-23  6:50 ` Vijendar Mukunda
  2026-10-23  6:50 ` [PATCH v3 06/13] ASoC: amd: acp: move ignore_internal_dmic gate to DMIC enable condition Vijendar Mukunda
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 19+ messages in thread
From: Vijendar Mukunda @ 2026-10-23  6:50 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, lgirdwood, perex, tiwai, pierre-louis.bossart,
	yung-chuan.liao, Basavaraj.Hiregoudar, Sunil-kumar.Dommati,
	venkataprasad.potturu, Syed.SabaKareem, Mario.Limonciello,
	Richard.Gong, Vijendar.Mukunda, Poojitha.N, linux-sound,
	linux-kernel, sound-open-firmware

Extend the DMIC DAI link enable condition in sof_card_dai_links_create()
to also check amd_ctx->pdm_sel. On ACP7.B/7.F platforms the PDM
controller is selected via ACPI rather than a DMI quirk, so
ASOC_SDW_ACP_DMIC may not be set. Enabling the DMIC link when
amd_ctx->pdm_sel is non-zero ensures the link is created whenever
a valid PDM controller has been identified from ACPI _DSD.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
---
 sound/soc/amd/acp/acp-sdw-sof-mach.c | 4 +++-
 1 file changed, 3 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 40df873ec024e..6848b966c6eb4 100644
--- a/sound/soc/amd/acp/acp-sdw-sof-mach.c
+++ b/sound/soc/amd/acp/acp-sdw-sof-mach.c
@@ -308,6 +308,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card)
 	struct snd_soc_acpi_mach *mach = dev_get_platdata(card->dev);
 	int sdw_be_num = 0, dmic_num = 0;
 	struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card);
+	struct amd_mc_ctx *amd_ctx = (struct amd_mc_ctx *)ctx->private;
 	struct snd_soc_acpi_mach_params *mach_params = &mach->mach_params;
 	struct snd_soc_aux_dev *sof_aux;
 	struct snd_soc_codec_conf *codec_conf;
@@ -350,7 +351,8 @@ static int sof_card_dai_links_create(struct snd_soc_card *card)
 	sdw_be_num = ret;
 
 	/* enable dmic */
-	if (sof_sdw_quirk & ASOC_SDW_ACP_DMIC || mach_params->dmic_num)
+	if (sof_sdw_quirk & ASOC_SDW_ACP_DMIC || mach_params->dmic_num ||
+	    amd_ctx->pdm_sel)
 		dmic_num = 1;
 
 	dev_dbg(dev, "sdw %d, dmic %d", sdw_be_num, dmic_num);
-- 
2.48.1


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v3 06/13] ASoC: amd: acp: move ignore_internal_dmic gate to DMIC enable condition
  2026-10-23  6:50 [PATCH v3 00/13] ASoC: amd: acp: ACP7.B/7.F SoundWire machine driver support Vijendar Mukunda
                   ` (4 preceding siblings ...)
  2026-10-23  6:50 ` [PATCH v3 05/13] ASoC: amd: acp: enable DMIC DAI link based on PDM controller selection Vijendar Mukunda
@ 2026-10-23  6:50 ` Vijendar Mukunda
  2026-10-23  6:50 ` [PATCH v3 07/13] ASoC: amd: acp: add DMIC components string for SOF SoundWire machine driver Vijendar Mukunda
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 19+ messages in thread
From: Vijendar Mukunda @ 2026-10-23  6:50 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, lgirdwood, perex, tiwai, pierre-louis.bossart,
	yung-chuan.liao, Basavaraj.Hiregoudar, Sunil-kumar.Dommati,
	venkataprasad.potturu, Syed.SabaKareem, Mario.Limonciello,
	Richard.Gong, Vijendar.Mukunda, Poojitha.N, linux-sound,
	linux-kernel, sound-open-firmware

Move the ignore_internal_dmic check from inside the dmic_num > 0 block
to the DMIC enable condition itself. This eliminates the dead if/else
inside the dmic_num > 0 block - when dmic_num is set,
create_dmic_dailinks() is always called. Demote the suppression message
from dev_warn to dev_dbg since ignoring the ACP DMIC in favour of a
SoundWire DMIC codec is expected behaviour, not a warning condition.

No functional change for platforms without a SoundWire DMIC codec.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
---
 sound/soc/amd/acp/acp-sdw-sof-mach.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/sound/soc/amd/acp/acp-sdw-sof-mach.c b/sound/soc/amd/acp/acp-sdw-sof-mach.c
index 6848b966c6eb4..5c201d0b3bef9 100644
--- a/sound/soc/amd/acp/acp-sdw-sof-mach.c
+++ b/sound/soc/amd/acp/acp-sdw-sof-mach.c
@@ -352,8 +352,12 @@ static int sof_card_dai_links_create(struct snd_soc_card *card)
 
 	/* enable dmic */
 	if (sof_sdw_quirk & ASOC_SDW_ACP_DMIC || mach_params->dmic_num ||
-	    amd_ctx->pdm_sel)
-		dmic_num = 1;
+	    amd_ctx->pdm_sel) {
+		if (ctx->ignore_internal_dmic)
+			dev_dbg(dev, "ACP DMIC suppressed by SoundWire DMIC\n");
+		else
+			dmic_num = 1;
+	}
 
 	dev_dbg(dev, "sdw %d, dmic %d", sdw_be_num, dmic_num);
 
@@ -384,13 +388,9 @@ static int sof_card_dai_links_create(struct snd_soc_card *card)
 
 	/* dmic */
 	if (dmic_num > 0) {
-		if (ctx->ignore_internal_dmic) {
-			dev_warn(dev, "Ignoring ACP DMIC\n");
-		} else {
-			ret = create_dmic_dailinks(card, &dai_links, &be_id, 1);
-			if (ret)
-				return ret;
-		}
+		ret = create_dmic_dailinks(card, &dai_links, &be_id, 1);
+		if (ret)
+			return ret;
 	}
 
 	WARN_ON(codec_conf != card->codec_conf + card->num_configs);
-- 
2.48.1


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v3 07/13] ASoC: amd: acp: add DMIC components string for SOF SoundWire machine driver
  2026-10-23  6:50 [PATCH v3 00/13] ASoC: amd: acp: ACP7.B/7.F SoundWire machine driver support Vijendar Mukunda
                   ` (5 preceding siblings ...)
  2026-10-23  6:50 ` [PATCH v3 06/13] ASoC: amd: acp: move ignore_internal_dmic gate to DMIC enable condition Vijendar Mukunda
@ 2026-10-23  6:50 ` Vijendar Mukunda
  2026-10-23  6:50 ` [PATCH v3 08/13] ASoC: amd: acp: set PCI subsystem ID " Vijendar Mukunda
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 19+ messages in thread
From: Vijendar Mukunda @ 2026-10-23  6:50 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, lgirdwood, perex, tiwai, pierre-louis.bossart,
	yung-chuan.liao, Basavaraj.Hiregoudar, Sunil-kumar.Dommati,
	venkataprasad.potturu, Syed.SabaKareem, Mario.Limonciello,
	Richard.Gong, Vijendar.Mukunda, Poojitha.N, linux-sound,
	linux-kernel, sound-open-firmware

Append "mic:acp-dmic cfg-mics:N" to card->components in mc_probe()
when a DMIC DAI link will be registered, keeping the components string
consistent with what sof_card_dai_links_create() actually creates.

Gate on the same three-way condition used in sof_card_dai_links_create()
(ASOC_SDW_ACP_DMIC quirk, mach_params->dmic_num, or amd_ctx->pdm_sel)
and suppress when ctx->ignore_internal_dmic is set. Use
mach_params->dmic_num for the mic count when platform-reported; fall
back to 1 for quirk and pdm_sel paths.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
---
 sound/soc/amd/acp/acp-sdw-sof-mach.c | 13 ++++++++++++-
 1 file 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 5c201d0b3bef9..4c171e52410a6 100644
--- a/sound/soc/amd/acp/acp-sdw-sof-mach.c
+++ b/sound/soc/amd/acp/acp-sdw-sof-mach.c
@@ -406,7 +406,7 @@ static int mc_probe(struct platform_device *pdev)
 	struct snd_soc_card *card;
 	struct amd_mc_ctx *amd_ctx;
 	struct asoc_sdw_mc_private *ctx;
-	int amp_num = 0, i;
+	int amp_num = 0, i, dmic_num;
 	int ret;
 
 	amd_ctx = devm_kzalloc(&pdev->dev, sizeof(*amd_ctx), GFP_KERNEL);
@@ -489,6 +489,17 @@ static int mc_probe(struct platform_device *pdev)
 	if (!card->components)
 		return -ENOMEM;
 
+	if ((sof_sdw_quirk & ASOC_SDW_ACP_DMIC || mach->mach_params.dmic_num ||
+	     amd_ctx->pdm_sel) && !ctx->ignore_internal_dmic) {
+		dmic_num = mach->mach_params.dmic_num ? mach->mach_params.dmic_num : 1;
+		card->components = devm_kasprintf(&pdev->dev, GFP_KERNEL,
+						  "%s mic:acp-dmic cfg-mics:%d",
+						  card->components,
+						  dmic_num);
+		if (!card->components)
+			return -ENOMEM;
+	}
+
 	/* Register the card */
 	ret = devm_snd_soc_register_card(&pdev->dev, card);
 	if (ret) {
-- 
2.48.1


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v3 08/13] ASoC: amd: acp: set PCI subsystem ID for SOF SoundWire machine driver
  2026-10-23  6:50 [PATCH v3 00/13] ASoC: amd: acp: ACP7.B/7.F SoundWire machine driver support Vijendar Mukunda
                   ` (6 preceding siblings ...)
  2026-10-23  6:50 ` [PATCH v3 07/13] ASoC: amd: acp: add DMIC components string for SOF SoundWire machine driver Vijendar Mukunda
@ 2026-10-23  6:50 ` Vijendar Mukunda
  2026-10-23  6:50 ` [PATCH v3 09/13] ASoC: amd: acp: fix MODULE_AUTHOR missing closing angle bracket Vijendar Mukunda
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 19+ messages in thread
From: Vijendar Mukunda @ 2026-10-23  6:50 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, lgirdwood, perex, tiwai, pierre-louis.bossart,
	yung-chuan.liao, Basavaraj.Hiregoudar, Sunil-kumar.Dommati,
	venkataprasad.potturu, Syed.SabaKareem, Mario.Limonciello,
	Richard.Gong, Vijendar.Mukunda, Poojitha.N, linux-sound,
	linux-kernel, sound-open-firmware

Call snd_soc_card_set_pci_ssid() when subsystem_id_set is indicated
in the machine params, propagating the PCI subsystem vendor and device
IDs to the ALSA card for correct device identification on ACP
SoundWire platforms.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
---
 sound/soc/amd/acp/acp-sdw-sof-mach.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sound/soc/amd/acp/acp-sdw-sof-mach.c b/sound/soc/amd/acp/acp-sdw-sof-mach.c
index 4c171e52410a6..1013f60b2818a 100644
--- a/sound/soc/amd/acp/acp-sdw-sof-mach.c
+++ b/sound/soc/amd/acp/acp-sdw-sof-mach.c
@@ -440,6 +440,11 @@ static int mc_probe(struct platform_device *pdev)
 
 	snd_soc_card_set_drvdata(card, ctx);
 
+	if (mach->mach_params.subsystem_id_set)
+		snd_soc_card_set_pci_ssid(card,
+					  mach->mach_params.subsystem_vendor,
+					  mach->mach_params.subsystem_device);
+
 	dmi_check_system(sof_sdw_quirk_table);
 
 	if (quirk_override != -1) {
-- 
2.48.1


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v3 09/13] ASoC: amd: acp: fix MODULE_AUTHOR missing closing angle bracket
  2026-10-23  6:50 [PATCH v3 00/13] ASoC: amd: acp: ACP7.B/7.F SoundWire machine driver support Vijendar Mukunda
                   ` (7 preceding siblings ...)
  2026-10-23  6:50 ` [PATCH v3 08/13] ASoC: amd: acp: set PCI subsystem ID " Vijendar Mukunda
@ 2026-10-23  6:50 ` Vijendar Mukunda
  2026-10-23  6:50 ` [PATCH v3 10/13] ASoC: amd: acp: add ACPI machine tables for ACP7.F SoundWire Vijendar Mukunda
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 19+ messages in thread
From: Vijendar Mukunda @ 2026-10-23  6:50 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, lgirdwood, perex, tiwai, pierre-louis.bossart,
	yung-chuan.liao, Basavaraj.Hiregoudar, Sunil-kumar.Dommati,
	venkataprasad.potturu, Syed.SabaKareem, Mario.Limonciello,
	Richard.Gong, Vijendar.Mukunda, Poojitha.N, linux-sound,
	linux-kernel, sound-open-firmware

The MODULE_AUTHOR macro call was missing the closing '>' for the
email address angle bracket notation.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
---
 sound/soc/amd/acp/acp-sdw-sof-mach.c | 2 +-
 1 file changed, 1 insertion(+), 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 1013f60b2818a..01e640f0ada72 100644
--- a/sound/soc/amd/acp/acp-sdw-sof-mach.c
+++ b/sound/soc/amd/acp/acp-sdw-sof-mach.c
@@ -544,7 +544,7 @@ static struct platform_driver sof_sdw_driver = {
 module_platform_driver(sof_sdw_driver);
 
 MODULE_DESCRIPTION("ASoC AMD SoundWire Generic Machine driver");
-MODULE_AUTHOR("Vijendar Mukunda <Vijendar.Mukunda@amd.com");
+MODULE_AUTHOR("Vijendar Mukunda <Vijendar.Mukunda@amd.com>");
 MODULE_LICENSE("GPL");
 MODULE_IMPORT_NS("SND_SOC_SDW_UTILS");
 MODULE_IMPORT_NS("SND_SOC_AMD_SDW_MACH");
-- 
2.48.1


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v3 10/13] ASoC: amd: acp: add ACPI machine tables for ACP7.F SoundWire
  2026-10-23  6:50 [PATCH v3 00/13] ASoC: amd: acp: ACP7.B/7.F SoundWire machine driver support Vijendar Mukunda
                   ` (8 preceding siblings ...)
  2026-10-23  6:50 ` [PATCH v3 09/13] ASoC: amd: acp: fix MODULE_AUTHOR missing closing angle bracket Vijendar Mukunda
@ 2026-10-23  6:50 ` Vijendar Mukunda
  2026-10-23  6:50 ` [PATCH v3 11/13] ASoC: SOF: amd: add alt_machines for ACP7.F SOF SoundWire Vijendar Mukunda
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 19+ messages in thread
From: Vijendar Mukunda @ 2026-10-23  6:50 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, lgirdwood, perex, tiwai, pierre-louis.bossart,
	yung-chuan.liao, Basavaraj.Hiregoudar, Sunil-kumar.Dommati,
	venkataprasad.potturu, Syed.SabaKareem, Mario.Limonciello,
	Richard.Gong, Vijendar.Mukunda, Poojitha.N, linux-sound,
	linux-kernel, sound-open-firmware

Add amd-acp7x-acpi-match.c with four snd_soc_acpi_mach entries for
ACP7.F SoundWire configurations:
- RT721 + RT1320 on SoundWire links L0+L3
  (jack+dmic on RT721, spk on RT1320)
- RT721 + RT1320 on SoundWire links L0+L1
  (jack+dmic on RT721, spk on RT1320)
- Standalone RT721 on L0 (jack, amp and dmic endpoints)
- Standalone RT722 on L0 (jack, amp and dmic endpoints)

RT721+RT1320 combo configurations use jack_dmic_endpoints for RT721,
skipping the internal amp since RT1320 provides amplification on a
dedicated SoundWire link.

ACP7.B machine table will be added in a follow-up patch.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
---
 sound/soc/amd/acp/Makefile               |   2 +-
 sound/soc/amd/acp/amd-acp7x-acpi-match.c | 186 +++++++++++++++++++++++
 sound/soc/amd/mach-config.h              |   1 +
 3 files changed, 188 insertions(+), 1 deletion(-)
 create mode 100644 sound/soc/amd/acp/amd-acp7x-acpi-match.c

diff --git a/sound/soc/amd/acp/Makefile b/sound/soc/amd/acp/Makefile
index ab5f9dc871a67..42e2bd34da060 100644
--- a/sound/soc/amd/acp/Makefile
+++ b/sound/soc/amd/acp/Makefile
@@ -23,7 +23,7 @@ snd-acp70-y := acp70.o
 snd-acp-mach-y     := acp-mach-common.o
 snd-acp-legacy-mach-y     := acp-legacy-mach.o acp3x-es83xx/acp3x-es83xx.o
 snd-acp-sof-mach-y     := acp-sof-mach.o
-snd-soc-acpi-amd-match-y := amd-acp63-acpi-match.o amd-acp70-acpi-match.o
+snd-soc-acpi-amd-match-y := amd-acp63-acpi-match.o amd-acp70-acpi-match.o amd-acp7x-acpi-match.o
 snd-soc-acpi-amd-match-$(CONFIG_SND_SOC_ACPI_AMD_SDCA_QUIRKS) += soc-acpi-amd-sdca-quirks.o
 snd-acp-sdw-mach-y     := acp-sdw-mach-common.o
 snd-acp-sdw-sof-mach-y += acp-sdw-sof-mach.o
diff --git a/sound/soc/amd/acp/amd-acp7x-acpi-match.c b/sound/soc/amd/acp/amd-acp7x-acpi-match.c
new file mode 100644
index 0000000000000..2f5e060ec79b4
--- /dev/null
+++ b/sound/soc/amd/acp/amd-acp7x-acpi-match.c
@@ -0,0 +1,186 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * amd-acp7x-acpi-match.c - tables and support for ACP7.x(7.B/7.F) platforms
+ * ACPI enumeration.
+ *
+ * Copyright 2026 Advanced Micro Devices, Inc.
+ */
+
+#include <sound/soc-acpi.h>
+#include "../mach-config.h"
+
+static const struct snd_soc_acpi_endpoint single_endpoint = {
+	.num = 0,
+	.aggregated = 0,
+	.group_position = 0,
+	.group_id = 0
+};
+
+static const struct snd_soc_acpi_endpoint jack_dmic_endpoints[] = {
+	/* Jack Endpoint */
+	{
+		.num = 0,
+		.aggregated = 0,
+		.group_position = 0,
+		.group_id = 0,
+	},
+	/* DMIC Endpoint */
+	{
+		.num = 2,
+		.aggregated = 0,
+		.group_position = 0,
+		.group_id = 0,
+	},
+};
+
+static const struct snd_soc_acpi_endpoint jack_amp_dmic_endpoints[] = {
+	/* Jack Endpoint */
+	{
+		.num = 0,
+		.aggregated = 0,
+		.group_position = 0,
+		.group_id = 0,
+	},
+	/* Amp Endpoint */
+	{
+		.num = 1,
+		.aggregated = 0,
+		.group_position = 0,
+		.group_id = 0,
+	},
+	/* DMIC Endpoint */
+	{
+		.num = 2,
+		.aggregated = 0,
+		.group_position = 0,
+		.group_id = 0,
+	},
+};
+
+static const struct snd_soc_acpi_adr_device rt721_l0_single_adr[] = {
+	{
+		.adr = 0x000030025d072101ull,
+		.num_endpoints = ARRAY_SIZE(jack_dmic_endpoints),
+		.endpoints = jack_dmic_endpoints,
+		.name_prefix = "rt721"
+	}
+};
+
+static const struct snd_soc_acpi_adr_device rt721_l0_only[] = {
+	{
+		.adr = 0x000030025d072101ull,
+		.num_endpoints = ARRAY_SIZE(jack_amp_dmic_endpoints),
+		.endpoints = jack_amp_dmic_endpoints,
+		.name_prefix = "rt721"
+	}
+};
+
+static const struct snd_soc_acpi_link_adr acp7x_rt721_only[] = {
+	{
+		.mask = BIT(0),
+		.num_adr = ARRAY_SIZE(rt721_l0_only),
+		.adr_d = rt721_l0_only,
+	},
+	{}
+};
+
+static const struct snd_soc_acpi_adr_device rt722_l0_single_adr[] = {
+	{
+		.adr = 0x000030025d072201ull,
+		.num_endpoints = ARRAY_SIZE(jack_amp_dmic_endpoints),
+		.endpoints = jack_amp_dmic_endpoints,
+		.name_prefix = "rt722"
+	}
+};
+
+static const struct snd_soc_acpi_link_adr acp7x_rt722_only[] = {
+	{
+		.mask = BIT(0),
+		.num_adr = ARRAY_SIZE(rt722_l0_single_adr),
+		.adr_d = rt722_l0_single_adr,
+	},
+	{}
+};
+
+static const struct snd_soc_acpi_adr_device rt1320_l1_single_adr[] = {
+	{
+		.adr = 0x000130025d132001ull,
+		.num_endpoints = 1,
+		.endpoints = &single_endpoint,
+		.name_prefix = "rt1320-1"
+	},
+};
+
+static const struct snd_soc_acpi_adr_device rt1320_l3_single_adr[] = {
+	{
+		.adr = 0x000330025d132001ull,
+		.num_endpoints = 1,
+		.endpoints = &single_endpoint,
+		.name_prefix = "rt1320-1"
+	},
+};
+
+static const struct snd_soc_acpi_link_adr acp7x_rt721_l0_rt1320_l1[] = {
+	{
+		.mask = BIT(0),
+		.num_adr = ARRAY_SIZE(rt721_l0_single_adr),
+		.adr_d = rt721_l0_single_adr,
+	},
+	{
+		.mask = BIT(1),
+		.num_adr = ARRAY_SIZE(rt1320_l1_single_adr),
+		.adr_d = rt1320_l1_single_adr,
+	},
+	{}
+};
+
+static const struct snd_soc_acpi_link_adr acp7x_rt721_l0_rt1320_l3[] = {
+	{
+		.mask = BIT(0),
+		.num_adr = ARRAY_SIZE(rt721_l0_single_adr),
+		.adr_d = rt721_l0_single_adr,
+	},
+	{
+		.mask = BIT(3),
+		.num_adr = ARRAY_SIZE(rt1320_l3_single_adr),
+		.adr_d = rt1320_l3_single_adr,
+	},
+	{}
+};
+
+struct snd_soc_acpi_mach snd_soc_acpi_amd_acp7f_sof_sdw_machines[] = {
+	{
+		.link_mask = BIT(0) | BIT(3),
+		.links = acp7x_rt721_l0_rt1320_l3,
+		.drv_name = "amd_sof_sdw",
+		.sof_tplg_filename = "sof-acp7f-rt721-l0-rt1320-l3.tplg",
+		.fw_filename = "sof-acp7f.ri",
+	},
+	{
+		.link_mask = BIT(0) | BIT(1),
+		.links = acp7x_rt721_l0_rt1320_l1,
+		.drv_name = "amd_sof_sdw",
+		.sof_tplg_filename = "sof-acp7f-rt721-l0-rt1320-l1.tplg",
+		.fw_filename = "sof-acp7f.ri",
+	},
+	{
+		.link_mask = BIT(0),
+		.links = acp7x_rt721_only,
+		.drv_name = "amd_sof_sdw",
+		.sof_tplg_filename = "sof-acp7f-rt721-l0.tplg",
+		.fw_filename = "sof-acp7f.ri",
+	},
+	{
+		.link_mask = BIT(0),
+		.links = acp7x_rt722_only,
+		.drv_name = "amd_sof_sdw",
+		.sof_tplg_filename = "sof-acp7f-rt722-l0.tplg",
+		.fw_filename = "sof-acp7f.ri",
+	},
+	{},
+};
+EXPORT_SYMBOL(snd_soc_acpi_amd_acp7f_sof_sdw_machines);
+
+MODULE_DESCRIPTION("AMD ACP7.x SoundWire machine tables for ACPI enumeration");
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Vijendar Mukunda <Vijendar.Mukunda@amd.com>");
diff --git a/sound/soc/amd/mach-config.h b/sound/soc/amd/mach-config.h
index 02ce044bcbf72..321af4682fd30 100644
--- a/sound/soc/amd/mach-config.h
+++ b/sound/soc/amd/mach-config.h
@@ -30,6 +30,7 @@ extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_sdw_machines[];
 extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_sof_sdw_machines[];
 extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp7b_sof_machines[];
 extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp7f_sof_machines[];
+extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp7f_sof_sdw_machines[];
 
 struct config_entry {
 	u32 flags;
-- 
2.48.1


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v3 11/13] ASoC: SOF: amd: add alt_machines for ACP7.F SOF SoundWire
  2026-10-23  6:50 [PATCH v3 00/13] ASoC: amd: acp: ACP7.B/7.F SoundWire machine driver support Vijendar Mukunda
                   ` (9 preceding siblings ...)
  2026-10-23  6:50 ` [PATCH v3 10/13] ASoC: amd: acp: add ACPI machine tables for ACP7.F SoundWire Vijendar Mukunda
@ 2026-10-23  6:50 ` Vijendar Mukunda
  2026-10-23  6:50 ` [PATCH v3 12/13] ASoC: amd: acp: add SoundWire machine table for ACP7.B platform Vijendar Mukunda
  2026-10-23  6:50 ` [PATCH v3 13/13] ASoC: SOF: amd: register SoundWire alt_machines for ACP7.B Vijendar Mukunda
  12 siblings, 0 replies; 19+ messages in thread
From: Vijendar Mukunda @ 2026-10-23  6:50 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, lgirdwood, perex, tiwai, pierre-louis.bossart,
	yung-chuan.liao, Basavaraj.Hiregoudar, Sunil-kumar.Dommati,
	venkataprasad.potturu, Syed.SabaKareem, Mario.Limonciello,
	Richard.Gong, Vijendar.Mukunda, Poojitha.N, linux-sound,
	linux-kernel, sound-open-firmware

Register snd_soc_acpi_amd_acp7f_sof_sdw_machines as alt_machines in
the ACP7.F SOF device descriptor so that the SOF core selects the
SoundWire machine driver when ADR devices are detected on ACP7.F
platforms.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
---
 sound/soc/sof/amd/pci-acp7x.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/sof/amd/pci-acp7x.c b/sound/soc/sof/amd/pci-acp7x.c
index 5a21ab8ebb4b9..2999dc6d72a63 100644
--- a/sound/soc/sof/amd/pci-acp7x.c
+++ b/sound/soc/sof/amd/pci-acp7x.c
@@ -89,6 +89,7 @@ static const struct sof_amd_acp_desc acp7f_chip_info = {
 
 static const struct sof_dev_desc acp7f_desc = {
 	.machines		= snd_soc_acpi_amd_acp7f_sof_machines,
+	.alt_machines		= snd_soc_acpi_amd_acp7f_sof_sdw_machines,
 	.resindex_lpe_base	= 0,
 	.resindex_pcicfg_base	= -1,
 	.resindex_imr_base	= -1,
-- 
2.48.1


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v3 12/13] ASoC: amd: acp: add SoundWire machine table for ACP7.B platform
  2026-10-23  6:50 [PATCH v3 00/13] ASoC: amd: acp: ACP7.B/7.F SoundWire machine driver support Vijendar Mukunda
                   ` (10 preceding siblings ...)
  2026-10-23  6:50 ` [PATCH v3 11/13] ASoC: SOF: amd: add alt_machines for ACP7.F SOF SoundWire Vijendar Mukunda
@ 2026-10-23  6:50 ` Vijendar Mukunda
  2026-10-23  6:50 ` [PATCH v3 13/13] ASoC: SOF: amd: register SoundWire alt_machines for ACP7.B Vijendar Mukunda
  12 siblings, 0 replies; 19+ messages in thread
From: Vijendar Mukunda @ 2026-10-23  6:50 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, lgirdwood, perex, tiwai, pierre-louis.bossart,
	yung-chuan.liao, Basavaraj.Hiregoudar, Sunil-kumar.Dommati,
	venkataprasad.potturu, Syed.SabaKareem, Mario.Limonciello,
	Richard.Gong, Vijendar.Mukunda, Poojitha.N, linux-sound,
	linux-kernel, sound-open-firmware

Add snd_soc_acpi_amd_acp7b_sof_sdw_machines with one entry for the
RT721 (L0: jack + DMIC) + RT1320 (L3: speaker) SoundWire configuration
on ACP7.B. Export the table for use by the SOF descriptor.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
---
 sound/soc/amd/acp/amd-acp7x-acpi-match.c | 12 ++++++++++++
 sound/soc/amd/mach-config.h              |  1 +
 2 files changed, 13 insertions(+)

diff --git a/sound/soc/amd/acp/amd-acp7x-acpi-match.c b/sound/soc/amd/acp/amd-acp7x-acpi-match.c
index 2f5e060ec79b4..830c59966a356 100644
--- a/sound/soc/amd/acp/amd-acp7x-acpi-match.c
+++ b/sound/soc/amd/acp/amd-acp7x-acpi-match.c
@@ -148,6 +148,18 @@ static const struct snd_soc_acpi_link_adr acp7x_rt721_l0_rt1320_l3[] = {
 	{}
 };
 
+struct snd_soc_acpi_mach snd_soc_acpi_amd_acp7b_sof_sdw_machines[] = {
+	{
+		.link_mask = BIT(0) | BIT(3),
+		.links = acp7x_rt721_l0_rt1320_l3,
+		.drv_name = "amd_sof_sdw",
+		.sof_tplg_filename = "sof-acp7b-rt721-l0-rt1320-l3.tplg",
+		.fw_filename = "sof-acp7b.ri",
+	},
+	{},
+};
+EXPORT_SYMBOL(snd_soc_acpi_amd_acp7b_sof_sdw_machines);
+
 struct snd_soc_acpi_mach snd_soc_acpi_amd_acp7f_sof_sdw_machines[] = {
 	{
 		.link_mask = BIT(0) | BIT(3),
diff --git a/sound/soc/amd/mach-config.h b/sound/soc/amd/mach-config.h
index 321af4682fd30..09ea9f5259557 100644
--- a/sound/soc/amd/mach-config.h
+++ b/sound/soc/amd/mach-config.h
@@ -29,6 +29,7 @@ extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_sof_machines[];
 extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_sdw_machines[];
 extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_sof_sdw_machines[];
 extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp7b_sof_machines[];
+extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp7b_sof_sdw_machines[];
 extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp7f_sof_machines[];
 extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp7f_sof_sdw_machines[];
 
-- 
2.48.1


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v3 13/13] ASoC: SOF: amd: register SoundWire alt_machines for ACP7.B
  2026-10-23  6:50 [PATCH v3 00/13] ASoC: amd: acp: ACP7.B/7.F SoundWire machine driver support Vijendar Mukunda
                   ` (11 preceding siblings ...)
  2026-10-23  6:50 ` [PATCH v3 12/13] ASoC: amd: acp: add SoundWire machine table for ACP7.B platform Vijendar Mukunda
@ 2026-10-23  6:50 ` Vijendar Mukunda
  12 siblings, 0 replies; 19+ messages in thread
From: Vijendar Mukunda @ 2026-10-23  6:50 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, lgirdwood, perex, tiwai, pierre-louis.bossart,
	yung-chuan.liao, Basavaraj.Hiregoudar, Sunil-kumar.Dommati,
	venkataprasad.potturu, Syed.SabaKareem, Mario.Limonciello,
	Richard.Gong, Vijendar.Mukunda, Poojitha.N, linux-sound,
	linux-kernel, sound-open-firmware

Register snd_soc_acpi_amd_acp7b_sof_sdw_machines as alt_machines in
the ACP7.B SOF device descriptor so that the SOF core selects the
SoundWire machine driver when ADR devices are detected on ACP7.B
platforms.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
---
 sound/soc/sof/amd/pci-acp7x.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/sof/amd/pci-acp7x.c b/sound/soc/sof/amd/pci-acp7x.c
index 2999dc6d72a63..6aa16d1a12b95 100644
--- a/sound/soc/sof/amd/pci-acp7x.c
+++ b/sound/soc/sof/amd/pci-acp7x.c
@@ -47,6 +47,7 @@ static const struct sof_amd_acp_desc acp7b_chip_info = {
 
 static const struct sof_dev_desc acp7b_desc = {
 	.machines		= snd_soc_acpi_amd_acp7b_sof_machines,
+	.alt_machines		= snd_soc_acpi_amd_acp7b_sof_sdw_machines,
 	.resindex_lpe_base	= 0,
 	.resindex_pcicfg_base	= -1,
 	.resindex_imr_base	= -1,
-- 
2.48.1


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v3 01/13] ASoC: amd: acp: add ACP7.B/7.F SoundWire link count for machine driver
  2026-10-23  6:50 ` [PATCH v3 01/13] ASoC: amd: acp: add ACP7.B/7.F SoundWire link count for machine driver Vijendar Mukunda
@ 2026-10-25 20:59   ` Pierre-Louis Bossart
  2026-10-29  3:45     ` Mukunda,Vijendar
  0 siblings, 1 reply; 19+ messages in thread
From: Pierre-Louis Bossart @ 2026-10-25 20:59 UTC (permalink / raw)
  To: Vijendar Mukunda, broonie
  Cc: alsa-devel, lgirdwood, perex, tiwai, yung-chuan.liao,
	Basavaraj.Hiregoudar, Sunil-kumar.Dommati, venkataprasad.potturu,
	Syed.SabaKareem, Mario.Limonciello, Richard.Gong, Poojitha.N,
	linux-sound, linux-kernel, sound-open-firmware


> 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

do you still need this define? I was wondering why there's no ACP7X
equivalent but I can't see anyone using this ACP63 definition?

>  #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)


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v3 02/13] ASoC: amd: acp: add ACP7.B/7.F SoundWire DAI link support
  2026-10-23  6:50 ` [PATCH v3 02/13] ASoC: amd: acp: add ACP7.B/7.F SoundWire DAI link support Vijendar Mukunda
@ 2026-10-25 21:11   ` Pierre-Louis Bossart
  2026-10-29  4:56     ` Mukunda,Vijendar
  0 siblings, 1 reply; 19+ messages in thread
From: Pierre-Louis Bossart @ 2026-10-25 21:11 UTC (permalink / raw)
  To: Vijendar Mukunda, broonie
  Cc: alsa-devel, lgirdwood, perex, tiwai, yung-chuan.liao,
	Basavaraj.Hiregoudar, Sunil-kumar.Dommati, venkataprasad.potturu,
	Syed.SabaKareem, Mario.Limonciello, Richard.Gong, Poojitha.N,
	linux-sound, linux-kernel, sound-open-firmware

It'd be useful to comment/explain why this routine only relies on a
subset of IDS...

> +int get_acp7x_cpu_pin_id(u32 sdw_link_id, int be_id, int *cpu_pin_id, struct device *dev)
> +{
> +	switch (sdw_link_id) {
> +	case AMD_SDW0:
> +	case AMD_SDW1:
> +	case AMD_SDW2:
> +	case AMD_SDW3:
> +		switch (be_id) {
> +		case SOC_SDW_JACK_OUT_DAI_ID:
> +			*cpu_pin_id = ACP7X_SW_AUDIO0_TX;
> +			break;
> +		case SOC_SDW_JACK_IN_DAI_ID:
> +			*cpu_pin_id = ACP7X_SW_AUDIO0_RX;
> +			break;
> +		case SOC_SDW_AMP_OUT_DAI_ID:
> +			*cpu_pin_id = ACP7X_SW_AUDIO4_TX;
> +			break;
> +		case SOC_SDW_AMP_IN_DAI_ID:
> +			*cpu_pin_id = ACP7X_SW_AUDIO4_RX;
> +			break;
> +		case SOC_SDW_DMIC_DAI_ID:
> +			*cpu_pin_id = ACP7X_SW_AUDIO5_RX;
> +			break;
> +		default:
> +			dev_err(dev, "Invalid be id:%d\n", be_id);
> +			return -EINVAL;
> +		}
> +		break;
> +	default:
> +		return -EINVAL;
> +	}
> +	dev_dbg(dev, "sdw_link_id:%d, be_id:%d, cpu_pin_id:%d\n", sdw_link_id, be_id, *cpu_pin_id);
> +	return 0;
> +}

... defined here - I marked the NOT USED ones.

> +/* ACP7.B/7.F SoundWire CPU pin IDs */
> +#define ACP7X_SW_AUDIO0_TX	0
> +#define ACP7X_SW_AUDIO1_TX	1 << NOT USED
> +#define ACP7X_SW_AUDIO2_TX	2 << NOT USED
> +#define ACP7X_SW_AUDIO3_TX	3 << NOT USED
> +#define ACP7X_SW_AUDIO4_TX	4 
> +#define ACP7X_SW_AUDIO5_TX	5 << NOT USED
> +#define ACP7X_SW_AUDIO6_TX	6 << NOT USED
> +#define ACP7X_SW_AUDIO7_TX	7 << NOT USED
> +#define ACP7X_SW_AUDIO8_TX	8 << NOT USED
> +#define ACP7X_SW_AUDIO9_TX	9 << NOT USED
> +#define ACP7X_SW_AUDIO10_TX	10 << NOT USED
> +
> +#define ACP7X_SW_AUDIO0_RX	11
> +#define ACP7X_SW_AUDIO1_RX	12 << NOT USED
> +#define ACP7X_SW_AUDIO2_RX	13 << NOT USED
> +#define ACP7X_SW_AUDIO3_RX	14 << NOT USED
> +#define ACP7X_SW_AUDIO4_RX	15
> +#define ACP7X_SW_AUDIO5_RX	16
> +#define ACP7X_SW_AUDIO6_RX	17 << NOT USED
> +#define ACP7X_SW_AUDIO7_RX	18 << NOT USED
> +#define ACP7X_SW_AUDIO8_RX	19 << NOT USED
The IDs are different from what was used for ACP70

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v3 01/13] ASoC: amd: acp: add ACP7.B/7.F SoundWire link count for machine driver
  2026-10-25 20:59   ` Pierre-Louis Bossart
@ 2026-10-29  3:45     ` Mukunda,Vijendar
  0 siblings, 0 replies; 19+ messages in thread
From: Mukunda,Vijendar @ 2026-10-29  3:45 UTC (permalink / raw)
  To: Pierre-Louis Bossart, broonie
  Cc: alsa-devel, lgirdwood, perex, tiwai, yung-chuan.liao,
	Basavaraj.Hiregoudar, Sunil-kumar.Dommati, venkataprasad.potturu,
	Syed.SabaKareem, Mario.Limonciello, Richard.Gong, Poojitha.N,
	linux-sound, linux-kernel, sound-open-firmware

On 26/10/26 02:29, Pierre-Louis Bossart wrote:
>> 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
> do you still need this define? I was wondering why there's no ACP7X
> equivalent but I can't see anyone using this ACP63 definition?
You're right. |ACP63_SDW_MAX_CPU_DAIS| is currently unused. I'll remove the
definition and send a supplemental patch.
>
>>  #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)


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v3 02/13] ASoC: amd: acp: add ACP7.B/7.F SoundWire DAI link support
  2026-10-25 21:11   ` Pierre-Louis Bossart
@ 2026-10-29  4:56     ` Mukunda,Vijendar
  2026-10-29  8:07       ` Pierre-Louis Bossart
  0 siblings, 1 reply; 19+ messages in thread
From: Mukunda,Vijendar @ 2026-10-29  4:56 UTC (permalink / raw)
  To: Pierre-Louis Bossart, broonie
  Cc: alsa-devel, lgirdwood, perex, tiwai, yung-chuan.liao,
	Basavaraj.Hiregoudar, Sunil-kumar.Dommati, venkataprasad.potturu,
	Syed.SabaKareem, Mario.Limonciello, Richard.Gong, Poojitha.N,
	linux-sound, linux-kernel, sound-open-firmware

On 26/10/26 02:41, Pierre-Louis Bossart wrote:
> It'd be useful to comment/explain why this routine only relies on a
> subset of IDS...
On ACP7x, each SoundWire data port has a dedicated DMA channel mapped
in hardware. This function selects only the ports required by the
currently supported ACP7x machine topologies:

  AUDIO0_TX (0)  - headset/jack playback
  AUDIO4_TX (4)  - amplifier/speaker playback
  AUDIO0_RX (11) - headset/jack capture
  AUDIO4_RX (15) - amplifier/speaker capture (feedback)
  AUDIO5_RX (16) - DMIC capture

The remaining port IDs are defined for completeness to represent the
hardware data port layout, but are not used by the currently supported
machine topologies.

The ID numbering differs from ACP70 due to the hardware differences
between ACP70 and ACP7x. ACP7x uses a flat ID space, with TX ports
numbered 0-10 and RX ports numbered 11-21.

Will add comments above the define block and the function to clarify
this in the next version.

>
>> +int get_acp7x_cpu_pin_id(u32 sdw_link_id, int be_id, int *cpu_pin_id, struct device *dev)
>> +{
>> +	switch (sdw_link_id) {
>> +	case AMD_SDW0:
>> +	case AMD_SDW1:
>> +	case AMD_SDW2:
>> +	case AMD_SDW3:
>> +		switch (be_id) {
>> +		case SOC_SDW_JACK_OUT_DAI_ID:
>> +			*cpu_pin_id = ACP7X_SW_AUDIO0_TX;
>> +			break;
>> +		case SOC_SDW_JACK_IN_DAI_ID:
>> +			*cpu_pin_id = ACP7X_SW_AUDIO0_RX;
>> +			break;
>> +		case SOC_SDW_AMP_OUT_DAI_ID:
>> +			*cpu_pin_id = ACP7X_SW_AUDIO4_TX;
>> +			break;
>> +		case SOC_SDW_AMP_IN_DAI_ID:
>> +			*cpu_pin_id = ACP7X_SW_AUDIO4_RX;
>> +			break;
>> +		case SOC_SDW_DMIC_DAI_ID:
>> +			*cpu_pin_id = ACP7X_SW_AUDIO5_RX;
>> +			break;
>> +		default:
>> +			dev_err(dev, "Invalid be id:%d\n", be_id);
>> +			return -EINVAL;
>> +		}
>> +		break;
>> +	default:
>> +		return -EINVAL;
>> +	}
>> +	dev_dbg(dev, "sdw_link_id:%d, be_id:%d, cpu_pin_id:%d\n", sdw_link_id, be_id, *cpu_pin_id);
>> +	return 0;
>> +}
> ... defined here - I marked the NOT USED ones.
Please refer above comment explanation.
>
>> +/* ACP7.B/7.F SoundWire CPU pin IDs */
>> +#define ACP7X_SW_AUDIO0_TX	0
>> +#define ACP7X_SW_AUDIO1_TX	1 << NOT USED
>> +#define ACP7X_SW_AUDIO2_TX	2 << NOT USED
>> +#define ACP7X_SW_AUDIO3_TX	3 << NOT USED
>> +#define ACP7X_SW_AUDIO4_TX	4 
>> +#define ACP7X_SW_AUDIO5_TX	5 << NOT USED
>> +#define ACP7X_SW_AUDIO6_TX	6 << NOT USED
>> +#define ACP7X_SW_AUDIO7_TX	7 << NOT USED
>> +#define ACP7X_SW_AUDIO8_TX	8 << NOT USED
>> +#define ACP7X_SW_AUDIO9_TX	9 << NOT USED
>> +#define ACP7X_SW_AUDIO10_TX	10 << NOT USED
>> +
>> +#define ACP7X_SW_AUDIO0_RX	11
>> +#define ACP7X_SW_AUDIO1_RX	12 << NOT USED
>> +#define ACP7X_SW_AUDIO2_RX	13 << NOT USED
>> +#define ACP7X_SW_AUDIO3_RX	14 << NOT USED
>> +#define ACP7X_SW_AUDIO4_RX	15
>> +#define ACP7X_SW_AUDIO5_RX	16
>> +#define ACP7X_SW_AUDIO6_RX	17 << NOT USED
>> +#define ACP7X_SW_AUDIO7_RX	18 << NOT USED
>> +#define ACP7X_SW_AUDIO8_RX	19 << NOT USED
> The IDs are different from what was used for ACP70

ACP7x hardware exposes 11 TX and 11 RX data ports, mapped to 8 TX and
8 RX DMA channels. The CPU pin IDs use linear numbering, with TX ports
numbered 0-10 and RX ports numbered 11-21.

The ID mapping differs from ACP70 due to the hardware differences
between ACP70 and ACP7x. All port IDs are defined here to represent the
ACP7x hardware data port layout.




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v3 02/13] ASoC: amd: acp: add ACP7.B/7.F SoundWire DAI link support
  2026-10-29  4:56     ` Mukunda,Vijendar
@ 2026-10-29  8:07       ` Pierre-Louis Bossart
  0 siblings, 0 replies; 19+ messages in thread
From: Pierre-Louis Bossart @ 2026-10-29  8:07 UTC (permalink / raw)
  To: Mukunda,Vijendar, broonie
  Cc: alsa-devel, lgirdwood, perex, tiwai, yung-chuan.liao,
	Basavaraj.Hiregoudar, Sunil-kumar.Dommati, venkataprasad.potturu,
	Syed.SabaKareem, Mario.Limonciello, Richard.Gong, Poojitha.N,
	linux-sound, linux-kernel, sound-open-firmware

On 10/29/26 05:56, Mukunda,Vijendar wrote:
> On 26/10/26 02:41, Pierre-Louis Bossart wrote:
>> It'd be useful to comment/explain why this routine only relies on a
>> subset of IDS...
> On ACP7x, each SoundWire data port has a dedicated DMA channel mapped
> in hardware. This function selects only the ports required by the
> currently supported ACP7x machine topologies:
> 
>   AUDIO0_TX (0)  - headset/jack playback
>   AUDIO4_TX (4)  - amplifier/speaker playback
>   AUDIO0_RX (11) - headset/jack capture
>   AUDIO4_RX (15) - amplifier/speaker capture (feedback)
>   AUDIO5_RX (16) - DMIC capture
> 
> The remaining port IDs are defined for completeness to represent the
> hardware data port layout, but are not used by the currently supported
> machine topologies.
> 
> The ID numbering differs from ACP70 due to the hardware differences
> between ACP70 and ACP7x. ACP7x uses a flat ID space, with TX ports
> numbered 0-10 and RX ports numbered 11-21.
> 
> Will add comments above the define block and the function to clarify
> this in the next version.
sounds good, thank you.

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2026-10-29  8:08 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-23  6:50 [PATCH v3 00/13] ASoC: amd: acp: ACP7.B/7.F SoundWire machine driver support Vijendar Mukunda
2026-10-23  6:50 ` [PATCH v3 01/13] ASoC: amd: acp: add ACP7.B/7.F SoundWire link count for machine driver Vijendar Mukunda
2026-10-25 20:59   ` Pierre-Louis Bossart
2026-10-29  3:45     ` Mukunda,Vijendar
2026-10-23  6:50 ` [PATCH v3 02/13] ASoC: amd: acp: add ACP7.B/7.F SoundWire DAI link support Vijendar Mukunda
2026-10-25 21:11   ` Pierre-Louis Bossart
2026-10-29  4:56     ` Mukunda,Vijendar
2026-10-29  8:07       ` Pierre-Louis Bossart
2026-10-23  6:50 ` [PATCH v3 03/13] ASoC: amd: acp: add PDM controller selection for ACP7.B/7.F SoundWire machine driver Vijendar Mukunda
2026-10-23  6:50 ` [PATCH v3 04/13] ASoC: amd: acp: log ASOC_SDW_ACP_DMIC1 quirk in SOF " Vijendar Mukunda
2026-10-23  6:50 ` [PATCH v3 05/13] ASoC: amd: acp: enable DMIC DAI link based on PDM controller selection Vijendar Mukunda
2026-10-23  6:50 ` [PATCH v3 06/13] ASoC: amd: acp: move ignore_internal_dmic gate to DMIC enable condition Vijendar Mukunda
2026-10-23  6:50 ` [PATCH v3 07/13] ASoC: amd: acp: add DMIC components string for SOF SoundWire machine driver Vijendar Mukunda
2026-10-23  6:50 ` [PATCH v3 08/13] ASoC: amd: acp: set PCI subsystem ID " Vijendar Mukunda
2026-10-23  6:50 ` [PATCH v3 09/13] ASoC: amd: acp: fix MODULE_AUTHOR missing closing angle bracket Vijendar Mukunda
2026-10-23  6:50 ` [PATCH v3 10/13] ASoC: amd: acp: add ACPI machine tables for ACP7.F SoundWire Vijendar Mukunda
2026-10-23  6:50 ` [PATCH v3 11/13] ASoC: SOF: amd: add alt_machines for ACP7.F SOF SoundWire Vijendar Mukunda
2026-10-23  6:50 ` [PATCH v3 12/13] ASoC: amd: acp: add SoundWire machine table for ACP7.B platform Vijendar Mukunda
2026-10-23  6:50 ` [PATCH v3 13/13] ASoC: SOF: amd: register SoundWire alt_machines for ACP7.B Vijendar Mukunda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®