Skip to content

Commit aa9e3fa

Browse files
crojewsk-intelbroonie
authored andcommitted
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: a126750 ("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>
1 parent 3650b22 commit aa9e3fa

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • sound/soc/intel/catpt

sound/soc/intel/catpt/pcm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,8 @@ void catpt_stream_update_position(struct catpt_dev *cdev,
534534

535535
dsppos = bytes_to_frames(r, pos->stream_position);
536536

537+
if (!stream->prepared)
538+
goto exit;
537539
/* only offload is set_write_pos driven */
538540
if (stream->template->type != CATPT_STRM_TYPE_RENDER)
539541
goto exit;

0 commit comments

Comments
 (0)