]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: SOF: Intel: hda-dai: Do not release the link DMA on STOP
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Tue, 17 Dec 2024 09:10:19 +0000 (11:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Jan 2025 09:34:14 +0000 (10:34 +0100)
commit909ecf15cb70f78cdb5c930f58df01db039a0ff8
tree06257021c4c3c3c028d2b2e04aef4e784a5aa481
parent54376d8d26596f98ed7432a788314bb9154bf3e3
ASoC: SOF: Intel: hda-dai: Do not release the link DMA on STOP

commit e8d0ba147d901022bcb69da8d8fd817f84e9f3ca upstream.

The linkDMA should not be released on stop trigger since a stream re-start
might happen without closing of the stream. This leaves a short time for
other streams to 'steal' the linkDMA since it has been released.

This issue is not easy to reproduce under normal conditions as usually
after stop the stream is closed, or the same stream is restarted, but if
another stream got in between the stop and start, like this:
aplay -Dhw:0,3 -c2 -r48000 -fS32_LE /dev/zero -d 120
CTRL+z
aplay -Dhw:0,0 -c2 -r48000 -fS32_LE /dev/zero -d 120

then the link DMA channels will be mixed up, resulting firmware error or
crash.

Fixes: ab5593793e90 ("ASoC: SOF: Intel: hda: Always clean up link DMA during stop")
Cc: stable@vger.kernel.org
Closes: https://github.com/thesofproject/sof/issues/9695
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241217091019.31798-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/sof/intel/hda-dai.c
sound/soc/sof/intel/hda.h