Skip to content

Commit 7e43b75

Browse files
Dharageswari.Rbroonie
authored andcommitted
ASoC: Intel: sof_rt5682: Add quirk for Rex board with mx98360a amplifier
Add mtl_mx98360a_rt5682 driver data for Chrome Rex board support. Signed-off-by: Dharageswari.R <dharageswari.r@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230220080652.23136-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 70d1d30 commit 7e43b75

2 files changed

Lines changed: 35 additions & 0 deletions

File tree

sound/soc/intel/boards/sof_rt5682.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,20 @@ static const struct dmi_system_id sof_rt5682_quirk_table[] = {
223223
SOF_RT5682_SSP_AMP(2) |
224224
SOF_RT5682_NUM_HDMIDEV(4)),
225225
},
226+
{
227+
.callback = sof_rt5682_quirk_cb,
228+
.matches = {
229+
DMI_MATCH(DMI_PRODUCT_FAMILY, "Google_Rex"),
230+
DMI_MATCH(DMI_OEM_STRING, "AUDIO-MAX98360_ALC5682I_I2S"),
231+
},
232+
.driver_data = (void *)(SOF_RT5682_MCLK_EN |
233+
SOF_RT5682_SSP_CODEC(2) |
234+
SOF_SPEAKER_AMP_PRESENT |
235+
SOF_MAX98360A_SPEAKER_AMP_PRESENT |
236+
SOF_RT5682_SSP_AMP(0) |
237+
SOF_RT5682_NUM_HDMIDEV(4)
238+
),
239+
},
226240
{
227241
.callback = sof_rt5682_quirk_cb,
228242
.matches = {
@@ -1104,6 +1118,15 @@ static const struct platform_device_id board_ids[] = {
11041118
SOF_RT5682_SSP_AMP(1) |
11051119
SOF_RT5682_NUM_HDMIDEV(4)),
11061120
},
1121+
{
1122+
.name = "mtl_mx98360_rt5682",
1123+
.driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN |
1124+
SOF_RT5682_SSP_CODEC(0) |
1125+
SOF_SPEAKER_AMP_PRESENT |
1126+
SOF_MAX98360A_SPEAKER_AMP_PRESENT |
1127+
SOF_RT5682_SSP_AMP(1) |
1128+
SOF_RT5682_NUM_HDMIDEV(4)),
1129+
},
11071130
{
11081131
.name = "jsl_rt5682",
11091132
.driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN |

sound/soc/intel/common/soc-acpi-intel-mtl-match.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ static const struct snd_soc_acpi_codecs mtl_max98357a_amp = {
1515
.codecs = {"MX98357A"}
1616
};
1717

18+
static const struct snd_soc_acpi_codecs mtl_max98360a_amp = {
19+
.num_codecs = 1,
20+
.codecs = {"MX98360A"}
21+
};
22+
1823
static const struct snd_soc_acpi_codecs mtl_rt5682_rt5682s_hp = {
1924
.num_codecs = 2,
2025
.codecs = {"10EC5682", "RTL5682"},
@@ -28,6 +33,13 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[] = {
2833
.quirk_data = &mtl_max98357a_amp,
2934
.sof_tplg_filename = "sof-mtl-max98357a-rt5682.tplg",
3035
},
36+
{
37+
.comp_ids = &mtl_rt5682_rt5682s_hp,
38+
.drv_name = "mtl_mx98360_rt5682",
39+
.machine_quirk = snd_soc_acpi_codec_list,
40+
.quirk_data = &mtl_max98360a_amp,
41+
.sof_tplg_filename = "sof-mtl-max98360a-rt5682.tplg",
42+
},
3143
{},
3244
};
3345
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_mtl_machines);

0 commit comments

Comments
 (0)