From 0a411e2c0adfb0b449874b7ed34d555ac969c043 Mon Sep 17 00:00:00 2001 From: Dhananjay Kumar Date: Tue, 24 Jan 2017 23:12:09 +0530 Subject: [PATCH] ASoC: msm: qdsp6v2: fix spurious wakeup from q6asm cmd_wait Some q6asm no-wait commands are not set with no-wait flag triggering unexpected wake-ups for waiting commands. Fix the issue by setting no-wait flags at all the places where not waiting for ack from DSP. CRs-Fixed: 1105759 Change-Id: I66fd16cf025877cb71944f32f0a7cd14fc052577 Signed-off-by: Dhananjay Kumar --- sound/soc/msm/qdsp6v2/q6asm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/msm/qdsp6v2/q6asm.c b/sound/soc/msm/qdsp6v2/q6asm.c index cfaa562fdaba..68d663408bd3 100644 --- a/sound/soc/msm/qdsp6v2/q6asm.c +++ b/sound/soc/msm/qdsp6v2/q6asm.c @@ -7243,7 +7243,7 @@ int q6asm_async_write(struct audio_client *ac, } q6asm_stream_add_hdr_async( - ac, &write.hdr, sizeof(write), FALSE, ac->stream_id); + ac, &write.hdr, sizeof(write), TRUE, ac->stream_id); port = &ac->port[IN]; ab = &port->buf[port->dsp_buf]; @@ -7404,7 +7404,7 @@ int q6asm_write(struct audio_client *ac, uint32_t len, uint32_t msw_ts, 0, /* Stream ID is NA */ port->dsp_buf, 0, /* Direction flag is NA */ - WAIT_CMD); + NO_WAIT_CMD); write.hdr.opcode = ASM_DATA_CMD_WRITE_V2; write.buf_addr_lsw = lower_32_bits(ab->phys); write.buf_addr_msw = msm_audio_populate_upper_32_bits(ab->phys); @@ -7483,7 +7483,7 @@ int q6asm_write_nolock(struct audio_client *ac, uint32_t len, uint32_t msw_ts, 0, /* Stream ID is NA */ port->dsp_buf, 0, /* Direction flag is NA */ - WAIT_CMD); + NO_WAIT_CMD); write.hdr.opcode = ASM_DATA_CMD_WRITE_V2; write.buf_addr_lsw = lower_32_bits(ab->phys); @@ -7931,7 +7931,7 @@ static int __q6asm_cmd_nowait(struct audio_client *ac, int cmd, stream_id, 0, /* Buffer index is NA */ 0, /* Direction flag is NA */ - WAIT_CMD); + NO_WAIT_CMD); pr_debug("%s: token = 0x%x, stream_id %d, session 0x%x\n", __func__, hdr.token, stream_id, ac->session); @@ -7995,7 +7995,7 @@ int __q6asm_send_meta_data(struct audio_client *ac, uint32_t stream_id, return -EINVAL; } pr_debug("%s: session[%d]\n", __func__, ac->session); - q6asm_stream_add_hdr_async(ac, &silence.hdr, sizeof(silence), FALSE, + q6asm_stream_add_hdr_async(ac, &silence.hdr, sizeof(silence), TRUE, stream_id); /* @@ -8009,7 +8009,7 @@ int __q6asm_send_meta_data(struct audio_client *ac, uint32_t stream_id, stream_id, 0, /* Buffer index is NA */ 0, /* Direction flag is NA */ - WAIT_CMD); + NO_WAIT_CMD); pr_debug("%s: token = 0x%x, stream_id %d, session 0x%x\n", __func__, silence.hdr.token, stream_id, ac->session);