Skip to content

Commit 5bd67f5

Browse files
Srinivas Kandagatlagregkh
authored andcommitted
ASoC: qcom: q6apm-dai: reset queue ptr on trigger stop
commit cab45ab upstream. Reset queue pointer on SNDRV_PCM_TRIGGER_STOP event to be inline with resetting appl_ptr. Without this we will end up with a queue_ptr out of sync and driver could try to send data that is not ready yet. Fix this by resetting the queue_ptr. Fixes: 3d4a441 ("ASoC: q6apm-dai: schedule all available frames to avoid dsp under-runs") Cc: Stable@vger.kernel.org Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20260402081118.348071-6-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 0f147ab commit 5bd67f5

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

sound/soc/qcom/qdsp6/q6apm-dai.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ static int q6apm_dai_trigger(struct snd_soc_component *component,
317317
case SNDRV_PCM_TRIGGER_STOP:
318318
/* TODO support be handled via SoftPause Module */
319319
prtd->state = Q6APM_STREAM_STOPPED;
320+
prtd->queue_ptr = 0;
320321
break;
321322
case SNDRV_PCM_TRIGGER_SUSPEND:
322323
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:

sound/soc/qcom/qdsp6/q6apm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ int q6apm_map_memory_regions(struct q6apm_graph *graph, unsigned int dir, phys_a
215215

216216
mutex_lock(&graph->lock);
217217

218+
data->dsp_buf = 0;
219+
218220
if (data->buf) {
219221
mutex_unlock(&graph->lock);
220222
return 0;

0 commit comments

Comments
 (0)