History

ASoC: qcom: q6apm-dai: reset queue ptr on trigger stop

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.

Srinivas Kandagatla committed 7 months ago

Commit cab45ab1 parent 69acc482 files · +3 −0Browse files

Unified · Split

2 files
  1. sound/soc/qcom/qdsp6/q6apm-dai.c +1 −0
  2. sound/soc/qcom/qdsp6/q6apm.c +2 −0
sound/soc/qcom/qdsp6/q6apm-dai.c+1−0
@@ -317,6 +317,7 @@ static int q6apm_dai_trigger(struct snd_soc_component *component, · 316 unmodified lines
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+2−0
@@ -215,6 +215,8 @@ int q6apm_map_memory_regions(struct q6apm_graph *graph, unsigned int dir, phys_a · 214 unmodified lines
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;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t