summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2013-09-13 09:25:01 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:10:43 -0700
commit106989c13d5fc877b22f7a43c2943e79c6119490 (patch)
tree9cb339b332be90e953f23f6659c240250514c55d
parent5871bd83cf5bac5dcf568b899ed37f9ceb024b49 (diff)
ASoC: msm: compr_free(), check if EOS is going on before waiting
Change-Id: I760979aa6ab1e1e10f203d8da5c9720d145869d3 Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org> Signed-off-by: Eric Laurent <elaurent@google.com> Git-commit: dddb29670e35ff0366f1f3dd7128b78872375f72 Git-repo: https://android.googlesource.com/kernel/msm Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
-rw-r--r--sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c b/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c
index 86adba6da2ce..48964fa22a28 100644
--- a/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c
+++ b/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c
@@ -455,10 +455,12 @@ static int msm_compr_free(struct snd_compr_stream *cstream)
pr_debug("%s: ocmem_req: %d\n", __func__,
atomic_read(&pdata->audio_ocmem_req));
- ret = wait_event_timeout(prtd->eos_wait,
- prtd->cmd_ack, 5 * HZ);
- if (!ret)
- pr_err("%s: CMD_EOS failed\n", __func__);
+ if (atomic_read(&prtd->eos)) {
+ ret = wait_event_timeout(prtd->eos_wait,
+ prtd->cmd_ack, 5 * HZ);
+ if (!ret)
+ pr_err("%s: CMD_EOS failed\n", __func__);
+ }
q6asm_cmd(prtd->audio_client, CMD_CLOSE);