aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/mpc5200_dma.h
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2009-11-07 03:33:53 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-11-07 07:40:08 -0500
commit8f159d720b89f2a6c5ae8a8cc54823933a58120b (patch)
treeeb4373286058f4808c5c2693465d130f06ab01cf /sound/soc/fsl/mpc5200_dma.h
parent4cae37fa98f4d50778161ec033122444e3c10a01 (diff)
ASoC/mpc5200: Track DMA position by period number instead of bytes
All DMA blocks are lined up to period boundaries, but the DMA handling code tracks bytes instead. This patch reworks the code to track the period index into the DMA buffer instead of the physical address pointer. Doing so makes the code simpler and easier to understand. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/fsl/mpc5200_dma.h')
-rw-r--r--sound/soc/fsl/mpc5200_dma.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/sound/soc/fsl/mpc5200_dma.h b/sound/soc/fsl/mpc5200_dma.h
index 8d396bb9d9fe..529f7a094479 100644
--- a/sound/soc/fsl/mpc5200_dma.h
+++ b/sound/soc/fsl/mpc5200_dma.h
@@ -13,7 +13,6 @@
13 * @psc_dma: pointer back to parent psc_dma data structure 13 * @psc_dma: pointer back to parent psc_dma data structure
14 * @bcom_task: bestcomm task structure 14 * @bcom_task: bestcomm task structure
15 * @irq: irq number for bestcomm task 15 * @irq: irq number for bestcomm task
16 * @period_start: physical address of start of DMA region
17 * @period_end: physical address of end of DMA region 16 * @period_end: physical address of end of DMA region
18 * @period_next_pt: physical address of next DMA buffer to enqueue 17 * @period_next_pt: physical address of next DMA buffer to enqueue
19 * @period_bytes: size of DMA period in bytes 18 * @period_bytes: size of DMA period in bytes
@@ -27,12 +26,9 @@ struct psc_dma_stream {
27 struct bcom_task *bcom_task; 26 struct bcom_task *bcom_task;
28 int irq; 27 int irq;
29 struct snd_pcm_substream *stream; 28 struct snd_pcm_substream *stream;
30 dma_addr_t period_start; 29 int period_next;
31 dma_addr_t period_end; 30 int period_current;
32 dma_addr_t period_next_pt;
33 dma_addr_t period_current_pt;
34 int period_bytes; 31 int period_bytes;
35 int period_size;
36}; 32};
37 33
38/** 34/**