From 2df29e84b685724d0e0777a7f9a6df95abbc85aa Mon Sep 17 00:00:00 2001 From: Lionel Xu Date: Tue, 18 May 2010 15:31:20 +0800 Subject: [PATCH] ENGR00122302 MX23 ALSA: Resolve the failure when pausing and resuming playback To reslove the problem when resuming a playback from pausing Signed-off-by: Lionel Xu --- arch/arm/plat-mxs/dmaengine.c | 2 +- sound/soc/mxs/mxs-adc.c | 1 + sound/soc/mxs/mxs-pcm.c | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm/plat-mxs/dmaengine.c b/arch/arm/plat-mxs/dmaengine.c index 453346e4057..52330d3ea9e 100644 --- a/arch/arm/plat-mxs/dmaengine.c +++ b/arch/arm/plat-mxs/dmaengine.c @@ -159,7 +159,7 @@ void mxs_dma_disable(int channel) pchan->flags &= ~MXS_DMA_FLAGS_BUSY; pchan->active_num = 0; pchan->pending_num = 0; - list_splice(&pchan->active, &pchan->done); + list_splice_init(&pchan->active, &pchan->done); spin_unlock_irqrestore(&pchan->lock, flags); mutex_unlock(&mxs_dma_mutex); } diff --git a/sound/soc/mxs/mxs-adc.c b/sound/soc/mxs/mxs-adc.c index af2cbbdc0c5..44e04d64ff2 100644 --- a/sound/soc/mxs/mxs-adc.c +++ b/sound/soc/mxs/mxs-adc.c @@ -224,6 +224,7 @@ static int mxs_adc_trigger(struct snd_pcm_substream *substream, /* disable the fifo error interrupt */ __raw_writel(BM_AUDIOOUT_CTRL_FIFO_ERROR_IRQ_EN, REGS_AUDIOOUT_BASE + HW_AUDIOOUT_CTRL_CLR); + mdelay(50); } else __raw_writel(BM_AUDIOIN_CTRL_RUN, diff --git a/sound/soc/mxs/mxs-pcm.c b/sound/soc/mxs/mxs-pcm.c index a9f0358687f..f3cdcdbd286 100644 --- a/sound/soc/mxs/mxs-pcm.c +++ b/sound/soc/mxs/mxs-pcm.c @@ -141,6 +141,7 @@ static int mxs_pcm_prepare(struct snd_pcm_substream *substream) /* Link with previous command */ prtd->dma_desc_array[i]->cmd.cmd.bits.bytes = prtd->dma_period; prtd->dma_desc_array[i]->cmd.cmd.bits.irq = 1; + prtd->dma_desc_array[i]->cmd.cmd.bits.dec_sem = 0; prtd->dma_desc_array[i]->cmd.cmd.bits.chain = 1; /* Set DMA direction */ if (playback) @@ -194,6 +195,8 @@ static void mxs_pcm_stop(struct snd_pcm_substream *substream) prtd->dma_desc_array[(desc + 1)%8]->cmd.cmd.bits.command = NO_DMA_XFER; mxs_dma_unfreeze(prtd->dma_ch); + + mxs_dma_disable(prtd->dma_ch); } static int mxs_pcm_trigger(struct snd_pcm_substream *substream, int cmd)