Skip to content

Commit 76f33e2

Browse files
brentlubroonie
authored andcommitted
ASoC: Intel: sof-rt5682: add driver_data to sof_rt5682 board
Move default BYT/CHT quirk to driver_data of sof_rt5682 board. This fixes a problem that DMI quirk of Minnowboard board got overwritten in probe function since it's a BYT board. Fixes: c68e079 ("ASoC: intel: sof_rt5682: Add quirk for number of HDMI DAI's") Reviewed-by: Bard Liao <[email protected]> Signed-off-by: Brent Lu <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 76fb0d3 commit 76f33e2

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

sound/soc/intel/boards/sof_rt5682.c

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -638,22 +638,13 @@ static int sof_audio_probe(struct platform_device *pdev)
638638
struct snd_soc_acpi_mach *mach = pdev->dev.platform_data;
639639
struct sof_card_private *ctx;
640640
char *card_name;
641-
bool is_legacy_cpu = false;
642641
int ret;
643642

644643
if (pdev->id_entry && pdev->id_entry->driver_data)
645644
sof_rt5682_quirk = (unsigned long)pdev->id_entry->driver_data;
646645

647646
dmi_check_system(sof_rt5682_quirk_table);
648647

649-
if (soc_intel_is_byt() || soc_intel_is_cht()) {
650-
is_legacy_cpu = true;
651-
652-
/* default quirk for legacy cpu */
653-
sof_rt5682_quirk = SOF_RT5682_MCLK_EN |
654-
SOF_SSP_PORT_CODEC(2);
655-
}
656-
657648
dev_dbg(&pdev->dev, "sof_rt5682_quirk = %lx\n", sof_rt5682_quirk);
658649

659650
/* initialize ctx with board quirk */
@@ -676,7 +667,7 @@ static int sof_audio_probe(struct platform_device *pdev)
676667
if (mach->mach_params.codec_mask & IDISP_CODEC_MASK)
677668
ctx->hdmi.idisp_codec = true;
678669

679-
if (is_legacy_cpu) {
670+
if (soc_intel_is_byt() || soc_intel_is_cht()) {
680671
ctx->rt5682.is_legacy_cpu = true;
681672
ctx->dmic_be_num = 0;
682673
/* HDMI is not supported by SOF on Baytrail/CherryTrail */
@@ -792,6 +783,8 @@ static int sof_audio_probe(struct platform_device *pdev)
792783
static const struct platform_device_id board_ids[] = {
793784
{
794785
.name = "sof_rt5682",
786+
.driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN |
787+
SOF_SSP_PORT_CODEC(2)),
795788
},
796789
{
797790
.name = "glk_rt5682_def",

0 commit comments

Comments
 (0)