ASoC: Intel: sof_rt5682: mach cleanup for mtl boards
authorBrent Lu <brent.lu@intel.com>
Wed, 27 Mar 2024 16:24:04 +0000 (11:24 -0500)
committerMark Brown <broonie@kernel.org>
Thu, 28 Mar 2024 13:58:22 +0000 (13:58 +0000)
Add two common entries in enumeration table for all rt5682/rt5650
boards with/without speaker amplifier. All other mtl_rt5682_def
entries become redundant so get removed.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240327162408.63953-15-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/common/soc-acpi-intel-mtl-match.c

index 0125e81af9e12babe1d4946c4f14a110624e3ff2..7f422848a3ba61bc48e7113e96099f18cc150c36 100644 (file)
@@ -21,14 +21,9 @@ static const struct snd_soc_acpi_codecs mtl_max98360a_amp = {
        .codecs = {"MX98360A"}
 };
 
-static const struct snd_soc_acpi_codecs mtl_rt1019p_amp = {
-       .num_codecs = 1,
-       .codecs = {"RTL1019"}
-};
-
 static const struct snd_soc_acpi_codecs mtl_rt5682_rt5682s_hp = {
        .num_codecs = 2,
-       .codecs = {"10EC5682", "RTL5682"},
+       .codecs = {RT5682_ACPI_HID, RT5682S_ACPI_HID},
 };
 
 static const struct snd_soc_acpi_codecs mtl_essx_83x6 = {
@@ -41,11 +36,6 @@ static const struct snd_soc_acpi_codecs mtl_lt6911_hdmi = {
        .codecs = {"INTC10B0"}
 };
 
-static const struct snd_soc_acpi_codecs mtl_rt5650_amp = {
-       .num_codecs = 1,
-       .codecs = {"10EC5650"}
-};
-
 struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[] = {
        {
                .comp_ids = &mtl_rt5682_rt5682s_hp,
@@ -61,13 +51,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[] = {
                .quirk_data = &mtl_max98360a_amp,
                .sof_tplg_filename = "sof-mtl-max98360a-rt5682.tplg",
        },
-       {
-               .comp_ids = &mtl_rt5682_rt5682s_hp,
-               .drv_name = "mtl_rt5682_def",
-               .machine_quirk = snd_soc_acpi_codec_list,
-               .quirk_data = &mtl_rt1019p_amp,
-               .sof_tplg_filename = "sof-mtl-rt1019-rt5682.tplg",
-       },
        {
                .comp_ids = &mtl_essx_83x6,
                .drv_name = "mtl_es83x6_c1_h02",
@@ -83,13 +66,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[] = {
                                        SND_SOC_ACPI_TPLG_INTEL_SSP_MSB |
                                        SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER,
        },
-       {
-               .id = "10EC5650",
-               .drv_name = "mtl_rt5682_def",
-               .machine_quirk = snd_soc_acpi_codec_list,
-               .quirk_data = &mtl_rt5650_amp,
-               .sof_tplg_filename = "sof-mtl-rt5650.tplg",
-       },
        /* place boards for each headphone codec: sof driver will complete the
         * tplg name and machine driver will detect the amp type
         */
@@ -100,6 +76,20 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[] = {
                .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME |
                                        SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME,
        },
+       {
+               .id = RT5650_ACPI_HID,
+               .drv_name = "mtl_rt5682_def",
+               .sof_tplg_filename = "sof-mtl", /* the tplg suffix is added at run time */
+               .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME |
+                                       SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME,
+       },
+       {
+               .comp_ids = &mtl_rt5682_rt5682s_hp,
+               .drv_name = "mtl_rt5682_def",
+               .sof_tplg_filename = "sof-mtl", /* the tplg suffix is added at run time */
+               .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME |
+                                       SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME,
+       },
        /* place amp-only boards in the end of table */
        {
                .id = "INTC10B0",