]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: SOF: pcm: harden PCM STOP sequence
authorPan Xiuli <xiuli.pan@linux.intel.com>
Fri, 27 Sep 2019 20:05:31 +0000 (15:05 -0500)
committerMark Brown <broonie@kernel.org>
Tue, 1 Oct 2019 17:31:25 +0000 (18:31 +0100)
commitba9654d6805893d114f37abba4d73f2c290f5db8
tree290254dc86c6be914423be208c09ea7ae97ae06f
parent584d754828698781340b3b89dcb2e2adbf35dd7c
ASoC: SOF: pcm: harden PCM STOP sequence

The old STOP sequence is: 1. stop DMA 2. send STOP ipc
If delay happen before the steps 1 and 2, the DMA buffer will be empty in
short time and cause pipeline xrun then stop the pipeline.
Then the step 2 ipc stop will return error as pipeline is already stopped.

Suggested change to avoid the issue is to switch the order of steps 1 and 2
for the stop sequence.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190927200538.660-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/pcm.c