]> 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)
commiteaa54dc4c192e539d332ef9c0192914bd3f05691
tree3fdb72af5a6723192d9a9e1832b0e49996519693
parent11ac71e61d87c57461c2ff904ec7d147e3d24f55
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