]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: qcom: q6asm: drop DSP responses for closed data streams
authorCédric Bellegarde <cedric.bellegarde@adishatz.org>
Fri, 2 Jan 2026 21:52:25 +0000 (22:52 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 2 Feb 2026 21:52:19 +0000 (21:52 +0000)
'Commit a354f030dbce ("ASoC: qcom: q6asm: handle the responses
after closing")' attempted to ignore DSP responses arriving
after a stream had been closed.

However, those responses were still handled, causing lockups.

Fix this by unconditionally dropping all DSP responses associated with
closed data streams.

Signed-off-by: Cédric Bellegarde <cedric.bellegarde@adishatz.org>
Link: https://patch.msgid.link/20260102215225.609166-1-cedric.bellegarde@adishatz.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/qcom/qdsp6/q6asm.c

index d76d29fa0099e68d2144aa0dd126171daabff9ca..1bb295407c6092c774f9df1981e741fd31cda2f5 100644 (file)
@@ -636,7 +636,6 @@ static int32_t q6asm_stream_callback(struct apr_device *adev,
                        client_event = ASM_CLIENT_EVENT_CMD_OUT_FLUSH_DONE;
                        break;
                case ASM_STREAM_CMD_OPEN_WRITE_V3:
-               case ASM_DATA_CMD_WRITE_V2:
                case ASM_STREAM_CMD_OPEN_READ_V3:
                case ASM_STREAM_CMD_OPEN_READWRITE_V2:
                case ASM_STREAM_CMD_SET_ENCDEC_PARAM:
@@ -655,8 +654,9 @@ static int32_t q6asm_stream_callback(struct apr_device *adev,
                        break;
                case ASM_DATA_CMD_EOS:
                case ASM_DATA_CMD_READ_V2:
+               case ASM_DATA_CMD_WRITE_V2:
                        /* response as result of close stream */
-                       break;
+                       goto done;
                default:
                        dev_err(ac->dev, "command[0x%x] not expecting rsp\n",
                                result->opcode);