ASoC/mpc5200: get rid of the appl_ptr tracking nonsense
[deliverable/linux.git] / sound / soc / fsl / mpc5200_dma.h
... / ...
CommitLineData
1/*
2 * Freescale MPC5200 Audio DMA driver
3 */
4
5#ifndef __SOUND_SOC_FSL_MPC5200_DMA_H__
6#define __SOUND_SOC_FSL_MPC5200_DMA_H__
7
8#define PSC_STREAM_NAME_LEN 32
9
10/**
11 * psc_ac97_stream - Data specific to a single stream (playback or capture)
12 * @active: flag indicating if the stream is active
13 * @psc_dma: pointer back to parent psc_dma data structure
14 * @bcom_task: bestcomm task structure
15 * @irq: irq number for bestcomm task
16 * @period_end: physical address of end of DMA region
17 * @period_next_pt: physical address of next DMA buffer to enqueue
18 * @period_bytes: size of DMA period in bytes
19 */
20struct psc_dma_stream {
21 struct snd_pcm_runtime *runtime;
22 int active;
23 struct psc_dma *psc_dma;
24 struct bcom_task *bcom_task;
25 int irq;
26 struct snd_pcm_substream *stream;
27 int period_next;
28 int period_current;
29 int period_bytes;
30};
31
32/**
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
41 * with this value.
42 * @playback: Playback stream context data
43 * @capture: Capture stream context data
44 */
45struct psc_dma {
46 char name[32];
47 struct mpc52xx_psc __iomem *psc_regs;
48 struct mpc52xx_psc_fifo __iomem *fifo_regs;
49 unsigned int irq;
50 struct device *dev;
51 spinlock_t lock;
52 struct mutex mutex;
53 u32 sicr;
54 uint sysclk;
55 int imr;
56 int id;
57 unsigned int slots;
58
59 /* per-stream data */
60 struct psc_dma_stream playback;
61 struct psc_dma_stream capture;
62
63 /* Statistics */
64 struct {
65 unsigned long overrun_count;
66 unsigned long underrun_count;
67 } stats;
68};
69
70int mpc5200_audio_dma_create(struct of_device *op);
71int mpc5200_audio_dma_destroy(struct of_device *op);
72
73extern struct snd_soc_platform mpc5200_audio_dma_platform;
74
75#endif /* __SOUND_SOC_FSL_MPC5200_DMA_H__ */
This page took 0.024035 seconds and 5 git commands to generate.