From: Peter Ujfalusi Date: Wed, 16 Jul 2014 12:29:21 +0000 (+0300) Subject: dmaengine: edma: Support to suppress the period interrupts in cyclic mode X-Git-Tag: firefly_0821_release~176^2~3413^2~24 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a1f146f31724b649f74185ffc817bbd983eba5e2;p=firefly-linux-kernel-4.4.55.git dmaengine: edma: Support to suppress the period interrupts in cyclic mode If the client (audio) does not request interrupts for every period we can disable them. With updated audio driver stack we can play audio w/o the need to process any edma interrupts. Signed-off-by: Peter Ujfalusi Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index 8e400c0f3529..54f7408e14ef 100644 --- a/drivers/dma/edma.c +++ b/drivers/dma/edma.c @@ -718,10 +718,10 @@ static struct dma_async_tx_descriptor *edma_prep_dma_cyclic( edesc->absync = ret; /* - * Enable interrupts for every period because callback - * has to be called for every period. + * Enable period interrupt only if it is requested */ - edesc->pset[i].param.opt |= TCINTEN; + if (tx_flags & DMA_PREP_INTERRUPT) + edesc->pset[i].param.opt |= TCINTEN; } return vchan_tx_prep(&echan->vchan, &edesc->vdesc, tx_flags);