diff options
author | Shengjiu Wang <shengjiu.wang@freescale.com> | 2016-01-18 13:44:56 +0800 |
---|---|---|
committer | Shengjiu Wang <shengjiu.wang@freescale.com> | 2016-01-19 13:07:34 +0800 |
commit | 743cead0f8c4ac6311ffb500efd6146c40124310 (patch) | |
tree | 91c882d0657cf1bbc6c54b105ab313f26cdcb6a7 /sound | |
parent | edd3accb00411f44fe432c4af6830aa41c353497 (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')
-rw-r--r-- | sound/soc/fsl/fsl_asrc_m2m.c | 4 |
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); |