diff options
| author | Shawn Guo <shengchao.guo@oss.qualcomm.com> | 2026-10-21 12:10:44 +0800 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-10-26 19:24:15 +0000 |
| commit | a51c5dd7f7fc7cdf4ae28fec4a013d8418d1cb53 (patch) | |
| tree | 0613dd22d2700522e726f1c3910d9470731bb1e5 /scripts/basic/split-include.c | |
| parent | 43c69604271d8b54c494fde70bd4a9eaab7a974d (diff) | |
| download | linux-a51c5dd7f7fc7cdf4ae28fec4a013d8418d1cb53.tar.gz linux-a51c5dd7f7fc7cdf4ae28fec4a013d8418d1cb53.zip | |
ASoC: qcom: q6apm: Unmap DSP buffers before removing the topology
Since buffers are mapped once in pcm_new() and unmapped in pcm_free(),
the unmap relies on the graph info still being registered. During card
teardown, however, soc_cleanup_card_resources() removes the components
before it frees the PCM runtimes. q6apm-audio's remove callback unloads
the topology, which frees every audioreach_graph_info, so by the time
q6apm_dai_pcm_free() runs the idr lookup fails and the unmap silently
returns -ENODEV. The DSP keeps the old mapping.
When the card is bound again, for example after unbinding and binding
any codec on it, pcm_new() maps the same buffer once more, the DSP
rejects it and the front-end PCM is not created:
qcom-apm gprsvc:service:2:1: Error (1) Processing 0x0100100c cmd
qcom-apm gprsvc:service:2:1: DSP returned error[100100c] 1
q6apm-dai ...: Audio Start: Buffer Allocation failed rc = -22
snd-sc8280xp sound: ASoC: can't create pcm MultiMedia1 Playback :-22
Release the circular and position buffer mappings of all graphs in
q6apm_audio_remove() while the graph info still exists. The unmap
helper now takes the q6apm instance directly, since it is called from
the APM component rather than from a q6apm-dai child device.
Fixes: 8ea6e25c8536 ("ASoC: qcom: q6apm: Add support for early buffer mapping on DSP")
Cc: stable@vger.kernel.org
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Signed-off-by: Shawn Guo <shengchao.guo@oss.qualcomm.com>
Link: https://patch.msgid.link/20261021041044.2080369-4-shengchao.guo@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions
