Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion sound/soc/qcom/qdsp6/q6asm-dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,12 @@ static int q6asm_dai_prepare(struct snd_soc_component *component,

prtd->pcm_count = snd_pcm_lib_period_bytes(substream);
/* rate and channels are sent to audio driver */
if (prtd->state == Q6ASM_STREAM_RUNNING) {
/*
* The DSP stream stays open after TRIGGER_STOP/EOS (state STOPPED), so a
* re-prepare (xrun recovery, resume from standby) must close it too, or
* the next open_write fails with ADSP_EALREADY.
*/
if (prtd->state != Q6ASM_STREAM_IDLE) {
/* clear the previous setup if any */
q6asm_cmd(prtd->audio_client, prtd->stream_id, CMD_CLOSE);
q6asm_unmap_memory_regions(substream->stream,
Expand Down
Loading