ASoC: audio: Fix MEM_UNMAP called before CLOSE ack
-When the commands for ASM_STREAM_CMD_SET_PP_PARAMS
and ASM_STREAM_CMD_CLOSE are sent back to back, Ack
for first command is misinterpreted as CMD_CLOSE ack
and proceeds to send memory unmap command resulting
in LPASS fatal.
-Maintain separate variable to wait on for CMD_CLOSE
that will avoid dependency to other commands getting
Ack early.
CRs-Fixed: 434279
Change-Id: I7b6b7f1b8154437b21c5ea14be2e774e4b96e2d1
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
diff --git a/include/sound/q6asm.h b/include/sound/q6asm.h
index 31bfa24..5099500 100644
--- a/include/sound/q6asm.h
+++ b/include/sound/q6asm.h
@@ -150,6 +150,7 @@
struct mutex cmd_lock;
atomic_t cmd_state;
+ atomic_t cmd_close_state;
atomic_t time_flag;
atomic_t nowait_cmd_cnt;
wait_queue_head_t cmd_wait;