ASoC: Intel: soc-acpi: add missing quirk for TGL SDCA single amp
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Mon, 4 Oct 2021 21:35:11 +0000 (16:35 -0500)
committerMark Brown <broonie@kernel.org>
Tue, 5 Oct 2021 12:06:02 +0000 (13:06 +0100)
We don't have a configuration for a single amp on link1.

BugLink: https://github.com/thesofproject/linux/issues/3161
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Link: https://lore.kernel.org/r/20211004213512.220836-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/common/soc-acpi-intel-tgl-match.c

index 5332f96eb938eae85a2d66401512065a52cd86b5..9d89f01d6b84720eccfa2b36ad1916b5199a39bc 100644 (file)
@@ -156,6 +156,15 @@ static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = {
        }
 };
 
+static const struct snd_soc_acpi_adr_device rt1316_1_single_adr[] = {
+       {
+               .adr = 0x000131025D131601ull,
+               .num_endpoints = 1,
+               .endpoints = &single_endpoint,
+               .name_prefix = "rt1316-1"
+       }
+};
+
 static const struct snd_soc_acpi_adr_device rt1316_1_group1_adr[] = {
        {
                .adr = 0x000131025D131601ull, /* unique ID is set for some reason */
@@ -320,6 +329,25 @@ static const struct snd_soc_acpi_link_adr tgl_3_in_1_sdca[] = {
        {}
 };
 
+static const struct snd_soc_acpi_link_adr tgl_3_in_1_sdca_mono[] = {
+       {
+               .mask = BIT(0),
+               .num_adr = ARRAY_SIZE(rt711_sdca_0_adr),
+               .adr_d = rt711_sdca_0_adr,
+       },
+       {
+               .mask = BIT(1),
+               .num_adr = ARRAY_SIZE(rt1316_1_single_adr),
+               .adr_d = rt1316_1_single_adr,
+       },
+       {
+               .mask = BIT(3),
+               .num_adr = ARRAY_SIZE(rt714_3_adr),
+               .adr_d = rt714_3_adr,
+       },
+       {}
+};
+
 static const struct snd_soc_acpi_codecs tgl_max98373_amp = {
        .num_codecs = 1,
        .codecs = {"MX98373"}
@@ -418,6 +446,19 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_sdw_machines[] = {
                .drv_name = "sof_sdw",
                .sof_tplg_filename = "sof-tgl-rt711-rt1316-rt714.tplg",
        },
+       {
+               /*
+                * link_mask should be 0xB, but all links are enabled by BIOS.
+                * This entry will be selected if there is no rt1316 amplifier exposed
+                * on link2 since it will fail to match the above entry.
+                */
+
+               .link_mask = 0xF, /* 4 active links required */
+               .links = tgl_3_in_1_sdca_mono,
+               .drv_name = "sof_sdw",
+               .sof_tplg_filename = "sof-tgl-rt711-l0-rt1316-l1-mono-rt714-l3.tplg",
+       },
+
        {
                .link_mask = 0x3, /* rt711 on link 0 and 1 rt1308 on link 1 */
                .links = tgl_hp,