ASoC: SOF: Intel: hda-ctrl: only clear WAKESTS for HDaudio codecs
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Thu, 4 Apr 2024 19:03:57 +0000 (14:03 -0500)
committerMark Brown <broonie@kernel.org>
Thu, 4 Apr 2024 19:25:40 +0000 (20:25 +0100)
commit35b5806e2edee1741f6bd2de2a5c149a876c4a60
tree4c2d6f2bbeae9113e91d2c6cd179bc2605cf153d
parentb69480edf4eb71c6f754e3c4020e8dd72a330558
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 <yung-chuan.liao@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Keqiao Zhang <keqiao.zhang@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://msgid.link/r/20240404190357.138073-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/hda-ctrl.c