summaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2014-07-08 06:46:38 -0400
committerVinod Koul <vinod.koul@intel.com>2014-07-28 07:33:16 -0400
commit8e8805d5bf704f24acb14d67d506cbd4c5893be5 (patch)
tree46e6c0d28c4bd93a49aed599fe466f38728cf6de /drivers/dma
parenteb3fe7def66511120766c8fc05ee9631cce7fe6f (diff)
dmaengine: edma: Serve cyclic (audio) channels with high priority queue
Move the DMA channel used in cyclic mode (audio) to the highest priority event queue which helps to reduce audio problems. When the channel is terminated, move it back to the default queue. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/edma.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index 54f7408e14ef..3754ffa09f27 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -256,8 +256,13 @@ static int edma_terminate_all(struct edma_chan *echan)
256 * echan->edesc is NULL and exit.) 256 * echan->edesc is NULL and exit.)
257 */ 257 */
258 if (echan->edesc) { 258 if (echan->edesc) {
259 int cyclic = echan->edesc->cyclic;
259 echan->edesc = NULL; 260 echan->edesc = NULL;
260 edma_stop(echan->ch_num); 261 edma_stop(echan->ch_num);
262 /* Move the cyclic channel back to default queue */
263 if (cyclic)
264 edma_assign_channel_eventq(echan->ch_num,
265 EVENTQ_DEFAULT);
261 } 266 }
262 267
263 vchan_get_all_descriptors(&echan->vchan, &head); 268 vchan_get_all_descriptors(&echan->vchan, &head);
@@ -724,6 +729,9 @@ static struct dma_async_tx_descriptor *edma_prep_dma_cyclic(
724 edesc->pset[i].param.opt |= TCINTEN; 729 edesc->pset[i].param.opt |= TCINTEN;
725 } 730 }
726 731
732 /* Place the cyclic channel to highest priority queue */
733 edma_assign_channel_eventq(echan->ch_num, EVENTQ_0);
734
727 return vchan_tx_prep(&echan->vchan, &edesc->vdesc, tx_flags); 735 return vchan_tx_prep(&echan->vchan, &edesc->vdesc, tx_flags);
728} 736}
729 737