ASoC: Intel: catpt: Skip position update for unprepared streams
authorCezary Rojewski <cezary.rojewski@intel.com>
Mon, 16 Nov 2020 13:33:28 +0000 (14:33 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 16 Nov 2020 20:03:27 +0000 (20:03 +0000)
commitaa9e3fa4992d83acb7311fc86d11d0d53e7ffb8e
tree2b6a995171d9fde721f62d7f5877660ae4bf71c1
parent3650b228f83adda7e5ee532e2b90429c03f7b9ec
ASoC: Intel: catpt: Skip position update for unprepared streams

Playing with very low period sizes may lead to timeouts when awaiting
RESET_STREAM reply for offload streams. This is caused by NOTIFY_POSITION
appearing in the middle of trigger(stop).

Stream is unprepared during trigger(stop) where PAUSE_STREAM IPC gets
invoked. However, all data that is already mixed in DSP firmware's mixer
stream will still be played regardless of the pause. For offload streams,
this means possibility for another NOTIFY_POSITION to process. Keep these
notifications in check by only handling them when stream is in prepared
state.

Fixes: a126750fc865 ("ASoC: Intel: catpt: PCM operations")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20201116133332.8530-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/catpt/pcm.c