Skip to content

Commit fcd1e39

Browse files
Ajye Huangbroonie
authored andcommitted
ASoC: Intel: sof_rt5682: Add support for max98360a speaker amp on SSP2
Follow Intel's design to replace max98360a amp SSP2 reather than SSP1 by judging DMI_OEM_STRING in sof_rt5682_quirk_table struct. And reusing max98357's topology since DAI setting could be leveraged. Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220324084708.2009375-1-ajye_huang@compal.corp-partner.google.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent d00887c commit fcd1e39

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

sound/soc/intel/boards/sof_rt5682.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,19 @@ static const struct dmi_system_id sof_rt5682_quirk_table[] = {
212212
SOF_SSP_BT_OFFLOAD_PRESENT),
213213

214214
},
215+
{
216+
.callback = sof_rt5682_quirk_cb,
217+
.matches = {
218+
DMI_MATCH(DMI_PRODUCT_FAMILY, "Google_Brya"),
219+
DMI_MATCH(DMI_OEM_STRING, "AUDIO-MAX98360_ALC5682I_I2S_AMP_SSP2"),
220+
},
221+
.driver_data = (void *)(SOF_RT5682_MCLK_EN |
222+
SOF_RT5682_SSP_CODEC(0) |
223+
SOF_SPEAKER_AMP_PRESENT |
224+
SOF_MAX98360A_SPEAKER_AMP_PRESENT |
225+
SOF_RT5682_SSP_AMP(2) |
226+
SOF_RT5682_NUM_HDMIDEV(4)),
227+
},
215228
{}
216229
};
217230

sound/soc/sof/sof-pci-dev.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,14 @@ static const struct dmi_system_id sof_tplg_table[] = {
8383
},
8484
.driver_data = "sof-adl-max98357a-rt5682-2way.tplg",
8585
},
86-
86+
{
87+
.callback = sof_tplg_cb,
88+
.matches = {
89+
DMI_MATCH(DMI_PRODUCT_FAMILY, "Google_Brya"),
90+
DMI_MATCH(DMI_OEM_STRING, "AUDIO-MAX98360_ALC5682I_I2S_AMP_SSP2"),
91+
},
92+
.driver_data = "sof-adl-max98357a-rt5682.tplg",
93+
},
8794
{}
8895
};
8996

0 commit comments

Comments
 (0)