]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: wm_adsp: Correct handling of compressed streams that restart
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Tue, 19 Mar 2019 11:52:04 +0000 (11:52 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 19 Mar 2019 12:35:36 +0000 (12:35 +0000)
commitc952366c73446a83e3d18f6dc46a87a2ae28bcfd
tree3377830815cd8891a1705dbe19fe0ebb5c795442
parentcec0e9a8a4a5d14e5df21170520332275b1509b0
ASoC: wm_adsp: Correct handling of compressed streams that restart

Previously support was added to allow streams to be stopped and
started again without the DSP being power cycled and this was done
by clearing the buffer state in trigger start. Another supported
use-case is using the DSP for a trigger event then opening the
compressed stream later to receive the audio, unfortunately clearing
the buffer state in trigger start destroys the data received
from such a trigger. Correct this issue by moving the call to
wm_adsp_buffer_clear to be in trigger stop instead.

Fixes: 9d6f9390139f ("ASoC: wm_adsp: Support streams which can start/stop with DSP active")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm_adsp.c