]> git.baikalelectronics.ru Git - kernel.git/commit
dma: mmp-tdma: refine dma disable and dma-pos update
authorQiao Zhou <zhouqiao@marvell.com>
Tue, 3 Mar 2015 01:16:08 +0000 (09:16 +0800)
committerVinod Koul <vinod.koul@intel.com>
Wed, 4 Mar 2015 12:33:15 +0000 (18:03 +0530)
commit7f96f2c9bfba034b100f52ba9810d78d8ccdbba5
tree3fdb72af5a6723192d9a9e1832b0e49996519693
parentea9fe49fa1453619e299a420486f85feb7b01fb8
dma: mmp-tdma: refine dma disable and dma-pos update

Below are the refinements.
1. Set DMA abort bit when disabling dma channel. This will clear
the remaining data in dma FIFO, to fix channel-swap issue.
2. Read DMA HW pointer when updating DMA status. Previously dma
position is calculated by adding one period size in dma interrupt.
This is inaccurate/insufficient for some high-quality audio APP.
Since interrupt bottom half handler has variable schedule delay,
it causes big error when calculating sample delay. Read the actual
HW pointer and feedback can improve the accuracy.
3. Do some minor code clean.

Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/mmp_tdma.c