summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/imx-pcm-rpmsg.c
diff options
context:
space:
mode:
authorShengjiu Wang <shengjiu.wang@freescale.com>2017-02-17 10:09:31 +0800
committerDong Aisheng <aisheng.dong@nxp.com>2019-11-25 15:52:50 +0800
commitc5ffd857b55b9ae46ca0cbd7e0dbd85a3a2733b4 (patch)
tree9c4093fb19e28fb29697b6321578288830711ab5 /sound/soc/fsl/imx-pcm-rpmsg.c
parentaa0cc6695a1be86576ed678e577e13f03a60d269 (diff)
MLK-13992: ASoC: fsl_rpmsg_i2s: add flush workqueue
some cmd is sent by workqueue, others are sent by call send message function directly, for workqueue may have delay, so there is occasion that cmd is not sent in order. Add flush_workqueue before the CLOSE and SUSPEND to make sure previous cmd is finished in that time. Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Diffstat (limited to 'sound/soc/fsl/imx-pcm-rpmsg.c')
-rw-r--r--sound/soc/fsl/imx-pcm-rpmsg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/fsl/imx-pcm-rpmsg.c b/sound/soc/fsl/imx-pcm-rpmsg.c
index 25369cc0fade..ace3bd77c8c2 100644
--- a/sound/soc/fsl/imx-pcm-rpmsg.c
+++ b/sound/soc/fsl/imx-pcm-rpmsg.c
@@ -149,6 +149,8 @@ static int imx_rpmsg_pcm_close(struct snd_pcm_substream *substream)
rpmsg->header.cmd = I2S_TX_CLOSE;
else
rpmsg->header.cmd = I2S_RX_CLOSE;
+
+ flush_workqueue(i2s_info->rpmsg_wq);
i2s_info->send_message(rpmsg, i2s_info);
kfree(prtd);