From: Pierre-Louis Bossart Date: Thu, 4 Apr 2024 19:03:57 +0000 (-0500) Subject: ASoC: SOF: Intel: hda-ctrl: only clear WAKESTS for HDaudio codecs X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=35b5806e2edee1741f6bd2de2a5c149a876c4a60;p=linux.git ASoC: SOF: Intel: hda-ctrl: only clear WAKESTS for HDaudio codecs When a PME wake happens due to a SoundWire wake, we currently clear all WAKESTS bits during the resume operation initiated by the PCI subsystem. As a result, we are unable to identify which SoundWire links need to be resumed and don't properly handle jack detection. This patch only clears the WAKESTS bits for the HDaudio codecs detected earlier. Note that we still clear all WAKESTS bits unconditionally in hda_dsp_ctrl_stop_chip(). The existing behavior is potentially racy if e.g. a jack event happens during a suspend routine, but there's a risk of breaking shutdown or reboot sequences so the code is left as is for now. Closes: https://github.com/thesofproject/linux/issues/4687 Co-developed-by: Bard Liao Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Keqiao Zhang Reviewed-by: Bard Liao Link: https://msgid.link/r/20240404190357.138073-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/sof/intel/hda-ctrl.c b/sound/soc/sof/intel/hda-ctrl.c index b4f0756e21f6c..6d941209847f5 100644 --- a/sound/soc/sof/intel/hda-ctrl.c +++ b/sound/soc/sof/intel/hda-ctrl.c @@ -228,7 +228,7 @@ int hda_dsp_ctrl_init_chip(struct snd_sof_dev *sdev) /* clear WAKESTS */ snd_sof_dsp_write(sdev, HDA_DSP_HDA_BAR, SOF_HDA_WAKESTS, - SOF_HDA_WAKESTS_INT_MASK); + bus->codec_mask); hda_codec_rirb_status_clear(sdev);