ASoC: SOF: Intel: pci-tgl: unblock S5 entry if DMA stop has failed"
authorKai Vehmanen <kai.vehmanen@linux.intel.com>
Fri, 9 Dec 2022 11:45:28 +0000 (13:45 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 12 Dec 2022 15:44:20 +0000 (15:44 +0000)
commit2aa2a5ead0ee0a358bf80a2984a641d1bf2adc2a
tree8d93e109ade12d4506d34bbc4fe17d287914d684
parente85b1f5a9769ac30f4d2f6fb1cdcd9570c38e0c1
ASoC: SOF: Intel: pci-tgl: unblock S5 entry if DMA stop has failed"

If system shutdown has not been completed cleanly, it is possible the
DMA stream shutdown has not been done, or was not clean.

If this is the case, Intel TGL/ADL HDA platforms may fail to shutdown
cleanly due to pending HDA DMA transactions. To avoid this, detect this
scenario in the shutdown callback, and perform an additional controller
reset. This has been tested to unblock S5 entry if this condition is
hit.

Co-developed-by: Archana Patni <archana.patni@intel.com>
Signed-off-by: Archana Patni <archana.patni@intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20221209114529.3909192-2-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/hda-dsp.c
sound/soc/sof/intel/hda.h
sound/soc/sof/intel/tgl.c