OSDN Git Service

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)
commit1eed601a5b02a1f0bbabd155aeea7879fc3708eb
tree3fdb72af5a6723192d9a9e1832b0e49996519693
parentb6d1778bc5485c55c6f5194b8b2ea84c0ce5adad
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