From 5fe314325663806167f25bf93aa4f39b2425b985 Mon Sep 17 00:00:00 2001 From: Mac Chiang Date: Wed, 27 May 2026 16:27:39 +0800 Subject: [PATCH 1/2] ASoC: Intel: soc-acpi-intel-adl-match: Reorder ACPI machine tables Sort ACPI machine tables by link count to ensure that configurations with the highest number of matching links are selected. Align the ordering with commit 08095e20995a ("ASoC: Intel: soc-acpi-intel-ptl-match: Sort ACPI link/machine tables"). Signed-off-by: Mac Chiang --- .../intel/common/soc-acpi-intel-adl-match.c | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/sound/soc/intel/common/soc-acpi-intel-adl-match.c b/sound/soc/intel/common/soc-acpi-intel-adl-match.c index a68efbe98948f4..132858c99edb2b 100644 --- a/sound/soc/intel/common/soc-acpi-intel-adl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-adl-match.c @@ -682,12 +682,6 @@ EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_adl_machines); /* this table is used when there is no I2S codec present */ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[] = { - { - .link_mask = BIT(0) | BIT(2) | BIT(3), - .links = adl_cs42l43_l0_cs35l56_l23, - .drv_name = "sof_sdw", - .sof_tplg_filename = "sof-adl-cs42l43-l0-cs35l56-l23.tplg", - }, { .link_mask = 0xF, /* 4 active links required */ .links = adl_default, @@ -713,22 +707,22 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[] = { .sof_tplg_filename = "sof-adl-rt711-l2-rt1316-l01-rt714-l3.tplg", }, { - .link_mask = 0x7, /* rt1316 on link0 and link1 & rt711 on link2*/ - .links = adl_sdw_rt711_link2_rt1316_link01, + .link_mask = 0x7, /* rt714 on link0 & two rt1316s on link1 and link2 */ + .links = adl_sdw_rt1316_link12_rt714_link0, .drv_name = "sof_sdw", - .sof_tplg_filename = "sof-adl-rt711-l2-rt1316-l01.tplg", + .sof_tplg_filename = "sof-adl-rt1316-l12-rt714-l0.tplg", }, { - .link_mask = 0xC, /* rt1316 on link2 & rt714 on link3 */ - .links = adl_sdw_rt1316_link2_rt714_link3, + .link_mask = 0x7, /* rt1316 on link0 and link1 & rt711 on link2*/ + .links = adl_sdw_rt711_link2_rt1316_link01, .drv_name = "sof_sdw", - .sof_tplg_filename = "sof-adl-rt1316-l2-mono-rt714-l3.tplg", + .sof_tplg_filename = "sof-adl-rt711-l2-rt1316-l01.tplg", }, { - .link_mask = 0x7, /* rt714 on link0 & two rt1316s on link1 and link2 */ - .links = adl_sdw_rt1316_link12_rt714_link0, + .link_mask = BIT(0) | BIT(2) | BIT(3), + .links = adl_cs42l43_l0_cs35l56_l23, .drv_name = "sof_sdw", - .sof_tplg_filename = "sof-adl-rt1316-l12-rt714-l0.tplg", + .sof_tplg_filename = "sof-adl-cs42l43-l0-cs35l56-l23.tplg", }, { .link_mask = 0x3, /* rt1316 on link1 & rt714 on link0 */ @@ -742,6 +736,24 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[] = { .drv_name = "sof_sdw", .sof_tplg_filename = "sof-adl-rt1316-l2-mono-rt714-l0.tplg", }, + { + .link_mask = 0x5, /* 2 active links required */ + .links = adl_sdw_rt711_link0_rt1316_link2, + .drv_name = "sof_sdw", + .sof_tplg_filename = "sof-adl-rt711-l0-rt1316-l2.tplg", + }, + { + .link_mask = 0x5, /* rt5682 on link0 & 2xmax98373 on link 2 */ + .links = adl_chromebook_base, + .drv_name = "sof_sdw", + .sof_tplg_filename = "sof-adl-sdw-max98373-rt5682.tplg", + }, + { + .link_mask = BIT(0) | BIT(2), + .links = adl_sdw_rt1316_link02, + .drv_name = "sof_sdw", + .sof_tplg_filename = "sof-adl-rt1316-l02.tplg", + }, { .link_mask = 0x9, /* 2 active links required */ .links = adl_sdw_rt711_link0_rt1316_link3, @@ -749,10 +761,10 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[] = { .sof_tplg_filename = "sof-adl-rt711-l0-rt1316-l3.tplg", }, { - .link_mask = 0x5, /* 2 active links required */ - .links = adl_sdw_rt711_link0_rt1316_link2, + .link_mask = 0xC, /* rt1316 on link2 & rt714 on link3 */ + .links = adl_sdw_rt1316_link2_rt714_link3, .drv_name = "sof_sdw", - .sof_tplg_filename = "sof-adl-rt711-l0-rt1316-l2.tplg", + .sof_tplg_filename = "sof-adl-rt1316-l2-mono-rt714-l3.tplg", }, { .link_mask = 0x1, /* link0 required */ @@ -766,18 +778,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[] = { .drv_name = "sof_sdw", .sof_tplg_filename = "sof-adl-rt711.tplg", }, - { - .link_mask = 0x5, /* rt5682 on link0 & 2xmax98373 on link 2 */ - .links = adl_chromebook_base, - .drv_name = "sof_sdw", - .sof_tplg_filename = "sof-adl-sdw-max98373-rt5682.tplg", - }, - { - .link_mask = BIT(0) | BIT(2), - .links = adl_sdw_rt1316_link02, - .drv_name = "sof_sdw", - .sof_tplg_filename = "sof-adl-rt1316-l02.tplg", - }, {}, }; EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_adl_sdw_machines); From 08f6f5fba21e9d189a323c80b65d4cad296e9d9b Mon Sep 17 00:00:00 2001 From: Mac Chiang Date: Wed, 27 May 2026 17:54:19 +0800 Subject: [PATCH 2/2] ASoC: Intel: soc-acpi-intel-adl-match: add rt711-l0-rt1316-l23-rt714-l1 support Add adl support for the same configuration as: sof-mtl-rt711-l0-rt1316-l23-rt714-l1 sof-lnl-rt711-l0-rt1316-l23-rt714-l1 Signed-off-by: Mac Chiang --- .../intel/common/soc-acpi-intel-adl-match.c | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/sound/soc/intel/common/soc-acpi-intel-adl-match.c b/sound/soc/intel/common/soc-acpi-intel-adl-match.c index 132858c99edb2b..c30cf225497606 100644 --- a/sound/soc/intel/common/soc-acpi-intel-adl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-adl-match.c @@ -187,6 +187,15 @@ static const struct snd_soc_acpi_adr_device rt1316_2_group1_adr[] = { } }; +static const struct snd_soc_acpi_adr_device rt1316_2_l_group1_adr[] = { + { + .adr = 0x000230025D131601ull, + .num_endpoints = 1, + .endpoints = &spk_l_endpoint, + .name_prefix = "rt1316-1" + } +}; + static const struct snd_soc_acpi_adr_device rt1316_3_group1_adr[] = { { .adr = 0x000330025D131601ull, @@ -196,6 +205,15 @@ static const struct snd_soc_acpi_adr_device rt1316_3_group1_adr[] = { } }; +static const struct snd_soc_acpi_adr_device rt1316_3_r_group1_adr[] = { + { + .adr = 0x000331025D131601ull, + .num_endpoints = 1, + .endpoints = &spk_r_endpoint, + .name_prefix = "rt1316-2" + } +}; + static const struct snd_soc_acpi_adr_device rt1316_0_group2_adr[] = { { .adr = 0x000031025D131601ull, @@ -259,6 +277,15 @@ static const struct snd_soc_acpi_adr_device rt714_0_adr[] = { } }; +static const struct snd_soc_acpi_adr_device rt714_1_adr[] = { + { + .adr = 0x000130025D071401ull, + .num_endpoints = 1, + .endpoints = &single_endpoint, + .name_prefix = "rt714" + } +}; + static const struct snd_soc_acpi_adr_device rt714_2_adr[] = { { .adr = 0x000230025D071401ull, @@ -349,6 +376,30 @@ static const struct snd_soc_acpi_link_adr adl_sdca_3_in_1[] = { {} }; +static const struct snd_soc_acpi_link_adr adl_sdw_rt711_link0_rt1316_link23_rt714_link1[] = { + { + .mask = BIT(0), + .num_adr = ARRAY_SIZE(rt711_sdca_0_adr), + .adr_d = rt711_sdca_0_adr, + }, + { + .mask = BIT(2), + .num_adr = ARRAY_SIZE(rt1316_2_l_group1_adr), + .adr_d = rt1316_2_l_group1_adr, + }, + { + .mask = BIT(3), + .num_adr = ARRAY_SIZE(rt1316_3_r_group1_adr), + .adr_d = rt1316_3_r_group1_adr, + }, + { + .mask = BIT(1), + .num_adr = ARRAY_SIZE(rt714_1_adr), + .adr_d = rt714_1_adr, + }, + {} +}; + static const struct snd_soc_acpi_link_adr adl_sdw_rt711_link2_rt1316_link01_rt714_link3[] = { { .mask = BIT(2), @@ -700,6 +751,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[] = { .drv_name = "sof_sdw", .sof_tplg_filename = "sof-adl-rt711-l0-rt1316-l13-rt714-l2.tplg", }, + { + .link_mask = 0xF, /* 4 active links required */ + .links = adl_sdw_rt711_link0_rt1316_link23_rt714_link1, + .drv_name = "sof_sdw", + .sof_tplg_filename = "sof-adl-rt711-l0-rt1316-l23-rt714-l1.tplg", + }, { .link_mask = 0xF, /* 4 active links required */ .links = adl_sdw_rt711_link2_rt1316_link01_rt714_link3,