ASoC: msm: qdsp6: Fix q6asm_memory_unmap issue
In q6asm_audio_client_buf_free_contiguous() function q6asm_memory_unmap
is called with wrong parameter. q6asm_memory_unmap() expects physical
address, but size of the buffer is passed as argument, hence
q6asm_memory_unmap returned with error code 2. Fix this issue by
passing physical address.
CRs-fixed: 296210
Signed-off-by: Deepa Madiregama <dmadireg@codeaurora.org>
diff --git a/sound/soc/msm/qdsp6/q6asm.c b/sound/soc/msm/qdsp6/q6asm.c
index f5f1c63..28bd98d 100644
--- a/sound/soc/msm/qdsp6/q6asm.c
+++ b/sound/soc/msm/qdsp6/q6asm.c
@@ -176,7 +176,7 @@
cnt = port->max_buf_cnt - 1;
if (cnt >= 0) {
- rc = q6asm_memory_unmap(ac, port->buf[0].size, dir);
+ rc = q6asm_memory_unmap(ac, port->buf[0].phys, dir);
if (rc < 0)
pr_err("%s CMD Memory_unmap_regions failed\n",
__func__);