aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 08:52:53 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:18:54 -0500
commitabfd67bd6fcc07b54d54e00a9105900f478323a6 (patch)
treef9c388fbedf793e85d6fc0552584bd6fe4792a48
parent98274f0701f9e6579ae493ac190227fe93d11e20 (diff)
[ALSA] Remove xxx_t typedefs: PCI RME9652
Modules: RME9652 driver Remove xxx_t typedefs from the PCI RME9652 driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/rme9652/rme9652.c372
1 files changed, 186 insertions, 186 deletions
diff --git a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c
index f9d0c126c213..a687eb63236f 100644
--- a/sound/pci/rme9652/rme9652.c
+++ b/sound/pci/rme9652/rme9652.c
@@ -198,7 +198,7 @@ MODULE_SUPPORTED_DEVICE("{{RME,Hammerfall},"
198#define RME9652_DMA_AREA_BYTES ((RME9652_NCHANNELS+1) * RME9652_CHANNEL_BUFFER_BYTES) 198#define RME9652_DMA_AREA_BYTES ((RME9652_NCHANNELS+1) * RME9652_CHANNEL_BUFFER_BYTES)
199#define RME9652_DMA_AREA_KILOBYTES (RME9652_DMA_AREA_BYTES/1024) 199#define RME9652_DMA_AREA_KILOBYTES (RME9652_DMA_AREA_BYTES/1024)
200 200
201typedef struct snd_rme9652 { 201struct snd_rme9652 {
202 int dev; 202 int dev;
203 203
204 spinlock_t lock; 204 spinlock_t lock;
@@ -234,8 +234,8 @@ typedef struct snd_rme9652 {
234 pid_t capture_pid; 234 pid_t capture_pid;
235 pid_t playback_pid; 235 pid_t playback_pid;
236 236
237 snd_pcm_substream_t *capture_substream; 237 struct snd_pcm_substream *capture_substream;
238 snd_pcm_substream_t *playback_substream; 238 struct snd_pcm_substream *playback_substream;
239 int running; 239 int running;
240 240
241 int passthru; /* non-zero if doing pass-thru */ 241 int passthru; /* non-zero if doing pass-thru */
@@ -246,12 +246,12 @@ typedef struct snd_rme9652 {
246 246
247 char *channel_map; 247 char *channel_map;
248 248
249 snd_card_t *card; 249 struct snd_card *card;
250 snd_pcm_t *pcm; 250 struct snd_pcm *pcm;
251 struct pci_dev *pci; 251 struct pci_dev *pci;
252 snd_kcontrol_t *spdif_ctl; 252 struct snd_kcontrol *spdif_ctl;
253 253
254} rme9652_t; 254};
255 255
256/* These tables map the ALSA channels 1..N to the channels that we 256/* These tables map the ALSA channels 1..N to the channels that we
257 need to use in order to find the relevant channel buffer. RME 257 need to use in order to find the relevant channel buffer. RME
@@ -327,17 +327,17 @@ static struct pci_device_id snd_rme9652_ids[] = {
327 327
328MODULE_DEVICE_TABLE(pci, snd_rme9652_ids); 328MODULE_DEVICE_TABLE(pci, snd_rme9652_ids);
329 329
330static inline void rme9652_write(rme9652_t *rme9652, int reg, int val) 330static inline void rme9652_write(struct snd_rme9652 *rme9652, int reg, int val)
331{ 331{
332 writel(val, rme9652->iobase + reg); 332 writel(val, rme9652->iobase + reg);
333} 333}
334 334
335static inline unsigned int rme9652_read(rme9652_t *rme9652, int reg) 335static inline unsigned int rme9652_read(struct snd_rme9652 *rme9652, int reg)
336{ 336{
337 return readl(rme9652->iobase + reg); 337 return readl(rme9652->iobase + reg);
338} 338}
339 339
340static inline int snd_rme9652_use_is_exclusive(rme9652_t *rme9652) 340static inline int snd_rme9652_use_is_exclusive(struct snd_rme9652 *rme9652)
341{ 341{
342 unsigned long flags; 342 unsigned long flags;
343 int ret = 1; 343 int ret = 1;
@@ -351,7 +351,7 @@ static inline int snd_rme9652_use_is_exclusive(rme9652_t *rme9652)
351 return ret; 351 return ret;
352} 352}
353 353
354static inline int rme9652_adat_sample_rate(rme9652_t *rme9652) 354static inline int rme9652_adat_sample_rate(struct snd_rme9652 *rme9652)
355{ 355{
356 if (rme9652_running_double_speed(rme9652)) { 356 if (rme9652_running_double_speed(rme9652)) {
357 return (rme9652_read(rme9652, RME9652_status_register) & 357 return (rme9652_read(rme9652, RME9652_status_register) &
@@ -362,7 +362,7 @@ static inline int rme9652_adat_sample_rate(rme9652_t *rme9652)
362 } 362 }
363} 363}
364 364
365static inline void rme9652_compute_period_size(rme9652_t *rme9652) 365static inline void rme9652_compute_period_size(struct snd_rme9652 *rme9652)
366{ 366{
367 unsigned int i; 367 unsigned int i;
368 368
@@ -373,7 +373,7 @@ static inline void rme9652_compute_period_size(rme9652_t *rme9652)
373 rme9652->max_jitter = 80; 373 rme9652->max_jitter = 80;
374} 374}
375 375
376static snd_pcm_uframes_t rme9652_hw_pointer(rme9652_t *rme9652) 376static snd_pcm_uframes_t rme9652_hw_pointer(struct snd_rme9652 *rme9652)
377{ 377{
378 int status; 378 int status;
379 unsigned int offset, frag; 379 unsigned int offset, frag;
@@ -420,7 +420,7 @@ static snd_pcm_uframes_t rme9652_hw_pointer(rme9652_t *rme9652)
420 return offset; 420 return offset;
421} 421}
422 422
423static inline void rme9652_reset_hw_pointer(rme9652_t *rme9652) 423static inline void rme9652_reset_hw_pointer(struct snd_rme9652 *rme9652)
424{ 424{
425 int i; 425 int i;
426 426
@@ -437,19 +437,19 @@ static inline void rme9652_reset_hw_pointer(rme9652_t *rme9652)
437 rme9652->prev_hw_offset = 0; 437 rme9652->prev_hw_offset = 0;
438} 438}
439 439
440static inline void rme9652_start(rme9652_t *s) 440static inline void rme9652_start(struct snd_rme9652 *s)
441{ 441{
442 s->control_register |= (RME9652_IE | RME9652_start_bit); 442 s->control_register |= (RME9652_IE | RME9652_start_bit);
443 rme9652_write(s, RME9652_control_register, s->control_register); 443 rme9652_write(s, RME9652_control_register, s->control_register);
444} 444}
445 445
446static inline void rme9652_stop(rme9652_t *s) 446static inline void rme9652_stop(struct snd_rme9652 *s)
447{ 447{
448 s->control_register &= ~(RME9652_start_bit | RME9652_IE); 448 s->control_register &= ~(RME9652_start_bit | RME9652_IE);
449 rme9652_write(s, RME9652_control_register, s->control_register); 449 rme9652_write(s, RME9652_control_register, s->control_register);
450} 450}
451 451
452static int rme9652_set_interrupt_interval(rme9652_t *s, 452static int rme9652_set_interrupt_interval(struct snd_rme9652 *s,
453 unsigned int frames) 453 unsigned int frames)
454{ 454{
455 int restart = 0; 455 int restart = 0;
@@ -483,7 +483,7 @@ static int rme9652_set_interrupt_interval(rme9652_t *s,
483 return 0; 483 return 0;
484} 484}
485 485
486static int rme9652_set_rate(rme9652_t *rme9652, int rate) 486static int rme9652_set_rate(struct snd_rme9652 *rme9652, int rate)
487{ 487{
488 int restart; 488 int restart;
489 int reject_if_open = 0; 489 int reject_if_open = 0;
@@ -571,7 +571,7 @@ static int rme9652_set_rate(rme9652_t *rme9652, int rate)
571 return 0; 571 return 0;
572} 572}
573 573
574static void rme9652_set_thru(rme9652_t *rme9652, int channel, int enable) 574static void rme9652_set_thru(struct snd_rme9652 *rme9652, int channel, int enable)
575{ 575{
576 int i; 576 int i;
577 577
@@ -612,7 +612,7 @@ static void rme9652_set_thru(rme9652_t *rme9652, int channel, int enable)
612 } 612 }
613} 613}
614 614
615static int rme9652_set_passthru(rme9652_t *rme9652, int onoff) 615static int rme9652_set_passthru(struct snd_rme9652 *rme9652, int onoff)
616{ 616{
617 if (onoff) { 617 if (onoff) {
618 rme9652_set_thru(rme9652, -1, 1); 618 rme9652_set_thru(rme9652, -1, 1);
@@ -640,7 +640,7 @@ static int rme9652_set_passthru(rme9652_t *rme9652, int onoff)
640 return 0; 640 return 0;
641} 641}
642 642
643static void rme9652_spdif_set_bit (rme9652_t *rme9652, int mask, int onoff) 643static void rme9652_spdif_set_bit (struct snd_rme9652 *rme9652, int mask, int onoff)
644{ 644{
645 if (onoff) 645 if (onoff)
646 rme9652->control_register |= mask; 646 rme9652->control_register |= mask;
@@ -650,7 +650,7 @@ static void rme9652_spdif_set_bit (rme9652_t *rme9652, int mask, int onoff)
650 rme9652_write(rme9652, RME9652_control_register, rme9652->control_register); 650 rme9652_write(rme9652, RME9652_control_register, rme9652->control_register);
651} 651}
652 652
653static void rme9652_spdif_write_byte (rme9652_t *rme9652, const int val) 653static void rme9652_spdif_write_byte (struct snd_rme9652 *rme9652, const int val)
654{ 654{
655 long mask; 655 long mask;
656 long i; 656 long i;
@@ -666,7 +666,7 @@ static void rme9652_spdif_write_byte (rme9652_t *rme9652, const int val)
666 } 666 }
667} 667}
668 668
669static int rme9652_spdif_read_byte (rme9652_t *rme9652) 669static int rme9652_spdif_read_byte (struct snd_rme9652 *rme9652)
670{ 670{
671 long mask; 671 long mask;
672 long val; 672 long val;
@@ -684,7 +684,7 @@ static int rme9652_spdif_read_byte (rme9652_t *rme9652)
684 return val; 684 return val;
685} 685}
686 686
687static void rme9652_write_spdif_codec (rme9652_t *rme9652, const int address, const int data) 687static void rme9652_write_spdif_codec (struct snd_rme9652 *rme9652, const int address, const int data)
688{ 688{
689 rme9652_spdif_set_bit (rme9652, RME9652_SPDIF_SELECT, 1); 689 rme9652_spdif_set_bit (rme9652, RME9652_SPDIF_SELECT, 1);
690 rme9652_spdif_write_byte (rme9652, 0x20); 690 rme9652_spdif_write_byte (rme9652, 0x20);
@@ -694,7 +694,7 @@ static void rme9652_write_spdif_codec (rme9652_t *rme9652, const int address, co
694} 694}
695 695
696 696
697static int rme9652_spdif_read_codec (rme9652_t *rme9652, const int address) 697static int rme9652_spdif_read_codec (struct snd_rme9652 *rme9652, const int address)
698{ 698{
699 int ret; 699 int ret;
700 700
@@ -711,7 +711,7 @@ static int rme9652_spdif_read_codec (rme9652_t *rme9652, const int address)
711 return ret; 711 return ret;
712} 712}
713 713
714static void rme9652_initialize_spdif_receiver (rme9652_t *rme9652) 714static void rme9652_initialize_spdif_receiver (struct snd_rme9652 *rme9652)
715{ 715{
716 /* XXX what unsets this ? */ 716 /* XXX what unsets this ? */
717 717
@@ -722,7 +722,7 @@ static void rme9652_initialize_spdif_receiver (rme9652_t *rme9652)
722 rme9652_write_spdif_codec (rme9652, 6, 0x02); 722 rme9652_write_spdif_codec (rme9652, 6, 0x02);
723} 723}
724 724
725static inline int rme9652_spdif_sample_rate(rme9652_t *s) 725static inline int rme9652_spdif_sample_rate(struct snd_rme9652 *s)
726{ 726{
727 unsigned int rate_bits; 727 unsigned int rate_bits;
728 728
@@ -790,7 +790,7 @@ static inline int rme9652_spdif_sample_rate(rme9652_t *s)
790 Control Interface 790 Control Interface
791 ----------------------------------------------------------------------------*/ 791 ----------------------------------------------------------------------------*/
792 792
793static u32 snd_rme9652_convert_from_aes(snd_aes_iec958_t *aes) 793static u32 snd_rme9652_convert_from_aes(struct snd_aes_iec958 *aes)
794{ 794{
795 u32 val = 0; 795 u32 val = 0;
796 val |= (aes->status[0] & IEC958_AES0_PROFESSIONAL) ? RME9652_PRO : 0; 796 val |= (aes->status[0] & IEC958_AES0_PROFESSIONAL) ? RME9652_PRO : 0;
@@ -802,7 +802,7 @@ static u32 snd_rme9652_convert_from_aes(snd_aes_iec958_t *aes)
802 return val; 802 return val;
803} 803}
804 804
805static void snd_rme9652_convert_to_aes(snd_aes_iec958_t *aes, u32 val) 805static void snd_rme9652_convert_to_aes(struct snd_aes_iec958 *aes, u32 val)
806{ 806{
807 aes->status[0] = ((val & RME9652_PRO) ? IEC958_AES0_PROFESSIONAL : 0) | 807 aes->status[0] = ((val & RME9652_PRO) ? IEC958_AES0_PROFESSIONAL : 0) |
808 ((val & RME9652_Dolby) ? IEC958_AES0_NONAUDIO : 0); 808 ((val & RME9652_Dolby) ? IEC958_AES0_NONAUDIO : 0);
@@ -812,24 +812,24 @@ static void snd_rme9652_convert_to_aes(snd_aes_iec958_t *aes, u32 val)
812 aes->status[0] |= (val & RME9652_EMP) ? IEC958_AES0_CON_EMPHASIS_5015 : 0; 812 aes->status[0] |= (val & RME9652_EMP) ? IEC958_AES0_CON_EMPHASIS_5015 : 0;
813} 813}
814 814
815static int snd_rme9652_control_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 815static int snd_rme9652_control_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
816{ 816{
817 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; 817 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
818 uinfo->count = 1; 818 uinfo->count = 1;
819 return 0; 819 return 0;
820} 820}
821 821
822static int snd_rme9652_control_spdif_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 822static int snd_rme9652_control_spdif_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
823{ 823{
824 rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); 824 struct snd_rme9652 *rme9652 = snd_kcontrol_chip(kcontrol);
825 825
826 snd_rme9652_convert_to_aes(&ucontrol->value.iec958, rme9652->creg_spdif); 826 snd_rme9652_convert_to_aes(&ucontrol->value.iec958, rme9652->creg_spdif);
827 return 0; 827 return 0;
828} 828}
829 829
830static int snd_rme9652_control_spdif_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 830static int snd_rme9652_control_spdif_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
831{ 831{
832 rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); 832 struct snd_rme9652 *rme9652 = snd_kcontrol_chip(kcontrol);
833 int change; 833 int change;
834 u32 val; 834 u32 val;
835 835
@@ -841,24 +841,24 @@ static int snd_rme9652_control_spdif_put(snd_kcontrol_t * kcontrol, snd_ctl_elem
841 return change; 841 return change;
842} 842}
843 843
844static int snd_rme9652_control_spdif_stream_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 844static int snd_rme9652_control_spdif_stream_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
845{ 845{
846 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; 846 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
847 uinfo->count = 1; 847 uinfo->count = 1;
848 return 0; 848 return 0;
849} 849}
850 850
851static int snd_rme9652_control_spdif_stream_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 851static int snd_rme9652_control_spdif_stream_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
852{ 852{
853 rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); 853 struct snd_rme9652 *rme9652 = snd_kcontrol_chip(kcontrol);
854 854
855 snd_rme9652_convert_to_aes(&ucontrol->value.iec958, rme9652->creg_spdif_stream); 855 snd_rme9652_convert_to_aes(&ucontrol->value.iec958, rme9652->creg_spdif_stream);
856 return 0; 856 return 0;
857} 857}
858 858
859static int snd_rme9652_control_spdif_stream_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 859static int snd_rme9652_control_spdif_stream_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
860{ 860{
861 rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); 861 struct snd_rme9652 *rme9652 = snd_kcontrol_chip(kcontrol);
862 int change; 862 int change;
863 u32 val; 863 u32 val;
864 864
@@ -872,14 +872,14 @@ static int snd_rme9652_control_spdif_stream_put(snd_kcontrol_t * kcontrol, snd_c
872 return change; 872 return change;
873} 873}
874 874
875static int snd_rme9652_control_spdif_mask_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 875static int snd_rme9652_control_spdif_mask_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
876{ 876{
877 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; 877 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
878 uinfo->count = 1; 878 uinfo->count = 1;
879 return 0; 879 return 0;
880} 880}
881 881
882static int snd_rme9652_control_spdif_mask_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 882static int snd_rme9652_control_spdif_mask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
883{ 883{
884 ucontrol->value.iec958.status[0] = kcontrol->private_value; 884 ucontrol->value.iec958.status[0] = kcontrol->private_value;
885 return 0; 885 return 0;
@@ -891,14 +891,14 @@ static int snd_rme9652_control_spdif_mask_get(snd_kcontrol_t * kcontrol, snd_ctl
891 .get = snd_rme9652_get_adat1_in, \ 891 .get = snd_rme9652_get_adat1_in, \
892 .put = snd_rme9652_put_adat1_in } 892 .put = snd_rme9652_put_adat1_in }
893 893
894static unsigned int rme9652_adat1_in(rme9652_t *rme9652) 894static unsigned int rme9652_adat1_in(struct snd_rme9652 *rme9652)
895{ 895{
896 if (rme9652->control_register & RME9652_ADAT1_INTERNAL) 896 if (rme9652->control_register & RME9652_ADAT1_INTERNAL)
897 return 1; 897 return 1;
898 return 0; 898 return 0;
899} 899}
900 900
901static int rme9652_set_adat1_input(rme9652_t *rme9652, int internal) 901static int rme9652_set_adat1_input(struct snd_rme9652 *rme9652, int internal)
902{ 902{
903 int restart = 0; 903 int restart = 0;
904 904
@@ -923,7 +923,7 @@ static int rme9652_set_adat1_input(rme9652_t *rme9652, int internal)
923 return 0; 923 return 0;
924} 924}
925 925
926static int snd_rme9652_info_adat1_in(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 926static int snd_rme9652_info_adat1_in(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
927{ 927{
928 static char *texts[2] = {"ADAT1", "Internal"}; 928 static char *texts[2] = {"ADAT1", "Internal"};
929 929
@@ -936,9 +936,9 @@ static int snd_rme9652_info_adat1_in(snd_kcontrol_t *kcontrol, snd_ctl_elem_info
936 return 0; 936 return 0;
937} 937}
938 938
939static int snd_rme9652_get_adat1_in(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 939static int snd_rme9652_get_adat1_in(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
940{ 940{
941 rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); 941 struct snd_rme9652 *rme9652 = snd_kcontrol_chip(kcontrol);
942 942
943 spin_lock_irq(&rme9652->lock); 943 spin_lock_irq(&rme9652->lock);
944 ucontrol->value.enumerated.item[0] = rme9652_adat1_in(rme9652); 944 ucontrol->value.enumerated.item[0] = rme9652_adat1_in(rme9652);
@@ -946,9 +946,9 @@ static int snd_rme9652_get_adat1_in(snd_kcontrol_t * kcontrol, snd_ctl_elem_valu
946 return 0; 946 return 0;
947} 947}
948 948
949static int snd_rme9652_put_adat1_in(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 949static int snd_rme9652_put_adat1_in(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
950{ 950{
951 rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); 951 struct snd_rme9652 *rme9652 = snd_kcontrol_chip(kcontrol);
952 int change; 952 int change;
953 unsigned int val; 953 unsigned int val;
954 954
@@ -968,13 +968,13 @@ static int snd_rme9652_put_adat1_in(snd_kcontrol_t * kcontrol, snd_ctl_elem_valu
968 .info = snd_rme9652_info_spdif_in, \ 968 .info = snd_rme9652_info_spdif_in, \
969 .get = snd_rme9652_get_spdif_in, .put = snd_rme9652_put_spdif_in } 969 .get = snd_rme9652_get_spdif_in, .put = snd_rme9652_put_spdif_in }
970 970
971static unsigned int rme9652_spdif_in(rme9652_t *rme9652) 971static unsigned int rme9652_spdif_in(struct snd_rme9652 *rme9652)
972{ 972{
973 return rme9652_decode_spdif_in(rme9652->control_register & 973 return rme9652_decode_spdif_in(rme9652->control_register &
974 RME9652_inp); 974 RME9652_inp);
975} 975}
976 976
977static int rme9652_set_spdif_input(rme9652_t *rme9652, int in) 977static int rme9652_set_spdif_input(struct snd_rme9652 *rme9652, int in)
978{ 978{
979 int restart = 0; 979 int restart = 0;
980 980
@@ -994,7 +994,7 @@ static int rme9652_set_spdif_input(rme9652_t *rme9652, int in)
994 return 0; 994 return 0;
995} 995}
996 996
997static int snd_rme9652_info_spdif_in(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 997static int snd_rme9652_info_spdif_in(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
998{ 998{
999 static char *texts[3] = {"ADAT1", "Coaxial", "Internal"}; 999 static char *texts[3] = {"ADAT1", "Coaxial", "Internal"};
1000 1000
@@ -1007,9 +1007,9 @@ static int snd_rme9652_info_spdif_in(snd_kcontrol_t *kcontrol, snd_ctl_elem_info
1007 return 0; 1007 return 0;
1008} 1008}
1009 1009
1010static int snd_rme9652_get_spdif_in(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1010static int snd_rme9652_get_spdif_in(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1011{ 1011{
1012 rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); 1012 struct snd_rme9652 *rme9652 = snd_kcontrol_chip(kcontrol);
1013 1013
1014 spin_lock_irq(&rme9652->lock); 1014 spin_lock_irq(&rme9652->lock);
1015 ucontrol->value.enumerated.item[0] = rme9652_spdif_in(rme9652); 1015 ucontrol->value.enumerated.item[0] = rme9652_spdif_in(rme9652);
@@ -1017,9 +1017,9 @@ static int snd_rme9652_get_spdif_in(snd_kcontrol_t * kcontrol, snd_ctl_elem_valu
1017 return 0; 1017 return 0;
1018} 1018}
1019 1019
1020static int snd_rme9652_put_spdif_in(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1020static int snd_rme9652_put_spdif_in(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1021{ 1021{
1022 rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); 1022 struct snd_rme9652 *rme9652 = snd_kcontrol_chip(kcontrol);
1023 int change; 1023 int change;
1024 unsigned int val; 1024 unsigned int val;
1025 1025
@@ -1039,12 +1039,12 @@ static int snd_rme9652_put_spdif_in(snd_kcontrol_t * kcontrol, snd_ctl_elem_valu
1039 .info = snd_rme9652_info_spdif_out, \ 1039 .info = snd_rme9652_info_spdif_out, \
1040 .get = snd_rme9652_get_spdif_out, .put = snd_rme9652_put_spdif_out } 1040 .get = snd_rme9652_get_spdif_out, .put = snd_rme9652_put_spdif_out }
1041 1041
1042static int rme9652_spdif_out(rme9652_t *rme9652) 1042static int rme9652_spdif_out(struct snd_rme9652 *rme9652)
1043{ 1043{
1044 return (rme9652->control_register & RME9652_opt_out) ? 1 : 0; 1044 return (rme9652->control_register & RME9652_opt_out) ? 1 : 0;
1045} 1045}
1046 1046
1047static int rme9652_set_spdif_output(rme9652_t *rme9652, int out) 1047static int rme9652_set_spdif_output(struct snd_rme9652 *rme9652, int out)
1048{ 1048{
1049 int restart = 0; 1049 int restart = 0;
1050 1050
@@ -1067,7 +1067,7 @@ static int rme9652_set_spdif_output(rme9652_t *rme9652, int out)
1067 return 0; 1067 return 0;
1068} 1068}
1069 1069
1070static int snd_rme9652_info_spdif_out(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1070static int snd_rme9652_info_spdif_out(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
1071{ 1071{
1072 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 1072 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
1073 uinfo->count = 1; 1073 uinfo->count = 1;
@@ -1076,9 +1076,9 @@ static int snd_rme9652_info_spdif_out(snd_kcontrol_t *kcontrol, snd_ctl_elem_inf
1076 return 0; 1076 return 0;
1077} 1077}
1078 1078
1079static int snd_rme9652_get_spdif_out(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1079static int snd_rme9652_get_spdif_out(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1080{ 1080{
1081 rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); 1081 struct snd_rme9652 *rme9652 = snd_kcontrol_chip(kcontrol);
1082 1082
1083 spin_lock_irq(&rme9652->lock); 1083 spin_lock_irq(&rme9652->lock);
1084 ucontrol->value.integer.value[0] = rme9652_spdif_out(rme9652); 1084 ucontrol->value.integer.value[0] = rme9652_spdif_out(rme9652);
@@ -1086,9 +1086,9 @@ static int snd_rme9652_get_spdif_out(snd_kcontrol_t * kcontrol, snd_ctl_elem_val
1086 return 0; 1086 return 0;
1087} 1087}
1088 1088
1089static int snd_rme9652_put_spdif_out(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1089static int snd_rme9652_put_spdif_out(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1090{ 1090{
1091 rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); 1091 struct snd_rme9652 *rme9652 = snd_kcontrol_chip(kcontrol);
1092 int change; 1092 int change;
1093 unsigned int val; 1093 unsigned int val;
1094 1094
@@ -1107,7 +1107,7 @@ static int snd_rme9652_put_spdif_out(snd_kcontrol_t * kcontrol, snd_ctl_elem_val
1107 .info = snd_rme9652_info_sync_mode, \ 1107 .info = snd_rme9652_info_sync_mode, \
1108 .get = snd_rme9652_get_sync_mode, .put = snd_rme9652_put_sync_mode } 1108 .get = snd_rme9652_get_sync_mode, .put = snd_rme9652_put_sync_mode }
1109 1109
1110static int rme9652_sync_mode(rme9652_t *rme9652) 1110static int rme9652_sync_mode(struct snd_rme9652 *rme9652)
1111{ 1111{
1112 if (rme9652->control_register & RME9652_wsel) { 1112 if (rme9652->control_register & RME9652_wsel) {
1113 return 2; 1113 return 2;
@@ -1118,7 +1118,7 @@ static int rme9652_sync_mode(rme9652_t *rme9652)
1118 } 1118 }
1119} 1119}
1120 1120
1121static int rme9652_set_sync_mode(rme9652_t *rme9652, int mode) 1121static int rme9652_set_sync_mode(struct snd_rme9652 *rme9652, int mode)
1122{ 1122{
1123 int restart = 0; 1123 int restart = 0;
1124 1124
@@ -1150,7 +1150,7 @@ static int rme9652_set_sync_mode(rme9652_t *rme9652, int mode)
1150 return 0; 1150 return 0;
1151} 1151}
1152 1152
1153static int snd_rme9652_info_sync_mode(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1153static int snd_rme9652_info_sync_mode(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
1154{ 1154{
1155 static char *texts[3] = {"AutoSync", "Master", "Word Clock"}; 1155 static char *texts[3] = {"AutoSync", "Master", "Word Clock"};
1156 1156
@@ -1163,9 +1163,9 @@ static int snd_rme9652_info_sync_mode(snd_kcontrol_t *kcontrol, snd_ctl_elem_inf
1163 return 0; 1163 return 0;
1164} 1164}
1165 1165
1166static int snd_rme9652_get_sync_mode(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1166static int snd_rme9652_get_sync_mode(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1167{ 1167{
1168 rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); 1168 struct snd_rme9652 *rme9652 = snd_kcontrol_chip(kcontrol);
1169 1169
1170 spin_lock_irq(&rme9652->lock); 1170 spin_lock_irq(&rme9652->lock);
1171 ucontrol->value.enumerated.item[0] = rme9652_sync_mode(rme9652); 1171 ucontrol->value.enumerated.item[0] = rme9652_sync_mode(rme9652);
@@ -1173,9 +1173,9 @@ static int snd_rme9652_get_sync_mode(snd_kcontrol_t * kcontrol, snd_ctl_elem_val
1173 return 0; 1173 return 0;
1174} 1174}
1175 1175
1176static int snd_rme9652_put_sync_mode(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1176static int snd_rme9652_put_sync_mode(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1177{ 1177{
1178 rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); 1178 struct snd_rme9652 *rme9652 = snd_kcontrol_chip(kcontrol);
1179 int change; 1179 int change;
1180 unsigned int val; 1180 unsigned int val;
1181 1181
@@ -1192,7 +1192,7 @@ static int snd_rme9652_put_sync_mode(snd_kcontrol_t * kcontrol, snd_ctl_elem_val
1192 .info = snd_rme9652_info_sync_pref, \ 1192 .info = snd_rme9652_info_sync_pref, \
1193 .get = snd_rme9652_get_sync_pref, .put = snd_rme9652_put_sync_pref } 1193 .get = snd_rme9652_get_sync_pref, .put = snd_rme9652_put_sync_pref }
1194 1194
1195static int rme9652_sync_pref(rme9652_t *rme9652) 1195static int rme9652_sync_pref(struct snd_rme9652 *rme9652)
1196{ 1196{
1197 switch (rme9652->control_register & RME9652_SyncPref_Mask) { 1197 switch (rme9652->control_register & RME9652_SyncPref_Mask) {
1198 case RME9652_SyncPref_ADAT1: 1198 case RME9652_SyncPref_ADAT1:
@@ -1208,7 +1208,7 @@ static int rme9652_sync_pref(rme9652_t *rme9652)
1208 return 0; 1208 return 0;
1209} 1209}
1210 1210
1211static int rme9652_set_sync_pref(rme9652_t *rme9652, int pref) 1211static int rme9652_set_sync_pref(struct snd_rme9652 *rme9652, int pref)
1212{ 1212{
1213 int restart; 1213 int restart;
1214 1214
@@ -1241,10 +1241,10 @@ static int rme9652_set_sync_pref(rme9652_t *rme9652, int pref)
1241 return 0; 1241 return 0;
1242} 1242}
1243 1243
1244static int snd_rme9652_info_sync_pref(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1244static int snd_rme9652_info_sync_pref(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
1245{ 1245{
1246 static char *texts[4] = {"IEC958 In", "ADAT1 In", "ADAT2 In", "ADAT3 In"}; 1246 static char *texts[4] = {"IEC958 In", "ADAT1 In", "ADAT2 In", "ADAT3 In"};
1247 rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); 1247 struct snd_rme9652 *rme9652 = snd_kcontrol_chip(kcontrol);
1248 1248
1249 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; 1249 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
1250 uinfo->count = 1; 1250 uinfo->count = 1;
@@ -1255,9 +1255,9 @@ static int snd_rme9652_info_sync_pref(snd_kcontrol_t *kcontrol, snd_ctl_elem_inf
1255 return 0; 1255 return 0;
1256} 1256}
1257 1257
1258static int snd_rme9652_get_sync_pref(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1258static int snd_rme9652_get_sync_pref(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1259{ 1259{
1260 rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); 1260 struct snd_rme9652 *rme9652 = snd_kcontrol_chip(kcontrol);
1261 1261
1262 spin_lock_irq(&rme9652->lock); 1262 spin_lock_irq(&rme9652->lock);
1263 ucontrol->value.enumerated.item[0] = rme9652_sync_pref(rme9652); 1263 ucontrol->value.enumerated.item[0] = rme9652_sync_pref(rme9652);
@@ -1265,9 +1265,9 @@ static int snd_rme9652_get_sync_pref(snd_kcontrol_t * kcontrol, snd_ctl_elem_val
1265 return 0; 1265 return 0;
1266} 1266}
1267 1267
1268static int snd_rme9652_put_sync_pref(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1268static int snd_rme9652_put_sync_pref(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1269{ 1269{
1270 rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); 1270 struct snd_rme9652 *rme9652 = snd_kcontrol_chip(kcontrol);
1271 int change, max; 1271 int change, max;
1272 unsigned int val; 1272 unsigned int val;
1273 1273
@@ -1282,9 +1282,9 @@ static int snd_rme9652_put_sync_pref(snd_kcontrol_t * kcontrol, snd_ctl_elem_val
1282 return change; 1282 return change;
1283} 1283}
1284 1284
1285static int snd_rme9652_info_thru(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1285static int snd_rme9652_info_thru(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
1286{ 1286{
1287 rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); 1287 struct snd_rme9652 *rme9652 = snd_kcontrol_chip(kcontrol);
1288 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 1288 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
1289 uinfo->count = rme9652->ss_channels; 1289 uinfo->count = rme9652->ss_channels;
1290 uinfo->value.integer.min = 0; 1290 uinfo->value.integer.min = 0;
@@ -1292,9 +1292,9 @@ static int snd_rme9652_info_thru(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *
1292 return 0; 1292 return 0;
1293} 1293}
1294 1294
1295static int snd_rme9652_get_thru(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1295static int snd_rme9652_get_thru(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1296{ 1296{
1297 rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); 1297 struct snd_rme9652 *rme9652 = snd_kcontrol_chip(kcontrol);
1298 unsigned int k; 1298 unsigned int k;
1299 u32 thru_bits = rme9652->thru_bits; 1299 u32 thru_bits = rme9652->thru_bits;
1300 1300
@@ -1304,9 +1304,9 @@ static int snd_rme9652_get_thru(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
1304 return 0; 1304 return 0;
1305} 1305}
1306 1306
1307static int snd_rme9652_put_thru(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1307static int snd_rme9652_put_thru(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1308{ 1308{
1309 rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); 1309 struct snd_rme9652 *rme9652 = snd_kcontrol_chip(kcontrol);
1310 int change; 1310 int change;
1311 unsigned int chn; 1311 unsigned int chn;
1312 u32 thru_bits = 0; 1312 u32 thru_bits = 0;
@@ -1338,7 +1338,7 @@ static int snd_rme9652_put_thru(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
1338 .put = snd_rme9652_put_passthru, \ 1338 .put = snd_rme9652_put_passthru, \
1339 .get = snd_rme9652_get_passthru } 1339 .get = snd_rme9652_get_passthru }
1340 1340
1341static int snd_rme9652_info_passthru(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) 1341static int snd_rme9652_info_passthru(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
1342{ 1342{
1343 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 1343 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
1344 uinfo->count = 1; 1344 uinfo->count = 1;
@@ -1347,9 +1347,9 @@ static int snd_rme9652_info_passthru(snd_kcontrol_t * kcontrol, snd_ctl_elem_inf
1347 return 0; 1347 return 0;
1348} 1348}
1349 1349
1350static int snd_rme9652_get_passthru(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1350static int snd_rme9652_get_passthru(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1351{ 1351{
1352 rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); 1352 struct snd_rme9652 *rme9652 = snd_kcontrol_chip(kcontrol);
1353 1353
1354 spin_lock_irq(&rme9652->lock); 1354 spin_lock_irq(&rme9652->lock);
1355 ucontrol->value.integer.value[0] = rme9652->passthru; 1355 ucontrol->value.integer.value[0] = rme9652->passthru;
@@ -1357,9 +1357,9 @@ static int snd_rme9652_get_passthru(snd_kcontrol_t * kcontrol, snd_ctl_elem_valu
1357 return 0; 1357 return 0;
1358} 1358}
1359 1359
1360static int snd_rme9652_put_passthru(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1360static int snd_rme9652_put_passthru(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1361{ 1361{
1362 rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); 1362 struct snd_rme9652 *rme9652 = snd_kcontrol_chip(kcontrol);
1363 int change; 1363 int change;
1364 unsigned int val; 1364 unsigned int val;
1365 int err = 0; 1365 int err = 0;
@@ -1384,7 +1384,7 @@ static int snd_rme9652_put_passthru(snd_kcontrol_t * kcontrol, snd_ctl_elem_valu
1384 .info = snd_rme9652_info_spdif_rate, \ 1384 .info = snd_rme9652_info_spdif_rate, \
1385 .get = snd_rme9652_get_spdif_rate } 1385 .get = snd_rme9652_get_spdif_rate }
1386 1386
1387static int snd_rme9652_info_spdif_rate(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1387static int snd_rme9652_info_spdif_rate(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
1388{ 1388{
1389 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 1389 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
1390 uinfo->count = 1; 1390 uinfo->count = 1;
@@ -1393,9 +1393,9 @@ static int snd_rme9652_info_spdif_rate(snd_kcontrol_t *kcontrol, snd_ctl_elem_in
1393 return 0; 1393 return 0;
1394} 1394}
1395 1395
1396static int snd_rme9652_get_spdif_rate(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1396static int snd_rme9652_get_spdif_rate(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1397{ 1397{
1398 rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); 1398 struct snd_rme9652 *rme9652 = snd_kcontrol_chip(kcontrol);
1399 1399
1400 spin_lock_irq(&rme9652->lock); 1400 spin_lock_irq(&rme9652->lock);
1401 ucontrol->value.integer.value[0] = rme9652_spdif_sample_rate(rme9652); 1401 ucontrol->value.integer.value[0] = rme9652_spdif_sample_rate(rme9652);
@@ -1409,7 +1409,7 @@ static int snd_rme9652_get_spdif_rate(snd_kcontrol_t * kcontrol, snd_ctl_elem_va
1409 .info = snd_rme9652_info_adat_sync, \ 1409 .info = snd_rme9652_info_adat_sync, \
1410 .get = snd_rme9652_get_adat_sync, .private_value = xidx } 1410 .get = snd_rme9652_get_adat_sync, .private_value = xidx }
1411 1411
1412static int snd_rme9652_info_adat_sync(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1412static int snd_rme9652_info_adat_sync(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
1413{ 1413{
1414 static char *texts[4] = {"No Lock", "Lock", "No Lock Sync", "Lock Sync"}; 1414 static char *texts[4] = {"No Lock", "Lock", "No Lock Sync", "Lock Sync"};
1415 1415
@@ -1422,9 +1422,9 @@ static int snd_rme9652_info_adat_sync(snd_kcontrol_t *kcontrol, snd_ctl_elem_inf
1422 return 0; 1422 return 0;
1423} 1423}
1424 1424
1425static int snd_rme9652_get_adat_sync(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1425static int snd_rme9652_get_adat_sync(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1426{ 1426{
1427 rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); 1427 struct snd_rme9652 *rme9652 = snd_kcontrol_chip(kcontrol);
1428 unsigned int mask1, mask2, val; 1428 unsigned int mask1, mask2, val;
1429 1429
1430 switch (kcontrol->private_value) { 1430 switch (kcontrol->private_value) {
@@ -1445,7 +1445,7 @@ static int snd_rme9652_get_adat_sync(snd_kcontrol_t * kcontrol, snd_ctl_elem_val
1445 .info = snd_rme9652_info_tc_valid, \ 1445 .info = snd_rme9652_info_tc_valid, \
1446 .get = snd_rme9652_get_tc_valid } 1446 .get = snd_rme9652_get_tc_valid }
1447 1447
1448static int snd_rme9652_info_tc_valid(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1448static int snd_rme9652_info_tc_valid(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
1449{ 1449{
1450 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 1450 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
1451 uinfo->count = 1; 1451 uinfo->count = 1;
@@ -1454,9 +1454,9 @@ static int snd_rme9652_info_tc_valid(snd_kcontrol_t *kcontrol, snd_ctl_elem_info
1454 return 0; 1454 return 0;
1455} 1455}
1456 1456
1457static int snd_rme9652_get_tc_valid(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1457static int snd_rme9652_get_tc_valid(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1458{ 1458{
1459 rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); 1459 struct snd_rme9652 *rme9652 = snd_kcontrol_chip(kcontrol);
1460 1460
1461 ucontrol->value.integer.value[0] = 1461 ucontrol->value.integer.value[0] =
1462 (rme9652_read(rme9652, RME9652_status_register) & RME9652_tc_valid) ? 1 : 0; 1462 (rme9652_read(rme9652, RME9652_status_register) & RME9652_tc_valid) ? 1 : 0;
@@ -1471,7 +1471,7 @@ static int snd_rme9652_get_tc_value(void *private_data,
1471 snd_kswitch_t *kswitch, 1471 snd_kswitch_t *kswitch,
1472 snd_switch_t *uswitch) 1472 snd_switch_t *uswitch)
1473{ 1473{
1474 rme9652_t *s = (rme9652_t *) private_data; 1474 struct snd_rme9652 *s = (struct snd_rme9652 *) private_data;
1475 u32 value; 1475 u32 value;
1476 int i; 1476 int i;
1477 1477
@@ -1520,7 +1520,7 @@ static int snd_rme9652_get_tc_value(void *private_data,
1520 1520
1521#endif /* ALSA_HAS_STANDARD_WAY_OF_RETURNING_TIMECODE */ 1521#endif /* ALSA_HAS_STANDARD_WAY_OF_RETURNING_TIMECODE */
1522 1522
1523static snd_kcontrol_new_t snd_rme9652_controls[] = { 1523static struct snd_kcontrol_new snd_rme9652_controls[] = {
1524{ 1524{
1525 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 1525 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
1526 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), 1526 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
@@ -1575,17 +1575,17 @@ RME9652_TC_VALID("Timecode Valid", 0),
1575RME9652_PASSTHRU("Passthru", 0) 1575RME9652_PASSTHRU("Passthru", 0)
1576}; 1576};
1577 1577
1578static snd_kcontrol_new_t snd_rme9652_adat3_check = 1578static struct snd_kcontrol_new snd_rme9652_adat3_check =
1579RME9652_ADAT_SYNC("ADAT3 Sync Check", 0, 2); 1579RME9652_ADAT_SYNC("ADAT3 Sync Check", 0, 2);
1580 1580
1581static snd_kcontrol_new_t snd_rme9652_adat1_input = 1581static struct snd_kcontrol_new snd_rme9652_adat1_input =
1582RME9652_ADAT1_IN("ADAT1 Input Source", 0); 1582RME9652_ADAT1_IN("ADAT1 Input Source", 0);
1583 1583
1584static int snd_rme9652_create_controls(snd_card_t *card, rme9652_t *rme9652) 1584static int snd_rme9652_create_controls(struct snd_card *card, struct snd_rme9652 *rme9652)
1585{ 1585{
1586 unsigned int idx; 1586 unsigned int idx;
1587 int err; 1587 int err;
1588 snd_kcontrol_t *kctl; 1588 struct snd_kcontrol *kctl;
1589 1589
1590 for (idx = 0; idx < ARRAY_SIZE(snd_rme9652_controls); idx++) { 1590 for (idx = 0; idx < ARRAY_SIZE(snd_rme9652_controls); idx++) {
1591 if ((err = snd_ctl_add(card, kctl = snd_ctl_new1(&snd_rme9652_controls[idx], rme9652))) < 0) 1591 if ((err = snd_ctl_add(card, kctl = snd_ctl_new1(&snd_rme9652_controls[idx], rme9652))) < 0)
@@ -1610,9 +1610,9 @@ static int snd_rme9652_create_controls(snd_card_t *card, rme9652_t *rme9652)
1610 ------------------------------------------------------------*/ 1610 ------------------------------------------------------------*/
1611 1611
1612static void 1612static void
1613snd_rme9652_proc_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer) 1613snd_rme9652_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
1614{ 1614{
1615 rme9652_t *rme9652 = (rme9652_t *) entry->private_data; 1615 struct snd_rme9652 *rme9652 = (struct snd_rme9652 *) entry->private_data;
1616 u32 thru_bits = rme9652->thru_bits; 1616 u32 thru_bits = rme9652->thru_bits;
1617 int show_auto_sync_source = 0; 1617 int show_auto_sync_source = 0;
1618 int i; 1618 int i;
@@ -1782,21 +1782,21 @@ snd_rme9652_proc_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
1782 snd_iprintf(buffer, "\n"); 1782 snd_iprintf(buffer, "\n");
1783} 1783}
1784 1784
1785static void __devinit snd_rme9652_proc_init(rme9652_t *rme9652) 1785static void __devinit snd_rme9652_proc_init(struct snd_rme9652 *rme9652)
1786{ 1786{
1787 snd_info_entry_t *entry; 1787 struct snd_info_entry *entry;
1788 1788
1789 if (! snd_card_proc_new(rme9652->card, "rme9652", &entry)) 1789 if (! snd_card_proc_new(rme9652->card, "rme9652", &entry))
1790 snd_info_set_text_ops(entry, rme9652, 1024, snd_rme9652_proc_read); 1790 snd_info_set_text_ops(entry, rme9652, 1024, snd_rme9652_proc_read);
1791} 1791}
1792 1792
1793static void snd_rme9652_free_buffers(rme9652_t *rme9652) 1793static void snd_rme9652_free_buffers(struct snd_rme9652 *rme9652)
1794{ 1794{
1795 snd_hammerfall_free_buffer(&rme9652->capture_dma_buf, rme9652->pci); 1795 snd_hammerfall_free_buffer(&rme9652->capture_dma_buf, rme9652->pci);
1796 snd_hammerfall_free_buffer(&rme9652->playback_dma_buf, rme9652->pci); 1796 snd_hammerfall_free_buffer(&rme9652->playback_dma_buf, rme9652->pci);
1797} 1797}
1798 1798
1799static int snd_rme9652_free(rme9652_t *rme9652) 1799static int snd_rme9652_free(struct snd_rme9652 *rme9652)
1800{ 1800{
1801 if (rme9652->irq >= 0) 1801 if (rme9652->irq >= 0)
1802 rme9652_stop(rme9652); 1802 rme9652_stop(rme9652);
@@ -1813,7 +1813,7 @@ static int snd_rme9652_free(rme9652_t *rme9652)
1813 return 0; 1813 return 0;
1814} 1814}
1815 1815
1816static int __devinit snd_rme9652_initialize_memory(rme9652_t *rme9652) 1816static int __devinit snd_rme9652_initialize_memory(struct snd_rme9652 *rme9652)
1817{ 1817{
1818 unsigned long pb_bus, cb_bus; 1818 unsigned long pb_bus, cb_bus;
1819 1819
@@ -1841,7 +1841,7 @@ static int __devinit snd_rme9652_initialize_memory(rme9652_t *rme9652)
1841 return 0; 1841 return 0;
1842} 1842}
1843 1843
1844static void snd_rme9652_set_defaults(rme9652_t *rme9652) 1844static void snd_rme9652_set_defaults(struct snd_rme9652 *rme9652)
1845{ 1845{
1846 unsigned int k; 1846 unsigned int k;
1847 1847
@@ -1884,7 +1884,7 @@ static void snd_rme9652_set_defaults(rme9652_t *rme9652)
1884 1884
1885static irqreturn_t snd_rme9652_interrupt(int irq, void *dev_id, struct pt_regs *regs) 1885static irqreturn_t snd_rme9652_interrupt(int irq, void *dev_id, struct pt_regs *regs)
1886{ 1886{
1887 rme9652_t *rme9652 = (rme9652_t *) dev_id; 1887 struct snd_rme9652 *rme9652 = (struct snd_rme9652 *) dev_id;
1888 1888
1889 if (!(rme9652_read(rme9652, RME9652_status_register) & RME9652_IRQ)) { 1889 if (!(rme9652_read(rme9652, RME9652_status_register) & RME9652_IRQ)) {
1890 return IRQ_NONE; 1890 return IRQ_NONE;
@@ -1902,13 +1902,13 @@ static irqreturn_t snd_rme9652_interrupt(int irq, void *dev_id, struct pt_regs *
1902 return IRQ_HANDLED; 1902 return IRQ_HANDLED;
1903} 1903}
1904 1904
1905static snd_pcm_uframes_t snd_rme9652_hw_pointer(snd_pcm_substream_t *substream) 1905static snd_pcm_uframes_t snd_rme9652_hw_pointer(struct snd_pcm_substream *substream)
1906{ 1906{
1907 rme9652_t *rme9652 = snd_pcm_substream_chip(substream); 1907 struct snd_rme9652 *rme9652 = snd_pcm_substream_chip(substream);
1908 return rme9652_hw_pointer(rme9652); 1908 return rme9652_hw_pointer(rme9652);
1909} 1909}
1910 1910
1911static char *rme9652_channel_buffer_location(rme9652_t *rme9652, 1911static char *rme9652_channel_buffer_location(struct snd_rme9652 *rme9652,
1912 int stream, 1912 int stream,
1913 int channel) 1913 int channel)
1914 1914
@@ -1930,10 +1930,10 @@ static char *rme9652_channel_buffer_location(rme9652_t *rme9652,
1930 } 1930 }
1931} 1931}
1932 1932
1933static int snd_rme9652_playback_copy(snd_pcm_substream_t *substream, int channel, 1933static int snd_rme9652_playback_copy(struct snd_pcm_substream *substream, int channel,
1934 snd_pcm_uframes_t pos, void __user *src, snd_pcm_uframes_t count) 1934 snd_pcm_uframes_t pos, void __user *src, snd_pcm_uframes_t count)
1935{ 1935{
1936 rme9652_t *rme9652 = snd_pcm_substream_chip(substream); 1936 struct snd_rme9652 *rme9652 = snd_pcm_substream_chip(substream);
1937 char *channel_buf; 1937 char *channel_buf;
1938 1938
1939 snd_assert(pos + count <= RME9652_CHANNEL_BUFFER_BYTES / 4, return -EINVAL); 1939 snd_assert(pos + count <= RME9652_CHANNEL_BUFFER_BYTES / 4, return -EINVAL);
@@ -1947,10 +1947,10 @@ static int snd_rme9652_playback_copy(snd_pcm_substream_t *substream, int channel
1947 return count; 1947 return count;
1948} 1948}
1949 1949
1950static int snd_rme9652_capture_copy(snd_pcm_substream_t *substream, int channel, 1950static int snd_rme9652_capture_copy(struct snd_pcm_substream *substream, int channel,
1951 snd_pcm_uframes_t pos, void __user *dst, snd_pcm_uframes_t count) 1951 snd_pcm_uframes_t pos, void __user *dst, snd_pcm_uframes_t count)
1952{ 1952{
1953 rme9652_t *rme9652 = snd_pcm_substream_chip(substream); 1953 struct snd_rme9652 *rme9652 = snd_pcm_substream_chip(substream);
1954 char *channel_buf; 1954 char *channel_buf;
1955 1955
1956 snd_assert(pos + count <= RME9652_CHANNEL_BUFFER_BYTES / 4, return -EINVAL); 1956 snd_assert(pos + count <= RME9652_CHANNEL_BUFFER_BYTES / 4, return -EINVAL);
@@ -1964,10 +1964,10 @@ static int snd_rme9652_capture_copy(snd_pcm_substream_t *substream, int channel,
1964 return count; 1964 return count;
1965} 1965}
1966 1966
1967static int snd_rme9652_hw_silence(snd_pcm_substream_t *substream, int channel, 1967static int snd_rme9652_hw_silence(struct snd_pcm_substream *substream, int channel,
1968 snd_pcm_uframes_t pos, snd_pcm_uframes_t count) 1968 snd_pcm_uframes_t pos, snd_pcm_uframes_t count)
1969{ 1969{
1970 rme9652_t *rme9652 = snd_pcm_substream_chip(substream); 1970 struct snd_rme9652 *rme9652 = snd_pcm_substream_chip(substream);
1971 char *channel_buf; 1971 char *channel_buf;
1972 1972
1973 channel_buf = rme9652_channel_buffer_location (rme9652, 1973 channel_buf = rme9652_channel_buffer_location (rme9652,
@@ -1978,11 +1978,11 @@ static int snd_rme9652_hw_silence(snd_pcm_substream_t *substream, int channel,
1978 return count; 1978 return count;
1979} 1979}
1980 1980
1981static int snd_rme9652_reset(snd_pcm_substream_t *substream) 1981static int snd_rme9652_reset(struct snd_pcm_substream *substream)
1982{ 1982{
1983 snd_pcm_runtime_t *runtime = substream->runtime; 1983 struct snd_pcm_runtime *runtime = substream->runtime;
1984 rme9652_t *rme9652 = snd_pcm_substream_chip(substream); 1984 struct snd_rme9652 *rme9652 = snd_pcm_substream_chip(substream);
1985 snd_pcm_substream_t *other; 1985 struct snd_pcm_substream *other;
1986 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) 1986 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
1987 other = rme9652->capture_substream; 1987 other = rme9652->capture_substream;
1988 else 1988 else
@@ -1993,8 +1993,8 @@ static int snd_rme9652_reset(snd_pcm_substream_t *substream)
1993 runtime->status->hw_ptr = 0; 1993 runtime->status->hw_ptr = 0;
1994 if (other) { 1994 if (other) {
1995 struct list_head *pos; 1995 struct list_head *pos;
1996 snd_pcm_substream_t *s; 1996 struct snd_pcm_substream *s;
1997 snd_pcm_runtime_t *oruntime = other->runtime; 1997 struct snd_pcm_runtime *oruntime = other->runtime;
1998 snd_pcm_group_for_each(pos, substream) { 1998 snd_pcm_group_for_each(pos, substream) {
1999 s = snd_pcm_group_substream_entry(pos); 1999 s = snd_pcm_group_substream_entry(pos);
2000 if (s == other) { 2000 if (s == other) {
@@ -2006,10 +2006,10 @@ static int snd_rme9652_reset(snd_pcm_substream_t *substream)
2006 return 0; 2006 return 0;
2007} 2007}
2008 2008
2009static int snd_rme9652_hw_params(snd_pcm_substream_t *substream, 2009static int snd_rme9652_hw_params(struct snd_pcm_substream *substream,
2010 snd_pcm_hw_params_t *params) 2010 struct snd_pcm_hw_params *params)
2011{ 2011{
2012 rme9652_t *rme9652 = snd_pcm_substream_chip(substream); 2012 struct snd_rme9652 *rme9652 = snd_pcm_substream_chip(substream);
2013 int err; 2013 int err;
2014 pid_t this_pid; 2014 pid_t this_pid;
2015 pid_t other_pid; 2015 pid_t other_pid;
@@ -2071,10 +2071,10 @@ static int snd_rme9652_hw_params(snd_pcm_substream_t *substream,
2071 return 0; 2071 return 0;
2072} 2072}
2073 2073
2074static int snd_rme9652_channel_info(snd_pcm_substream_t *substream, 2074static int snd_rme9652_channel_info(struct snd_pcm_substream *substream,
2075 snd_pcm_channel_info_t *info) 2075 struct snd_pcm_channel_info *info)
2076{ 2076{
2077 rme9652_t *rme9652 = snd_pcm_substream_chip(substream); 2077 struct snd_rme9652 *rme9652 = snd_pcm_substream_chip(substream);
2078 int chn; 2078 int chn;
2079 2079
2080 snd_assert(info->channel < RME9652_NCHANNELS, return -EINVAL); 2080 snd_assert(info->channel < RME9652_NCHANNELS, return -EINVAL);
@@ -2089,7 +2089,7 @@ static int snd_rme9652_channel_info(snd_pcm_substream_t *substream,
2089 return 0; 2089 return 0;
2090} 2090}
2091 2091
2092static int snd_rme9652_ioctl(snd_pcm_substream_t *substream, 2092static int snd_rme9652_ioctl(struct snd_pcm_substream *substream,
2093 unsigned int cmd, void *arg) 2093 unsigned int cmd, void *arg)
2094{ 2094{
2095 switch (cmd) { 2095 switch (cmd) {
@@ -2099,7 +2099,7 @@ static int snd_rme9652_ioctl(snd_pcm_substream_t *substream,
2099 } 2099 }
2100 case SNDRV_PCM_IOCTL1_CHANNEL_INFO: 2100 case SNDRV_PCM_IOCTL1_CHANNEL_INFO:
2101 { 2101 {
2102 snd_pcm_channel_info_t *info = arg; 2102 struct snd_pcm_channel_info *info = arg;
2103 return snd_rme9652_channel_info(substream, info); 2103 return snd_rme9652_channel_info(substream, info);
2104 } 2104 }
2105 default: 2105 default:
@@ -2109,16 +2109,16 @@ static int snd_rme9652_ioctl(snd_pcm_substream_t *substream,
2109 return snd_pcm_lib_ioctl(substream, cmd, arg); 2109 return snd_pcm_lib_ioctl(substream, cmd, arg);
2110} 2110}
2111 2111
2112static void rme9652_silence_playback(rme9652_t *rme9652) 2112static void rme9652_silence_playback(struct snd_rme9652 *rme9652)
2113{ 2113{
2114 memset(rme9652->playback_buffer, 0, RME9652_DMA_AREA_BYTES); 2114 memset(rme9652->playback_buffer, 0, RME9652_DMA_AREA_BYTES);
2115} 2115}
2116 2116
2117static int snd_rme9652_trigger(snd_pcm_substream_t *substream, 2117static int snd_rme9652_trigger(struct snd_pcm_substream *substream,
2118 int cmd) 2118 int cmd)
2119{ 2119{
2120 rme9652_t *rme9652 = snd_pcm_substream_chip(substream); 2120 struct snd_rme9652 *rme9652 = snd_pcm_substream_chip(substream);
2121 snd_pcm_substream_t *other; 2121 struct snd_pcm_substream *other;
2122 int running; 2122 int running;
2123 spin_lock(&rme9652->lock); 2123 spin_lock(&rme9652->lock);
2124 running = rme9652->running; 2124 running = rme9652->running;
@@ -2141,7 +2141,7 @@ static int snd_rme9652_trigger(snd_pcm_substream_t *substream,
2141 2141
2142 if (other) { 2142 if (other) {
2143 struct list_head *pos; 2143 struct list_head *pos;
2144 snd_pcm_substream_t *s; 2144 struct snd_pcm_substream *s;
2145 snd_pcm_group_for_each(pos, substream) { 2145 snd_pcm_group_for_each(pos, substream) {
2146 s = snd_pcm_group_substream_entry(pos); 2146 s = snd_pcm_group_substream_entry(pos);
2147 if (s == other) { 2147 if (s == other) {
@@ -2178,9 +2178,9 @@ static int snd_rme9652_trigger(snd_pcm_substream_t *substream,
2178 return 0; 2178 return 0;
2179} 2179}
2180 2180
2181static int snd_rme9652_prepare(snd_pcm_substream_t *substream) 2181static int snd_rme9652_prepare(struct snd_pcm_substream *substream)
2182{ 2182{
2183 rme9652_t *rme9652 = snd_pcm_substream_chip(substream); 2183 struct snd_rme9652 *rme9652 = snd_pcm_substream_chip(substream);
2184 unsigned long flags; 2184 unsigned long flags;
2185 int result = 0; 2185 int result = 0;
2186 2186
@@ -2191,7 +2191,7 @@ static int snd_rme9652_prepare(snd_pcm_substream_t *substream)
2191 return result; 2191 return result;
2192} 2192}
2193 2193
2194static snd_pcm_hardware_t snd_rme9652_playback_subinfo = 2194static struct snd_pcm_hardware snd_rme9652_playback_subinfo =
2195{ 2195{
2196 .info = (SNDRV_PCM_INFO_MMAP | 2196 .info = (SNDRV_PCM_INFO_MMAP |
2197 SNDRV_PCM_INFO_MMAP_VALID | 2197 SNDRV_PCM_INFO_MMAP_VALID |
@@ -2215,7 +2215,7 @@ static snd_pcm_hardware_t snd_rme9652_playback_subinfo =
2215 .fifo_size = 0, 2215 .fifo_size = 0,
2216}; 2216};
2217 2217
2218static snd_pcm_hardware_t snd_rme9652_capture_subinfo = 2218static struct snd_pcm_hardware snd_rme9652_capture_subinfo =
2219{ 2219{
2220 .info = (SNDRV_PCM_INFO_MMAP | 2220 .info = (SNDRV_PCM_INFO_MMAP |
2221 SNDRV_PCM_INFO_MMAP_VALID | 2221 SNDRV_PCM_INFO_MMAP_VALID |
@@ -2240,36 +2240,36 @@ static snd_pcm_hardware_t snd_rme9652_capture_subinfo =
2240 2240
2241static unsigned int period_sizes[] = { 64, 128, 256, 512, 1024, 2048, 4096, 8192 }; 2241static unsigned int period_sizes[] = { 64, 128, 256, 512, 1024, 2048, 4096, 8192 };
2242 2242
2243static snd_pcm_hw_constraint_list_t hw_constraints_period_sizes = { 2243static struct snd_pcm_hw_constraint_list hw_constraints_period_sizes = {
2244 .count = ARRAY_SIZE(period_sizes), 2244 .count = ARRAY_SIZE(period_sizes),
2245 .list = period_sizes, 2245 .list = period_sizes,
2246 .mask = 0 2246 .mask = 0
2247}; 2247};
2248 2248
2249static int snd_rme9652_hw_rule_channels(snd_pcm_hw_params_t *params, 2249static int snd_rme9652_hw_rule_channels(struct snd_pcm_hw_params *params,
2250 snd_pcm_hw_rule_t *rule) 2250 struct snd_pcm_hw_rule *rule)
2251{ 2251{
2252 rme9652_t *rme9652 = rule->private; 2252 struct snd_rme9652 *rme9652 = rule->private;
2253 snd_interval_t *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); 2253 struct snd_interval *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
2254 unsigned int list[2] = { rme9652->ds_channels, rme9652->ss_channels }; 2254 unsigned int list[2] = { rme9652->ds_channels, rme9652->ss_channels };
2255 return snd_interval_list(c, 2, list, 0); 2255 return snd_interval_list(c, 2, list, 0);
2256} 2256}
2257 2257
2258static int snd_rme9652_hw_rule_channels_rate(snd_pcm_hw_params_t *params, 2258static int snd_rme9652_hw_rule_channels_rate(struct snd_pcm_hw_params *params,
2259 snd_pcm_hw_rule_t *rule) 2259 struct snd_pcm_hw_rule *rule)
2260{ 2260{
2261 rme9652_t *rme9652 = rule->private; 2261 struct snd_rme9652 *rme9652 = rule->private;
2262 snd_interval_t *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); 2262 struct snd_interval *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
2263 snd_interval_t *r = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); 2263 struct snd_interval *r = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
2264 if (r->min > 48000) { 2264 if (r->min > 48000) {
2265 snd_interval_t t = { 2265 struct snd_interval t = {
2266 .min = rme9652->ds_channels, 2266 .min = rme9652->ds_channels,
2267 .max = rme9652->ds_channels, 2267 .max = rme9652->ds_channels,
2268 .integer = 1, 2268 .integer = 1,
2269 }; 2269 };
2270 return snd_interval_refine(c, &t); 2270 return snd_interval_refine(c, &t);
2271 } else if (r->max < 88200) { 2271 } else if (r->max < 88200) {
2272 snd_interval_t t = { 2272 struct snd_interval t = {
2273 .min = rme9652->ss_channels, 2273 .min = rme9652->ss_channels,
2274 .max = rme9652->ss_channels, 2274 .max = rme9652->ss_channels,
2275 .integer = 1, 2275 .integer = 1,
@@ -2279,21 +2279,21 @@ static int snd_rme9652_hw_rule_channels_rate(snd_pcm_hw_params_t *params,
2279 return 0; 2279 return 0;
2280} 2280}
2281 2281
2282static int snd_rme9652_hw_rule_rate_channels(snd_pcm_hw_params_t *params, 2282static int snd_rme9652_hw_rule_rate_channels(struct snd_pcm_hw_params *params,
2283 snd_pcm_hw_rule_t *rule) 2283 struct snd_pcm_hw_rule *rule)
2284{ 2284{
2285 rme9652_t *rme9652 = rule->private; 2285 struct snd_rme9652 *rme9652 = rule->private;
2286 snd_interval_t *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); 2286 struct snd_interval *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
2287 snd_interval_t *r = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); 2287 struct snd_interval *r = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
2288 if (c->min >= rme9652->ss_channels) { 2288 if (c->min >= rme9652->ss_channels) {
2289 snd_interval_t t = { 2289 struct snd_interval t = {
2290 .min = 44100, 2290 .min = 44100,
2291 .max = 48000, 2291 .max = 48000,
2292 .integer = 1, 2292 .integer = 1,
2293 }; 2293 };
2294 return snd_interval_refine(r, &t); 2294 return snd_interval_refine(r, &t);
2295 } else if (c->max <= rme9652->ds_channels) { 2295 } else if (c->max <= rme9652->ds_channels) {
2296 snd_interval_t t = { 2296 struct snd_interval t = {
2297 .min = 88200, 2297 .min = 88200,
2298 .max = 96000, 2298 .max = 96000,
2299 .integer = 1, 2299 .integer = 1,
@@ -2303,10 +2303,10 @@ static int snd_rme9652_hw_rule_rate_channels(snd_pcm_hw_params_t *params,
2303 return 0; 2303 return 0;
2304} 2304}
2305 2305
2306static int snd_rme9652_playback_open(snd_pcm_substream_t *substream) 2306static int snd_rme9652_playback_open(struct snd_pcm_substream *substream)
2307{ 2307{
2308 rme9652_t *rme9652 = snd_pcm_substream_chip(substream); 2308 struct snd_rme9652 *rme9652 = snd_pcm_substream_chip(substream);
2309 snd_pcm_runtime_t *runtime = substream->runtime; 2309 struct snd_pcm_runtime *runtime = substream->runtime;
2310 2310
2311 spin_lock_irq(&rme9652->lock); 2311 spin_lock_irq(&rme9652->lock);
2312 2312
@@ -2345,9 +2345,9 @@ static int snd_rme9652_playback_open(snd_pcm_substream_t *substream)
2345 return 0; 2345 return 0;
2346} 2346}
2347 2347
2348static int snd_rme9652_playback_release(snd_pcm_substream_t *substream) 2348static int snd_rme9652_playback_release(struct snd_pcm_substream *substream)
2349{ 2349{
2350 rme9652_t *rme9652 = snd_pcm_substream_chip(substream); 2350 struct snd_rme9652 *rme9652 = snd_pcm_substream_chip(substream);
2351 2351
2352 spin_lock_irq(&rme9652->lock); 2352 spin_lock_irq(&rme9652->lock);
2353 2353
@@ -2363,10 +2363,10 @@ static int snd_rme9652_playback_release(snd_pcm_substream_t *substream)
2363} 2363}
2364 2364
2365 2365
2366static int snd_rme9652_capture_open(snd_pcm_substream_t *substream) 2366static int snd_rme9652_capture_open(struct snd_pcm_substream *substream)
2367{ 2367{
2368 rme9652_t *rme9652 = snd_pcm_substream_chip(substream); 2368 struct snd_rme9652 *rme9652 = snd_pcm_substream_chip(substream);
2369 snd_pcm_runtime_t *runtime = substream->runtime; 2369 struct snd_pcm_runtime *runtime = substream->runtime;
2370 2370
2371 spin_lock_irq(&rme9652->lock); 2371 spin_lock_irq(&rme9652->lock);
2372 2372
@@ -2400,9 +2400,9 @@ static int snd_rme9652_capture_open(snd_pcm_substream_t *substream)
2400 return 0; 2400 return 0;
2401} 2401}
2402 2402
2403static int snd_rme9652_capture_release(snd_pcm_substream_t *substream) 2403static int snd_rme9652_capture_release(struct snd_pcm_substream *substream)
2404{ 2404{
2405 rme9652_t *rme9652 = snd_pcm_substream_chip(substream); 2405 struct snd_rme9652 *rme9652 = snd_pcm_substream_chip(substream);
2406 2406
2407 spin_lock_irq(&rme9652->lock); 2407 spin_lock_irq(&rme9652->lock);
2408 2408
@@ -2413,7 +2413,7 @@ static int snd_rme9652_capture_release(snd_pcm_substream_t *substream)
2413 return 0; 2413 return 0;
2414} 2414}
2415 2415
2416static snd_pcm_ops_t snd_rme9652_playback_ops = { 2416static struct snd_pcm_ops snd_rme9652_playback_ops = {
2417 .open = snd_rme9652_playback_open, 2417 .open = snd_rme9652_playback_open,
2418 .close = snd_rme9652_playback_release, 2418 .close = snd_rme9652_playback_release,
2419 .ioctl = snd_rme9652_ioctl, 2419 .ioctl = snd_rme9652_ioctl,
@@ -2425,7 +2425,7 @@ static snd_pcm_ops_t snd_rme9652_playback_ops = {
2425 .silence = snd_rme9652_hw_silence, 2425 .silence = snd_rme9652_hw_silence,
2426}; 2426};
2427 2427
2428static snd_pcm_ops_t snd_rme9652_capture_ops = { 2428static struct snd_pcm_ops snd_rme9652_capture_ops = {
2429 .open = snd_rme9652_capture_open, 2429 .open = snd_rme9652_capture_open,
2430 .close = snd_rme9652_capture_release, 2430 .close = snd_rme9652_capture_release,
2431 .ioctl = snd_rme9652_ioctl, 2431 .ioctl = snd_rme9652_ioctl,
@@ -2436,10 +2436,10 @@ static snd_pcm_ops_t snd_rme9652_capture_ops = {
2436 .copy = snd_rme9652_capture_copy, 2436 .copy = snd_rme9652_capture_copy,
2437}; 2437};
2438 2438
2439static int __devinit snd_rme9652_create_pcm(snd_card_t *card, 2439static int __devinit snd_rme9652_create_pcm(struct snd_card *card,
2440 rme9652_t *rme9652) 2440 struct snd_rme9652 *rme9652)
2441{ 2441{
2442 snd_pcm_t *pcm; 2442 struct snd_pcm *pcm;
2443 int err; 2443 int err;
2444 2444
2445 if ((err = snd_pcm_new(card, 2445 if ((err = snd_pcm_new(card,
@@ -2460,8 +2460,8 @@ static int __devinit snd_rme9652_create_pcm(snd_card_t *card,
2460 return 0; 2460 return 0;
2461} 2461}
2462 2462
2463static int __devinit snd_rme9652_create(snd_card_t *card, 2463static int __devinit snd_rme9652_create(struct snd_card *card,
2464 rme9652_t *rme9652, 2464 struct snd_rme9652 *rme9652,
2465 int precise_ptr) 2465 int precise_ptr)
2466{ 2466{
2467 struct pci_dev *pci = rme9652->pci; 2467 struct pci_dev *pci = rme9652->pci;
@@ -2591,9 +2591,9 @@ static int __devinit snd_rme9652_create(snd_card_t *card,
2591 return 0; 2591 return 0;
2592} 2592}
2593 2593
2594static void snd_rme9652_card_free(snd_card_t *card) 2594static void snd_rme9652_card_free(struct snd_card *card)
2595{ 2595{
2596 rme9652_t *rme9652 = (rme9652_t *) card->private_data; 2596 struct snd_rme9652 *rme9652 = (struct snd_rme9652 *) card->private_data;
2597 2597
2598 if (rme9652) 2598 if (rme9652)
2599 snd_rme9652_free(rme9652); 2599 snd_rme9652_free(rme9652);
@@ -2603,8 +2603,8 @@ static int __devinit snd_rme9652_probe(struct pci_dev *pci,
2603 const struct pci_device_id *pci_id) 2603 const struct pci_device_id *pci_id)
2604{ 2604{
2605 static int dev; 2605 static int dev;
2606 rme9652_t *rme9652; 2606 struct snd_rme9652 *rme9652;
2607 snd_card_t *card; 2607 struct snd_card *card;
2608 int err; 2608 int err;
2609 2609
2610 if (dev >= SNDRV_CARDS) 2610 if (dev >= SNDRV_CARDS)
@@ -2615,12 +2615,12 @@ static int __devinit snd_rme9652_probe(struct pci_dev *pci,
2615 } 2615 }
2616 2616
2617 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 2617 card = snd_card_new(index[dev], id[dev], THIS_MODULE,
2618 sizeof(rme9652_t)); 2618 sizeof(struct snd_rme9652));
2619 2619
2620 if (!card) 2620 if (!card)
2621 return -ENOMEM; 2621 return -ENOMEM;
2622 2622
2623 rme9652 = (rme9652_t *) card->private_data; 2623 rme9652 = (struct snd_rme9652 *) card->private_data;
2624 card->private_free = snd_rme9652_card_free; 2624 card->private_free = snd_rme9652_card_free;
2625 rme9652->dev = dev; 2625 rme9652->dev = dev;
2626 rme9652->pci = pci; 2626 rme9652->pci = pci;