diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-11-17 09:05:25 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 06:19:43 -0500 |
commit | 017ce80236c28bae9c2573307f1e76724232f287 (patch) | |
tree | e2d59723fb9be9195e2fd76618fab593e5bdad1a /sound/pci/rme32.c | |
parent | 3470c29dbde2aa8320acb29a654b5a72756ee58b (diff) |
[ALSA] Remove xxx_t typedefs: PCI RME32
Modules: RME32 driver
Remove xxx_t typedefs from the PCI RME32 driver.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/rme32.c')
-rw-r--r-- | sound/pci/rme32.c | 332 |
1 files changed, 166 insertions, 166 deletions
diff --git a/sound/pci/rme32.c b/sound/pci/rme32.c index 783df7625c1c..0cbef5fe6c63 100644 --- a/sound/pci/rme32.c +++ b/sound/pci/rme32.c | |||
@@ -192,7 +192,7 @@ MODULE_SUPPORTED_DEVICE("{{RME,Digi32}," "{RME,Digi32/8}," "{RME,Digi32 PRO}}"); | |||
192 | #define RME32_PRO_REVISION_WITH_8414 150 | 192 | #define RME32_PRO_REVISION_WITH_8414 150 |
193 | 193 | ||
194 | 194 | ||
195 | typedef struct snd_rme32 { | 195 | struct rme32 { |
196 | spinlock_t lock; | 196 | spinlock_t lock; |
197 | int irq; | 197 | int irq; |
198 | unsigned long port; | 198 | unsigned long port; |
@@ -205,8 +205,8 @@ typedef struct snd_rme32 { | |||
205 | 205 | ||
206 | u8 rev; /* card revision number */ | 206 | u8 rev; /* card revision number */ |
207 | 207 | ||
208 | snd_pcm_substream_t *playback_substream; | 208 | struct snd_pcm_substream *playback_substream; |
209 | snd_pcm_substream_t *capture_substream; | 209 | struct snd_pcm_substream *capture_substream; |
210 | 210 | ||
211 | int playback_frlog; /* log2 of framesize */ | 211 | int playback_frlog; /* log2 of framesize */ |
212 | int capture_frlog; | 212 | int capture_frlog; |
@@ -217,15 +217,15 @@ typedef struct snd_rme32 { | |||
217 | unsigned int fullduplex_mode; | 217 | unsigned int fullduplex_mode; |
218 | int running; | 218 | int running; |
219 | 219 | ||
220 | snd_pcm_indirect_t playback_pcm; | 220 | struct snd_pcm_indirect playback_pcm; |
221 | snd_pcm_indirect_t capture_pcm; | 221 | struct snd_pcm_indirect capture_pcm; |
222 | 222 | ||
223 | snd_card_t *card; | 223 | struct snd_card *card; |
224 | snd_pcm_t *spdif_pcm; | 224 | struct snd_pcm *spdif_pcm; |
225 | snd_pcm_t *adat_pcm; | 225 | struct snd_pcm *adat_pcm; |
226 | struct pci_dev *pci; | 226 | struct pci_dev *pci; |
227 | snd_kcontrol_t *spdif_ctl; | 227 | struct snd_kcontrol *spdif_ctl; |
228 | } rme32_t; | 228 | }; |
229 | 229 | ||
230 | static struct pci_device_id snd_rme32_ids[] = { | 230 | static struct pci_device_id snd_rme32_ids[] = { |
231 | {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_RME_DIGI32, | 231 | {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_RME_DIGI32, |
@@ -242,17 +242,17 @@ MODULE_DEVICE_TABLE(pci, snd_rme32_ids); | |||
242 | #define RME32_ISWORKING(rme32) ((rme32)->wcreg & RME32_WCR_START) | 242 | #define RME32_ISWORKING(rme32) ((rme32)->wcreg & RME32_WCR_START) |
243 | #define RME32_PRO_WITH_8414(rme32) ((rme32)->pci->device == PCI_DEVICE_ID_RME_DIGI32_PRO && (rme32)->rev == RME32_PRO_REVISION_WITH_8414) | 243 | #define RME32_PRO_WITH_8414(rme32) ((rme32)->pci->device == PCI_DEVICE_ID_RME_DIGI32_PRO && (rme32)->rev == RME32_PRO_REVISION_WITH_8414) |
244 | 244 | ||
245 | static int snd_rme32_playback_prepare(snd_pcm_substream_t * substream); | 245 | static int snd_rme32_playback_prepare(struct snd_pcm_substream *substream); |
246 | 246 | ||
247 | static int snd_rme32_capture_prepare(snd_pcm_substream_t * substream); | 247 | static int snd_rme32_capture_prepare(struct snd_pcm_substream *substream); |
248 | 248 | ||
249 | static int snd_rme32_pcm_trigger(snd_pcm_substream_t * substream, int cmd); | 249 | static int snd_rme32_pcm_trigger(struct snd_pcm_substream *substream, int cmd); |
250 | 250 | ||
251 | static void snd_rme32_proc_init(rme32_t * rme32); | 251 | static void snd_rme32_proc_init(struct rme32 * rme32); |
252 | 252 | ||
253 | static int snd_rme32_create_switches(snd_card_t * card, rme32_t * rme32); | 253 | static int snd_rme32_create_switches(struct snd_card *card, struct rme32 * rme32); |
254 | 254 | ||
255 | static inline unsigned int snd_rme32_pcm_byteptr(rme32_t * rme32) | 255 | static inline unsigned int snd_rme32_pcm_byteptr(struct rme32 * rme32) |
256 | { | 256 | { |
257 | return (readl(rme32->iobase + RME32_IO_GET_POS) | 257 | return (readl(rme32->iobase + RME32_IO_GET_POS) |
258 | & RME32_RCR_AUDIO_ADDR_MASK); | 258 | & RME32_RCR_AUDIO_ADDR_MASK); |
@@ -272,11 +272,11 @@ static int snd_rme32_ratecode(int rate) | |||
272 | } | 272 | } |
273 | 273 | ||
274 | /* silence callback for halfduplex mode */ | 274 | /* silence callback for halfduplex mode */ |
275 | static int snd_rme32_playback_silence(snd_pcm_substream_t * substream, int channel, /* not used (interleaved data) */ | 275 | static int snd_rme32_playback_silence(struct snd_pcm_substream *substream, int channel, /* not used (interleaved data) */ |
276 | snd_pcm_uframes_t pos, | 276 | snd_pcm_uframes_t pos, |
277 | snd_pcm_uframes_t count) | 277 | snd_pcm_uframes_t count) |
278 | { | 278 | { |
279 | rme32_t *rme32 = snd_pcm_substream_chip(substream); | 279 | struct rme32 *rme32 = snd_pcm_substream_chip(substream); |
280 | count <<= rme32->playback_frlog; | 280 | count <<= rme32->playback_frlog; |
281 | pos <<= rme32->playback_frlog; | 281 | pos <<= rme32->playback_frlog; |
282 | memset_io(rme32->iobase + RME32_IO_DATA_BUFFER + pos, 0, count); | 282 | memset_io(rme32->iobase + RME32_IO_DATA_BUFFER + pos, 0, count); |
@@ -284,11 +284,11 @@ static int snd_rme32_playback_silence(snd_pcm_substream_t * substream, int chann | |||
284 | } | 284 | } |
285 | 285 | ||
286 | /* copy callback for halfduplex mode */ | 286 | /* copy callback for halfduplex mode */ |
287 | static int snd_rme32_playback_copy(snd_pcm_substream_t * substream, int channel, /* not used (interleaved data) */ | 287 | static int snd_rme32_playback_copy(struct snd_pcm_substream *substream, int channel, /* not used (interleaved data) */ |
288 | snd_pcm_uframes_t pos, | 288 | snd_pcm_uframes_t pos, |
289 | void __user *src, snd_pcm_uframes_t count) | 289 | void __user *src, snd_pcm_uframes_t count) |
290 | { | 290 | { |
291 | rme32_t *rme32 = snd_pcm_substream_chip(substream); | 291 | struct rme32 *rme32 = snd_pcm_substream_chip(substream); |
292 | count <<= rme32->playback_frlog; | 292 | count <<= rme32->playback_frlog; |
293 | pos <<= rme32->playback_frlog; | 293 | pos <<= rme32->playback_frlog; |
294 | if (copy_from_user_toio(rme32->iobase + RME32_IO_DATA_BUFFER + pos, | 294 | if (copy_from_user_toio(rme32->iobase + RME32_IO_DATA_BUFFER + pos, |
@@ -298,11 +298,11 @@ static int snd_rme32_playback_copy(snd_pcm_substream_t * substream, int channel, | |||
298 | } | 298 | } |
299 | 299 | ||
300 | /* copy callback for halfduplex mode */ | 300 | /* copy callback for halfduplex mode */ |
301 | static int snd_rme32_capture_copy(snd_pcm_substream_t * substream, int channel, /* not used (interleaved data) */ | 301 | static int snd_rme32_capture_copy(struct snd_pcm_substream *substream, int channel, /* not used (interleaved data) */ |
302 | snd_pcm_uframes_t pos, | 302 | snd_pcm_uframes_t pos, |
303 | void __user *dst, snd_pcm_uframes_t count) | 303 | void __user *dst, snd_pcm_uframes_t count) |
304 | { | 304 | { |
305 | rme32_t *rme32 = snd_pcm_substream_chip(substream); | 305 | struct rme32 *rme32 = snd_pcm_substream_chip(substream); |
306 | count <<= rme32->capture_frlog; | 306 | count <<= rme32->capture_frlog; |
307 | pos <<= rme32->capture_frlog; | 307 | pos <<= rme32->capture_frlog; |
308 | if (copy_to_user_fromio(dst, | 308 | if (copy_to_user_fromio(dst, |
@@ -315,7 +315,7 @@ static int snd_rme32_capture_copy(snd_pcm_substream_t * substream, int channel, | |||
315 | /* | 315 | /* |
316 | * SPDIF I/O capabilites (half-duplex mode) | 316 | * SPDIF I/O capabilites (half-duplex mode) |
317 | */ | 317 | */ |
318 | static snd_pcm_hardware_t snd_rme32_spdif_info = { | 318 | static struct snd_pcm_hardware snd_rme32_spdif_info = { |
319 | .info = (SNDRV_PCM_INFO_MMAP_IOMEM | | 319 | .info = (SNDRV_PCM_INFO_MMAP_IOMEM | |
320 | SNDRV_PCM_INFO_MMAP_VALID | | 320 | SNDRV_PCM_INFO_MMAP_VALID | |
321 | SNDRV_PCM_INFO_INTERLEAVED | | 321 | SNDRV_PCM_INFO_INTERLEAVED | |
@@ -341,7 +341,7 @@ static snd_pcm_hardware_t snd_rme32_spdif_info = { | |||
341 | /* | 341 | /* |
342 | * ADAT I/O capabilites (half-duplex mode) | 342 | * ADAT I/O capabilites (half-duplex mode) |
343 | */ | 343 | */ |
344 | static snd_pcm_hardware_t snd_rme32_adat_info = | 344 | static struct snd_pcm_hardware snd_rme32_adat_info = |
345 | { | 345 | { |
346 | .info = (SNDRV_PCM_INFO_MMAP_IOMEM | | 346 | .info = (SNDRV_PCM_INFO_MMAP_IOMEM | |
347 | SNDRV_PCM_INFO_MMAP_VALID | | 347 | SNDRV_PCM_INFO_MMAP_VALID | |
@@ -366,7 +366,7 @@ static snd_pcm_hardware_t snd_rme32_adat_info = | |||
366 | /* | 366 | /* |
367 | * SPDIF I/O capabilites (full-duplex mode) | 367 | * SPDIF I/O capabilites (full-duplex mode) |
368 | */ | 368 | */ |
369 | static snd_pcm_hardware_t snd_rme32_spdif_fd_info = { | 369 | static struct snd_pcm_hardware snd_rme32_spdif_fd_info = { |
370 | .info = (SNDRV_PCM_INFO_MMAP | | 370 | .info = (SNDRV_PCM_INFO_MMAP | |
371 | SNDRV_PCM_INFO_MMAP_VALID | | 371 | SNDRV_PCM_INFO_MMAP_VALID | |
372 | SNDRV_PCM_INFO_INTERLEAVED | | 372 | SNDRV_PCM_INFO_INTERLEAVED | |
@@ -392,7 +392,7 @@ static snd_pcm_hardware_t snd_rme32_spdif_fd_info = { | |||
392 | /* | 392 | /* |
393 | * ADAT I/O capabilites (full-duplex mode) | 393 | * ADAT I/O capabilites (full-duplex mode) |
394 | */ | 394 | */ |
395 | static snd_pcm_hardware_t snd_rme32_adat_fd_info = | 395 | static struct snd_pcm_hardware snd_rme32_adat_fd_info = |
396 | { | 396 | { |
397 | .info = (SNDRV_PCM_INFO_MMAP | | 397 | .info = (SNDRV_PCM_INFO_MMAP | |
398 | SNDRV_PCM_INFO_MMAP_VALID | | 398 | SNDRV_PCM_INFO_MMAP_VALID | |
@@ -414,14 +414,14 @@ static snd_pcm_hardware_t snd_rme32_adat_fd_info = | |||
414 | .fifo_size = 0, | 414 | .fifo_size = 0, |
415 | }; | 415 | }; |
416 | 416 | ||
417 | static void snd_rme32_reset_dac(rme32_t *rme32) | 417 | static void snd_rme32_reset_dac(struct rme32 *rme32) |
418 | { | 418 | { |
419 | writel(rme32->wcreg | RME32_WCR_PD, | 419 | writel(rme32->wcreg | RME32_WCR_PD, |
420 | rme32->iobase + RME32_IO_CONTROL_REGISTER); | 420 | rme32->iobase + RME32_IO_CONTROL_REGISTER); |
421 | writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); | 421 | writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); |
422 | } | 422 | } |
423 | 423 | ||
424 | static int snd_rme32_playback_getrate(rme32_t * rme32) | 424 | static int snd_rme32_playback_getrate(struct rme32 * rme32) |
425 | { | 425 | { |
426 | int rate; | 426 | int rate; |
427 | 427 | ||
@@ -443,7 +443,7 @@ static int snd_rme32_playback_getrate(rme32_t * rme32) | |||
443 | return (rme32->wcreg & RME32_WCR_DS_BM) ? rate << 1 : rate; | 443 | return (rme32->wcreg & RME32_WCR_DS_BM) ? rate << 1 : rate; |
444 | } | 444 | } |
445 | 445 | ||
446 | static int snd_rme32_capture_getrate(rme32_t * rme32, int *is_adat) | 446 | static int snd_rme32_capture_getrate(struct rme32 * rme32, int *is_adat) |
447 | { | 447 | { |
448 | int n; | 448 | int n; |
449 | 449 | ||
@@ -505,7 +505,7 @@ static int snd_rme32_capture_getrate(rme32_t * rme32, int *is_adat) | |||
505 | return -1; | 505 | return -1; |
506 | } | 506 | } |
507 | 507 | ||
508 | static int snd_rme32_playback_setrate(rme32_t * rme32, int rate) | 508 | static int snd_rme32_playback_setrate(struct rme32 * rme32, int rate) |
509 | { | 509 | { |
510 | int ds; | 510 | int ds; |
511 | 511 | ||
@@ -561,7 +561,7 @@ static int snd_rme32_playback_setrate(rme32_t * rme32, int rate) | |||
561 | return 0; | 561 | return 0; |
562 | } | 562 | } |
563 | 563 | ||
564 | static int snd_rme32_setclockmode(rme32_t * rme32, int mode) | 564 | static int snd_rme32_setclockmode(struct rme32 * rme32, int mode) |
565 | { | 565 | { |
566 | switch (mode) { | 566 | switch (mode) { |
567 | case RME32_CLOCKMODE_SLAVE: | 567 | case RME32_CLOCKMODE_SLAVE: |
@@ -591,13 +591,13 @@ static int snd_rme32_setclockmode(rme32_t * rme32, int mode) | |||
591 | return 0; | 591 | return 0; |
592 | } | 592 | } |
593 | 593 | ||
594 | static int snd_rme32_getclockmode(rme32_t * rme32) | 594 | static int snd_rme32_getclockmode(struct rme32 * rme32) |
595 | { | 595 | { |
596 | return ((rme32->wcreg >> RME32_WCR_BITPOS_FREQ_0) & 1) + | 596 | return ((rme32->wcreg >> RME32_WCR_BITPOS_FREQ_0) & 1) + |
597 | (((rme32->wcreg >> RME32_WCR_BITPOS_FREQ_1) & 1) << 1); | 597 | (((rme32->wcreg >> RME32_WCR_BITPOS_FREQ_1) & 1) << 1); |
598 | } | 598 | } |
599 | 599 | ||
600 | static int snd_rme32_setinputtype(rme32_t * rme32, int type) | 600 | static int snd_rme32_setinputtype(struct rme32 * rme32, int type) |
601 | { | 601 | { |
602 | switch (type) { | 602 | switch (type) { |
603 | case RME32_INPUT_OPTICAL: | 603 | case RME32_INPUT_OPTICAL: |
@@ -623,14 +623,14 @@ static int snd_rme32_setinputtype(rme32_t * rme32, int type) | |||
623 | return 0; | 623 | return 0; |
624 | } | 624 | } |
625 | 625 | ||
626 | static int snd_rme32_getinputtype(rme32_t * rme32) | 626 | static int snd_rme32_getinputtype(struct rme32 * rme32) |
627 | { | 627 | { |
628 | return ((rme32->wcreg >> RME32_WCR_BITPOS_INP_0) & 1) + | 628 | return ((rme32->wcreg >> RME32_WCR_BITPOS_INP_0) & 1) + |
629 | (((rme32->wcreg >> RME32_WCR_BITPOS_INP_1) & 1) << 1); | 629 | (((rme32->wcreg >> RME32_WCR_BITPOS_INP_1) & 1) << 1); |
630 | } | 630 | } |
631 | 631 | ||
632 | static void | 632 | static void |
633 | snd_rme32_setframelog(rme32_t * rme32, int n_channels, int is_playback) | 633 | snd_rme32_setframelog(struct rme32 * rme32, int n_channels, int is_playback) |
634 | { | 634 | { |
635 | int frlog; | 635 | int frlog; |
636 | 636 | ||
@@ -649,7 +649,7 @@ snd_rme32_setframelog(rme32_t * rme32, int n_channels, int is_playback) | |||
649 | } | 649 | } |
650 | } | 650 | } |
651 | 651 | ||
652 | static int snd_rme32_setformat(rme32_t * rme32, int format) | 652 | static int snd_rme32_setformat(struct rme32 * rme32, int format) |
653 | { | 653 | { |
654 | switch (format) { | 654 | switch (format) { |
655 | case SNDRV_PCM_FORMAT_S16_LE: | 655 | case SNDRV_PCM_FORMAT_S16_LE: |
@@ -666,12 +666,12 @@ static int snd_rme32_setformat(rme32_t * rme32, int format) | |||
666 | } | 666 | } |
667 | 667 | ||
668 | static int | 668 | static int |
669 | snd_rme32_playback_hw_params(snd_pcm_substream_t * substream, | 669 | snd_rme32_playback_hw_params(struct snd_pcm_substream *substream, |
670 | snd_pcm_hw_params_t * params) | 670 | struct snd_pcm_hw_params *params) |
671 | { | 671 | { |
672 | int err, rate, dummy; | 672 | int err, rate, dummy; |
673 | rme32_t *rme32 = snd_pcm_substream_chip(substream); | 673 | struct rme32 *rme32 = snd_pcm_substream_chip(substream); |
674 | snd_pcm_runtime_t *runtime = substream->runtime; | 674 | struct snd_pcm_runtime *runtime = substream->runtime; |
675 | 675 | ||
676 | if (rme32->fullduplex_mode) { | 676 | if (rme32->fullduplex_mode) { |
677 | err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params)); | 677 | err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params)); |
@@ -721,12 +721,12 @@ snd_rme32_playback_hw_params(snd_pcm_substream_t * substream, | |||
721 | } | 721 | } |
722 | 722 | ||
723 | static int | 723 | static int |
724 | snd_rme32_capture_hw_params(snd_pcm_substream_t * substream, | 724 | snd_rme32_capture_hw_params(struct snd_pcm_substream *substream, |
725 | snd_pcm_hw_params_t * params) | 725 | struct snd_pcm_hw_params *params) |
726 | { | 726 | { |
727 | int err, isadat, rate; | 727 | int err, isadat, rate; |
728 | rme32_t *rme32 = snd_pcm_substream_chip(substream); | 728 | struct rme32 *rme32 = snd_pcm_substream_chip(substream); |
729 | snd_pcm_runtime_t *runtime = substream->runtime; | 729 | struct snd_pcm_runtime *runtime = substream->runtime; |
730 | 730 | ||
731 | if (rme32->fullduplex_mode) { | 731 | if (rme32->fullduplex_mode) { |
732 | err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params)); | 732 | err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params)); |
@@ -782,15 +782,15 @@ snd_rme32_capture_hw_params(snd_pcm_substream_t * substream, | |||
782 | return 0; | 782 | return 0; |
783 | } | 783 | } |
784 | 784 | ||
785 | static int snd_rme32_pcm_hw_free(snd_pcm_substream_t * substream) | 785 | static int snd_rme32_pcm_hw_free(struct snd_pcm_substream *substream) |
786 | { | 786 | { |
787 | rme32_t *rme32 = snd_pcm_substream_chip(substream); | 787 | struct rme32 *rme32 = snd_pcm_substream_chip(substream); |
788 | if (! rme32->fullduplex_mode) | 788 | if (! rme32->fullduplex_mode) |
789 | return 0; | 789 | return 0; |
790 | return snd_pcm_lib_free_pages(substream); | 790 | return snd_pcm_lib_free_pages(substream); |
791 | } | 791 | } |
792 | 792 | ||
793 | static void snd_rme32_pcm_start(rme32_t * rme32, int from_pause) | 793 | static void snd_rme32_pcm_start(struct rme32 * rme32, int from_pause) |
794 | { | 794 | { |
795 | if (!from_pause) { | 795 | if (!from_pause) { |
796 | writel(0, rme32->iobase + RME32_IO_RESET_POS); | 796 | writel(0, rme32->iobase + RME32_IO_RESET_POS); |
@@ -800,7 +800,7 @@ static void snd_rme32_pcm_start(rme32_t * rme32, int from_pause) | |||
800 | writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); | 800 | writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); |
801 | } | 801 | } |
802 | 802 | ||
803 | static void snd_rme32_pcm_stop(rme32_t * rme32, int to_pause) | 803 | static void snd_rme32_pcm_stop(struct rme32 * rme32, int to_pause) |
804 | { | 804 | { |
805 | /* | 805 | /* |
806 | * Check if there is an unconfirmed IRQ, if so confirm it, or else | 806 | * Check if there is an unconfirmed IRQ, if so confirm it, or else |
@@ -821,7 +821,7 @@ static void snd_rme32_pcm_stop(rme32_t * rme32, int to_pause) | |||
821 | static irqreturn_t | 821 | static irqreturn_t |
822 | snd_rme32_interrupt(int irq, void *dev_id, struct pt_regs *regs) | 822 | snd_rme32_interrupt(int irq, void *dev_id, struct pt_regs *regs) |
823 | { | 823 | { |
824 | rme32_t *rme32 = (rme32_t *) dev_id; | 824 | struct rme32 *rme32 = (struct rme32 *) dev_id; |
825 | 825 | ||
826 | rme32->rcreg = readl(rme32->iobase + RME32_IO_CONTROL_REGISTER); | 826 | rme32->rcreg = readl(rme32->iobase + RME32_IO_CONTROL_REGISTER); |
827 | if (!(rme32->rcreg & RME32_RCR_IRQ)) { | 827 | if (!(rme32->rcreg & RME32_RCR_IRQ)) { |
@@ -841,13 +841,13 @@ snd_rme32_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
841 | static unsigned int period_bytes[] = { RME32_BLOCK_SIZE }; | 841 | static unsigned int period_bytes[] = { RME32_BLOCK_SIZE }; |
842 | 842 | ||
843 | 843 | ||
844 | static snd_pcm_hw_constraint_list_t hw_constraints_period_bytes = { | 844 | static struct snd_pcm_hw_constraint_list hw_constraints_period_bytes = { |
845 | .count = ARRAY_SIZE(period_bytes), | 845 | .count = ARRAY_SIZE(period_bytes), |
846 | .list = period_bytes, | 846 | .list = period_bytes, |
847 | .mask = 0 | 847 | .mask = 0 |
848 | }; | 848 | }; |
849 | 849 | ||
850 | static void snd_rme32_set_buffer_constraint(rme32_t *rme32, snd_pcm_runtime_t *runtime) | 850 | static void snd_rme32_set_buffer_constraint(struct rme32 *rme32, struct snd_pcm_runtime *runtime) |
851 | { | 851 | { |
852 | if (! rme32->fullduplex_mode) { | 852 | if (! rme32->fullduplex_mode) { |
853 | snd_pcm_hw_constraint_minmax(runtime, | 853 | snd_pcm_hw_constraint_minmax(runtime, |
@@ -859,11 +859,11 @@ static void snd_rme32_set_buffer_constraint(rme32_t *rme32, snd_pcm_runtime_t *r | |||
859 | } | 859 | } |
860 | } | 860 | } |
861 | 861 | ||
862 | static int snd_rme32_playback_spdif_open(snd_pcm_substream_t * substream) | 862 | static int snd_rme32_playback_spdif_open(struct snd_pcm_substream *substream) |
863 | { | 863 | { |
864 | int rate, dummy; | 864 | int rate, dummy; |
865 | rme32_t *rme32 = snd_pcm_substream_chip(substream); | 865 | struct rme32 *rme32 = snd_pcm_substream_chip(substream); |
866 | snd_pcm_runtime_t *runtime = substream->runtime; | 866 | struct snd_pcm_runtime *runtime = substream->runtime; |
867 | 867 | ||
868 | snd_pcm_set_sync(substream); | 868 | snd_pcm_set_sync(substream); |
869 | 869 | ||
@@ -902,11 +902,11 @@ static int snd_rme32_playback_spdif_open(snd_pcm_substream_t * substream) | |||
902 | return 0; | 902 | return 0; |
903 | } | 903 | } |
904 | 904 | ||
905 | static int snd_rme32_capture_spdif_open(snd_pcm_substream_t * substream) | 905 | static int snd_rme32_capture_spdif_open(struct snd_pcm_substream *substream) |
906 | { | 906 | { |
907 | int isadat, rate; | 907 | int isadat, rate; |
908 | rme32_t *rme32 = snd_pcm_substream_chip(substream); | 908 | struct rme32 *rme32 = snd_pcm_substream_chip(substream); |
909 | snd_pcm_runtime_t *runtime = substream->runtime; | 909 | struct snd_pcm_runtime *runtime = substream->runtime; |
910 | 910 | ||
911 | snd_pcm_set_sync(substream); | 911 | snd_pcm_set_sync(substream); |
912 | 912 | ||
@@ -941,11 +941,11 @@ static int snd_rme32_capture_spdif_open(snd_pcm_substream_t * substream) | |||
941 | } | 941 | } |
942 | 942 | ||
943 | static int | 943 | static int |
944 | snd_rme32_playback_adat_open(snd_pcm_substream_t *substream) | 944 | snd_rme32_playback_adat_open(struct snd_pcm_substream *substream) |
945 | { | 945 | { |
946 | int rate, dummy; | 946 | int rate, dummy; |
947 | rme32_t *rme32 = snd_pcm_substream_chip(substream); | 947 | struct rme32 *rme32 = snd_pcm_substream_chip(substream); |
948 | snd_pcm_runtime_t *runtime = substream->runtime; | 948 | struct snd_pcm_runtime *runtime = substream->runtime; |
949 | 949 | ||
950 | snd_pcm_set_sync(substream); | 950 | snd_pcm_set_sync(substream); |
951 | 951 | ||
@@ -976,11 +976,11 @@ snd_rme32_playback_adat_open(snd_pcm_substream_t *substream) | |||
976 | } | 976 | } |
977 | 977 | ||
978 | static int | 978 | static int |
979 | snd_rme32_capture_adat_open(snd_pcm_substream_t *substream) | 979 | snd_rme32_capture_adat_open(struct snd_pcm_substream *substream) |
980 | { | 980 | { |
981 | int isadat, rate; | 981 | int isadat, rate; |
982 | rme32_t *rme32 = snd_pcm_substream_chip(substream); | 982 | struct rme32 *rme32 = snd_pcm_substream_chip(substream); |
983 | snd_pcm_runtime_t *runtime = substream->runtime; | 983 | struct snd_pcm_runtime *runtime = substream->runtime; |
984 | 984 | ||
985 | if (rme32->fullduplex_mode) | 985 | if (rme32->fullduplex_mode) |
986 | runtime->hw = snd_rme32_adat_fd_info; | 986 | runtime->hw = snd_rme32_adat_fd_info; |
@@ -1009,9 +1009,9 @@ snd_rme32_capture_adat_open(snd_pcm_substream_t *substream) | |||
1009 | return 0; | 1009 | return 0; |
1010 | } | 1010 | } |
1011 | 1011 | ||
1012 | static int snd_rme32_playback_close(snd_pcm_substream_t * substream) | 1012 | static int snd_rme32_playback_close(struct snd_pcm_substream *substream) |
1013 | { | 1013 | { |
1014 | rme32_t *rme32 = snd_pcm_substream_chip(substream); | 1014 | struct rme32 *rme32 = snd_pcm_substream_chip(substream); |
1015 | int spdif = 0; | 1015 | int spdif = 0; |
1016 | 1016 | ||
1017 | spin_lock_irq(&rme32->lock); | 1017 | spin_lock_irq(&rme32->lock); |
@@ -1028,9 +1028,9 @@ static int snd_rme32_playback_close(snd_pcm_substream_t * substream) | |||
1028 | return 0; | 1028 | return 0; |
1029 | } | 1029 | } |
1030 | 1030 | ||
1031 | static int snd_rme32_capture_close(snd_pcm_substream_t * substream) | 1031 | static int snd_rme32_capture_close(struct snd_pcm_substream *substream) |
1032 | { | 1032 | { |
1033 | rme32_t *rme32 = snd_pcm_substream_chip(substream); | 1033 | struct rme32 *rme32 = snd_pcm_substream_chip(substream); |
1034 | 1034 | ||
1035 | spin_lock_irq(&rme32->lock); | 1035 | spin_lock_irq(&rme32->lock); |
1036 | rme32->capture_substream = NULL; | 1036 | rme32->capture_substream = NULL; |
@@ -1039,9 +1039,9 @@ static int snd_rme32_capture_close(snd_pcm_substream_t * substream) | |||
1039 | return 0; | 1039 | return 0; |
1040 | } | 1040 | } |
1041 | 1041 | ||
1042 | static int snd_rme32_playback_prepare(snd_pcm_substream_t * substream) | 1042 | static int snd_rme32_playback_prepare(struct snd_pcm_substream *substream) |
1043 | { | 1043 | { |
1044 | rme32_t *rme32 = snd_pcm_substream_chip(substream); | 1044 | struct rme32 *rme32 = snd_pcm_substream_chip(substream); |
1045 | 1045 | ||
1046 | spin_lock_irq(&rme32->lock); | 1046 | spin_lock_irq(&rme32->lock); |
1047 | if (rme32->fullduplex_mode) { | 1047 | if (rme32->fullduplex_mode) { |
@@ -1058,9 +1058,9 @@ static int snd_rme32_playback_prepare(snd_pcm_substream_t * substream) | |||
1058 | return 0; | 1058 | return 0; |
1059 | } | 1059 | } |
1060 | 1060 | ||
1061 | static int snd_rme32_capture_prepare(snd_pcm_substream_t * substream) | 1061 | static int snd_rme32_capture_prepare(struct snd_pcm_substream *substream) |
1062 | { | 1062 | { |
1063 | rme32_t *rme32 = snd_pcm_substream_chip(substream); | 1063 | struct rme32 *rme32 = snd_pcm_substream_chip(substream); |
1064 | 1064 | ||
1065 | spin_lock_irq(&rme32->lock); | 1065 | spin_lock_irq(&rme32->lock); |
1066 | if (rme32->fullduplex_mode) { | 1066 | if (rme32->fullduplex_mode) { |
@@ -1076,11 +1076,11 @@ static int snd_rme32_capture_prepare(snd_pcm_substream_t * substream) | |||
1076 | } | 1076 | } |
1077 | 1077 | ||
1078 | static int | 1078 | static int |
1079 | snd_rme32_pcm_trigger(snd_pcm_substream_t * substream, int cmd) | 1079 | snd_rme32_pcm_trigger(struct snd_pcm_substream *substream, int cmd) |
1080 | { | 1080 | { |
1081 | rme32_t *rme32 = snd_pcm_substream_chip(substream); | 1081 | struct rme32 *rme32 = snd_pcm_substream_chip(substream); |
1082 | struct list_head *pos; | 1082 | struct list_head *pos; |
1083 | snd_pcm_substream_t *s; | 1083 | struct snd_pcm_substream *s; |
1084 | 1084 | ||
1085 | spin_lock(&rme32->lock); | 1085 | spin_lock(&rme32->lock); |
1086 | snd_pcm_group_for_each(pos, substream) { | 1086 | snd_pcm_group_for_each(pos, substream) { |
@@ -1144,33 +1144,33 @@ snd_rme32_pcm_trigger(snd_pcm_substream_t * substream, int cmd) | |||
1144 | 1144 | ||
1145 | /* pointer callback for halfduplex mode */ | 1145 | /* pointer callback for halfduplex mode */ |
1146 | static snd_pcm_uframes_t | 1146 | static snd_pcm_uframes_t |
1147 | snd_rme32_playback_pointer(snd_pcm_substream_t * substream) | 1147 | snd_rme32_playback_pointer(struct snd_pcm_substream *substream) |
1148 | { | 1148 | { |
1149 | rme32_t *rme32 = snd_pcm_substream_chip(substream); | 1149 | struct rme32 *rme32 = snd_pcm_substream_chip(substream); |
1150 | return snd_rme32_pcm_byteptr(rme32) >> rme32->playback_frlog; | 1150 | return snd_rme32_pcm_byteptr(rme32) >> rme32->playback_frlog; |
1151 | } | 1151 | } |
1152 | 1152 | ||
1153 | static snd_pcm_uframes_t | 1153 | static snd_pcm_uframes_t |
1154 | snd_rme32_capture_pointer(snd_pcm_substream_t * substream) | 1154 | snd_rme32_capture_pointer(struct snd_pcm_substream *substream) |
1155 | { | 1155 | { |
1156 | rme32_t *rme32 = snd_pcm_substream_chip(substream); | 1156 | struct rme32 *rme32 = snd_pcm_substream_chip(substream); |
1157 | return snd_rme32_pcm_byteptr(rme32) >> rme32->capture_frlog; | 1157 | return snd_rme32_pcm_byteptr(rme32) >> rme32->capture_frlog; |
1158 | } | 1158 | } |
1159 | 1159 | ||
1160 | 1160 | ||
1161 | /* ack and pointer callbacks for fullduplex mode */ | 1161 | /* ack and pointer callbacks for fullduplex mode */ |
1162 | static void snd_rme32_pb_trans_copy(snd_pcm_substream_t *substream, | 1162 | static void snd_rme32_pb_trans_copy(struct snd_pcm_substream *substream, |
1163 | snd_pcm_indirect_t *rec, size_t bytes) | 1163 | struct snd_pcm_indirect *rec, size_t bytes) |
1164 | { | 1164 | { |
1165 | rme32_t *rme32 = snd_pcm_substream_chip(substream); | 1165 | struct rme32 *rme32 = snd_pcm_substream_chip(substream); |
1166 | memcpy_toio(rme32->iobase + RME32_IO_DATA_BUFFER + rec->hw_data, | 1166 | memcpy_toio(rme32->iobase + RME32_IO_DATA_BUFFER + rec->hw_data, |
1167 | substream->runtime->dma_area + rec->sw_data, bytes); | 1167 | substream->runtime->dma_area + rec->sw_data, bytes); |
1168 | } | 1168 | } |
1169 | 1169 | ||
1170 | static int snd_rme32_playback_fd_ack(snd_pcm_substream_t *substream) | 1170 | static int snd_rme32_playback_fd_ack(struct snd_pcm_substream *substream) |
1171 | { | 1171 | { |
1172 | rme32_t *rme32 = snd_pcm_substream_chip(substream); | 1172 | struct rme32 *rme32 = snd_pcm_substream_chip(substream); |
1173 | snd_pcm_indirect_t *rec, *cprec; | 1173 | struct snd_pcm_indirect *rec, *cprec; |
1174 | 1174 | ||
1175 | rec = &rme32->playback_pcm; | 1175 | rec = &rme32->playback_pcm; |
1176 | cprec = &rme32->capture_pcm; | 1176 | cprec = &rme32->capture_pcm; |
@@ -1184,41 +1184,41 @@ static int snd_rme32_playback_fd_ack(snd_pcm_substream_t *substream) | |||
1184 | return 0; | 1184 | return 0; |
1185 | } | 1185 | } |
1186 | 1186 | ||
1187 | static void snd_rme32_cp_trans_copy(snd_pcm_substream_t *substream, | 1187 | static void snd_rme32_cp_trans_copy(struct snd_pcm_substream *substream, |
1188 | snd_pcm_indirect_t *rec, size_t bytes) | 1188 | struct snd_pcm_indirect *rec, size_t bytes) |
1189 | { | 1189 | { |
1190 | rme32_t *rme32 = snd_pcm_substream_chip(substream); | 1190 | struct rme32 *rme32 = snd_pcm_substream_chip(substream); |
1191 | memcpy_fromio(substream->runtime->dma_area + rec->sw_data, | 1191 | memcpy_fromio(substream->runtime->dma_area + rec->sw_data, |
1192 | rme32->iobase + RME32_IO_DATA_BUFFER + rec->hw_data, | 1192 | rme32->iobase + RME32_IO_DATA_BUFFER + rec->hw_data, |
1193 | bytes); | 1193 | bytes); |
1194 | } | 1194 | } |
1195 | 1195 | ||
1196 | static int snd_rme32_capture_fd_ack(snd_pcm_substream_t *substream) | 1196 | static int snd_rme32_capture_fd_ack(struct snd_pcm_substream *substream) |
1197 | { | 1197 | { |
1198 | rme32_t *rme32 = snd_pcm_substream_chip(substream); | 1198 | struct rme32 *rme32 = snd_pcm_substream_chip(substream); |
1199 | snd_pcm_indirect_capture_transfer(substream, &rme32->capture_pcm, | 1199 | snd_pcm_indirect_capture_transfer(substream, &rme32->capture_pcm, |
1200 | snd_rme32_cp_trans_copy); | 1200 | snd_rme32_cp_trans_copy); |
1201 | return 0; | 1201 | return 0; |
1202 | } | 1202 | } |
1203 | 1203 | ||
1204 | static snd_pcm_uframes_t | 1204 | static snd_pcm_uframes_t |
1205 | snd_rme32_playback_fd_pointer(snd_pcm_substream_t * substream) | 1205 | snd_rme32_playback_fd_pointer(struct snd_pcm_substream *substream) |
1206 | { | 1206 | { |
1207 | rme32_t *rme32 = snd_pcm_substream_chip(substream); | 1207 | struct rme32 *rme32 = snd_pcm_substream_chip(substream); |
1208 | return snd_pcm_indirect_playback_pointer(substream, &rme32->playback_pcm, | 1208 | return snd_pcm_indirect_playback_pointer(substream, &rme32->playback_pcm, |
1209 | snd_rme32_pcm_byteptr(rme32)); | 1209 | snd_rme32_pcm_byteptr(rme32)); |
1210 | } | 1210 | } |
1211 | 1211 | ||
1212 | static snd_pcm_uframes_t | 1212 | static snd_pcm_uframes_t |
1213 | snd_rme32_capture_fd_pointer(snd_pcm_substream_t * substream) | 1213 | snd_rme32_capture_fd_pointer(struct snd_pcm_substream *substream) |
1214 | { | 1214 | { |
1215 | rme32_t *rme32 = snd_pcm_substream_chip(substream); | 1215 | struct rme32 *rme32 = snd_pcm_substream_chip(substream); |
1216 | return snd_pcm_indirect_capture_pointer(substream, &rme32->capture_pcm, | 1216 | return snd_pcm_indirect_capture_pointer(substream, &rme32->capture_pcm, |
1217 | snd_rme32_pcm_byteptr(rme32)); | 1217 | snd_rme32_pcm_byteptr(rme32)); |
1218 | } | 1218 | } |
1219 | 1219 | ||
1220 | /* for halfduplex mode */ | 1220 | /* for halfduplex mode */ |
1221 | static snd_pcm_ops_t snd_rme32_playback_spdif_ops = { | 1221 | static struct snd_pcm_ops snd_rme32_playback_spdif_ops = { |
1222 | .open = snd_rme32_playback_spdif_open, | 1222 | .open = snd_rme32_playback_spdif_open, |
1223 | .close = snd_rme32_playback_close, | 1223 | .close = snd_rme32_playback_close, |
1224 | .ioctl = snd_pcm_lib_ioctl, | 1224 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1232,7 +1232,7 @@ static snd_pcm_ops_t snd_rme32_playback_spdif_ops = { | |||
1232 | .mmap = snd_pcm_lib_mmap_iomem, | 1232 | .mmap = snd_pcm_lib_mmap_iomem, |
1233 | }; | 1233 | }; |
1234 | 1234 | ||
1235 | static snd_pcm_ops_t snd_rme32_capture_spdif_ops = { | 1235 | static struct snd_pcm_ops snd_rme32_capture_spdif_ops = { |
1236 | .open = snd_rme32_capture_spdif_open, | 1236 | .open = snd_rme32_capture_spdif_open, |
1237 | .close = snd_rme32_capture_close, | 1237 | .close = snd_rme32_capture_close, |
1238 | .ioctl = snd_pcm_lib_ioctl, | 1238 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1245,7 +1245,7 @@ static snd_pcm_ops_t snd_rme32_capture_spdif_ops = { | |||
1245 | .mmap = snd_pcm_lib_mmap_iomem, | 1245 | .mmap = snd_pcm_lib_mmap_iomem, |
1246 | }; | 1246 | }; |
1247 | 1247 | ||
1248 | static snd_pcm_ops_t snd_rme32_playback_adat_ops = { | 1248 | static struct snd_pcm_ops snd_rme32_playback_adat_ops = { |
1249 | .open = snd_rme32_playback_adat_open, | 1249 | .open = snd_rme32_playback_adat_open, |
1250 | .close = snd_rme32_playback_close, | 1250 | .close = snd_rme32_playback_close, |
1251 | .ioctl = snd_pcm_lib_ioctl, | 1251 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1258,7 +1258,7 @@ static snd_pcm_ops_t snd_rme32_playback_adat_ops = { | |||
1258 | .mmap = snd_pcm_lib_mmap_iomem, | 1258 | .mmap = snd_pcm_lib_mmap_iomem, |
1259 | }; | 1259 | }; |
1260 | 1260 | ||
1261 | static snd_pcm_ops_t snd_rme32_capture_adat_ops = { | 1261 | static struct snd_pcm_ops snd_rme32_capture_adat_ops = { |
1262 | .open = snd_rme32_capture_adat_open, | 1262 | .open = snd_rme32_capture_adat_open, |
1263 | .close = snd_rme32_capture_close, | 1263 | .close = snd_rme32_capture_close, |
1264 | .ioctl = snd_pcm_lib_ioctl, | 1264 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1271,7 +1271,7 @@ static snd_pcm_ops_t snd_rme32_capture_adat_ops = { | |||
1271 | }; | 1271 | }; |
1272 | 1272 | ||
1273 | /* for fullduplex mode */ | 1273 | /* for fullduplex mode */ |
1274 | static snd_pcm_ops_t snd_rme32_playback_spdif_fd_ops = { | 1274 | static struct snd_pcm_ops snd_rme32_playback_spdif_fd_ops = { |
1275 | .open = snd_rme32_playback_spdif_open, | 1275 | .open = snd_rme32_playback_spdif_open, |
1276 | .close = snd_rme32_playback_close, | 1276 | .close = snd_rme32_playback_close, |
1277 | .ioctl = snd_pcm_lib_ioctl, | 1277 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1283,7 +1283,7 @@ static snd_pcm_ops_t snd_rme32_playback_spdif_fd_ops = { | |||
1283 | .ack = snd_rme32_playback_fd_ack, | 1283 | .ack = snd_rme32_playback_fd_ack, |
1284 | }; | 1284 | }; |
1285 | 1285 | ||
1286 | static snd_pcm_ops_t snd_rme32_capture_spdif_fd_ops = { | 1286 | static struct snd_pcm_ops snd_rme32_capture_spdif_fd_ops = { |
1287 | .open = snd_rme32_capture_spdif_open, | 1287 | .open = snd_rme32_capture_spdif_open, |
1288 | .close = snd_rme32_capture_close, | 1288 | .close = snd_rme32_capture_close, |
1289 | .ioctl = snd_pcm_lib_ioctl, | 1289 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1295,7 +1295,7 @@ static snd_pcm_ops_t snd_rme32_capture_spdif_fd_ops = { | |||
1295 | .ack = snd_rme32_capture_fd_ack, | 1295 | .ack = snd_rme32_capture_fd_ack, |
1296 | }; | 1296 | }; |
1297 | 1297 | ||
1298 | static snd_pcm_ops_t snd_rme32_playback_adat_fd_ops = { | 1298 | static struct snd_pcm_ops snd_rme32_playback_adat_fd_ops = { |
1299 | .open = snd_rme32_playback_adat_open, | 1299 | .open = snd_rme32_playback_adat_open, |
1300 | .close = snd_rme32_playback_close, | 1300 | .close = snd_rme32_playback_close, |
1301 | .ioctl = snd_pcm_lib_ioctl, | 1301 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1306,7 +1306,7 @@ static snd_pcm_ops_t snd_rme32_playback_adat_fd_ops = { | |||
1306 | .ack = snd_rme32_playback_fd_ack, | 1306 | .ack = snd_rme32_playback_fd_ack, |
1307 | }; | 1307 | }; |
1308 | 1308 | ||
1309 | static snd_pcm_ops_t snd_rme32_capture_adat_fd_ops = { | 1309 | static struct snd_pcm_ops snd_rme32_capture_adat_fd_ops = { |
1310 | .open = snd_rme32_capture_adat_open, | 1310 | .open = snd_rme32_capture_adat_open, |
1311 | .close = snd_rme32_capture_close, | 1311 | .close = snd_rme32_capture_close, |
1312 | .ioctl = snd_pcm_lib_ioctl, | 1312 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1319,7 +1319,7 @@ static snd_pcm_ops_t snd_rme32_capture_adat_fd_ops = { | |||
1319 | 1319 | ||
1320 | static void snd_rme32_free(void *private_data) | 1320 | static void snd_rme32_free(void *private_data) |
1321 | { | 1321 | { |
1322 | rme32_t *rme32 = (rme32_t *) private_data; | 1322 | struct rme32 *rme32 = (struct rme32 *) private_data; |
1323 | 1323 | ||
1324 | if (rme32 == NULL) { | 1324 | if (rme32 == NULL) { |
1325 | return; | 1325 | return; |
@@ -1340,20 +1340,20 @@ static void snd_rme32_free(void *private_data) | |||
1340 | pci_disable_device(rme32->pci); | 1340 | pci_disable_device(rme32->pci); |
1341 | } | 1341 | } |
1342 | 1342 | ||
1343 | static void snd_rme32_free_spdif_pcm(snd_pcm_t * pcm) | 1343 | static void snd_rme32_free_spdif_pcm(struct snd_pcm *pcm) |
1344 | { | 1344 | { |
1345 | rme32_t *rme32 = (rme32_t *) pcm->private_data; | 1345 | struct rme32 *rme32 = (struct rme32 *) pcm->private_data; |
1346 | rme32->spdif_pcm = NULL; | 1346 | rme32->spdif_pcm = NULL; |
1347 | } | 1347 | } |
1348 | 1348 | ||
1349 | static void | 1349 | static void |
1350 | snd_rme32_free_adat_pcm(snd_pcm_t *pcm) | 1350 | snd_rme32_free_adat_pcm(struct snd_pcm *pcm) |
1351 | { | 1351 | { |
1352 | rme32_t *rme32 = (rme32_t *) pcm->private_data; | 1352 | struct rme32 *rme32 = (struct rme32 *) pcm->private_data; |
1353 | rme32->adat_pcm = NULL; | 1353 | rme32->adat_pcm = NULL; |
1354 | } | 1354 | } |
1355 | 1355 | ||
1356 | static int __devinit snd_rme32_create(rme32_t * rme32) | 1356 | static int __devinit snd_rme32_create(struct rme32 * rme32) |
1357 | { | 1357 | { |
1358 | struct pci_dev *pci = rme32->pci; | 1358 | struct pci_dev *pci = rme32->pci; |
1359 | int err; | 1359 | int err; |
@@ -1479,10 +1479,10 @@ static int __devinit snd_rme32_create(rme32_t * rme32) | |||
1479 | */ | 1479 | */ |
1480 | 1480 | ||
1481 | static void | 1481 | static void |
1482 | snd_rme32_proc_read(snd_info_entry_t * entry, snd_info_buffer_t * buffer) | 1482 | snd_rme32_proc_read(struct snd_info_entry * entry, struct snd_info_buffer *buffer) |
1483 | { | 1483 | { |
1484 | int n; | 1484 | int n; |
1485 | rme32_t *rme32 = (rme32_t *) entry->private_data; | 1485 | struct rme32 *rme32 = (struct rme32 *) entry->private_data; |
1486 | 1486 | ||
1487 | rme32->rcreg = readl(rme32->iobase + RME32_IO_CONTROL_REGISTER); | 1487 | rme32->rcreg = readl(rme32->iobase + RME32_IO_CONTROL_REGISTER); |
1488 | 1488 | ||
@@ -1573,9 +1573,9 @@ snd_rme32_proc_read(snd_info_entry_t * entry, snd_info_buffer_t * buffer) | |||
1573 | } | 1573 | } |
1574 | } | 1574 | } |
1575 | 1575 | ||
1576 | static void __devinit snd_rme32_proc_init(rme32_t * rme32) | 1576 | static void __devinit snd_rme32_proc_init(struct rme32 * rme32) |
1577 | { | 1577 | { |
1578 | snd_info_entry_t *entry; | 1578 | struct snd_info_entry *entry; |
1579 | 1579 | ||
1580 | if (! snd_card_proc_new(rme32->card, "rme32", &entry)) | 1580 | if (! snd_card_proc_new(rme32->card, "rme32", &entry)) |
1581 | snd_info_set_text_ops(entry, rme32, 1024, snd_rme32_proc_read); | 1581 | snd_info_set_text_ops(entry, rme32, 1024, snd_rme32_proc_read); |
@@ -1586,8 +1586,8 @@ static void __devinit snd_rme32_proc_init(rme32_t * rme32) | |||
1586 | */ | 1586 | */ |
1587 | 1587 | ||
1588 | static int | 1588 | static int |
1589 | snd_rme32_info_loopback_control(snd_kcontrol_t * kcontrol, | 1589 | snd_rme32_info_loopback_control(struct snd_kcontrol *kcontrol, |
1590 | snd_ctl_elem_info_t * uinfo) | 1590 | struct snd_ctl_elem_info *uinfo) |
1591 | { | 1591 | { |
1592 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | 1592 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; |
1593 | uinfo->count = 1; | 1593 | uinfo->count = 1; |
@@ -1596,10 +1596,10 @@ snd_rme32_info_loopback_control(snd_kcontrol_t * kcontrol, | |||
1596 | return 0; | 1596 | return 0; |
1597 | } | 1597 | } |
1598 | static int | 1598 | static int |
1599 | snd_rme32_get_loopback_control(snd_kcontrol_t * kcontrol, | 1599 | snd_rme32_get_loopback_control(struct snd_kcontrol *kcontrol, |
1600 | snd_ctl_elem_value_t * ucontrol) | 1600 | struct snd_ctl_elem_value *ucontrol) |
1601 | { | 1601 | { |
1602 | rme32_t *rme32 = snd_kcontrol_chip(kcontrol); | 1602 | struct rme32 *rme32 = snd_kcontrol_chip(kcontrol); |
1603 | 1603 | ||
1604 | spin_lock_irq(&rme32->lock); | 1604 | spin_lock_irq(&rme32->lock); |
1605 | ucontrol->value.integer.value[0] = | 1605 | ucontrol->value.integer.value[0] = |
@@ -1608,10 +1608,10 @@ snd_rme32_get_loopback_control(snd_kcontrol_t * kcontrol, | |||
1608 | return 0; | 1608 | return 0; |
1609 | } | 1609 | } |
1610 | static int | 1610 | static int |
1611 | snd_rme32_put_loopback_control(snd_kcontrol_t * kcontrol, | 1611 | snd_rme32_put_loopback_control(struct snd_kcontrol *kcontrol, |
1612 | snd_ctl_elem_value_t * ucontrol) | 1612 | struct snd_ctl_elem_value *ucontrol) |
1613 | { | 1613 | { |
1614 | rme32_t *rme32 = snd_kcontrol_chip(kcontrol); | 1614 | struct rme32 *rme32 = snd_kcontrol_chip(kcontrol); |
1615 | unsigned int val; | 1615 | unsigned int val; |
1616 | int change; | 1616 | int change; |
1617 | 1617 | ||
@@ -1630,10 +1630,10 @@ snd_rme32_put_loopback_control(snd_kcontrol_t * kcontrol, | |||
1630 | } | 1630 | } |
1631 | 1631 | ||
1632 | static int | 1632 | static int |
1633 | snd_rme32_info_inputtype_control(snd_kcontrol_t * kcontrol, | 1633 | snd_rme32_info_inputtype_control(struct snd_kcontrol *kcontrol, |
1634 | snd_ctl_elem_info_t * uinfo) | 1634 | struct snd_ctl_elem_info *uinfo) |
1635 | { | 1635 | { |
1636 | rme32_t *rme32 = snd_kcontrol_chip(kcontrol); | 1636 | struct rme32 *rme32 = snd_kcontrol_chip(kcontrol); |
1637 | static char *texts[4] = { "Optical", "Coaxial", "Internal", "XLR" }; | 1637 | static char *texts[4] = { "Optical", "Coaxial", "Internal", "XLR" }; |
1638 | 1638 | ||
1639 | uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; | 1639 | uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; |
@@ -1660,10 +1660,10 @@ snd_rme32_info_inputtype_control(snd_kcontrol_t * kcontrol, | |||
1660 | return 0; | 1660 | return 0; |
1661 | } | 1661 | } |
1662 | static int | 1662 | static int |
1663 | snd_rme32_get_inputtype_control(snd_kcontrol_t * kcontrol, | 1663 | snd_rme32_get_inputtype_control(struct snd_kcontrol *kcontrol, |
1664 | snd_ctl_elem_value_t * ucontrol) | 1664 | struct snd_ctl_elem_value *ucontrol) |
1665 | { | 1665 | { |
1666 | rme32_t *rme32 = snd_kcontrol_chip(kcontrol); | 1666 | struct rme32 *rme32 = snd_kcontrol_chip(kcontrol); |
1667 | unsigned int items = 3; | 1667 | unsigned int items = 3; |
1668 | 1668 | ||
1669 | spin_lock_irq(&rme32->lock); | 1669 | spin_lock_irq(&rme32->lock); |
@@ -1689,10 +1689,10 @@ snd_rme32_get_inputtype_control(snd_kcontrol_t * kcontrol, | |||
1689 | return 0; | 1689 | return 0; |
1690 | } | 1690 | } |
1691 | static int | 1691 | static int |
1692 | snd_rme32_put_inputtype_control(snd_kcontrol_t * kcontrol, | 1692 | snd_rme32_put_inputtype_control(struct snd_kcontrol *kcontrol, |
1693 | snd_ctl_elem_value_t * ucontrol) | 1693 | struct snd_ctl_elem_value *ucontrol) |
1694 | { | 1694 | { |
1695 | rme32_t *rme32 = snd_kcontrol_chip(kcontrol); | 1695 | struct rme32 *rme32 = snd_kcontrol_chip(kcontrol); |
1696 | unsigned int val; | 1696 | unsigned int val; |
1697 | int change, items = 3; | 1697 | int change, items = 3; |
1698 | 1698 | ||
@@ -1718,8 +1718,8 @@ snd_rme32_put_inputtype_control(snd_kcontrol_t * kcontrol, | |||
1718 | } | 1718 | } |
1719 | 1719 | ||
1720 | static int | 1720 | static int |
1721 | snd_rme32_info_clockmode_control(snd_kcontrol_t * kcontrol, | 1721 | snd_rme32_info_clockmode_control(struct snd_kcontrol *kcontrol, |
1722 | snd_ctl_elem_info_t * uinfo) | 1722 | struct snd_ctl_elem_info *uinfo) |
1723 | { | 1723 | { |
1724 | static char *texts[4] = { "AutoSync", | 1724 | static char *texts[4] = { "AutoSync", |
1725 | "Internal 32.0kHz", | 1725 | "Internal 32.0kHz", |
@@ -1737,10 +1737,10 @@ snd_rme32_info_clockmode_control(snd_kcontrol_t * kcontrol, | |||
1737 | return 0; | 1737 | return 0; |
1738 | } | 1738 | } |
1739 | static int | 1739 | static int |
1740 | snd_rme32_get_clockmode_control(snd_kcontrol_t * kcontrol, | 1740 | snd_rme32_get_clockmode_control(struct snd_kcontrol *kcontrol, |
1741 | snd_ctl_elem_value_t * ucontrol) | 1741 | struct snd_ctl_elem_value *ucontrol) |
1742 | { | 1742 | { |
1743 | rme32_t *rme32 = snd_kcontrol_chip(kcontrol); | 1743 | struct rme32 *rme32 = snd_kcontrol_chip(kcontrol); |
1744 | 1744 | ||
1745 | spin_lock_irq(&rme32->lock); | 1745 | spin_lock_irq(&rme32->lock); |
1746 | ucontrol->value.enumerated.item[0] = snd_rme32_getclockmode(rme32); | 1746 | ucontrol->value.enumerated.item[0] = snd_rme32_getclockmode(rme32); |
@@ -1748,10 +1748,10 @@ snd_rme32_get_clockmode_control(snd_kcontrol_t * kcontrol, | |||
1748 | return 0; | 1748 | return 0; |
1749 | } | 1749 | } |
1750 | static int | 1750 | static int |
1751 | snd_rme32_put_clockmode_control(snd_kcontrol_t * kcontrol, | 1751 | snd_rme32_put_clockmode_control(struct snd_kcontrol *kcontrol, |
1752 | snd_ctl_elem_value_t * ucontrol) | 1752 | struct snd_ctl_elem_value *ucontrol) |
1753 | { | 1753 | { |
1754 | rme32_t *rme32 = snd_kcontrol_chip(kcontrol); | 1754 | struct rme32 *rme32 = snd_kcontrol_chip(kcontrol); |
1755 | unsigned int val; | 1755 | unsigned int val; |
1756 | int change; | 1756 | int change; |
1757 | 1757 | ||
@@ -1763,7 +1763,7 @@ snd_rme32_put_clockmode_control(snd_kcontrol_t * kcontrol, | |||
1763 | return change; | 1763 | return change; |
1764 | } | 1764 | } |
1765 | 1765 | ||
1766 | static u32 snd_rme32_convert_from_aes(snd_aes_iec958_t * aes) | 1766 | static u32 snd_rme32_convert_from_aes(struct snd_aes_iec958 * aes) |
1767 | { | 1767 | { |
1768 | u32 val = 0; | 1768 | u32 val = 0; |
1769 | val |= (aes->status[0] & IEC958_AES0_PROFESSIONAL) ? RME32_WCR_PRO : 0; | 1769 | val |= (aes->status[0] & IEC958_AES0_PROFESSIONAL) ? RME32_WCR_PRO : 0; |
@@ -1774,7 +1774,7 @@ static u32 snd_rme32_convert_from_aes(snd_aes_iec958_t * aes) | |||
1774 | return val; | 1774 | return val; |
1775 | } | 1775 | } |
1776 | 1776 | ||
1777 | static void snd_rme32_convert_to_aes(snd_aes_iec958_t * aes, u32 val) | 1777 | static void snd_rme32_convert_to_aes(struct snd_aes_iec958 * aes, u32 val) |
1778 | { | 1778 | { |
1779 | aes->status[0] = ((val & RME32_WCR_PRO) ? IEC958_AES0_PROFESSIONAL : 0); | 1779 | aes->status[0] = ((val & RME32_WCR_PRO) ? IEC958_AES0_PROFESSIONAL : 0); |
1780 | if (val & RME32_WCR_PRO) | 1780 | if (val & RME32_WCR_PRO) |
@@ -1783,28 +1783,28 @@ static void snd_rme32_convert_to_aes(snd_aes_iec958_t * aes, u32 val) | |||
1783 | aes->status[0] |= (val & RME32_WCR_EMP) ? IEC958_AES0_CON_EMPHASIS_5015 : 0; | 1783 | aes->status[0] |= (val & RME32_WCR_EMP) ? IEC958_AES0_CON_EMPHASIS_5015 : 0; |
1784 | } | 1784 | } |
1785 | 1785 | ||
1786 | static int snd_rme32_control_spdif_info(snd_kcontrol_t * kcontrol, | 1786 | static int snd_rme32_control_spdif_info(struct snd_kcontrol *kcontrol, |
1787 | snd_ctl_elem_info_t * uinfo) | 1787 | struct snd_ctl_elem_info *uinfo) |
1788 | { | 1788 | { |
1789 | uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; | 1789 | uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; |
1790 | uinfo->count = 1; | 1790 | uinfo->count = 1; |
1791 | return 0; | 1791 | return 0; |
1792 | } | 1792 | } |
1793 | 1793 | ||
1794 | static int snd_rme32_control_spdif_get(snd_kcontrol_t * kcontrol, | 1794 | static int snd_rme32_control_spdif_get(struct snd_kcontrol *kcontrol, |
1795 | snd_ctl_elem_value_t * ucontrol) | 1795 | struct snd_ctl_elem_value *ucontrol) |
1796 | { | 1796 | { |
1797 | rme32_t *rme32 = snd_kcontrol_chip(kcontrol); | 1797 | struct rme32 *rme32 = snd_kcontrol_chip(kcontrol); |
1798 | 1798 | ||
1799 | snd_rme32_convert_to_aes(&ucontrol->value.iec958, | 1799 | snd_rme32_convert_to_aes(&ucontrol->value.iec958, |
1800 | rme32->wcreg_spdif); | 1800 | rme32->wcreg_spdif); |
1801 | return 0; | 1801 | return 0; |
1802 | } | 1802 | } |
1803 | 1803 | ||
1804 | static int snd_rme32_control_spdif_put(snd_kcontrol_t * kcontrol, | 1804 | static int snd_rme32_control_spdif_put(struct snd_kcontrol *kcontrol, |
1805 | snd_ctl_elem_value_t * ucontrol) | 1805 | struct snd_ctl_elem_value *ucontrol) |
1806 | { | 1806 | { |
1807 | rme32_t *rme32 = snd_kcontrol_chip(kcontrol); | 1807 | struct rme32 *rme32 = snd_kcontrol_chip(kcontrol); |
1808 | int change; | 1808 | int change; |
1809 | u32 val; | 1809 | u32 val; |
1810 | 1810 | ||
@@ -1816,30 +1816,30 @@ static int snd_rme32_control_spdif_put(snd_kcontrol_t * kcontrol, | |||
1816 | return change; | 1816 | return change; |
1817 | } | 1817 | } |
1818 | 1818 | ||
1819 | static int snd_rme32_control_spdif_stream_info(snd_kcontrol_t * kcontrol, | 1819 | static int snd_rme32_control_spdif_stream_info(struct snd_kcontrol *kcontrol, |
1820 | snd_ctl_elem_info_t * uinfo) | 1820 | struct snd_ctl_elem_info *uinfo) |
1821 | { | 1821 | { |
1822 | uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; | 1822 | uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; |
1823 | uinfo->count = 1; | 1823 | uinfo->count = 1; |
1824 | return 0; | 1824 | return 0; |
1825 | } | 1825 | } |
1826 | 1826 | ||
1827 | static int snd_rme32_control_spdif_stream_get(snd_kcontrol_t * kcontrol, | 1827 | static int snd_rme32_control_spdif_stream_get(struct snd_kcontrol *kcontrol, |
1828 | snd_ctl_elem_value_t * | 1828 | struct snd_ctl_elem_value * |
1829 | ucontrol) | 1829 | ucontrol) |
1830 | { | 1830 | { |
1831 | rme32_t *rme32 = snd_kcontrol_chip(kcontrol); | 1831 | struct rme32 *rme32 = snd_kcontrol_chip(kcontrol); |
1832 | 1832 | ||
1833 | snd_rme32_convert_to_aes(&ucontrol->value.iec958, | 1833 | snd_rme32_convert_to_aes(&ucontrol->value.iec958, |
1834 | rme32->wcreg_spdif_stream); | 1834 | rme32->wcreg_spdif_stream); |
1835 | return 0; | 1835 | return 0; |
1836 | } | 1836 | } |
1837 | 1837 | ||
1838 | static int snd_rme32_control_spdif_stream_put(snd_kcontrol_t * kcontrol, | 1838 | static int snd_rme32_control_spdif_stream_put(struct snd_kcontrol *kcontrol, |
1839 | snd_ctl_elem_value_t * | 1839 | struct snd_ctl_elem_value * |
1840 | ucontrol) | 1840 | ucontrol) |
1841 | { | 1841 | { |
1842 | rme32_t *rme32 = snd_kcontrol_chip(kcontrol); | 1842 | struct rme32 *rme32 = snd_kcontrol_chip(kcontrol); |
1843 | int change; | 1843 | int change; |
1844 | u32 val; | 1844 | u32 val; |
1845 | 1845 | ||
@@ -1854,23 +1854,23 @@ static int snd_rme32_control_spdif_stream_put(snd_kcontrol_t * kcontrol, | |||
1854 | return change; | 1854 | return change; |
1855 | } | 1855 | } |
1856 | 1856 | ||
1857 | static int snd_rme32_control_spdif_mask_info(snd_kcontrol_t * kcontrol, | 1857 | static int snd_rme32_control_spdif_mask_info(struct snd_kcontrol *kcontrol, |
1858 | snd_ctl_elem_info_t * uinfo) | 1858 | struct snd_ctl_elem_info *uinfo) |
1859 | { | 1859 | { |
1860 | uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; | 1860 | uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; |
1861 | uinfo->count = 1; | 1861 | uinfo->count = 1; |
1862 | return 0; | 1862 | return 0; |
1863 | } | 1863 | } |
1864 | 1864 | ||
1865 | static int snd_rme32_control_spdif_mask_get(snd_kcontrol_t * kcontrol, | 1865 | static int snd_rme32_control_spdif_mask_get(struct snd_kcontrol *kcontrol, |
1866 | snd_ctl_elem_value_t * | 1866 | struct snd_ctl_elem_value * |
1867 | ucontrol) | 1867 | ucontrol) |
1868 | { | 1868 | { |
1869 | ucontrol->value.iec958.status[0] = kcontrol->private_value; | 1869 | ucontrol->value.iec958.status[0] = kcontrol->private_value; |
1870 | return 0; | 1870 | return 0; |
1871 | } | 1871 | } |
1872 | 1872 | ||
1873 | static snd_kcontrol_new_t snd_rme32_controls[] = { | 1873 | static struct snd_kcontrol_new snd_rme32_controls[] = { |
1874 | { | 1874 | { |
1875 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, | 1875 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, |
1876 | .name = SNDRV_CTL_NAME_IEC958("", PLAYBACK, DEFAULT), | 1876 | .name = SNDRV_CTL_NAME_IEC958("", PLAYBACK, DEFAULT), |
@@ -1925,10 +1925,10 @@ static snd_kcontrol_new_t snd_rme32_controls[] = { | |||
1925 | } | 1925 | } |
1926 | }; | 1926 | }; |
1927 | 1927 | ||
1928 | static int snd_rme32_create_switches(snd_card_t * card, rme32_t * rme32) | 1928 | static int snd_rme32_create_switches(struct snd_card *card, struct rme32 * rme32) |
1929 | { | 1929 | { |
1930 | int idx, err; | 1930 | int idx, err; |
1931 | snd_kcontrol_t *kctl; | 1931 | struct snd_kcontrol *kctl; |
1932 | 1932 | ||
1933 | for (idx = 0; idx < (int)ARRAY_SIZE(snd_rme32_controls); idx++) { | 1933 | for (idx = 0; idx < (int)ARRAY_SIZE(snd_rme32_controls); idx++) { |
1934 | if ((err = snd_ctl_add(card, kctl = snd_ctl_new1(&snd_rme32_controls[idx], rme32))) < 0) | 1934 | if ((err = snd_ctl_add(card, kctl = snd_ctl_new1(&snd_rme32_controls[idx], rme32))) < 0) |
@@ -1944,7 +1944,7 @@ static int snd_rme32_create_switches(snd_card_t * card, rme32_t * rme32) | |||
1944 | * Card initialisation | 1944 | * Card initialisation |
1945 | */ | 1945 | */ |
1946 | 1946 | ||
1947 | static void snd_rme32_card_free(snd_card_t * card) | 1947 | static void snd_rme32_card_free(struct snd_card *card) |
1948 | { | 1948 | { |
1949 | snd_rme32_free(card->private_data); | 1949 | snd_rme32_free(card->private_data); |
1950 | } | 1950 | } |
@@ -1953,8 +1953,8 @@ static int __devinit | |||
1953 | snd_rme32_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) | 1953 | snd_rme32_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) |
1954 | { | 1954 | { |
1955 | static int dev; | 1955 | static int dev; |
1956 | rme32_t *rme32; | 1956 | struct rme32 *rme32; |
1957 | snd_card_t *card; | 1957 | struct snd_card *card; |
1958 | int err; | 1958 | int err; |
1959 | 1959 | ||
1960 | if (dev >= SNDRV_CARDS) { | 1960 | if (dev >= SNDRV_CARDS) { |
@@ -1966,10 +1966,10 @@ snd_rme32_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) | |||
1966 | } | 1966 | } |
1967 | 1967 | ||
1968 | if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE, | 1968 | if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE, |
1969 | sizeof(rme32_t))) == NULL) | 1969 | sizeof(struct rme32))) == NULL) |
1970 | return -ENOMEM; | 1970 | return -ENOMEM; |
1971 | card->private_free = snd_rme32_card_free; | 1971 | card->private_free = snd_rme32_card_free; |
1972 | rme32 = (rme32_t *) card->private_data; | 1972 | rme32 = (struct rme32 *) card->private_data; |
1973 | rme32->card = card; | 1973 | rme32->card = card; |
1974 | rme32->pci = pci; | 1974 | rme32->pci = pci; |
1975 | snd_card_set_dev(card, &pci->dev); | 1975 | snd_card_set_dev(card, &pci->dev); |