diff options
| author | Michael McAllister <me@michaelmcallister.org> | 2026-10-21 21:42:02 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-11-09 12:08:27 +0000 |
| commit | 54e89fab723d5a374972d3f5c3e0b89ae055bd18 (patch) | |
| tree | 06e8a2b64e0fd77c2f5384d811718ce4078249f7 /scripts/objdiff | |
| parent | 05998d64426a8f245f267bafee434d8cb00a5cb6 (diff) | |
ASoC: qcom: q6asm: Reset PCM positions when preparing a stream
Preparing an existing PCM stream closes the DSP stream and remaps its
buffers, but leaves queue_ptr, dsp_buf and hw_ptr at their previous
positions. ALSA resets appl_ptr during prepare, so q6asm_dai_ack() can
subtract a stale queue_ptr from the new appl_ptr and queue an incorrect
number of periods.
On the Motorola Moto G10, playback works after opening the PCM device,
but the first write after snd_pcm_drop() and snd_pcm_prepare() fails
with -EBUSY and "Error queuing playback buffer -16".
Reset queue_ptr in prepare, and reset the DSP buffer index and hardware
pointer when allocating the new buffer ring. This keeps the queued,
submitted and completed positions aligned with the new PCM stream.
Fixes: e386c2cf3df2 ("ASoC: qcom: q6asm-dai: schedule all available frames to avoid dsp under-runs")
Fixes: 44432315444c ("ASoC: qcom: q6asm-dai: use q6asm_get_hw_pointer")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: Michael McAllister <me@michaelmcallister.org>
Link: https://patch.msgid.link/20261021204202.43738-1-me@michaelmcallister.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions
