mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vladimir Bely <vlwwwwww@gmail.com>
To: Srinivas Kandagatla <srini@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org, Vladimir Bely <vlwwwwww@gmail.com>
Subject: [PATCH 0/2] ASoC: qcom: qdsp6: handle SMD FIFO -EAGAIN in q6asm playback
Date: Sun, 29 Nov 2026 03:19:49 +0300	[thread overview]
Message-ID: <20261129001951.991080-1-vlwwwwww@gmail.com> (raw)

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


             reply	other threads:[~2026-11-29  0:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-29  0:19 Vladimir Bely [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261129001951.991080-1-vlwwwwww@gmail.com \
    --to=vlwwwwww@gmail.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=srini@kernel.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®