* [PATCH v2 1/6] ASoC: amd: acp: add Cirrus SoundWire configs for ACP7.F
[not found] <20261107192744.2027264-1-syed.sabakareem@amd.com>
@ 2026-11-07 19:26 ` Syed Saba Kareem
2026-11-07 19:26 ` [PATCH v2 2/6] ASoC: amd: acp: add SoundWire speaker quirks for Dell platforms Syed Saba Kareem
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Syed Saba Kareem @ 2026-11-07 19:26 UTC (permalink / raw)
To: broonie
Cc: Sunil-kumar.Dommati, vijendar.mukunda, Mario.Limonciello,
venkataprasad.potturu, Syed Saba Kareem, kernel test robot,
Vijendar Mukunda, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Pierre-Louis Bossart, Siva Subramanian Ravi Saravanan,
open list:AMD ASoC DRIVERS, open list
From: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Extend the ACP7.F SoundWire machine table with additional Cirrus Logic
codec configurations:
- CS42L43 jack + CS35L56 quad amp (L0+L1, L1)
- CS42L45 jack + CS35L63 stereo/quad amp (L0+L1 combinations)
- CS35L56 quad amp standalone (L1)
- Standalone CS42L43 / CS42L43B / CS42L45 jack (L0)
Add the corresponding endpoint, adr_device and link_adr descriptors for
the CS42L43/CS42L45 jack codecs and the CS35L56/CS35L63 amplifiers, with
speaker endpoints grouped for aggregated multi-amp playback. The CS42L45
entries reuse the CS42L43 endpoint array minus the speaker endpoint since
CS42L45 has no internal speaker path.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202611071819.8CnKog4h-lkp@intel.com/
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
---
sound/soc/amd/acp/amd-acp7x-acpi-match.c | 434 +++++++++++++++++++++++
1 file changed, 434 insertions(+)
diff --git a/sound/soc/amd/acp/amd-acp7x-acpi-match.c b/sound/soc/amd/acp/amd-acp7x-acpi-match.c
index bf11ceb7478b..217b11f9dfc3 100644
--- a/sound/soc/amd/acp/amd-acp7x-acpi-match.c
+++ b/sound/soc/amd/acp/amd-acp7x-acpi-match.c
@@ -16,6 +16,20 @@ static const struct snd_soc_acpi_endpoint single_endpoint = {
.group_id = 0
};
+static const struct snd_soc_acpi_endpoint spk_l_endpoint = {
+ .num = 0,
+ .aggregated = 1,
+ .group_position = 0,
+ .group_id = 1
+};
+
+static const struct snd_soc_acpi_endpoint spk_r_endpoint = {
+ .num = 0,
+ .aggregated = 1,
+ .group_position = 1,
+ .group_id = 1
+};
+
static const struct snd_soc_acpi_endpoint jack_dmic_endpoints[] = {
/* Jack Endpoint */
{
@@ -148,6 +162,350 @@ static const struct snd_soc_acpi_link_adr acp7x_rt721_l0_rt1320_l3[] = {
{}
};
+static const struct snd_soc_acpi_endpoint spk_2_endpoint = {
+ .num = 0,
+ .aggregated = 1,
+ .group_position = 2,
+ .group_id = 1
+};
+
+static const struct snd_soc_acpi_endpoint spk_3_endpoint = {
+ .num = 0,
+ .aggregated = 1,
+ .group_position = 3,
+ .group_id = 1
+};
+
+static const struct snd_soc_acpi_endpoint cs42l43_endpoints[] = {
+ { /* Jack Playback Endpoint */
+ .num = 0,
+ .aggregated = 0,
+ .group_position = 0,
+ .group_id = 0,
+ },
+ { /* DMIC Capture Endpoint */
+ .num = 1,
+ .aggregated = 0,
+ .group_position = 0,
+ .group_id = 0,
+ },
+ { /* Jack Capture Endpoint */
+ .num = 2,
+ .aggregated = 0,
+ .group_position = 0,
+ .group_id = 0,
+ },
+ { /* Speaker Playback Endpoint */
+ .num = 3,
+ .aggregated = 0,
+ .group_position = 0,
+ .group_id = 0,
+ },
+};
+
+static const struct snd_soc_acpi_adr_device cs35l56x4_l1u3210_adr[] = {
+ {
+ .adr = 0x00013301FA355601ull,
+ .num_endpoints = 1,
+ .endpoints = &spk_l_endpoint,
+ .name_prefix = "AMP1"
+ },
+ {
+ .adr = 0x00013201FA355601ull,
+ .num_endpoints = 1,
+ .endpoints = &spk_r_endpoint,
+ .name_prefix = "AMP2"
+ },
+ {
+ .adr = 0x00013101FA355601ull,
+ .num_endpoints = 1,
+ .endpoints = &spk_2_endpoint,
+ .name_prefix = "AMP3"
+ },
+ {
+ .adr = 0x00013001FA355601ull,
+ .num_endpoints = 1,
+ .endpoints = &spk_3_endpoint,
+ .name_prefix = "AMP4"
+ },
+};
+
+static const struct snd_soc_acpi_adr_device cs35l63x2_l0u01_adr[] = {
+ {
+ .adr = 0x00003001FA356301ull,
+ .num_endpoints = 1,
+ .endpoints = &spk_l_endpoint,
+ .name_prefix = "AMP1"
+ },
+ {
+ .adr = 0x00003101FA356301ull,
+ .num_endpoints = 1,
+ .endpoints = &spk_r_endpoint,
+ .name_prefix = "AMP2"
+ },
+};
+
+static const struct snd_soc_acpi_adr_device cs35l63x2_l1u01_adr[] = {
+ {
+ .adr = 0x00013001FA356301ull,
+ .num_endpoints = 1,
+ .endpoints = &spk_l_endpoint,
+ .name_prefix = "AMP1"
+ },
+ {
+ .adr = 0x00013101FA356301ull,
+ .num_endpoints = 1,
+ .endpoints = &spk_r_endpoint,
+ .name_prefix = "AMP2"
+ },
+};
+
+static const struct snd_soc_acpi_adr_device cs35l63x2_l1u13_adr[] = {
+ {
+ .adr = 0x00013101FA356301ull,
+ .num_endpoints = 1,
+ .endpoints = &spk_l_endpoint,
+ .name_prefix = "AMP1"
+ },
+ {
+ .adr = 0x00013301FA356301ull,
+ .num_endpoints = 1,
+ .endpoints = &spk_r_endpoint,
+ .name_prefix = "AMP2"
+ },
+};
+
+static const struct snd_soc_acpi_adr_device cs35l63x4_l0u0246_adr[] = {
+ {
+ .adr = 0x00003001FA356301ull,
+ .num_endpoints = 1,
+ .endpoints = &spk_l_endpoint,
+ .name_prefix = "AMP1"
+ },
+ {
+ .adr = 0x00003201FA356301ull,
+ .num_endpoints = 1,
+ .endpoints = &spk_r_endpoint,
+ .name_prefix = "AMP2"
+ },
+ {
+ .adr = 0x00003401FA356301ull,
+ .num_endpoints = 1,
+ .endpoints = &spk_2_endpoint,
+ .name_prefix = "AMP3"
+ },
+ {
+ .adr = 0x00003601FA356301ull,
+ .num_endpoints = 1,
+ .endpoints = &spk_3_endpoint,
+ .name_prefix = "AMP4"
+ },
+};
+
+static const struct snd_soc_acpi_adr_device cs42l43_l0u0_adr[] = {
+ {
+ .adr = 0x00003001FA424301ull,
+ .num_endpoints = ARRAY_SIZE(cs42l43_endpoints),
+ .endpoints = cs42l43_endpoints,
+ .name_prefix = "cs42l43"
+ }
+};
+
+static const struct snd_soc_acpi_adr_device cs42l43_l0u1_adr[] = {
+ {
+ .adr = 0x00003101FA424301ull,
+ .num_endpoints = ARRAY_SIZE(cs42l43_endpoints),
+ .endpoints = cs42l43_endpoints,
+ .name_prefix = "cs42l43"
+ }
+};
+
+static const struct snd_soc_acpi_adr_device cs42l43b_l0u1_adr[] = {
+ {
+ .adr = 0x00003101FA2A3B01ull,
+ .num_endpoints = ARRAY_SIZE(cs42l43_endpoints),
+ .endpoints = cs42l43_endpoints,
+ .name_prefix = "cs42l43"
+ }
+};
+
+static const struct snd_soc_acpi_adr_device cs42l43_l1u0_cs35l56x4_l1u0123_adr[] = {
+ {
+ .adr = 0x00013001FA424301ull,
+ .num_endpoints = ARRAY_SIZE(cs42l43_endpoints),
+ .endpoints = cs42l43_endpoints,
+ .name_prefix = "cs42l43"
+ },
+ {
+ .adr = 0x00013001FA355601ull,
+ .num_endpoints = 1,
+ .endpoints = &spk_l_endpoint,
+ .name_prefix = "AMP1"
+ },
+ {
+ .adr = 0x00013101FA355601ull,
+ .num_endpoints = 1,
+ .endpoints = &spk_r_endpoint,
+ .name_prefix = "AMP2"
+ },
+ {
+ .adr = 0x00013201FA355601ull,
+ .num_endpoints = 1,
+ .endpoints = &spk_2_endpoint,
+ .name_prefix = "AMP3"
+ },
+ {
+ .adr = 0x00013301FA355601ull,
+ .num_endpoints = 1,
+ .endpoints = &spk_3_endpoint,
+ .name_prefix = "AMP4"
+ },
+};
+
+static const struct snd_soc_acpi_adr_device cs42l45_l0u0_adr[] = {
+ {
+ .adr = 0x00003001FA424501ull,
+ /* Re-use endpoints, but cs42l45 has no speaker */
+ .num_endpoints = ARRAY_SIZE(cs42l43_endpoints) - 1,
+ .endpoints = cs42l43_endpoints,
+ .name_prefix = "cs42l45"
+ }
+};
+
+static const struct snd_soc_acpi_adr_device cs42l45_l1u0_adr[] = {
+ {
+ .adr = 0x00013001FA424501ull,
+ /* Re-use endpoints, but cs42l45 has no speaker */
+ .num_endpoints = ARRAY_SIZE(cs42l43_endpoints) - 1,
+ .endpoints = cs42l43_endpoints,
+ .name_prefix = "cs42l45"
+ }
+};
+
+static const struct snd_soc_acpi_link_adr acp7x_cs35l56x4_l1u3210[] = {
+ {
+ .mask = BIT(1),
+ .num_adr = ARRAY_SIZE(cs35l56x4_l1u3210_adr),
+ .adr_d = cs35l56x4_l1u3210_adr,
+ },
+ {}
+};
+
+static const struct snd_soc_acpi_link_adr acp7x_cs42l43_l0u1[] = {
+ {
+ .mask = BIT(0),
+ .num_adr = ARRAY_SIZE(cs42l43_l0u1_adr),
+ .adr_d = cs42l43_l0u1_adr,
+ },
+ {}
+};
+
+static const struct snd_soc_acpi_link_adr acp7x_cs42l43b_l0u1[] = {
+ {
+ .mask = BIT(0),
+ .num_adr = ARRAY_SIZE(cs42l43b_l0u1_adr),
+ .adr_d = cs42l43b_l0u1_adr,
+ },
+ {}
+};
+
+static const struct snd_soc_acpi_link_adr acp7x_cs42l43_l0u0_cs35l56x4_l1u3210[] = {
+ {
+ .mask = BIT(0),
+ .num_adr = ARRAY_SIZE(cs42l43_l0u0_adr),
+ .adr_d = cs42l43_l0u0_adr,
+ },
+ {
+ .mask = BIT(1),
+ .num_adr = ARRAY_SIZE(cs35l56x4_l1u3210_adr),
+ .adr_d = cs35l56x4_l1u3210_adr,
+ },
+ {}
+};
+
+static const struct snd_soc_acpi_link_adr acp7x_cs42l43_l1u0_cs35l56x4_l1u0123[] = {
+ {
+ .mask = BIT(1),
+ .num_adr = ARRAY_SIZE(cs42l43_l1u0_cs35l56x4_l1u0123_adr),
+ .adr_d = cs42l43_l1u0_cs35l56x4_l1u0123_adr,
+ },
+ {}
+};
+
+static const struct snd_soc_acpi_link_adr acp7x_cs42l45_l0u0[] = {
+ {
+ .mask = BIT(0),
+ .num_adr = ARRAY_SIZE(cs42l45_l0u0_adr),
+ .adr_d = cs42l45_l0u0_adr,
+ },
+ {}
+};
+
+static const struct snd_soc_acpi_link_adr acp7x_cs42l45_l0u0_cs35l63x2_l1u01[] = {
+ {
+ .mask = BIT(0),
+ .num_adr = ARRAY_SIZE(cs42l45_l0u0_adr),
+ .adr_d = cs42l45_l0u0_adr,
+ },
+ {
+ .mask = BIT(1),
+ .num_adr = ARRAY_SIZE(cs35l63x2_l1u01_adr),
+ .adr_d = cs35l63x2_l1u01_adr,
+ },
+ {}
+};
+
+static const struct snd_soc_acpi_link_adr acp7x_cs42l45_l0u0_cs35l63x2_l1u13[] = {
+ {
+ .mask = BIT(0),
+ .num_adr = ARRAY_SIZE(cs42l45_l0u0_adr),
+ .adr_d = cs42l45_l0u0_adr,
+ },
+ {
+ .mask = BIT(1),
+ .num_adr = ARRAY_SIZE(cs35l63x2_l1u13_adr),
+ .adr_d = cs35l63x2_l1u13_adr,
+ },
+ {}
+};
+
+static const struct snd_soc_acpi_link_adr acp7x_cs42l45_l1u0[] = {
+ {
+ .mask = BIT(1),
+ .num_adr = ARRAY_SIZE(cs42l45_l1u0_adr),
+ .adr_d = cs42l45_l1u0_adr,
+ },
+ {}
+};
+
+static const struct snd_soc_acpi_link_adr acp7x_cs42l45_l1u0_cs35l63x2_l0u01[] = {
+ {
+ .mask = BIT(1),
+ .num_adr = ARRAY_SIZE(cs42l45_l1u0_adr),
+ .adr_d = cs42l45_l1u0_adr,
+ },
+ {
+ .mask = BIT(0),
+ .num_adr = ARRAY_SIZE(cs35l63x2_l0u01_adr),
+ .adr_d = cs35l63x2_l0u01_adr,
+ },
+ {}
+};
+
+static const struct snd_soc_acpi_link_adr acp7x_cs42l45_l1u0_cs35l63x4_l0u0246[] = {
+ {
+ .mask = BIT(1),
+ .num_adr = ARRAY_SIZE(cs42l45_l1u0_adr),
+ .adr_d = cs42l45_l1u0_adr,
+ },
+ {
+ .mask = BIT(0),
+ .num_adr = ARRAY_SIZE(cs35l63x4_l0u0246_adr),
+ .adr_d = cs35l63x4_l0u0246_adr,
+ },
+ {}
+};
+
struct snd_soc_acpi_mach snd_soc_acpi_amd_acp7b_sof_sdw_machines[] = {
{
.link_mask = BIT(0) | BIT(3),
@@ -188,6 +546,82 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_acp7f_sof_sdw_machines[] = {
.drv_name = "amd_sof_sdw",
.sof_tplg_filename = "sof-acp7f-rt722-l0.tplg",
.fw_filename = "sof-acp7f.ri",
+ }, {
+ .link_mask = BIT(0) | BIT(1),
+ .links = acp7x_cs42l43_l0u0_cs35l56x4_l1u3210,
+ .drv_name = "amd_sof_sdw",
+ .sof_tplg_filename = "sof-acp7f-cs42l43-l0u0-cs35l56x4-l1u3210.tplg",
+ .fw_filename = "sof-acp7f.ri",
+ },
+ {
+ .link_mask = BIT(0) | BIT(1),
+ .links = acp7x_cs42l45_l1u0_cs35l63x4_l0u0246,
+ .drv_name = "amd_sof_sdw",
+ .sof_tplg_filename = "sof-acp7f-cs42l45-l1u0-cs35l63x4-l0u0246.tplg",
+ .fw_filename = "sof-acp7f.ri",
+ },
+ {
+ .link_mask = BIT(0) | BIT(1),
+ .links = acp7x_cs42l45_l0u0_cs35l63x2_l1u01,
+ .drv_name = "amd_sof_sdw",
+ .sof_tplg_filename = "sof-acp7f-cs42l45-l0u0-cs35l63x2-l1u01.tplg",
+ .fw_filename = "sof-acp7f.ri",
+ },
+ {
+ .link_mask = BIT(0) | BIT(1),
+ .links = acp7x_cs42l45_l0u0_cs35l63x2_l1u13,
+ .drv_name = "amd_sof_sdw",
+ .sof_tplg_filename = "sof-acp7f-cs42l45-l0u0-cs35l63x2-l1u13.tplg",
+ .fw_filename = "sof-acp7f.ri",
+ },
+ {
+ .link_mask = BIT(0) | BIT(1),
+ .links = acp7x_cs42l45_l1u0_cs35l63x2_l0u01,
+ .drv_name = "amd_sof_sdw",
+ .sof_tplg_filename = "sof-acp7f-cs42l45-l1u0-cs35l63x2-l0u01.tplg",
+ .fw_filename = "sof-acp7f.ri",
+ },
+ {
+ .link_mask = BIT(1),
+ .links = acp7x_cs42l43_l1u0_cs35l56x4_l1u0123,
+ .drv_name = "amd_sof_sdw",
+ .sof_tplg_filename = "sof-acp7f-cs42l43-l1u0-cs35l56x4-l1u0123.tplg",
+ .fw_filename = "sof-acp7f.ri",
+ },
+ {
+ .link_mask = BIT(1),
+ .links = acp7x_cs35l56x4_l1u3210,
+ .drv_name = "amd_sof_sdw",
+ .sof_tplg_filename = "sof-acp7f-cs35l56x4-l1u3210.tplg",
+ .fw_filename = "sof-acp7f.ri",
+ },
+ {
+ .link_mask = BIT(0),
+ .links = acp7x_cs42l43_l0u1,
+ .drv_name = "amd_sof_sdw",
+ .sof_tplg_filename = "sof-acp7f-cs42l43-l0u1.tplg",
+ .fw_filename = "sof-acp7f.ri",
+ },
+ {
+ .link_mask = BIT(0),
+ .links = acp7x_cs42l43b_l0u1,
+ .drv_name = "amd_sof_sdw",
+ .sof_tplg_filename = "sof-acp7f-cs42l43b-l0u1.tplg",
+ .fw_filename = "sof-acp7f.ri",
+ },
+ {
+ .link_mask = BIT(0),
+ .links = acp7x_cs42l45_l0u0,
+ .drv_name = "amd_sof_sdw",
+ .sof_tplg_filename = "sof-acp7f-cs42l45-l0u0.tplg",
+ .fw_filename = "sof-acp7f.ri",
+ },
+ {
+ .link_mask = BIT(1),
+ .links = acp7x_cs42l45_l1u0,
+ .drv_name = "amd_sof_sdw",
+ .sof_tplg_filename = "sof-acp7f-cs42l45-l1u0.tplg",
+ .fw_filename = "sof-acp7f.ri",
},
{},
};
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH v2 2/6] ASoC: amd: acp: add SoundWire speaker quirks for Dell platforms
[not found] <20261107192744.2027264-1-syed.sabakareem@amd.com>
2026-11-07 19:26 ` [PATCH v2 1/6] ASoC: amd: acp: add Cirrus SoundWire configs for ACP7.F Syed Saba Kareem
@ 2026-11-07 19:26 ` Syed Saba Kareem
2026-11-07 19:26 ` [PATCH v2 3/6] ASoC: soc-acpi: move common function topology helpers Syed Saba Kareem
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Syed Saba Kareem @ 2026-11-07 19:26 UTC (permalink / raw)
To: broonie
Cc: Sunil-kumar.Dommati, vijendar.mukunda, Mario.Limonciello,
venkataprasad.potturu, Syed Saba Kareem, Vijendar Mukunda,
Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Pierre-Louis Bossart, Mario Limonciello (AMD),
Kuninori Morimoto, Charles Keepax, Krzysztof Kozlowski, Aaron Ma,
open list:AMD ASoC DRIVERS, open list
From: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Add sof_sdw_quirk_table DMI entries for the Dell 0EF1, 0EF2, 0EF3, 0EF4,
0F12 and 0F13 platforms, setting the ASOC_SDW_CODEC_SPKR quirk so that
the SoundWire speaker amplifiers are enabled on these systems.
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
---
sound/soc/amd/acp/acp-sdw-sof-mach.c | 48 ++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/sound/soc/amd/acp/acp-sdw-sof-mach.c b/sound/soc/amd/acp/acp-sdw-sof-mach.c
index 1d7487c87265..4e21d85d4724 100644
--- a/sound/soc/amd/acp/acp-sdw-sof-mach.c
+++ b/sound/soc/amd/acp/acp-sdw-sof-mach.c
@@ -47,6 +47,54 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = {
},
.driver_data = (void *)RT711_JD2,
},
+ {
+ .callback = sof_sdw_quirk_cb,
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0EF1"),
+ },
+ .driver_data = (void *)(ASOC_SDW_CODEC_SPKR),
+ },
+ {
+ .callback = sof_sdw_quirk_cb,
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "0EF2"),
+ },
+ .driver_data = (void *)(ASOC_SDW_CODEC_SPKR),
+ },
+ {
+ .callback = sof_sdw_quirk_cb,
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "0EF3"),
+ },
+ .driver_data = (void *)(ASOC_SDW_CODEC_SPKR),
+ },
+ {
+ .callback = sof_sdw_quirk_cb,
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "0EF4"),
+ },
+ .driver_data = (void *)(ASOC_SDW_CODEC_SPKR),
+ },
+ {
+ .callback = sof_sdw_quirk_cb,
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "0F12"),
+ },
+ .driver_data = (void *)(ASOC_SDW_CODEC_SPKR),
+ },
+ {
+ .callback = sof_sdw_quirk_cb,
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "0F13"),
+ },
+ .driver_data = (void *)(ASOC_SDW_CODEC_SPKR),
+ },
{}
};
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH v2 3/6] ASoC: soc-acpi: move common function topology helpers
[not found] <20261107192744.2027264-1-syed.sabakareem@amd.com>
2026-11-07 19:26 ` [PATCH v2 1/6] ASoC: amd: acp: add Cirrus SoundWire configs for ACP7.F Syed Saba Kareem
2026-11-07 19:26 ` [PATCH v2 2/6] ASoC: amd: acp: add SoundWire speaker quirks for Dell platforms Syed Saba Kareem
@ 2026-11-07 19:26 ` Syed Saba Kareem
2026-11-08 16:23 ` kernel test robot
2026-11-07 19:27 ` [PATCH v2 4/6] ASoC: amd: acp: add SOF function topology support Syed Saba Kareem
` (2 subsequent siblings)
5 siblings, 1 reply; 7+ messages in thread
From: Syed Saba Kareem @ 2026-11-07 19:26 UTC (permalink / raw)
To: broonie
Cc: Sunil-kumar.Dommati, vijendar.mukunda, Mario.Limonciello,
venkataprasad.potturu, Syed Saba Kareem,
Siva Subramanian Ravi Saravanan, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Cezary Rojewski, Peter Ujfalusi, Bard Liao,
Kai Vehmanen, Pierre-Louis Bossart,
open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
open list
From: Syed Saba Kareem <Syed.SabaKareem@amd.com>
From: Siva Subramanian Ravi Saravanan <sravisar@amd.com>
Move the Intel function topology helpers and the topology device enum
to soc-acpi so that they can be shared with other platforms too. The
moved helpers are:
- get_platform_name() as snd_soc_acpi_get_platform_name()
- tplg_files_exist() as snd_soc_acpi_tplg_files_exist()
- get_tplg_filename() as snd_soc_acpi_get_tplg_filename()
No functional change for Intel.
Signed-off-by: Siva Subramanian Ravi Saravanan <sravisar@amd.com>
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
---
include/sound/soc-acpi.h | 25 +++++
.../intel/common/sof-function-topology-lib.c | 93 ++-----------------
sound/soc/soc-acpi.c | 73 +++++++++++++++
3 files changed, 106 insertions(+), 85 deletions(-)
diff --git a/include/sound/soc-acpi.h b/include/sound/soc-acpi.h
index 2ee303b791dc..aea47a42f43d 100644
--- a/include/sound/soc-acpi.h
+++ b/include/sound/soc-acpi.h
@@ -257,4 +257,29 @@ bool snd_soc_acpi_sdw_link_slaves_found(struct device *dev,
const struct snd_soc_acpi_link_adr *link,
struct sdw_peripherals *peripherals);
+enum tplg_device_id {
+ TPLG_DEVICE_SDCA_JACK,
+ TPLG_DEVICE_SDCA_AMP,
+ TPLG_DEVICE_SDCA_MIC,
+ TPLG_DEVICE_INTEL_PCH_DMIC,
+ TPLG_DEVICE_HDMI,
+ TPLG_DEVICE_SSP_JACK,
+ TPLG_DEVICE_SSP_AMP,
+ TPLG_DEVICE_SSP_BT,
+ TPLG_DEVICE_SSP_HDMI_IN,
+ TPLG_DEVICE_LOOPBACK_VIRTUAL,
+ TPLG_DEVICE_ACP_SDW_JACK,
+ TPLG_DEVICE_ACP_SDW_AMP,
+ TPLG_DEVICE_ACP_SDW_MIC,
+ TPLG_DEVICE_ACP_DMIC,
+ TPLG_DEVICE_MAX
+};
+
+int snd_soc_acpi_get_platform_name(struct snd_soc_card *card,
+ const struct snd_soc_acpi_mach *mach, char *platform);
+bool snd_soc_acpi_tplg_files_exist(struct device *dev, const char *tplg_files);
+char *snd_soc_acpi_get_tplg_filename(struct device *dev, const char *prefix,
+ const char *platform, const char *tplg_dev_name,
+ int dai_link_id, int tplg_dev);
+
#endif
diff --git a/sound/soc/intel/common/sof-function-topology-lib.c b/sound/soc/intel/common/sof-function-topology-lib.c
index 57e089f8e721..413d6f11a00e 100644
--- a/sound/soc/intel/common/sof-function-topology-lib.c
+++ b/sound/soc/intel/common/sof-function-topology-lib.c
@@ -13,88 +13,11 @@
#include <sound/soc-acpi.h>
#include "sof-function-topology-lib.h"
-enum tplg_device_id {
- TPLG_DEVICE_SDCA_JACK,
- TPLG_DEVICE_SDCA_AMP,
- TPLG_DEVICE_SDCA_MIC,
- TPLG_DEVICE_INTEL_PCH_DMIC,
- TPLG_DEVICE_HDMI,
- TPLG_DEVICE_SSP_JACK,
- TPLG_DEVICE_SSP_AMP,
- TPLG_DEVICE_SSP_BT,
- TPLG_DEVICE_SSP_HDMI_IN,
- TPLG_DEVICE_LOOPBACK_VIRTUAL,
- TPLG_DEVICE_MAX
-};
-
#define SDCA_DEVICE_MASK (BIT(TPLG_DEVICE_SDCA_JACK) | BIT(TPLG_DEVICE_SDCA_AMP) | \
BIT(TPLG_DEVICE_SDCA_MIC))
#define SOF_INTEL_PLATFORM_NAME_MAX 4
-static int get_platform_name(struct snd_soc_card *card,
- const struct snd_soc_acpi_mach *mach, char *platform)
-{
- int ret;
-
- ret = sscanf(mach->sof_tplg_filename, "sof-%3s-*.tplg", platform);
- if (ret != 1) {
- dev_err(card->dev, "Invalid platform name of tplg %s\n",
- mach->sof_tplg_filename);
- return -EINVAL;
- }
-
- return 0;
-}
-
-static bool tplg_files_exist(struct device *dev, const char *tplg_files)
-{
- const struct firmware *fw;
- int ret;
-
- ret = firmware_request_nowarn(&fw, tplg_files, dev);
- if (!ret) {
- release_firmware(fw);
- return true;
- }
-
- dev_warn(dev,
- "Failed to open topology file: %s, you might need to\n",
- tplg_files);
- dev_warn(dev,
- "download it from https://github.com/thesofproject/sof-bin/\n");
- return false;
-}
-
-static char *get_tplg_filename(struct device *dev, const char *prefix,
- const char *platform, const char *tplg_dev_name,
- int dai_link_id, int tplg_dev)
-{
- char *filename = NULL;
-
- /*
- * The tplg file naming rule is sof-<platform>-<function>-id<BE id number>.tplg
- * where <platform> is required for functions that depend on NHLT blobs (e.g. DMIC/SSP)
- * as the nhlt blob is platform dependent.
- */
- switch (tplg_dev) {
- case TPLG_DEVICE_INTEL_PCH_DMIC:
- case TPLG_DEVICE_SSP_JACK:
- case TPLG_DEVICE_SSP_AMP:
- case TPLG_DEVICE_SSP_BT:
- case TPLG_DEVICE_SSP_HDMI_IN:
- filename = devm_kasprintf(dev, GFP_KERNEL, "%s/sof-%s-%s-id%d.tplg",
- prefix, platform, tplg_dev_name, dai_link_id);
- break;
- default:
- filename = devm_kasprintf(dev, GFP_KERNEL, "%s/sof-%s-id%d.tplg",
- prefix, tplg_dev_name, dai_link_id);
- break;
- }
-
- return filename;
-}
-
static int get_dmic_tplg_dev(struct device *dev, int dmic_num,
int *tplg_dev, char **tplg_dev_name)
{
@@ -182,7 +105,7 @@ int sof_sdw_get_tplg_files(struct snd_soc_card *card, const struct snd_soc_acpi_
int ret;
int i;
- ret = get_platform_name(card, mach, platform);
+ ret = snd_soc_acpi_get_platform_name(card, mach, platform);
if (ret < 0)
return ret;
@@ -235,13 +158,13 @@ int sof_sdw_get_tplg_files(struct snd_soc_card *card, const struct snd_soc_acpi_
if (tplg_mask & BIT(tplg_dev))
continue;
- tplg_file = get_tplg_filename(card->dev, prefix, platform, tplg_dev_name,
- dai_link->id, tplg_dev);
+ tplg_file = snd_soc_acpi_get_tplg_filename(card->dev, prefix, platform,
+ tplg_dev_name, dai_link->id, tplg_dev);
if (!tplg_file)
return -ENOMEM;
/* Check presence of sub-topologies */
- if (!tplg_files_exist(card->dev, tplg_file)) {
+ if (!snd_soc_acpi_tplg_files_exist(card->dev, tplg_file)) {
devm_kfree(card->dev, tplg_file);
if (best_effort)
continue;
@@ -275,7 +198,7 @@ int sof_i2s_get_tplg_files(struct snd_soc_card *card, const struct snd_soc_acpi_
int ret;
int i;
- ret = get_platform_name(card, mach, platform);
+ ret = snd_soc_acpi_get_platform_name(card, mach, platform);
if (ret < 0)
return ret;
@@ -307,13 +230,13 @@ int sof_i2s_get_tplg_files(struct snd_soc_card *card, const struct snd_soc_acpi_
if (tplg_mask & BIT(tplg_dev))
continue;
- tplg_file = get_tplg_filename(card->dev, prefix, platform, tplg_dev_name,
- dai_link->id, tplg_dev);
+ tplg_file = snd_soc_acpi_get_tplg_filename(card->dev, prefix, platform,
+ tplg_dev_name, dai_link->id, tplg_dev);
if (!tplg_file)
return -ENOMEM;
/* Check presence of sub-topologies */
- if (!tplg_files_exist(card->dev, tplg_file)) {
+ if (!snd_soc_acpi_tplg_files_exist(card->dev, tplg_file)) {
devm_kfree(card->dev, tplg_file);
if (best_effort)
continue;
diff --git a/sound/soc/soc-acpi.c b/sound/soc/soc-acpi.c
index 270f9777942f..7e9d7b3c6b32 100644
--- a/sound/soc/soc-acpi.c
+++ b/sound/soc/soc-acpi.c
@@ -4,7 +4,9 @@
//
// Copyright (c) 2013-15, Intel Corporation.
+#include <linux/device.h>
#include <linux/export.h>
+#include <linux/firmware.h>
#include <linux/module.h>
#include <sound/soc-acpi.h>
@@ -200,5 +202,76 @@ bool snd_soc_acpi_sdw_link_slaves_found(struct device *dev,
}
EXPORT_SYMBOL_GPL(snd_soc_acpi_sdw_link_slaves_found);
+int snd_soc_acpi_get_platform_name(struct snd_soc_card *card,
+ const struct snd_soc_acpi_mach *mach, char *platform)
+{
+ int ret;
+
+ /* platform must hold at least 8 bytes */
+ ret = sscanf(mach->sof_tplg_filename, "sof-%7[^-]-*.tplg", platform);
+ if (ret != 1) {
+ dev_err(card->dev, "Invalid platform name of tplg %s\n",
+ mach->sof_tplg_filename);
+ return -EINVAL;
+ }
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(snd_soc_acpi_get_platform_name);
+
+bool snd_soc_acpi_tplg_files_exist(struct device *dev, const char *tplg_files)
+{
+ const struct firmware *fw;
+ int ret;
+
+ ret = firmware_request_nowarn(&fw, tplg_files, dev);
+ if (!ret) {
+ release_firmware(fw);
+ return true;
+ }
+
+ dev_warn(dev,
+ "Failed to open topology file: %s, you might need to\n",
+ tplg_files);
+ dev_warn(dev,
+ "download it from https://github.com/thesofproject/sof-bin/\n");
+ return false;
+}
+EXPORT_SYMBOL_GPL(snd_soc_acpi_tplg_files_exist);
+
+char *snd_soc_acpi_get_tplg_filename(struct device *dev, const char *prefix,
+ const char *platform, const char *tplg_dev_name,
+ int dai_link_id, int tplg_dev)
+{
+ char *filename = NULL;
+
+ /*
+ * The tplg file naming rule is sof-<platform>-<function>-id<BE id number>.tplg
+ * where <platform> is required for functions that depend on NHLT blobs (e.g. DMIC/SSP)
+ * as the nhlt blob is platform dependent.
+ */
+ switch (tplg_dev) {
+ case TPLG_DEVICE_INTEL_PCH_DMIC:
+ case TPLG_DEVICE_SSP_JACK:
+ case TPLG_DEVICE_SSP_AMP:
+ case TPLG_DEVICE_SSP_BT:
+ case TPLG_DEVICE_SSP_HDMI_IN:
+ case TPLG_DEVICE_ACP_SDW_JACK:
+ case TPLG_DEVICE_ACP_SDW_AMP:
+ case TPLG_DEVICE_ACP_SDW_MIC:
+ case TPLG_DEVICE_ACP_DMIC:
+ filename = devm_kasprintf(dev, GFP_KERNEL, "%s/sof-%s-%s-id%d.tplg",
+ prefix, platform, tplg_dev_name, dai_link_id);
+ break;
+ default:
+ filename = devm_kasprintf(dev, GFP_KERNEL, "%s/sof-%s-id%d.tplg",
+ prefix, tplg_dev_name, dai_link_id);
+ break;
+ }
+
+ return filename;
+}
+EXPORT_SYMBOL_GPL(snd_soc_acpi_get_tplg_filename);
+
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("ALSA SoC ACPI module");
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v2 3/6] ASoC: soc-acpi: move common function topology helpers
2026-11-07 19:26 ` [PATCH v2 3/6] ASoC: soc-acpi: move common function topology helpers Syed Saba Kareem
@ 2026-11-08 16:23 ` kernel test robot
0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2026-11-08 16:23 UTC (permalink / raw)
To: Syed Saba Kareem, broonie
Cc: oe-kbuild-all, Sunil-kumar.Dommati, vijendar.mukunda,
Mario.Limonciello, venkataprasad.potturu, Syed Saba Kareem,
Siva Subramanian Ravi Saravanan, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Cezary Rojewski, Peter Ujfalusi, Bard Liao,
Kai Vehmanen, Pierre-Louis Bossart,
open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
open list
Hi Syed,
kernel test robot noticed the following build errors:
[auto build test ERROR on broonie-sound/for-next]
[cannot apply to linus/master v7.4-rc1 next-20261105]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Syed-Saba-Kareem/ASoC-amd-acp-add-SoundWire-speaker-quirks-for-Dell-platforms/20261108-005658
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
patch link: https://lore.kernel.org/r/20261107192744.2027264-4-syed.sabakareem%40amd.com
patch subject: [PATCH v2 3/6] ASoC: soc-acpi: move common function topology helpers
config: csky-randconfig-1001-20261108 (https://download.01.org/0day-ci/archive/20261109/202611090051.8jaT0pb0-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 16.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261109/202611090051.8jaT0pb0-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611090051.8jaT0pb0-lkp@intel.com/
All errors (new ones prefixed by >>, old ones prefixed by <<):
>> ERROR: modpost: sound/soc/intel/common/snd-soc-acpi-intel-match.ko: symbol 'snd_soc_acpi_get_platform_name' undefined!
>> ERROR: modpost: sound/soc/intel/common/snd-soc-acpi-intel-match.ko: symbol 'snd_soc_acpi_tplg_files_exist' undefined!
>> ERROR: modpost: sound/soc/intel/common/snd-soc-acpi-intel-match.ko: symbol 'snd_soc_acpi_get_tplg_filename' undefined!
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 4/6] ASoC: amd: acp: add SOF function topology support
[not found] <20261107192744.2027264-1-syed.sabakareem@amd.com>
` (2 preceding siblings ...)
2026-11-07 19:26 ` [PATCH v2 3/6] ASoC: soc-acpi: move common function topology helpers Syed Saba Kareem
@ 2026-11-07 19:27 ` Syed Saba Kareem
2026-11-07 19:27 ` [PATCH v2 5/6] ASoC: amd: acp: always append the DAI type to SoundWire DAI link names Syed Saba Kareem
2026-11-07 19:27 ` [PATCH v2 6/6] ASoC: amd: acp: enable function topologies for ACP7.F SoundWire Syed Saba Kareem
5 siblings, 0 replies; 7+ messages in thread
From: Syed Saba Kareem @ 2026-11-07 19:27 UTC (permalink / raw)
To: broonie
Cc: Sunil-kumar.Dommati, vijendar.mukunda, Mario.Limonciello,
venkataprasad.potturu, Syed Saba Kareem,
Siva Subramanian Ravi Saravanan, Vijendar Mukunda, Liam Girdwood,
Jaroslav Kysela, Takashi Iwai, Pierre-Louis Bossart, open list,
open list:AMD ASoC DRIVERS
From: Syed Saba Kareem <Syed.SabaKareem@amd.com>
From: Siva Subramanian Ravi Saravanan <sravisar@amd.com>
Add amd_sof_sdw_get_tplg_files() to build the list of SOF function
topologies from the card DAI links, so that a card can be formed from
per-function topologies instead of one monolithic topology per codec
configuration.
Signed-off-by: Siva Subramanian Ravi Saravanan <sravisar@amd.com>
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
---
sound/soc/amd/acp/Makefile | 3 +-
.../amd/acp/amd-sof-function-topology-lib.c | 129 ++++++++++++++++++
.../amd/acp/amd-sof-function-topology-lib.h | 19 +++
3 files changed, 150 insertions(+), 1 deletion(-)
create mode 100644 sound/soc/amd/acp/amd-sof-function-topology-lib.c
create mode 100644 sound/soc/amd/acp/amd-sof-function-topology-lib.h
diff --git a/sound/soc/amd/acp/Makefile b/sound/soc/amd/acp/Makefile
index 42e2bd34da06..91bbbeef5b8a 100644
--- a/sound/soc/amd/acp/Makefile
+++ b/sound/soc/amd/acp/Makefile
@@ -23,7 +23,8 @@ 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 amd-acp7x-acpi-match.o
+snd-soc-acpi-amd-match-y := amd-acp63-acpi-match.o amd-acp70-acpi-match.o amd-acp7x-acpi-match.o \
+ amd-sof-function-topology-lib.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-sof-function-topology-lib.c b/sound/soc/amd/acp/amd-sof-function-topology-lib.c
new file mode 100644
index 000000000000..8d70d46d769e
--- /dev/null
+++ b/sound/soc/amd/acp/amd-sof-function-topology-lib.c
@@ -0,0 +1,129 @@
+// SPDX-License-Identifier: GPL-2.0-only
+//
+// Copyright(c) 2026 Advanced Micro Devices, Inc.
+//
+
+#include <linux/bits.h>
+#include <linux/device.h>
+#include <linux/errno.h>
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <sound/soc.h>
+#include <sound/soc-acpi.h>
+#include "amd-sof-function-topology-lib.h"
+
+#define SOF_AMD_PLATFORM_NAME_MAX 8
+#define SOF_AMD_SDW_MAX_LINKS 4
+
+static int get_sdw_link_num(struct device *dev, struct snd_soc_dai_link *dai_link,
+ unsigned int *link_num)
+{
+ if (sscanf(dai_link->name, "SDW%u", link_num) != 1 ||
+ *link_num >= SOF_AMD_SDW_MAX_LINKS) {
+ dev_err(dev, "Can't get SDW link from dai_link->name %s\n", dai_link->name);
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+int amd_sof_sdw_get_tplg_files(struct snd_soc_card *card, const struct snd_soc_acpi_mach *mach,
+ const char *prefix, const char ***tplg_files, bool best_effort)
+{
+ struct snd_soc_dai_link *dai_link;
+ char platform[SOF_AMD_PLATFORM_NAME_MAX];
+ unsigned long tplg_mask = 0;
+ int tplg_num = 0;
+ char *tplg_file;
+ int tplg_bit;
+ int tplg_dev;
+ int ret;
+ int i;
+
+ /* ACP SoundWire and PDM DAI configuration is platform dependent */
+ ret = snd_soc_acpi_get_platform_name(card, mach, platform);
+ if (ret < 0)
+ return ret;
+
+ /*
+ * ACP SoundWire DAI index and stream names in the topologies are
+ * specific to the SoundWire link, so the link number is part of the
+ * SoundWire function names.
+ */
+ for_each_card_prelinks(card, i, dai_link) {
+ unsigned int link_num = 0;
+ const char *tplg_dev_name;
+
+ dev_dbg(card->dev, "dai_link %s id %d\n", dai_link->name, dai_link->id);
+ if (strstr(dai_link->name, "SimpleJack")) {
+ ret = get_sdw_link_num(card->dev, dai_link, &link_num);
+ if (ret)
+ return ret;
+
+ tplg_dev = TPLG_DEVICE_ACP_SDW_JACK;
+ tplg_dev_name = devm_kasprintf(card->dev, GFP_KERNEL, "jack-l%u", link_num);
+ if (!tplg_dev_name)
+ return -ENOMEM;
+ } else if (strstr(dai_link->name, "SmartAmp")) {
+ ret = get_sdw_link_num(card->dev, dai_link, &link_num);
+ if (ret)
+ return ret;
+
+ tplg_dev = TPLG_DEVICE_ACP_SDW_AMP;
+ tplg_dev_name = devm_kasprintf(card->dev, GFP_KERNEL, "%damp-l%u",
+ dai_link->num_cpus, link_num);
+ if (!tplg_dev_name)
+ return -ENOMEM;
+ } else if (strstr(dai_link->name, "SmartMic")) {
+ ret = get_sdw_link_num(card->dev, dai_link, &link_num);
+ if (ret)
+ return ret;
+
+ tplg_dev = TPLG_DEVICE_ACP_SDW_MIC;
+ tplg_dev_name = devm_kasprintf(card->dev, GFP_KERNEL, "mic-l%u", link_num);
+ if (!tplg_dev_name)
+ return -ENOMEM;
+ } else if (strstr(dai_link->name, "dmic")) {
+ /* ACP PDM DMIC is always stereo */
+ tplg_dev = TPLG_DEVICE_ACP_DMIC;
+ tplg_dev_name = "dmic-2ch";
+ } else {
+ /* The dai link is not supported by separated tplg yet */
+ dev_dbg(card->dev,
+ "dai_link %s is not supported by separated tplg yet\n",
+ dai_link->name);
+ if (best_effort)
+ continue;
+
+ return 0;
+ }
+
+ /* the same function on different links needs its own topology */
+ tplg_bit = (tplg_dev - TPLG_DEVICE_ACP_SDW_JACK) * SOF_AMD_SDW_MAX_LINKS + link_num;
+ if (tplg_mask & BIT(tplg_bit))
+ continue;
+
+ tplg_file = snd_soc_acpi_get_tplg_filename(card->dev, prefix, platform,
+ tplg_dev_name, dai_link->id, tplg_dev);
+ if (!tplg_file)
+ return -ENOMEM;
+
+ /* Check presence of sub-topologies */
+ if (!snd_soc_acpi_tplg_files_exist(card->dev, tplg_file)) {
+ devm_kfree(card->dev, tplg_file);
+ if (best_effort)
+ continue;
+
+ return 0;
+ }
+
+ tplg_mask |= BIT(tplg_bit);
+
+ (*tplg_files)[tplg_num] = tplg_file;
+ tplg_num++;
+ }
+
+ dev_dbg(card->dev, "tplg_mask %#lx tplg_num %d\n", tplg_mask, tplg_num);
+
+ return tplg_num;
+}
diff --git a/sound/soc/amd/acp/amd-sof-function-topology-lib.h b/sound/soc/amd/acp/amd-sof-function-topology-lib.h
new file mode 100644
index 000000000000..cea49aa9c200
--- /dev/null
+++ b/sound/soc/amd/acp/amd-sof-function-topology-lib.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * amd-sof-function-topology-lib.h - get-tplg-files ops
+ *
+ * Copyright(c) 2026 Advanced Micro Devices, Inc.
+ */
+
+#ifndef __AMD_SOF_FUNCTION_TOPOLOGY_LIB_H
+#define __AMD_SOF_FUNCTION_TOPOLOGY_LIB_H
+
+#include <linux/types.h>
+
+struct snd_soc_acpi_mach;
+struct snd_soc_card;
+
+int amd_sof_sdw_get_tplg_files(struct snd_soc_card *card, const struct snd_soc_acpi_mach *mach,
+ const char *prefix, const char ***tplg_files, bool best_effort);
+
+#endif
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH v2 5/6] ASoC: amd: acp: always append the DAI type to SoundWire DAI link names
[not found] <20261107192744.2027264-1-syed.sabakareem@amd.com>
` (3 preceding siblings ...)
2026-11-07 19:27 ` [PATCH v2 4/6] ASoC: amd: acp: add SOF function topology support Syed Saba Kareem
@ 2026-11-07 19:27 ` Syed Saba Kareem
2026-11-07 19:27 ` [PATCH v2 6/6] ASoC: amd: acp: enable function topologies for ACP7.F SoundWire Syed Saba Kareem
5 siblings, 0 replies; 7+ messages in thread
From: Syed Saba Kareem @ 2026-11-07 19:27 UTC (permalink / raw)
To: broonie
Cc: Sunil-kumar.Dommati, vijendar.mukunda, Mario.Limonciello,
venkataprasad.potturu, Syed Saba Kareem,
Siva Subramanian Ravi Saravanan, Vijendar Mukunda, Liam Girdwood,
Jaroslav Kysela, Takashi Iwai, Pierre-Louis Bossart,
Mario Limonciello (AMD),
Kuninori Morimoto, Charles Keepax, Krzysztof Kozlowski, Aaron Ma,
open list:AMD ASoC DRIVERS, open list
From: Syed Saba Kareem <Syed.SabaKareem@amd.com>
From: Siva Subramanian Ravi Saravanan <sravisar@amd.com>
Function topologies are selected from the DAI type (SimpleJack,
SmartAmp, SmartMic) in the DAI link name, but the SoundWire SOF machine
driver only appends it when a link has more than one DAI link. Always
append it. Existing topologies are not affected as the topology stream
names and DAI link names are matched partially.
Signed-off-by: Siva Subramanian Ravi Saravanan <sravisar@amd.com>
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
---
sound/soc/amd/acp/acp-sdw-sof-mach.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/soc/amd/acp/acp-sdw-sof-mach.c b/sound/soc/amd/acp/acp-sdw-sof-mach.c
index 4e21d85d4724..842278d850c9 100644
--- a/sound/soc/amd/acp/acp-sdw-sof-mach.c
+++ b/sound/soc/amd/acp/acp-sdw-sof-mach.c
@@ -398,6 +398,9 @@ static int sof_card_dai_links_create(struct snd_soc_card *card)
sdw_be_num = ret;
+ /* the dai_type in the DAI link name selects the function topologies */
+ ctx->append_dai_type = true;
+
/* enable dmic */
if (sof_sdw_quirk & ASOC_SDW_ACP_DMIC || mach_params->dmic_num ||
amd_ctx->pdm_sel) {
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH v2 6/6] ASoC: amd: acp: enable function topologies for ACP7.F SoundWire
[not found] <20261107192744.2027264-1-syed.sabakareem@amd.com>
` (4 preceding siblings ...)
2026-11-07 19:27 ` [PATCH v2 5/6] ASoC: amd: acp: always append the DAI type to SoundWire DAI link names Syed Saba Kareem
@ 2026-11-07 19:27 ` Syed Saba Kareem
5 siblings, 0 replies; 7+ messages in thread
From: Syed Saba Kareem @ 2026-11-07 19:27 UTC (permalink / raw)
To: broonie
Cc: Sunil-kumar.Dommati, vijendar.mukunda, Mario.Limonciello,
venkataprasad.potturu, Syed Saba Kareem,
Siva Subramanian Ravi Saravanan, Vijendar Mukunda, Liam Girdwood,
Jaroslav Kysela, Takashi Iwai, Pierre-Louis Bossart,
open list:AMD ASoC DRIVERS, open list
From: Syed Saba Kareem <Syed.SabaKareem@amd.com>
From: Siva Subramanian Ravi Saravanan <sravisar@amd.com>
Set get_function_tplg_files for all the ACP7.B and ACP7.F SoundWire
machine entries. The SOF core tries the function topologies first and
falls back to the monolithic topology if any of them is missing, so
existing setups keep working. The monolithic topology is still required
as its presence is checked when the SOF firmware file profile is set up.
Signed-off-by: Siva Subramanian Ravi Saravanan <sravisar@amd.com>
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
---
sound/soc/amd/acp/amd-acp7x-acpi-match.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/sound/soc/amd/acp/amd-acp7x-acpi-match.c b/sound/soc/amd/acp/amd-acp7x-acpi-match.c
index 217b11f9dfc3..068b11400a41 100644
--- a/sound/soc/amd/acp/amd-acp7x-acpi-match.c
+++ b/sound/soc/amd/acp/amd-acp7x-acpi-match.c
@@ -8,6 +8,7 @@
#include <sound/soc-acpi.h>
#include "../mach-config.h"
+#include "amd-sof-function-topology-lib.h"
static const struct snd_soc_acpi_endpoint single_endpoint = {
.num = 0,
@@ -513,6 +514,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_acp7b_sof_sdw_machines[] = {
.drv_name = "amd_sof_sdw",
.sof_tplg_filename = "sof-acp7b-rt721-l0-rt1320-l3.tplg",
.fw_filename = "sof-acp7b.ri",
+ .get_function_tplg_files = amd_sof_sdw_get_tplg_files,
},
{},
};
@@ -525,6 +527,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_acp7f_sof_sdw_machines[] = {
.drv_name = "amd_sof_sdw",
.sof_tplg_filename = "sof-acp7f-rt721-l0-rt1320-l3.tplg",
.fw_filename = "sof-acp7f.ri",
+ .get_function_tplg_files = amd_sof_sdw_get_tplg_files,
},
{
.link_mask = BIT(0) | BIT(1),
@@ -532,6 +535,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_acp7f_sof_sdw_machines[] = {
.drv_name = "amd_sof_sdw",
.sof_tplg_filename = "sof-acp7f-rt721-l0-rt1320-l1.tplg",
.fw_filename = "sof-acp7f.ri",
+ .get_function_tplg_files = amd_sof_sdw_get_tplg_files,
},
{
.link_mask = BIT(0),
@@ -539,6 +543,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_acp7f_sof_sdw_machines[] = {
.drv_name = "amd_sof_sdw",
.sof_tplg_filename = "sof-acp7f-rt721-l0.tplg",
.fw_filename = "sof-acp7f.ri",
+ .get_function_tplg_files = amd_sof_sdw_get_tplg_files,
},
{
.link_mask = BIT(0),
@@ -546,12 +551,14 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_acp7f_sof_sdw_machines[] = {
.drv_name = "amd_sof_sdw",
.sof_tplg_filename = "sof-acp7f-rt722-l0.tplg",
.fw_filename = "sof-acp7f.ri",
+ .get_function_tplg_files = amd_sof_sdw_get_tplg_files,
}, {
.link_mask = BIT(0) | BIT(1),
.links = acp7x_cs42l43_l0u0_cs35l56x4_l1u3210,
.drv_name = "amd_sof_sdw",
.sof_tplg_filename = "sof-acp7f-cs42l43-l0u0-cs35l56x4-l1u3210.tplg",
.fw_filename = "sof-acp7f.ri",
+ .get_function_tplg_files = amd_sof_sdw_get_tplg_files,
},
{
.link_mask = BIT(0) | BIT(1),
@@ -559,6 +566,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_acp7f_sof_sdw_machines[] = {
.drv_name = "amd_sof_sdw",
.sof_tplg_filename = "sof-acp7f-cs42l45-l1u0-cs35l63x4-l0u0246.tplg",
.fw_filename = "sof-acp7f.ri",
+ .get_function_tplg_files = amd_sof_sdw_get_tplg_files,
},
{
.link_mask = BIT(0) | BIT(1),
@@ -566,6 +574,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_acp7f_sof_sdw_machines[] = {
.drv_name = "amd_sof_sdw",
.sof_tplg_filename = "sof-acp7f-cs42l45-l0u0-cs35l63x2-l1u01.tplg",
.fw_filename = "sof-acp7f.ri",
+ .get_function_tplg_files = amd_sof_sdw_get_tplg_files,
},
{
.link_mask = BIT(0) | BIT(1),
@@ -573,6 +582,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_acp7f_sof_sdw_machines[] = {
.drv_name = "amd_sof_sdw",
.sof_tplg_filename = "sof-acp7f-cs42l45-l0u0-cs35l63x2-l1u13.tplg",
.fw_filename = "sof-acp7f.ri",
+ .get_function_tplg_files = amd_sof_sdw_get_tplg_files,
},
{
.link_mask = BIT(0) | BIT(1),
@@ -580,6 +590,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_acp7f_sof_sdw_machines[] = {
.drv_name = "amd_sof_sdw",
.sof_tplg_filename = "sof-acp7f-cs42l45-l1u0-cs35l63x2-l0u01.tplg",
.fw_filename = "sof-acp7f.ri",
+ .get_function_tplg_files = amd_sof_sdw_get_tplg_files,
},
{
.link_mask = BIT(1),
@@ -587,6 +598,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_acp7f_sof_sdw_machines[] = {
.drv_name = "amd_sof_sdw",
.sof_tplg_filename = "sof-acp7f-cs42l43-l1u0-cs35l56x4-l1u0123.tplg",
.fw_filename = "sof-acp7f.ri",
+ .get_function_tplg_files = amd_sof_sdw_get_tplg_files,
},
{
.link_mask = BIT(1),
@@ -594,6 +606,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_acp7f_sof_sdw_machines[] = {
.drv_name = "amd_sof_sdw",
.sof_tplg_filename = "sof-acp7f-cs35l56x4-l1u3210.tplg",
.fw_filename = "sof-acp7f.ri",
+ .get_function_tplg_files = amd_sof_sdw_get_tplg_files,
},
{
.link_mask = BIT(0),
@@ -601,6 +614,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_acp7f_sof_sdw_machines[] = {
.drv_name = "amd_sof_sdw",
.sof_tplg_filename = "sof-acp7f-cs42l43-l0u1.tplg",
.fw_filename = "sof-acp7f.ri",
+ .get_function_tplg_files = amd_sof_sdw_get_tplg_files,
},
{
.link_mask = BIT(0),
@@ -608,6 +622,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_acp7f_sof_sdw_machines[] = {
.drv_name = "amd_sof_sdw",
.sof_tplg_filename = "sof-acp7f-cs42l43b-l0u1.tplg",
.fw_filename = "sof-acp7f.ri",
+ .get_function_tplg_files = amd_sof_sdw_get_tplg_files,
},
{
.link_mask = BIT(0),
@@ -615,6 +630,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_acp7f_sof_sdw_machines[] = {
.drv_name = "amd_sof_sdw",
.sof_tplg_filename = "sof-acp7f-cs42l45-l0u0.tplg",
.fw_filename = "sof-acp7f.ri",
+ .get_function_tplg_files = amd_sof_sdw_get_tplg_files,
},
{
.link_mask = BIT(1),
@@ -622,6 +638,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_acp7f_sof_sdw_machines[] = {
.drv_name = "amd_sof_sdw",
.sof_tplg_filename = "sof-acp7f-cs42l45-l1u0.tplg",
.fw_filename = "sof-acp7f.ri",
+ .get_function_tplg_files = amd_sof_sdw_get_tplg_files,
},
{},
};
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread