Unverified Commit a2e678fe authored by Brent Lu's avatar Brent Lu Committed by Mark Brown
Browse files

ASoC: Intel: sof_rt5682: mach cleanup for mtl boards



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: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: default avatarBrent Lu <brent.lu@intel.com>
Signed-off-by: default avatarPierre-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: default avatarMark Brown <broonie@kernel.org>
parent 7b24d86c
Loading
Loading
Loading
Loading
+15 −25
Original line number Diff line number Diff line
@@ -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",