mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] ASoC: qcom: qdsp6: handle SMD FIFO -EAGAIN in q6asm playback
@ 2026-11-29  0:19 Vladimir Bely
  2026-11-29  0:19 ` [PATCH 1/2] ASoC: qcom: q6asm: don't advance dsp_buf on failed write or read Vladimir Bely
  2026-11-29  0:19 ` [PATCH 2/2] ASoC: qcom: q6asm-dai: retry playback queuing on -EAGAIN Vladimir Bely
  0 siblings, 2 replies; 3+ messages in thread
From: Vladimir Bely @ 2026-11-29  0:19 UTC (permalink / raw)
  To: Srinivas Kandagatla, Liam Girdwood, Mark Brown
  Cc: Jaroslav Kysela, Takashi Iwai, linux-sound, linux-arm-msm,
	linux-kernel, Vladimir Bely

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-29  0:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-29  0:19 [PATCH 0/2] ASoC: qcom: qdsp6: handle SMD FIFO -EAGAIN in q6asm playback Vladimir Bely
2026-11-29  0:19 ` [PATCH 1/2] ASoC: qcom: q6asm: don't advance dsp_buf on failed write or read Vladimir Bely
2026-11-29  0:19 ` [PATCH 2/2] ASoC: qcom: q6asm-dai: retry playback queuing on -EAGAIN Vladimir Bely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®