2 * Freescale MPC5200 Audio DMA driver
5 #ifndef __SOUND_SOC_FSL_MPC5200_DMA_H__
6 #define __SOUND_SOC_FSL_MPC5200_DMA_H__
9 * psc_dma_stream - Data specific to a single stream (playback or capture)
10 * @active: flag indicating if the stream is active
11 * @psc_dma: pointer back to parent psc_dma data structure
12 * @bcom_task: bestcomm task structure
13 * @irq: irq number for bestcomm task
14 * @period_start: physical address of start of DMA region
15 * @period_end: physical address of end of DMA region
16 * @period_next_pt: physical address of next DMA buffer to enqueue
17 * @period_bytes: size of DMA period in bytes
19 struct psc_dma_stream
{
21 struct psc_dma
*psc_dma
;
22 struct bcom_task
*bcom_task
;
24 struct snd_pcm_substream
*stream
;
25 dma_addr_t period_start
;
26 dma_addr_t period_end
;
27 dma_addr_t period_next_pt
;
28 dma_addr_t period_current_pt
;
33 * psc_dma - Private driver data
34 * @name: short name for this device ("PSC0", "PSC1", etc)
35 * @psc_regs: pointer to the PSC's registers
36 * @fifo_regs: pointer to the PSC's FIFO registers
37 * @irq: IRQ of this PSC
38 * @dev: struct device pointer
39 * @dai: the CPU DAI for this device
40 * @sicr: Base value used in serial interface control register; mode is ORed
42 * @playback: Playback stream context data
43 * @capture: Capture stream context data
47 struct mpc52xx_psc __iomem
*psc_regs
;
48 struct mpc52xx_psc_fifo __iomem
*fifo_regs
;
51 struct snd_soc_dai dai
;
56 struct psc_dma_stream playback
;
57 struct psc_dma_stream capture
;
67 int psc_dma_startup(struct snd_pcm_substream
*substream
,
68 struct snd_soc_dai
*dai
);
70 int psc_dma_hw_free(struct snd_pcm_substream
*substream
,
71 struct snd_soc_dai
*dai
);
73 void psc_dma_shutdown(struct snd_pcm_substream
*substream
,
74 struct snd_soc_dai
*dai
);
76 int psc_dma_trigger(struct snd_pcm_substream
*substream
, int cmd
,
77 struct snd_soc_dai
*dai
);
79 extern struct snd_soc_platform psc_dma_pcm_soc_platform
;
81 #endif /* __SOUND_SOC_FSL_MPC5200_DMA_H__ */