Re: [PATCH 2/2] ASoC: omap: Stop DMA re enabling in self linkage mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 07 December 2010 00:34:47 ext Olaya, Margarita wrote:
> From: Hari Nagalla <hnagalla@xxxxxx>
> 
> While using self linking, there is a chance that the DMA
> has re-enabled the channel just after disabling it.
> 
> This patch stops the OMAP4 DMA re-enabling after stoping the
> DMA channel.

I have not seen this happening on OMAP2/3, or at least I'm not aware of it.
Is this problem OMAP4 only?
Do you know if this happens on playback, capture or in both direction?
Is it worth to do this workaround only on OMAP4?

> 
> Signed-off-by: Hari Nagalla <hnagalla@xxxxxx>
> Signed-off-by: Margarita Olaya Cabrera <magi.olaya@xxxxxx>
> ---
>  sound/soc/omap/omap-pcm.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
> index 6a21447..afe91ad 100644
> --- a/sound/soc/omap/omap-pcm.c
> +++ b/sound/soc/omap/omap-pcm.c
> @@ -234,6 +234,13 @@ static int omap_pcm_trigger(struct snd_pcm_substream
> *substream, int cmd) case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
>  		prtd->period_index = -1;
>  		omap_stop_dma(prtd->dma_ch);
> +		/*
> +		 * Since we are using self linking, there is a
> +		 * chance that the DMA as re-enabled the channel
> +		 * just after disabling it.
> +		 */
> +		while (omap_get_dma_active_status(prtd->dma_ch))
> +			omap_stop_dma(prtd->dma_ch);
>  		break;
>  	default:
>  		ret = -EINVAL;

-- 
Péter
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux