From e7736cdea223f3a5b867c359fb35cf08250dd771 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Mon, 24 Sep 2012 10:58:04 +0300 Subject: dmaengine: Add flags parameter to dmaengine_prep_dma_cyclic() With this parameter added to dmaengine_prep_dma_cyclic() the API will be in sync with other dmaengine_prep_*() functions. The dmaengine_prep_dma_cyclic() function primarily used by audio for cyclic transfer required by ALSA, we use the from audio to ask dma drivers to suppress interrupts (if DMA_PREP_INTERRUPT is cleared) when it is supported on the platform. Signed-off-by: Peter Ujfalusi CC: Lars-Peter Clausen Acked-by: Vinod Koul Signed-off-by: Takashi Iwai --- sound/soc/soc-dmaengine-pcm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sound/soc') diff --git a/sound/soc/soc-dmaengine-pcm.c b/sound/soc/soc-dmaengine-pcm.c index 5df529eda251..bbc125748a38 100644 --- a/sound/soc/soc-dmaengine-pcm.c +++ b/sound/soc/soc-dmaengine-pcm.c @@ -140,14 +140,18 @@ static int dmaengine_pcm_prepare_and_submit(struct snd_pcm_substream *substream) struct dma_chan *chan = prtd->dma_chan; struct dma_async_tx_descriptor *desc; enum dma_transfer_direction direction; + unsigned long flags = DMA_CTRL_ACK; direction = snd_pcm_substream_to_dma_direction(substream); + if (!substream->runtime->no_period_wakeup) + flags |= DMA_PREP_INTERRUPT; + prtd->pos = 0; desc = dmaengine_prep_dma_cyclic(chan, substream->runtime->dma_addr, snd_pcm_lib_buffer_bytes(substream), - snd_pcm_lib_period_bytes(substream), direction); + snd_pcm_lib_period_bytes(substream), direction, flags); if (!desc) return -ENOMEM; -- cgit v1.2.3