From 9ba734901cfd67d1b2101cce803a62d422e81b67 Mon Sep 17 00:00:00 2001 From: Simon Trimmer Date: Tue, 27 Jan 2026 17:34:46 +0000 Subject: [PATCH 1/4] ASoC: amd: acp: Sort match table into most specific first Match tables should be sorted so that more complex combinations of device matches are before simpler combinations, with the single device matches at the end. Signed-off-by: Simon Trimmer Link: https://patch.msgid.link/50c385a7f64ccd75cabf49eddbc0ec6fe13f3252.1769534442.git.simont@opensource.cirrus.com Signed-off-by: Mark Brown --- sound/soc/amd/acp/amd-acp70-acpi-match.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/amd/acp/amd-acp70-acpi-match.c b/sound/soc/amd/acp/amd-acp70-acpi-match.c index c5f42bd79548..93eb01a00a0c 100644 --- a/sound/soc/amd/acp/amd-acp70-acpi-match.c +++ b/sound/soc/amd/acp/amd-acp70-acpi-match.c @@ -326,11 +326,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_sdw_machines[] = { .links = acp70_rt722_l0_rt1320_l1, .drv_name = "amd_sdw", }, - { - .link_mask = BIT(0), - .links = acp70_rt722_only, - .drv_name = "amd_sdw", - }, { .link_mask = BIT(0) | BIT(1), .links = acp70_4_in_1_sdca, @@ -351,6 +346,11 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_sdw_machines[] = { .links = acp70_cs35l56x4_l1, .drv_name = "amd_sdw", }, + { + .link_mask = BIT(0), + .links = acp70_rt722_only, + .drv_name = "amd_sdw", + }, { .link_mask = BIT(1), .links = acp70_alc712_vb_l1, From 5eb3fc48d37157fd83315bcbb5693269fc497fb7 Mon Sep 17 00:00:00 2001 From: Simon Trimmer Date: Tue, 27 Jan 2026 17:34:47 +0000 Subject: [PATCH 2/4] ASoC: amd: acp: Rename Cirrus Logic component match entries to include link and uid In preparation for having similar matches with multiple UIDs on the same bus rename the match entries to include the bus link and device uid numbers in their name using the lNuN convention. Signed-off-by: Simon Trimmer Link: https://patch.msgid.link/f8f7fab5131ea6080421812dcce3e9ffc5b936e0.1769534442.git.simont@opensource.cirrus.com Signed-off-by: Mark Brown --- sound/soc/amd/acp/amd-acp70-acpi-match.c | 34 ++++++++++++------------ 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/sound/soc/amd/acp/amd-acp70-acpi-match.c b/sound/soc/amd/acp/amd-acp70-acpi-match.c index 93eb01a00a0c..44fab145aa59 100644 --- a/sound/soc/amd/acp/amd-acp70-acpi-match.c +++ b/sound/soc/amd/acp/amd-acp70-acpi-match.c @@ -187,7 +187,7 @@ static const struct snd_soc_acpi_endpoint cs42l43_endpoints[] = { }, }; -static const struct snd_soc_acpi_adr_device cs42l43_0_adr[] = { +static const struct snd_soc_acpi_adr_device cs42l43_l0u0_adr[] = { { .adr = 0x00003001FA424301ull, .num_endpoints = ARRAY_SIZE(cs42l43_endpoints), @@ -196,7 +196,7 @@ static const struct snd_soc_acpi_adr_device cs42l43_0_adr[] = { } }; -static const struct snd_soc_acpi_adr_device cs42l43_1_cs35l56x4_1_adr[] = { +static const struct snd_soc_acpi_adr_device cs42l43_l1u0_cs35l56x4_l1u0123_adr[] = { { .adr = 0x00013001FA424301ull, .num_endpoints = ARRAY_SIZE(cs42l43_endpoints), @@ -229,7 +229,7 @@ static const struct snd_soc_acpi_adr_device cs42l43_1_cs35l56x4_1_adr[] = { }, }; -static const struct snd_soc_acpi_adr_device cs35l56x4_1_adr[] = { +static const struct snd_soc_acpi_adr_device cs35l56x4_l1u3210_adr[] = { { .adr = 0x00013301FA355601ull, .num_endpoints = 1, @@ -256,34 +256,34 @@ static const struct snd_soc_acpi_adr_device cs35l56x4_1_adr[] = { }, }; -static const struct snd_soc_acpi_link_adr acp70_cs42l43_l1_cs35l56x4_l1[] = { +static const struct snd_soc_acpi_link_adr acp70_cs42l43_l1u0_cs35l56x4_l1u0123[] = { { .mask = BIT(1), - .num_adr = ARRAY_SIZE(cs42l43_1_cs35l56x4_1_adr), - .adr_d = cs42l43_1_cs35l56x4_1_adr, + .num_adr = ARRAY_SIZE(cs42l43_l1u0_cs35l56x4_l1u0123_adr), + .adr_d = cs42l43_l1u0_cs35l56x4_l1u0123_adr, }, {} }; -static const struct snd_soc_acpi_link_adr acp70_cs42l43_l0_cs35l56x4_l1[] = { +static const struct snd_soc_acpi_link_adr acp70_cs42l43_l0u0_cs35l56x4_l1u3210[] = { { .mask = BIT(0), - .num_adr = ARRAY_SIZE(cs42l43_0_adr), - .adr_d = cs42l43_0_adr, + .num_adr = ARRAY_SIZE(cs42l43_l0u0_adr), + .adr_d = cs42l43_l0u0_adr, }, { .mask = BIT(1), - .num_adr = ARRAY_SIZE(cs35l56x4_1_adr), - .adr_d = cs35l56x4_1_adr, + .num_adr = ARRAY_SIZE(cs35l56x4_l1u3210_adr), + .adr_d = cs35l56x4_l1u3210_adr, }, {} }; -static const struct snd_soc_acpi_link_adr acp70_cs35l56x4_l1[] = { +static const struct snd_soc_acpi_link_adr acp70_cs35l56x4_l1u3210[] = { { .mask = BIT(1), - .num_adr = ARRAY_SIZE(cs35l56x4_1_adr), - .adr_d = cs35l56x4_1_adr, + .num_adr = ARRAY_SIZE(cs35l56x4_l1u3210_adr), + .adr_d = cs35l56x4_l1u3210_adr, }, {} }; @@ -333,17 +333,17 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_sdw_machines[] = { }, { .link_mask = BIT(0) | BIT(1), - .links = acp70_cs42l43_l0_cs35l56x4_l1, + .links = acp70_cs42l43_l0u0_cs35l56x4_l1u3210, .drv_name = "amd_sdw", }, { .link_mask = BIT(1), - .links = acp70_cs42l43_l1_cs35l56x4_l1, + .links = acp70_cs42l43_l1u0_cs35l56x4_l1u0123, .drv_name = "amd_sdw", }, { .link_mask = BIT(1), - .links = acp70_cs35l56x4_l1, + .links = acp70_cs35l56x4_l1u3210, .drv_name = "amd_sdw", }, { From 3de9cf4782492b19c9d8bdac309462027e18ab43 Mon Sep 17 00:00:00 2001 From: Simon Trimmer Date: Tue, 27 Jan 2026 17:34:48 +0000 Subject: [PATCH 3/4] ASoC: amd: acp: Sort Cirrus Logic match entries In preparation for adding more match entries sort the ones that are present. Signed-off-by: Simon Trimmer Link: https://patch.msgid.link/0a756390dfb7e928246d0f35c611f175e1311e55.1769534442.git.simont@opensource.cirrus.com Signed-off-by: Mark Brown --- sound/soc/amd/acp/amd-acp70-acpi-match.c | 66 ++++++++++++------------ 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/sound/soc/amd/acp/amd-acp70-acpi-match.c b/sound/soc/amd/acp/amd-acp70-acpi-match.c index 44fab145aa59..de8f5a2a8e9d 100644 --- a/sound/soc/amd/acp/amd-acp70-acpi-match.c +++ b/sound/soc/amd/acp/amd-acp70-acpi-match.c @@ -187,6 +187,33 @@ static const struct snd_soc_acpi_endpoint cs42l43_endpoints[] = { }, }; +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 cs42l43_l0u0_adr[] = { { .adr = 0x00003001FA424301ull, @@ -229,38 +256,11 @@ static const struct snd_soc_acpi_adr_device cs42l43_l1u0_cs35l56x4_l1u0123_adr[] }, }; -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_link_adr acp70_cs42l43_l1u0_cs35l56x4_l1u0123[] = { +static const struct snd_soc_acpi_link_adr acp70_cs35l56x4_l1u3210[] = { { .mask = BIT(1), - .num_adr = ARRAY_SIZE(cs42l43_l1u0_cs35l56x4_l1u0123_adr), - .adr_d = cs42l43_l1u0_cs35l56x4_l1u0123_adr, + .num_adr = ARRAY_SIZE(cs35l56x4_l1u3210_adr), + .adr_d = cs35l56x4_l1u3210_adr, }, {} }; @@ -279,11 +279,11 @@ static const struct snd_soc_acpi_link_adr acp70_cs42l43_l0u0_cs35l56x4_l1u3210[] {} }; -static const struct snd_soc_acpi_link_adr acp70_cs35l56x4_l1u3210[] = { +static const struct snd_soc_acpi_link_adr acp70_cs42l43_l1u0_cs35l56x4_l1u0123[] = { { .mask = BIT(1), - .num_adr = ARRAY_SIZE(cs35l56x4_l1u3210_adr), - .adr_d = cs35l56x4_l1u3210_adr, + .num_adr = ARRAY_SIZE(cs42l43_l1u0_cs35l56x4_l1u0123_adr), + .adr_d = cs42l43_l1u0_cs35l56x4_l1u0123_adr, }, {} }; From ddd9bf2212ab80bb90fa986cd987c671de53bd44 Mon Sep 17 00:00:00 2001 From: Simon Trimmer Date: Tue, 27 Jan 2026 17:34:49 +0000 Subject: [PATCH 4/4] ASoC: amd: acp: Add ACP7.0 match entries for Cirrus Logic parts This adds some match entries for a few system configurations: cs42l45 link 1 UID 0 cs35l63 link 0 UID 0 cs35l63 link 0 UID 2 cs35l63 link 0 UID 4 cs35l63 link 0 UID 6 cs42l45 link 0 UID 0 cs35l63 link 1 UID 0 cs35l63 link 1 UID 1 cs42l45 link 0 UID 0 cs35l63 link 1 UID 1 cs35l63 link 1 UID 3 cs42l45 link 1 UID 0 cs35l63 link 0 UID 0 cs35l63 link 0 UID 1 cs35l63 link 0 UID 0 cs35l63 link 0 UID 2 cs35l63 link 0 UID 4 cs35l63 link 0 UID 6 cs42l43 link 0 UID 1 cs42l43b link 0 UID 1 cs42l45 link 0 UID 0 cs42l45 link 1 UID 0 Signed-off-by: Simon Trimmer Reviewed-by: Maciej Strozek Link: https://patch.msgid.link/6cac5670fd5bc14201d925584251d75e59307431.1769534442.git.simont@opensource.cirrus.com Signed-off-by: Mark Brown --- sound/soc/amd/acp/amd-acp70-acpi-match.c | 256 +++++++++++++++++++++++ 1 file changed, 256 insertions(+) diff --git a/sound/soc/amd/acp/amd-acp70-acpi-match.c b/sound/soc/amd/acp/amd-acp70-acpi-match.c index de8f5a2a8e9d..dd2b010efdaa 100644 --- a/sound/soc/amd/acp/amd-acp70-acpi-match.c +++ b/sound/soc/amd/acp/amd-acp70-acpi-match.c @@ -214,6 +214,78 @@ static const struct snd_soc_acpi_adr_device cs35l56x4_l1u3210_adr[] = { }, }; +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, @@ -223,6 +295,24 @@ static const struct snd_soc_acpi_adr_device cs42l43_l0u0_adr[] = { } }; +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, @@ -256,6 +346,26 @@ static const struct snd_soc_acpi_adr_device cs42l43_l1u0_cs35l56x4_l1u0123_adr[] }, }; +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 acp70_cs35l56x4_l1u3210[] = { { .mask = BIT(1), @@ -265,6 +375,33 @@ static const struct snd_soc_acpi_link_adr acp70_cs35l56x4_l1u3210[] = { {} }; +static const struct snd_soc_acpi_link_adr acp70_cs35l63x4_l0u0246[] = { + { + .mask = BIT(0), + .num_adr = ARRAY_SIZE(cs35l63x4_l0u0246_adr), + .adr_d = cs35l63x4_l0u0246_adr, + }, + {} +}; + +static const struct snd_soc_acpi_link_adr acp70_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 acp70_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 acp70_cs42l43_l0u0_cs35l56x4_l1u3210[] = { { .mask = BIT(0), @@ -288,6 +425,80 @@ static const struct snd_soc_acpi_link_adr acp70_cs42l43_l1u0_cs35l56x4_l1u0123[] {} }; +static const struct snd_soc_acpi_link_adr acp70_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 acp70_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 acp70_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 acp70_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 acp70_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 acp70_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, + }, + {} +}; + static const struct snd_soc_acpi_link_adr acp70_alc712_vb_l1[] = { { .mask = BIT(1), @@ -336,6 +547,26 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_sdw_machines[] = { .links = acp70_cs42l43_l0u0_cs35l56x4_l1u3210, .drv_name = "amd_sdw", }, + { + .link_mask = BIT(0) | BIT(1), + .links = acp70_cs42l45_l1u0_cs35l63x4_l0u0246, + .drv_name = "amd_sdw", + }, + { + .link_mask = BIT(0) | BIT(1), + .links = acp70_cs42l45_l0u0_cs35l63x2_l1u01, + .drv_name = "amd_sdw", + }, + { + .link_mask = BIT(0) | BIT(1), + .links = acp70_cs42l45_l0u0_cs35l63x2_l1u13, + .drv_name = "amd_sdw", + }, + { + .link_mask = BIT(0) | BIT(1), + .links = acp70_cs42l45_l1u0_cs35l63x2_l0u01, + .drv_name = "amd_sdw", + }, { .link_mask = BIT(1), .links = acp70_cs42l43_l1u0_cs35l56x4_l1u0123, @@ -346,11 +577,36 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_sdw_machines[] = { .links = acp70_cs35l56x4_l1u3210, .drv_name = "amd_sdw", }, + { + .link_mask = BIT(0), + .links = acp70_cs35l63x4_l0u0246, + .drv_name = "amd_sdw", + }, { .link_mask = BIT(0), .links = acp70_rt722_only, .drv_name = "amd_sdw", }, + { + .link_mask = BIT(0), + .links = acp70_cs42l43_l0u1, + .drv_name = "amd_sdw", + }, + { + .link_mask = BIT(0), + .links = acp70_cs42l43b_l0u1, + .drv_name = "amd_sdw", + }, + { + .link_mask = BIT(0), + .links = acp70_cs42l45_l0u0, + .drv_name = "amd_sdw", + }, + { + .link_mask = BIT(1), + .links = acp70_cs42l45_l1u0, + .drv_name = "amd_sdw", + }, { .link_mask = BIT(1), .links = acp70_alc712_vb_l1,