Re: [PATCH v3 0/2] ASoC: qcom: qdsp6: handle SMD FIFO -EAGAIN in q6asm playback

From: Konrad Dybcio

Date: Mon Nov 30 2026 - 02:50:15 EST


On 11/29/26 10:20 AM, Vladimir Bely wrote:
> On SoCs with a small SMD FIFO (such as MSM8916), a playback burst in
> q6asm_dai_ack() can fill the FIFO so rpmsg_trysend() returns -EAGAIN.
> Today q6asm_write_async() still advances port->dsp_buf on that failed
> send, and q6asm_dai_ack() fails the write with -EAGAIN.
>
> Patch 1 keeps port->dsp_buf unchanged when apr_send_pkt() fails and
> protects port->buf teardown under ac->lock. Patch 2 defers queuing
> until trigger start, stops cleanly on -EAGAIN, and retries on
> CMD_RUN_DONE and DATA_WRITE_DONE under the PCM stream lock while the
> stream is running.
>
> Changes in v3 (addressing Sashiko AI review):
> - Patch 1: fix Fixes: trailer subjects and add Fixes: fdbb53d318aa.
> - Patch 2:
> - Defer playback queuing in q6asm_dai_ack() until
> snd_pcm_running(substream) and queue after q6asm_run_nowait() in
> q6asm_dai_trigger() (with CMD_RUN_DONE retry) so a full SMD FIFO
> before start cannot fail SNDRV_PCM_TRIGGER_START with -EAGAIN.
> - Combine snd_pcm_period_elapsed_under_stream_lock() and
> q6asm_dai_queue_playback() under a single pcm_stream_lock_irqsave.
> - Fix the Fixes: trailer subject.

Friendly note: Please don't send new versions of a patchset in reply
to the previous ones, that confuses people and tooling. Please also
limit the frequency (1 a day is a good rule of thumb), as all the
maintainers are under a flurry of emails anyway

Konrad