mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
To: Vladyslav Tymoshchuk <tvlad744@gmail.com>,
	Srinivas Kandagatla <srini@kernel.org>,
	Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Zhang Jiaxi <Z1529105815@outlook.com>,
	Johan Hovold <johan@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>,
	linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] ASoC: qcom: qdsp6: report the position of a drained buffer
Date: Thu, 15 Oct 2026 10:59:30 +0100	[thread overview]
Message-ID: <fef22189-05c5-423f-b0e8-c1ba9dad0fed@oss.qualcomm.com> (raw)
In-Reply-To: <20261014162703.10172-1-tvlad744@gmail.com>



On 10/14/26 5:26 PM, Vladyslav Tymoshchuk wrote:
> Since commit a93dad6f4e6a ("ASoC: q6apm-dai: make use of
> q6apm_get_hw_pointer") q6apm-dai reports one frame less than the
> position of the last buffer the DSP returned, and commit 44432315444c
> ("ASoC: qcom: q6asm-dai: use q6asm_get_hw_pointer") did the same in
> q6asm-dai. When the application stops feeding a playback stream, the
> position never reaches appl_ptr: ALSA never sees the underrun, the
> stream stays RUNNING without period interrupts, and drain ends on its
> timeout with -EIO. On a OnePlus Pad 3 (SM8750) this left PipeWire's
> PCM stuck for hours after a stall.
> 
> Patch 1 wraps the q6apm position to 0 at the end of the ring, as before
> a93dad6f4e6a. Patch 2 resets the q6apm hw pointer on prepare, which
> a93dad6f4e6a also stopped doing. Patch 3 is patch 1 for q6asm-dai.
> 
> Patches 1 and 2 are tested on SM8750 (numbers in patch 1). Patch 3 is
> compile-tested only; a test on a Q6ASM board (RB3, RB5) and on x1e or
> sc8280xp for patches 1 and 2 would be very welcome.
> 
> The RFC "ASoC: qcom: q6apm: correct PCM formats and error handling" by
> Zhang Jiaxi [1] touches the same hw pointer, in graph_callback() (4/4
> "recover PCM from failed data receipts"). The two do not conflict:
> that series changes when the hw pointer is published, this one how it
> is turned into a position and when it is reset, and that series
> applies on top of this one on sound/for-next without conflicts.
> 
> The analysis, the patches and this text were drafted with an AI
> assistant (Claude, see Assisted-by); I reviewed them and ran the tests
> described in the patches.
> 
> [1] https://lore.kernel.org/r/SY5PR01MB10600B2BE812BAA1B0FA501B4A1932@SY5PR01MB10600.ausprd01.prod.outlook.com
> 
> Vladyslav Tymoshchuk (3):
>   ASoC: qcom: q6apm-dai: wrap the position of a full ring to 0
>   ASoC: qcom: q6apm: reset the hw pointer with the fragment queue
>   ASoC: qcom: q6asm-dai: wrap the position of a full ring to 0

Thanks for the patches,
Lgtm, tested on Lenovo T14s Gen7

Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>

--srini
> 
>  sound/soc/qcom/qdsp6/q6apm-dai.c | 12 ++++++++----
>  sound/soc/qcom/qdsp6/q6apm.c     |  1 +
>  sound/soc/qcom/qdsp6/q6asm-dai.c |  7 +++----
>  3 files changed, 12 insertions(+), 8 deletions(-)
> 
> 
> base-commit: 8ef28aef33f2d5da6959ad6b579ec3cfccc009f6


      parent reply	other threads:[~2026-10-15  9:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14 16:26 Vladyslav Tymoshchuk
2026-10-14 16:27 ` [PATCH 1/3] ASoC: qcom: q6apm-dai: wrap the position of a full ring to 0 Vladyslav Tymoshchuk
2026-10-14 16:27 ` [PATCH 2/3] ASoC: qcom: q6apm: reset the hw pointer with the fragment queue Vladyslav Tymoshchuk
2026-10-14 16:27 ` [PATCH 3/3] ASoC: qcom: q6asm-dai: wrap the position of a full ring to 0 Vladyslav Tymoshchuk
2026-10-15  9:59 ` Srinivas Kandagatla [this message]

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=fef22189-05c5-423f-b0e8-c1ba9dad0fed@oss.qualcomm.com \
    --to=srinivas.kandagatla@oss.qualcomm.com \
    --cc=Z1529105815@outlook.com \
    --cc=broonie@kernel.org \
    --cc=johan@kernel.org \
    --cc=krzysztof.kozlowski@oss.qualcomm.com \
    --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 \
    --cc=tvlad744@gmail.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®