diff options
Diffstat (limited to 'sound/soc/fsl/mpc5200_dma.h')
-rw-r--r-- | sound/soc/fsl/mpc5200_dma.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/sound/soc/fsl/mpc5200_dma.h b/sound/soc/fsl/mpc5200_dma.h index 8d396bb9d9fe..22208b373fb9 100644 --- a/sound/soc/fsl/mpc5200_dma.h +++ b/sound/soc/fsl/mpc5200_dma.h | |||
@@ -13,26 +13,25 @@ | |||
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 |
19 | * @ac97_slot_bits: Enable bits for turning on the correct AC97 slot | ||
20 | */ | 20 | */ |
21 | struct psc_dma_stream { | 21 | struct psc_dma_stream { |
22 | struct snd_pcm_runtime *runtime; | 22 | struct snd_pcm_runtime *runtime; |
23 | snd_pcm_uframes_t appl_ptr; | ||
24 | |||
25 | int active; | 23 | int active; |
26 | struct psc_dma *psc_dma; | 24 | struct psc_dma *psc_dma; |
27 | struct bcom_task *bcom_task; | 25 | struct bcom_task *bcom_task; |
28 | int irq; | 26 | int irq; |
29 | struct snd_pcm_substream *stream; | 27 | struct snd_pcm_substream *stream; |
30 | dma_addr_t period_start; | 28 | int period_next; |
31 | dma_addr_t period_end; | 29 | int period_current; |
32 | dma_addr_t period_next_pt; | ||
33 | dma_addr_t period_current_pt; | ||
34 | int period_bytes; | 30 | int period_bytes; |
35 | int period_size; | 31 | int period_count; |
32 | |||
33 | /* AC97 state */ | ||
34 | u32 ac97_slot_bits; | ||
36 | }; | 35 | }; |
37 | 36 | ||
38 | /** | 37 | /** |
@@ -73,6 +72,15 @@ struct psc_dma { | |||
73 | } stats; | 72 | } stats; |
74 | }; | 73 | }; |
75 | 74 | ||
75 | /* Utility for retrieving psc_dma_stream structure from a substream */ | ||
76 | inline struct psc_dma_stream * | ||
77 | to_psc_dma_stream(struct snd_pcm_substream *substream, struct psc_dma *psc_dma) | ||
78 | { | ||
79 | if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE) | ||
80 | return &psc_dma->capture; | ||
81 | return &psc_dma->playback; | ||
82 | } | ||
83 | |||
76 | int mpc5200_audio_dma_create(struct of_device *op); | 84 | int mpc5200_audio_dma_create(struct of_device *op); |
77 | int mpc5200_audio_dma_destroy(struct of_device *op); | 85 | int mpc5200_audio_dma_destroy(struct of_device *op); |
78 | 86 | ||