]> www.infradead.org Git - users/hch/misc.git/commitdiff
ASoC: SOF: Intel: split codec mask detect and programming UNSOL
authorBard Liao <yung-chuan.liao@linux.intel.com>
Fri, 29 Aug 2025 08:29:07 +0000 (11:29 +0300)
committerMark Brown <broonie@kernel.org>
Fri, 29 Aug 2025 08:50:36 +0000 (10:50 +0200)
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 <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Message-ID: <20250829082908.2693-2-peter.ujfalusi@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/hda-codec.c
sound/soc/sof/intel/hda-ctrl.c

index 2f9925830d1d53b47cf47add7d7d1cc09a5d9ca9..37674ea452d6a229eaea002c0dd9a3ffba10da02 100644 (file)
@@ -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);
index 4f34fd919a00aac09f35c74faab6e87f6e352867..f43eb2a21f48da930e365c5777b9bc78abe13003 100644 (file)
@@ -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 */