Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
sound
soc
fsl
mpc5200_dma.h
Go to the documentation of this file.
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
21
struct
psc_dma_stream
{
22
struct
snd_pcm_runtime
*
runtime
;
23
int
active
;
24
struct
psc_dma
*
psc_dma
;
25
struct
bcom_task
*
bcom_task
;
26
int
irq
;
27
struct
snd_pcm_substream
*
stream
;
28
int
period_next
;
29
int
period_current
;
30
int
period_bytes
;
31
int
period_count
;
32
33
/* AC97 state */
34
u32
ac97_slot_bits
;
35
};
36
50
struct
psc_dma
{
51
char
name
[32];
52
struct
mpc52xx_psc
__iomem
*
psc_regs
;
53
struct
mpc52xx_psc_fifo
__iomem
*
fifo_regs
;
54
unsigned
int
irq
;
55
struct
device
*
dev
;
56
spinlock_t
lock
;
57
struct
mutex
mutex
;
58
u32
sicr
;
59
uint
sysclk
;
60
int
imr
;
61
int
id
;
62
unsigned
int
slots
;
63
64
/* per-stream data */
65
struct
psc_dma_stream
playback
;
66
struct
psc_dma_stream
capture
;
67
68
/* Statistics */
69
struct
{
70
unsigned
long
overrun_count
;
71
unsigned
long
underrun_count
;
72
}
stats
;
73
};
74
75
/* Utility for retrieving psc_dma_stream structure from a substream */
76
static
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
84
int
mpc5200_audio_dma_create
(
struct
platform_device
*
op
);
85
int
mpc5200_audio_dma_destroy
(
struct
platform_device
*
op
);
86
87
#endif
/* __SOUND_SOC_FSL_MPC5200_DMA_H__ */
Generated on Thu Jan 10 2013 15:08:14 for Linux Kernel by
1.8.2