Unverified Commit 5b56db90 authored by Yong Zhi's avatar Yong Zhi Committed by Mark Brown
Browse files

ASoC: Intel: sof_nau8825: Move quirk check to the front in late probe



The sof_rt5682_quirk check was placed in the middle of
hdmi handling code, move it to the front to be consistent
with sof_rt5682.c/sof_card_late_probe().

Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: default avatarYong Zhi <yong.zhi@intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220725194909.145418-11-pierre-louis.bossart@linux.intel.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 371a3f01
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -190,11 +190,6 @@ static int sof_card_late_probe(struct snd_soc_card *card)
	struct sof_hdmi_pcm *pcm;
	int err;

	if (list_empty(&ctx->hdmi_pcm_list))
		return -EINVAL;

	pcm = list_first_entry(&ctx->hdmi_pcm_list, struct sof_hdmi_pcm, head);

	if (sof_nau8825_quirk & SOF_MAX98373_SPEAKER_AMP_PRESENT) {
		/* Disable Left and Right Spk pin after boot */
		snd_soc_dapm_disable_pin(dapm, "Left Spk");
@@ -204,6 +199,11 @@ static int sof_card_late_probe(struct snd_soc_card *card)
			return err;
	}

	if (list_empty(&ctx->hdmi_pcm_list))
		return -EINVAL;

	pcm = list_first_entry(&ctx->hdmi_pcm_list, struct sof_hdmi_pcm, head);

	return hda_dsp_hdmi_build_controls(card, pcm->codec_dai->component);
}