From f9e6e744775d415d4c352f35c0cc403b208ac119 Mon Sep 17 00:00:00 2001 From: Bard Liao <yung-chuan.liao@linux.intel.com> Date: Thu, 30 Nov 2023 11:20:00 +0100 Subject: [PATCH 2923/2926] ASoC: Intel: soc-acpi-intel-mtl-match: add rt713 rt1316 config BugLink: https://bugs.launchpad.net/bugs/2042090 Adding rt713 jack + rt1316 amp + rt1713 dmic configuration support. Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20231012190826.142619-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit e70ca580e9c8d59bc8cf70cb15546da5aecff3a0) Signed-off-by: You-Sheng Yang <vicamo.yang@canonical.com> Acked-by: Manuel Diewald <manuel.diewald@canonical.com> Acked-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com> --- .../intel/common/soc-acpi-intel-mtl-match.c | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/sound/soc/intel/common/soc-acpi-intel-mtl-match.c b/sound/soc/intel/common/soc-acpi-intel-mtl-match.c index 0304246d2922..2e210c24edb2 100644 --- a/sound/soc/intel/common/soc-acpi-intel-mtl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-mtl-match.c @@ -117,10 +117,28 @@ static const struct snd_soc_acpi_adr_device rt1712_3_single_adr[] = { .endpoints = &single_endpoint, .name_prefix = "rt712-dmic" } }; +static const struct snd_soc_acpi_adr_device rt713_0_single_adr[] = { + { + .adr = 0x000031025D071301ull, + .num_endpoints = 1, + .endpoints = &single_endpoint, + .name_prefix = "rt713" + } +}; + +static const struct snd_soc_acpi_adr_device rt1713_3_single_adr[] = { + { + .adr = 0x000331025D171301ull, + .num_endpoints = 1, + .endpoints = &single_endpoint, + .name_prefix = "rt713-dmic" + } +}; + static const struct snd_soc_acpi_adr_device mx8373_0_adr[] = { { .adr = 0x000023019F837300ull, .num_endpoints = 1, .endpoints = &spk_l_endpoint, @@ -159,10 +177,28 @@ static const struct snd_soc_acpi_adr_device rt1316_3_group1_adr[] = { .endpoints = &spk_r_endpoint, .name_prefix = "rt1316-2" } }; +static const struct snd_soc_acpi_adr_device rt1316_1_group2_adr[] = { + { + .adr = 0x000131025D131601ull, + .num_endpoints = 1, + .endpoints = &spk_l_endpoint, + .name_prefix = "rt1316-1" + } +}; + +static const struct snd_soc_acpi_adr_device rt1316_2_group2_adr[] = { + { + .adr = 0x000230025D131601ull, + .num_endpoints = 1, + .endpoints = &spk_r_endpoint, + .name_prefix = "rt1316-2" + } +}; + static const struct snd_soc_acpi_adr_device rt1318_1_group1_adr[] = { { .adr = 0x000130025D131801ull, .num_endpoints = 1, .endpoints = &spk_l_endpoint, @@ -276,10 +312,34 @@ static const struct snd_soc_acpi_link_adr mtl_sdw_rt1318_l12_rt714_l0[] = { .adr_d = rt714_0_adr, }, {} }; +static const struct snd_soc_acpi_link_adr mtl_rt713_l0_rt1316_l12_rt1713_l3[] = { + { + .mask = BIT(0), + .num_adr = ARRAY_SIZE(rt713_0_single_adr), + .adr_d = rt713_0_single_adr, + }, + { + .mask = BIT(1), + .num_adr = ARRAY_SIZE(rt1316_1_group2_adr), + .adr_d = rt1316_1_group2_adr, + }, + { + .mask = BIT(2), + .num_adr = ARRAY_SIZE(rt1316_2_group2_adr), + .adr_d = rt1316_2_group2_adr, + }, + { + .mask = BIT(3), + .num_adr = ARRAY_SIZE(rt1713_3_single_adr), + .adr_d = rt1713_3_single_adr, + }, + {} +}; + static const struct snd_soc_acpi_adr_device mx8363_2_adr[] = { { .adr = 0x000230019F836300ull, .num_endpoints = 1, .endpoints = &spk_l_endpoint, @@ -336,10 +396,16 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_sdw_machines[] = { .link_mask = GENMASK(2, 0), .links = sdw_mockup_mic_headset_1amp, .drv_name = "sof_sdw", .sof_tplg_filename = "sof-mtl-rt715-rt711-rt1308-mono.tplg", }, + { + .link_mask = GENMASK(3, 0), + .links = mtl_rt713_l0_rt1316_l12_rt1713_l3, + .drv_name = "sof_sdw", + .sof_tplg_filename = "sof-mtl-rt713-l0-rt1316-l12-rt1713-l3.tplg", + }, { .link_mask = BIT(3) | BIT(0), .links = mtl_712_only, .drv_name = "sof_sdw", .sof_tplg_filename = "sof-mtl-rt712-l0-rt1712-l3.tplg", -- 2.41.0