[PATCH 0/2] ASoC: qcom: qdsp6: handle SMD FIFO -EAGAIN in q6asm playback
From: Vladimir Bely
Date: Sat Nov 28 2026 - 19:20:01 EST
On older QDSP6 SoCs with small SMD FIFOs (such as MSM8916), queuing a
burst of playback periods in q6asm_dai_ack() via rpmsg_trysend() can
temporarily fill the FIFO and return -EAGAIN, aborting playback right
at start.
This 2-patch series fixes both sides of -EAGAIN handling:
- Patch 1 keeps ac->lock held across apr_send_pkt() in
q6asm_write_async() and q6asm_read() and only advances port->dsp_buf
when the packet is queued, so a failed send does not leave dsp_buf
out of sync on retry.
- Patch 2 introduces a locked q6asm_dai_queue_playback() helper in
q6asm-dai that stops cleanly on -EAGAIN (also handling
runtime->boundary wrap-around and initializing prtd->lock on PCM open)
and retries when the DSP completes a buffer (DATA_WRITE_DONE).
Tested on MSM8916 (Samsung Galaxy A3, SM-A300F).
Vladimir Bely (2):
ASoC: qcom: q6asm: don't advance dsp_buf on failed write or read
ASoC: qcom: q6asm-dai: retry playback queuing on -EAGAIN
sound/soc/qcom/qdsp6/q6asm-dai.c | 58 +++++++++++++++++++++++++-------
sound/soc/qcom/qdsp6/q6asm.c | 30 ++++++++---------
2 files changed, 61 insertions(+), 27 deletions(-)
base-commit: 626d2233d48884f22c16011a6e44f905824bd8e0
--
2.43.0