]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: wm_adsp: Avoid calling snd_compr_stop_error from WDT expiry
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Thu, 4 Apr 2019 12:56:01 +0000 (13:56 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 4 Apr 2019 13:51:34 +0000 (20:51 +0700)
commit7e9a23bd81badd5d392cd7647eac0d09de0a0e1d
tree110656840bce5f8cf9b98d92e1cf67569deddb7f
parentf59be8d8ed567e6ae41f76d3454496d786b4b646
ASoC: wm_adsp: Avoid calling snd_compr_stop_error from WDT expiry

It is unsafe to call snd_compr_stop_error from outside of the
compressed ops. Firstly the compressed device lock needs to be held
and secondly it queues error work to issue a trigger stop which
should not happen after the stream has been freed. To avoid these
issues use the same trick used for the IRQ handling, simply send a
snd_compr_fragment_elapsed to cause user-space to wake on the poll,
then report the error when user-space issues the pointer request
after it wakes.

Fixes: 01a262f7387ec ("ASoC: wm_adsp: Shutdown any compressed streams on DSP watchdog timeout")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@kernel.org
sound/soc/codecs/wm_adsp.c