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
317 case SNDRV_PCM_TRIGGER_STOP:317 case SNDRV_PCM_TRIGGER_STOP:
318 /* TODO support be handled via SoftPause Module */318 /* TODO support be handled via SoftPause Module */
319 prtd->state = Q6APM_STREAM_STOPPED;319 prtd->state = Q6APM_STREAM_STOPPED;
320 prtd->queue_ptr = 0;
320 break;321 break;
321 case SNDRV_PCM_TRIGGER_SUSPEND:322 case SNDRV_PCM_TRIGGER_SUSPEND:
322 case SNDRV_PCM_TRIGGER_PAUSE_PUSH:323 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
215 215
216 mutex_lock(&graph->lock);216 mutex_lock(&graph->lock);
217 217
218 data->dsp_buf = 0;
219
218 if (data->buf) {220 if (data->buf) {
219 mutex_unlock(&graph->lock);221 mutex_unlock(&graph->lock);
220 return 0;222 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