diff options
| author | Marc Herrero <marcht@proton.me> | 2026-11-16 20:16:20 +0000 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-11-17 22:02:45 +0000 |
| commit | feb416ba626e95b12fc238587f8fee93cae66c9c (patch) | |
| tree | b594c2b222f46bb2940866dc265af4b6b3738d39 /tools/perf/scripts/python | |
| parent | aebb7274476403040d582c61478df8f4a7bf9cd3 (diff) | |
ASoC: qcom: audioreach: use a 32-bit container for S24_LE PCM
SNDRV_PCM_FORMAT_S24_LE carries 24 valid bits in a 32-bit container, but
audioreach_shmem_set_media_format() and audioreach_pcm_set_media_format()
set bits_per_sample = bit_width = 24 in PARAM_ID_MEDIA_FORMAT and
PARAM_ID_PCM_OUTPUT_FORMAT_CFG, which tells the DSP that the samples are
packed 3-byte words.
q6apm-dai advertises S24_LE, so with a topology that allows it on a
playback front end the DSP walks the buffer with the wrong stride. On
QCS6490 (Radxa Dragon Q6A) this crashes the ADSP audio_process:
PDM: service 'audio_process' crash: 'EX:audio_process:0x2:...'
q6apm-lpass-dais ...: Failed to start APM port 113
remoteproc remoteproc0: crash detected in adsp: type fatal error
Use the container size (32) for 24-bit data and keep bit_width = 24,
alignment = PCM_LSB_ALIGNED and q_factor = 23. With this change S24_LE
playback works on the headphone path (codec DMA RX -> LPASS RX macro ->
WCD9385), tested with the back end at S16_LE, S24_LE and S32_LE and at
48, 96 and 192 kHz.
The DSP then reads each 32-bit word as Q23, so S24_LE samples must be
sign-extended into the top byte, as alsa-lib's conversions do.
Fixes: 25ab80db6b13 ("ASoC: qdsp6: audioreach: add module configuration command helpers")
Cc: stable@vger.kernel.org
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Signed-off-by: Marc Herrero <marcht@proton.me>
Link: https://patch.msgid.link/20261116-q6apm-fixes-v2-1-ea89fb43316a@proton.me
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
