]> git.ipfire.org Git - thirdparty/linux.git/commit
ASoC: qcom: q6asm-dai: close stream only when running
authorSrinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Mon, 18 May 2026 09:23:44 +0000 (09:23 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 25 May 2026 12:46:44 +0000 (13:46 +0100)
commit048c540ee76ded666bda74f9dae1ca3254e0633c
tree841e71491907db6fa7f557c5731ce90bc0f0097f
parentcee3e63e7106c3c81b2053371fdf14240bfba2fc
ASoC: qcom: q6asm-dai: close stream only when running

q6asm_dai_close() and q6asm_dai_compr_free() currently issue CMD_CLOSE
whenever prtd->state is non-zero.

After prepare() closes an existing stream, the state is updated to
Q6ASM_STREAM_STOPPED. Since this state is also non-zero, the close and
free paths can send CMD_CLOSE again for a stream that has already been
closed.

Restrict CMD_CLOSE to the Q6ASM_STREAM_RUNNING state so the command is
sent only when the ASM stream is still active.

Fixes: 2a9e92d371db ("ASoC: qdsp6: q6asm: Add q6asm dai driver")
Cc: Stable@vger.kernel.org
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260518092347.3446946-3-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/qcom/qdsp6/q6asm-dai.c