summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/fsl_asrc_m2m.c
diff options
context:
space:
mode:
authorShengjiu Wang <shengjiu.wang@freescale.com>2016-01-18 13:44:56 +0800
committerDong Aisheng <aisheng.dong@nxp.com>2019-11-25 15:48:24 +0800
commit54c70617c7c441c12d815cc28006bce52e6accb7 (patch)
tree189d2838435ed0a25cc9af62517b807aa194d6dc /sound/soc/fsl/fsl_asrc_m2m.c
parent299f7667dbc67a331a0929b28700fc4410b26aca (diff)
MLK-12202: ASoC: fsl_asrc_m2m: fix dma timeout after suspend/resume
In suspend function, the complete will be set to done in callback. After resuming, the convert will not spend time to wait the complete. which is a wrong complete. So in suspend function, the complete need to be reinited for next convert. Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Diffstat (limited to 'sound/soc/fsl/fsl_asrc_m2m.c')
-rw-r--r--sound/soc/fsl/fsl_asrc_m2m.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/fsl/fsl_asrc_m2m.c b/sound/soc/fsl/fsl_asrc_m2m.c
index 0caed6233b6b..0e5db3dae051 100644
--- a/sound/soc/fsl/fsl_asrc_m2m.c
+++ b/sound/soc/fsl/fsl_asrc_m2m.c
@@ -1,7 +1,7 @@
/*
* Freescale ASRC Memory to Memory (M2M) driver
*
- * Copyright (C) 2014-2015 Freescale Semiconductor, Inc.
+ * Copyright (C) 2014-2016 Freescale Semiconductor, Inc.
*
* This file is licensed under the terms of the GNU General Public License
* version 2. This program is licensed "as is" without any warranty of any
@@ -954,11 +954,13 @@ static void fsl_asrc_m2m_suspend(struct fsl_asrc *asrc_priv)
if (pair->dma_chan[IN])
dmaengine_terminate_all(pair->dma_chan[IN]);
fsl_asrc_input_dma_callback((void *)pair);
+ init_completion(&m2m->complete[IN]);
}
if (!completion_done(&m2m->complete[OUT])) {
if (pair->dma_chan[OUT])
dmaengine_terminate_all(pair->dma_chan[OUT]);
fsl_asrc_output_dma_callback((void *)pair);
+ init_completion(&m2m->complete[OUT]);
}
spin_unlock_irqrestore(&asrc_priv->lock, lock_flags);