This source file includes following definitions.
- to_psc_dma_stream
1
2
3
4
5
6 #ifndef __SOUND_SOC_FSL_MPC5200_DMA_H__
7 #define __SOUND_SOC_FSL_MPC5200_DMA_H__
8
9 #define PSC_STREAM_NAME_LEN 32
10
11
12
13
14
15
16
17
18
19
20
21
22 struct psc_dma_stream {
23 struct snd_pcm_runtime *runtime;
24 int active;
25 struct psc_dma *psc_dma;
26 struct bcom_task *bcom_task;
27 int irq;
28 struct snd_pcm_substream *stream;
29 int period_next;
30 int period_current;
31 int period_bytes;
32 int period_count;
33
34
35 u32 ac97_slot_bits;
36 };
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51 struct psc_dma {
52 char name[32];
53 struct mpc52xx_psc __iomem *psc_regs;
54 struct mpc52xx_psc_fifo __iomem *fifo_regs;
55 unsigned int irq;
56 struct device *dev;
57 spinlock_t lock;
58 struct mutex mutex;
59 u32 sicr;
60 uint sysclk;
61 int imr;
62 int id;
63 unsigned int slots;
64
65
66 struct psc_dma_stream playback;
67 struct psc_dma_stream capture;
68
69
70 struct {
71 unsigned long overrun_count;
72 unsigned long underrun_count;
73 } stats;
74 };
75
76
77 static inline struct psc_dma_stream *
78 to_psc_dma_stream(struct snd_pcm_substream *substream, struct psc_dma *psc_dma)
79 {
80 if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE)
81 return &psc_dma->capture;
82 return &psc_dma->playback;
83 }
84
85 int mpc5200_audio_dma_create(struct platform_device *op);
86 int mpc5200_audio_dma_destroy(struct platform_device *op);
87
88 #endif