From 6158a321c051095024e8306c8996b79e5f7f79b6 Mon Sep 17 00:00:00 2001 From: Bard Liao Date: Fri, 29 Aug 2025 11:29:07 +0300 Subject: [PATCH] ASoC: SOF: Intel: split codec mask detect and programming UNSOL We only need to detect codec mask in probe, but need to program UNSOL in probe and resume. We will detect codec mask and program UNSOL separately in the follow up commit. Signed-off-by: Bard Liao Reviewed-by: Kai Vehmanen Signed-off-by: Peter Ujfalusi Message-ID: <20250829082908.2693-2-peter.ujfalusi@linux.intel.com> Signed-off-by: Mark Brown --- sound/soc/sof/intel/hda-codec.c | 3 --- sound/soc/sof/intel/hda-ctrl.c | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/sof/intel/hda-codec.c b/sound/soc/sof/intel/hda-codec.c index 2f9925830d1d5..37674ea452d6a 100644 --- a/sound/soc/sof/intel/hda-codec.c +++ b/sound/soc/sof/intel/hda-codec.c @@ -260,9 +260,6 @@ void hda_codec_detect_mask(struct snd_sof_dev *sdev) sof_debug_check_flag(SOF_DBG_FORCE_NOCODEC)) return; - /* Accept unsolicited responses */ - snd_hdac_chip_updatel(bus, GCTL, AZX_GCTL_UNSOL, AZX_GCTL_UNSOL); - /* detect codecs */ if (!bus->codec_mask) { bus->codec_mask = snd_hdac_chip_readw(bus, STATESTS); diff --git a/sound/soc/sof/intel/hda-ctrl.c b/sound/soc/sof/intel/hda-ctrl.c index 4f34fd919a00a..f43eb2a21f48d 100644 --- a/sound/soc/sof/intel/hda-ctrl.c +++ b/sound/soc/sof/intel/hda-ctrl.c @@ -220,6 +220,9 @@ int hda_dsp_ctrl_init_chip(struct snd_sof_dev *sdev) } usleep_range(1000, 1200); + /* Accept unsolicited responses */ + snd_hdac_chip_updatel(bus, GCTL, AZX_GCTL_UNSOL, AZX_GCTL_UNSOL); + hda_codec_detect_mask(sdev); /* clear stream status */ -- 2.47.3