diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-11-17 09:10:38 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 06:20:03 -0500 |
commit | d18f83764e376dea9e14a8ac53d1e14004fa9c13 (patch) | |
tree | f51e4a25f8cf71d642c0ab46233858322427c293 /sound/arm/pxa2xx-pcm.c | |
parent | ceb9e476c89f50e9ba7de914bbec2c05e9647915 (diff) |
[ALSA] Remove xxx_t typedefs: ARM PXA2xx
Modules: ARM PXA2XX driver
Remove xxx_t typedefs from the ARM PXA2xx driver.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/arm/pxa2xx-pcm.c')
-rw-r--r-- | sound/arm/pxa2xx-pcm.c | 59 |
1 files changed, 30 insertions, 29 deletions
diff --git a/sound/arm/pxa2xx-pcm.c b/sound/arm/pxa2xx-pcm.c index b1eb53b02eae..4938ef10b813 100644 --- a/sound/arm/pxa2xx-pcm.c +++ b/sound/arm/pxa2xx-pcm.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include "pxa2xx-pcm.h" | 28 | #include "pxa2xx-pcm.h" |
29 | 29 | ||
30 | 30 | ||
31 | static const snd_pcm_hardware_t pxa2xx_pcm_hardware = { | 31 | static const struct snd_pcm_hardware pxa2xx_pcm_hardware = { |
32 | .info = SNDRV_PCM_INFO_MMAP | | 32 | .info = SNDRV_PCM_INFO_MMAP | |
33 | SNDRV_PCM_INFO_MMAP_VALID | | 33 | SNDRV_PCM_INFO_MMAP_VALID | |
34 | SNDRV_PCM_INFO_INTERLEAVED | | 34 | SNDRV_PCM_INFO_INTERLEAVED | |
@@ -44,15 +44,15 @@ static const snd_pcm_hardware_t pxa2xx_pcm_hardware = { | |||
44 | 44 | ||
45 | struct pxa2xx_runtime_data { | 45 | struct pxa2xx_runtime_data { |
46 | int dma_ch; | 46 | int dma_ch; |
47 | pxa2xx_pcm_dma_params_t *params; | 47 | struct pxa2xx_pcm_dma_params *params; |
48 | pxa_dma_desc *dma_desc_array; | 48 | pxa_dma_desc *dma_desc_array; |
49 | dma_addr_t dma_desc_array_phys; | 49 | dma_addr_t dma_desc_array_phys; |
50 | }; | 50 | }; |
51 | 51 | ||
52 | static int pxa2xx_pcm_hw_params(snd_pcm_substream_t *substream, | 52 | static int pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream, |
53 | snd_pcm_hw_params_t *params) | 53 | struct snd_pcm_hw_params *params) |
54 | { | 54 | { |
55 | snd_pcm_runtime_t *runtime = substream->runtime; | 55 | struct snd_pcm_runtime *runtime = substream->runtime; |
56 | struct pxa2xx_runtime_data *rtd = runtime->private_data; | 56 | struct pxa2xx_runtime_data *rtd = runtime->private_data; |
57 | size_t totsize = params_buffer_bytes(params); | 57 | size_t totsize = params_buffer_bytes(params); |
58 | size_t period = params_period_bytes(params); | 58 | size_t period = params_period_bytes(params); |
@@ -86,7 +86,7 @@ static int pxa2xx_pcm_hw_params(snd_pcm_substream_t *substream, | |||
86 | return 0; | 86 | return 0; |
87 | } | 87 | } |
88 | 88 | ||
89 | static int pxa2xx_pcm_hw_free(snd_pcm_substream_t *substream) | 89 | static int pxa2xx_pcm_hw_free(struct snd_pcm_substream *substream) |
90 | { | 90 | { |
91 | struct pxa2xx_runtime_data *rtd = substream->runtime->private_data; | 91 | struct pxa2xx_runtime_data *rtd = substream->runtime->private_data; |
92 | 92 | ||
@@ -95,10 +95,10 @@ static int pxa2xx_pcm_hw_free(snd_pcm_substream_t *substream) | |||
95 | return 0; | 95 | return 0; |
96 | } | 96 | } |
97 | 97 | ||
98 | static int pxa2xx_pcm_prepare(snd_pcm_substream_t *substream) | 98 | static int pxa2xx_pcm_prepare(struct snd_pcm_substream *substream) |
99 | { | 99 | { |
100 | pxa2xx_pcm_client_t *client = substream->private_data; | 100 | struct pxa2xx_pcm_client *client = substream->private_data; |
101 | snd_pcm_runtime_t *runtime = substream->runtime; | 101 | struct snd_pcm_runtime *runtime = substream->runtime; |
102 | struct pxa2xx_runtime_data *rtd = runtime->private_data; | 102 | struct pxa2xx_runtime_data *rtd = runtime->private_data; |
103 | 103 | ||
104 | DCSR(rtd->dma_ch) &= ~DCSR_RUN; | 104 | DCSR(rtd->dma_ch) &= ~DCSR_RUN; |
@@ -109,7 +109,7 @@ static int pxa2xx_pcm_prepare(snd_pcm_substream_t *substream) | |||
109 | return client->prepare(substream); | 109 | return client->prepare(substream); |
110 | } | 110 | } |
111 | 111 | ||
112 | static int pxa2xx_pcm_trigger(snd_pcm_substream_t *substream, int cmd) | 112 | static int pxa2xx_pcm_trigger(struct snd_pcm_substream *substream, int cmd) |
113 | { | 113 | { |
114 | struct pxa2xx_runtime_data *rtd = substream->runtime->private_data; | 114 | struct pxa2xx_runtime_data *rtd = substream->runtime->private_data; |
115 | int ret = 0; | 115 | int ret = 0; |
@@ -139,7 +139,7 @@ static int pxa2xx_pcm_trigger(snd_pcm_substream_t *substream, int cmd) | |||
139 | 139 | ||
140 | static void pxa2xx_pcm_dma_irq(int dma_ch, void *dev_id, struct pt_regs *regs) | 140 | static void pxa2xx_pcm_dma_irq(int dma_ch, void *dev_id, struct pt_regs *regs) |
141 | { | 141 | { |
142 | snd_pcm_substream_t *substream = dev_id; | 142 | struct snd_pcm_substream *substream = dev_id; |
143 | struct pxa2xx_runtime_data *rtd = substream->runtime->private_data; | 143 | struct pxa2xx_runtime_data *rtd = substream->runtime->private_data; |
144 | int dcsr; | 144 | int dcsr; |
145 | 145 | ||
@@ -155,9 +155,9 @@ static void pxa2xx_pcm_dma_irq(int dma_ch, void *dev_id, struct pt_regs *regs) | |||
155 | } | 155 | } |
156 | } | 156 | } |
157 | 157 | ||
158 | static snd_pcm_uframes_t pxa2xx_pcm_pointer(snd_pcm_substream_t *substream) | 158 | static snd_pcm_uframes_t pxa2xx_pcm_pointer(struct snd_pcm_substream *substream) |
159 | { | 159 | { |
160 | snd_pcm_runtime_t *runtime = substream->runtime; | 160 | struct snd_pcm_runtime *runtime = substream->runtime; |
161 | struct pxa2xx_runtime_data *rtd = runtime->private_data; | 161 | struct pxa2xx_runtime_data *rtd = runtime->private_data; |
162 | dma_addr_t ptr = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ? | 162 | dma_addr_t ptr = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ? |
163 | DSADR(rtd->dma_ch) : DTADR(rtd->dma_ch); | 163 | DSADR(rtd->dma_ch) : DTADR(rtd->dma_ch); |
@@ -168,9 +168,9 @@ static snd_pcm_uframes_t pxa2xx_pcm_pointer(snd_pcm_substream_t *substream) | |||
168 | } | 168 | } |
169 | 169 | ||
170 | static int | 170 | static int |
171 | pxa2xx_pcm_hw_rule_mult32(snd_pcm_hw_params_t *params, snd_pcm_hw_rule_t *rule) | 171 | pxa2xx_pcm_hw_rule_mult32(struct snd_pcm_hw_params *params, struct snd_pcm_hw_rule *rule) |
172 | { | 172 | { |
173 | snd_interval_t *i = hw_param_interval(params, rule->var); | 173 | struct snd_interval *i = hw_param_interval(params, rule->var); |
174 | int changed = 0; | 174 | int changed = 0; |
175 | 175 | ||
176 | if (i->min & 31) { | 176 | if (i->min & 31) { |
@@ -188,10 +188,10 @@ pxa2xx_pcm_hw_rule_mult32(snd_pcm_hw_params_t *params, snd_pcm_hw_rule_t *rule) | |||
188 | return changed; | 188 | return changed; |
189 | } | 189 | } |
190 | 190 | ||
191 | static int pxa2xx_pcm_open(snd_pcm_substream_t *substream) | 191 | static int pxa2xx_pcm_open(struct snd_pcm_substream *substream) |
192 | { | 192 | { |
193 | pxa2xx_pcm_client_t *client = substream->private_data; | 193 | struct pxa2xx_pcm_client *client = substream->private_data; |
194 | snd_pcm_runtime_t *runtime = substream->runtime; | 194 | struct snd_pcm_runtime *runtime = substream->runtime; |
195 | struct pxa2xx_runtime_data *rtd; | 195 | struct pxa2xx_runtime_data *rtd; |
196 | int ret; | 196 | int ret; |
197 | 197 | ||
@@ -246,9 +246,9 @@ static int pxa2xx_pcm_open(snd_pcm_substream_t *substream) | |||
246 | return ret; | 246 | return ret; |
247 | } | 247 | } |
248 | 248 | ||
249 | static int pxa2xx_pcm_close(snd_pcm_substream_t *substream) | 249 | static int pxa2xx_pcm_close(struct snd_pcm_substream *substream) |
250 | { | 250 | { |
251 | pxa2xx_pcm_client_t *client = substream->private_data; | 251 | struct pxa2xx_pcm_client *client = substream->private_data; |
252 | struct pxa2xx_runtime_data *rtd = substream->runtime->private_data; | 252 | struct pxa2xx_runtime_data *rtd = substream->runtime->private_data; |
253 | 253 | ||
254 | pxa_free_dma(rtd->dma_ch); | 254 | pxa_free_dma(rtd->dma_ch); |
@@ -260,16 +260,16 @@ static int pxa2xx_pcm_close(snd_pcm_substream_t *substream) | |||
260 | } | 260 | } |
261 | 261 | ||
262 | static int | 262 | static int |
263 | pxa2xx_pcm_mmap(snd_pcm_substream_t *substream, struct vm_area_struct *vma) | 263 | pxa2xx_pcm_mmap(struct snd_pcm_substream *substream, struct vm_area_struct *vma) |
264 | { | 264 | { |
265 | snd_pcm_runtime_t *runtime = substream->runtime; | 265 | struct snd_pcm_runtime *runtime = substream->runtime; |
266 | return dma_mmap_writecombine(substream->pcm->card->dev, vma, | 266 | return dma_mmap_writecombine(substream->pcm->card->dev, vma, |
267 | runtime->dma_area, | 267 | runtime->dma_area, |
268 | runtime->dma_addr, | 268 | runtime->dma_addr, |
269 | runtime->dma_bytes); | 269 | runtime->dma_bytes); |
270 | } | 270 | } |
271 | 271 | ||
272 | static snd_pcm_ops_t pxa2xx_pcm_ops = { | 272 | static struct snd_pcm_ops pxa2xx_pcm_ops = { |
273 | .open = pxa2xx_pcm_open, | 273 | .open = pxa2xx_pcm_open, |
274 | .close = pxa2xx_pcm_close, | 274 | .close = pxa2xx_pcm_close, |
275 | .ioctl = snd_pcm_lib_ioctl, | 275 | .ioctl = snd_pcm_lib_ioctl, |
@@ -281,9 +281,9 @@ static snd_pcm_ops_t pxa2xx_pcm_ops = { | |||
281 | .mmap = pxa2xx_pcm_mmap, | 281 | .mmap = pxa2xx_pcm_mmap, |
282 | }; | 282 | }; |
283 | 283 | ||
284 | static int pxa2xx_pcm_preallocate_dma_buffer(snd_pcm_t *pcm, int stream) | 284 | static int pxa2xx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream) |
285 | { | 285 | { |
286 | snd_pcm_substream_t *substream = pcm->streams[stream].substream; | 286 | struct snd_pcm_substream *substream = pcm->streams[stream].substream; |
287 | struct snd_dma_buffer *buf = &substream->dma_buffer; | 287 | struct snd_dma_buffer *buf = &substream->dma_buffer; |
288 | size_t size = pxa2xx_pcm_hardware.buffer_bytes_max; | 288 | size_t size = pxa2xx_pcm_hardware.buffer_bytes_max; |
289 | buf->dev.type = SNDRV_DMA_TYPE_DEV; | 289 | buf->dev.type = SNDRV_DMA_TYPE_DEV; |
@@ -297,9 +297,9 @@ static int pxa2xx_pcm_preallocate_dma_buffer(snd_pcm_t *pcm, int stream) | |||
297 | return 0; | 297 | return 0; |
298 | } | 298 | } |
299 | 299 | ||
300 | static void pxa2xx_pcm_free_dma_buffers(snd_pcm_t *pcm) | 300 | static void pxa2xx_pcm_free_dma_buffers(struct snd_pcm *pcm) |
301 | { | 301 | { |
302 | snd_pcm_substream_t *substream; | 302 | struct snd_pcm_substream *substream; |
303 | struct snd_dma_buffer *buf; | 303 | struct snd_dma_buffer *buf; |
304 | int stream; | 304 | int stream; |
305 | 305 | ||
@@ -318,9 +318,10 @@ static void pxa2xx_pcm_free_dma_buffers(snd_pcm_t *pcm) | |||
318 | 318 | ||
319 | static u64 pxa2xx_pcm_dmamask = 0xffffffff; | 319 | static u64 pxa2xx_pcm_dmamask = 0xffffffff; |
320 | 320 | ||
321 | int pxa2xx_pcm_new(snd_card_t *card, pxa2xx_pcm_client_t *client, snd_pcm_t **rpcm) | 321 | int pxa2xx_pcm_new(struct snd_card *card, struct pxa2xx_pcm_client *client, |
322 | struct snd_pcm **rpcm) | ||
322 | { | 323 | { |
323 | snd_pcm_t *pcm; | 324 | struct snd_pcm *pcm; |
324 | int play = client->playback_params ? 1 : 0; | 325 | int play = client->playback_params ? 1 : 0; |
325 | int capt = client->capture_params ? 1 : 0; | 326 | int capt = client->capture_params ? 1 : 0; |
326 | int ret; | 327 | int ret; |