[RFC PATCH 0/4] ASoC: qcom: q6apm: correct PCM formats and error handling
From: Zhang Jiaxi
Date: Thu Oct 08 2026 - 18:24:09 EST
This series addresses four AudioReach/Q6APM paths: PCM format lengths,
prepare callers which ignore STOP failure, a stale readiness query and
provider lookup, and V2 data completions which can publish false progress.
The format fix keeps the target's channel-map and compressed serialization.
Failed STOP now returns before PCM fragments are freed or the LPASS backend
is reformatted. Readiness requires a successful READY=1 response and holds
the published provider through the query and removal synchronization.
The data fix validates payload/period/address/map identity and lets the
PCM consumer latch a matching DSP error, report XRUN, avoid further normal
period/requeue processing and recover through a successful normal prepare.
Compressed clients keep their original valid-receipt status behavior.
This does not define terminal graph cleanup, retry after a lost STOP reply,
DSP restart, token generations or APR callback draining. An early PCM error
while ALSA is not RUNNING is latched without taking a stream lock: a backend
START may be waiting for a GPR reply under that lock. Other graph lifetime
and late-epoch problems remain separate.
The fixed baseline is sound.git for-next
62d9f9ffdfd44e88010412bf8f23732f0a93a9be. The four patches applied together;
Clang 22.1.8 built audioreach.o, q6apm.o, q6apm-dai.o and q6apm-lpass-dais.o
through normal arm64 Kbuild without diagnostics. Actual-function tests with
modeled transport/ALSA dependencies exercise the old STOP/readiness faults
and both matched data errors and normal prepare recovery under ASan/UBSan.
They do not validate this target on hardware or prove teardown safety.
Earlier quiet speaker playback belongs to a combined development runtime;
it does not isolate this series or establish production audio/microphone
capture. No board DTS, firmware, ACDB or per-device calibration is included.
Patches are numbered for review and apply together on the stated baseline.
Jiaxi Zhang (4):
ASoC: qdsp6: correct AudioReach PCM format lengths
ASoC: qcom: q6apm: abort prepare when stopping the graph fails
ASoC: qcom: q6apm: synchronize readiness query and provider lifetime
ASoC: qcom: q6apm: recover PCM from failed data receipts