aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 08:34:36 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:18:25 -0500
commit029d64b0cfa30abc10f722e2f67d282abe09c9da (patch)
treed9a1e72e9792b33e57db2695f6c1a1a4843df0bf /sound
parentd3a7e476740dc23588ea65fa0df1aacdf8e70003 (diff)
[ALSA] Remove xxx_t typedefs: ISA SB8/SB16/SBAWE
Remove xxx_t typedefs from the ISA SB8/SB16/SBAWE drivers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/isa/sb/emu8000.c121
-rw-r--r--sound/isa/sb/emu8000_callback.c107
-rw-r--r--sound/isa/sb/emu8000_local.h13
-rw-r--r--sound/isa/sb/emu8000_patch.c20
-rw-r--r--sound/isa/sb/emu8000_pcm.c104
-rw-r--r--sound/isa/sb/emu8000_synth.c17
-rw-r--r--sound/isa/sb/es968.c8
-rw-r--r--sound/isa/sb/sb16.c16
-rw-r--r--sound/isa/sb/sb16_csp.c174
-rw-r--r--sound/isa/sb/sb16_main.c120
-rw-r--r--sound/isa/sb/sb8.c12
-rw-r--r--sound/isa/sb/sb8_main.c88
-rw-r--r--sound/isa/sb/sb8_midi.c44
-rw-r--r--sound/isa/sb/sb_common.c24
-rw-r--r--sound/isa/sb/sb_mixer.c68
15 files changed, 473 insertions, 463 deletions
diff --git a/sound/isa/sb/emu8000.c b/sound/isa/sb/emu8000.c
index b09c6575e01a..c0b8d61b75e7 100644
--- a/sound/isa/sb/emu8000.c
+++ b/sound/isa/sb/emu8000.c
@@ -45,7 +45,7 @@
45 * directly. The macros handle the port number and command word. 45 * directly. The macros handle the port number and command word.
46 */ 46 */
47/* Write a word */ 47/* Write a word */
48void snd_emu8000_poke(emu8000_t *emu, unsigned int port, unsigned int reg, unsigned int val) 48void snd_emu8000_poke(struct snd_emu8000 *emu, unsigned int port, unsigned int reg, unsigned int val)
49{ 49{
50 unsigned long flags; 50 unsigned long flags;
51 spin_lock_irqsave(&emu->reg_lock, flags); 51 spin_lock_irqsave(&emu->reg_lock, flags);
@@ -58,7 +58,7 @@ void snd_emu8000_poke(emu8000_t *emu, unsigned int port, unsigned int reg, unsig
58} 58}
59 59
60/* Read a word */ 60/* Read a word */
61unsigned short snd_emu8000_peek(emu8000_t *emu, unsigned int port, unsigned int reg) 61unsigned short snd_emu8000_peek(struct snd_emu8000 *emu, unsigned int port, unsigned int reg)
62{ 62{
63 unsigned short res; 63 unsigned short res;
64 unsigned long flags; 64 unsigned long flags;
@@ -73,7 +73,7 @@ unsigned short snd_emu8000_peek(emu8000_t *emu, unsigned int port, unsigned int
73} 73}
74 74
75/* Write a double word */ 75/* Write a double word */
76void snd_emu8000_poke_dw(emu8000_t *emu, unsigned int port, unsigned int reg, unsigned int val) 76void snd_emu8000_poke_dw(struct snd_emu8000 *emu, unsigned int port, unsigned int reg, unsigned int val)
77{ 77{
78 unsigned long flags; 78 unsigned long flags;
79 spin_lock_irqsave(&emu->reg_lock, flags); 79 spin_lock_irqsave(&emu->reg_lock, flags);
@@ -87,7 +87,7 @@ void snd_emu8000_poke_dw(emu8000_t *emu, unsigned int port, unsigned int reg, un
87} 87}
88 88
89/* Read a double word */ 89/* Read a double word */
90unsigned int snd_emu8000_peek_dw(emu8000_t *emu, unsigned int port, unsigned int reg) 90unsigned int snd_emu8000_peek_dw(struct snd_emu8000 *emu, unsigned int port, unsigned int reg)
91{ 91{
92 unsigned short low; 92 unsigned short low;
93 unsigned int res; 93 unsigned int res;
@@ -107,7 +107,7 @@ unsigned int snd_emu8000_peek_dw(emu8000_t *emu, unsigned int port, unsigned int
107 * Set up / close a channel to be used for DMA. 107 * Set up / close a channel to be used for DMA.
108 */ 108 */
109/*exported*/ void 109/*exported*/ void
110snd_emu8000_dma_chan(emu8000_t *emu, int ch, int mode) 110snd_emu8000_dma_chan(struct snd_emu8000 *emu, int ch, int mode)
111{ 111{
112 unsigned right_bit = (mode & EMU8000_RAM_RIGHT) ? 0x01000000 : 0; 112 unsigned right_bit = (mode & EMU8000_RAM_RIGHT) ? 0x01000000 : 0;
113 mode &= EMU8000_RAM_MODE_MASK; 113 mode &= EMU8000_RAM_MODE_MASK;
@@ -132,7 +132,7 @@ snd_emu8000_dma_chan(emu8000_t *emu, int ch, int mode)
132/* 132/*
133 */ 133 */
134static void __init 134static void __init
135snd_emu8000_read_wait(emu8000_t *emu) 135snd_emu8000_read_wait(struct snd_emu8000 *emu)
136{ 136{
137 while ((EMU8000_SMALR_READ(emu) & 0x80000000) != 0) { 137 while ((EMU8000_SMALR_READ(emu) & 0x80000000) != 0) {
138 schedule_timeout_interruptible(1); 138 schedule_timeout_interruptible(1);
@@ -144,7 +144,7 @@ snd_emu8000_read_wait(emu8000_t *emu)
144/* 144/*
145 */ 145 */
146static void __init 146static void __init
147snd_emu8000_write_wait(emu8000_t *emu) 147snd_emu8000_write_wait(struct snd_emu8000 *emu)
148{ 148{
149 while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) { 149 while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) {
150 schedule_timeout_interruptible(1); 150 schedule_timeout_interruptible(1);
@@ -157,7 +157,7 @@ snd_emu8000_write_wait(emu8000_t *emu)
157 * detect a card at the given port 157 * detect a card at the given port
158 */ 158 */
159static int __init 159static int __init
160snd_emu8000_detect(emu8000_t *emu) 160snd_emu8000_detect(struct snd_emu8000 *emu)
161{ 161{
162 /* Initialise */ 162 /* Initialise */
163 EMU8000_HWCF1_WRITE(emu, 0x0059); 163 EMU8000_HWCF1_WRITE(emu, 0x0059);
@@ -183,7 +183,7 @@ snd_emu8000_detect(emu8000_t *emu)
183 * intiailize audio channels 183 * intiailize audio channels
184 */ 184 */
185static void __init 185static void __init
186init_audio(emu8000_t *emu) 186init_audio(struct snd_emu8000 *emu)
187{ 187{
188 int ch; 188 int ch;
189 189
@@ -224,7 +224,7 @@ init_audio(emu8000_t *emu)
224 * initialize DMA address 224 * initialize DMA address
225 */ 225 */
226static void __init 226static void __init
227init_dma(emu8000_t *emu) 227init_dma(struct snd_emu8000 *emu)
228{ 228{
229 EMU8000_SMALR_WRITE(emu, 0); 229 EMU8000_SMALR_WRITE(emu, 0);
230 EMU8000_SMARR_WRITE(emu, 0); 230 EMU8000_SMARR_WRITE(emu, 0);
@@ -328,7 +328,7 @@ static unsigned short init4[128] /*__devinitdata*/ = {
328 * is meant to work 328 * is meant to work
329 */ 329 */
330static void __init 330static void __init
331send_array(emu8000_t *emu, unsigned short *data, int size) 331send_array(struct snd_emu8000 *emu, unsigned short *data, int size)
332{ 332{
333 int i; 333 int i;
334 unsigned short *p; 334 unsigned short *p;
@@ -350,7 +350,7 @@ send_array(emu8000_t *emu, unsigned short *data, int size)
350 * initialisation sequence in the adip. 350 * initialisation sequence in the adip.
351 */ 351 */
352static void __init 352static void __init
353init_arrays(emu8000_t *emu) 353init_arrays(struct snd_emu8000 *emu)
354{ 354{
355 send_array(emu, init1, ARRAY_SIZE(init1)/4); 355 send_array(emu, init1, ARRAY_SIZE(init1)/4);
356 356
@@ -376,7 +376,7 @@ init_arrays(emu8000_t *emu)
376 * reallocating between read and write. 376 * reallocating between read and write.
377 */ 377 */
378static void __init 378static void __init
379size_dram(emu8000_t *emu) 379size_dram(struct snd_emu8000 *emu)
380{ 380{
381 int i, size; 381 int i, size;
382 382
@@ -455,7 +455,7 @@ size_dram(emu8000_t *emu)
455 * and therefore lose 2 voices. 455 * and therefore lose 2 voices.
456 */ 456 */
457/*exported*/ void 457/*exported*/ void
458snd_emu8000_init_fm(emu8000_t *emu) 458snd_emu8000_init_fm(struct snd_emu8000 *emu)
459{ 459{
460 unsigned long flags; 460 unsigned long flags;
461 461
@@ -501,7 +501,7 @@ snd_emu8000_init_fm(emu8000_t *emu)
501 * The main initialization routine. 501 * The main initialization routine.
502 */ 502 */
503static void __init 503static void __init
504snd_emu8000_init_hw(emu8000_t *emu) 504snd_emu8000_init_hw(struct snd_emu8000 *emu)
505{ 505{
506 int i; 506 int i;
507 507
@@ -585,7 +585,7 @@ static unsigned short treble_parm[12][9] = {
585 * set Emu8000 digital equalizer; from 0 to 11 [-12dB - 12dB] 585 * set Emu8000 digital equalizer; from 0 to 11 [-12dB - 12dB]
586 */ 586 */
587/*exported*/ void 587/*exported*/ void
588snd_emu8000_update_equalizer(emu8000_t *emu) 588snd_emu8000_update_equalizer(struct snd_emu8000 *emu)
589{ 589{
590 unsigned short w; 590 unsigned short w;
591 int bass = emu->bass_level; 591 int bass = emu->bass_level;
@@ -628,17 +628,17 @@ snd_emu8000_update_equalizer(emu8000_t *emu)
628/* user can define chorus modes up to 32 */ 628/* user can define chorus modes up to 32 */
629#define SNDRV_EMU8000_CHORUS_NUMBERS 32 629#define SNDRV_EMU8000_CHORUS_NUMBERS 32
630 630
631typedef struct soundfont_chorus_fx_t { 631struct soundfont_chorus_fx {
632 unsigned short feedback; /* feedback level (0xE600-0xE6FF) */ 632 unsigned short feedback; /* feedback level (0xE600-0xE6FF) */
633 unsigned short delay_offset; /* delay (0-0x0DA3) [1/44100 sec] */ 633 unsigned short delay_offset; /* delay (0-0x0DA3) [1/44100 sec] */
634 unsigned short lfo_depth; /* LFO depth (0xBC00-0xBCFF) */ 634 unsigned short lfo_depth; /* LFO depth (0xBC00-0xBCFF) */
635 unsigned int delay; /* right delay (0-0xFFFFFFFF) [1/256/44100 sec] */ 635 unsigned int delay; /* right delay (0-0xFFFFFFFF) [1/256/44100 sec] */
636 unsigned int lfo_freq; /* LFO freq LFO freq (0-0xFFFFFFFF) */ 636 unsigned int lfo_freq; /* LFO freq LFO freq (0-0xFFFFFFFF) */
637} soundfont_chorus_fx_t; 637};
638 638
639/* 5 parameters for each chorus mode; 3 x 16bit, 2 x 32bit */ 639/* 5 parameters for each chorus mode; 3 x 16bit, 2 x 32bit */
640static char chorus_defined[SNDRV_EMU8000_CHORUS_NUMBERS]; 640static char chorus_defined[SNDRV_EMU8000_CHORUS_NUMBERS];
641static soundfont_chorus_fx_t chorus_parm[SNDRV_EMU8000_CHORUS_NUMBERS] = { 641static struct soundfont_chorus_fx chorus_parm[SNDRV_EMU8000_CHORUS_NUMBERS] = {
642 {0xE600, 0x03F6, 0xBC2C ,0x00000000, 0x0000006D}, /* chorus 1 */ 642 {0xE600, 0x03F6, 0xBC2C ,0x00000000, 0x0000006D}, /* chorus 1 */
643 {0xE608, 0x031A, 0xBC6E, 0x00000000, 0x0000017C}, /* chorus 2 */ 643 {0xE608, 0x031A, 0xBC6E, 0x00000000, 0x0000017C}, /* chorus 2 */
644 {0xE610, 0x031A, 0xBC84, 0x00000000, 0x00000083}, /* chorus 3 */ 644 {0xE610, 0x031A, 0xBC84, 0x00000000, 0x00000083}, /* chorus 3 */
@@ -650,9 +650,9 @@ static soundfont_chorus_fx_t chorus_parm[SNDRV_EMU8000_CHORUS_NUMBERS] = {
650}; 650};
651 651
652/*exported*/ int 652/*exported*/ int
653snd_emu8000_load_chorus_fx(emu8000_t *emu, int mode, const void __user *buf, long len) 653snd_emu8000_load_chorus_fx(struct snd_emu8000 *emu, int mode, const void __user *buf, long len)
654{ 654{
655 soundfont_chorus_fx_t rec; 655 struct soundfont_chorus_fx rec;
656 if (mode < SNDRV_EMU8000_CHORUS_PREDEFINED || mode >= SNDRV_EMU8000_CHORUS_NUMBERS) { 656 if (mode < SNDRV_EMU8000_CHORUS_PREDEFINED || mode >= SNDRV_EMU8000_CHORUS_NUMBERS) {
657 snd_printk(KERN_WARNING "invalid chorus mode %d for uploading\n", mode); 657 snd_printk(KERN_WARNING "invalid chorus mode %d for uploading\n", mode);
658 return -EINVAL; 658 return -EINVAL;
@@ -665,7 +665,7 @@ snd_emu8000_load_chorus_fx(emu8000_t *emu, int mode, const void __user *buf, lon
665} 665}
666 666
667/*exported*/ void 667/*exported*/ void
668snd_emu8000_update_chorus_mode(emu8000_t *emu) 668snd_emu8000_update_chorus_mode(struct snd_emu8000 *emu)
669{ 669{
670 int effect = emu->chorus_mode; 670 int effect = emu->chorus_mode;
671 if (effect < 0 || effect >= SNDRV_EMU8000_CHORUS_NUMBERS || 671 if (effect < 0 || effect >= SNDRV_EMU8000_CHORUS_NUMBERS ||
@@ -699,15 +699,15 @@ snd_emu8000_update_chorus_mode(emu8000_t *emu)
699/* user can define reverb modes up to 32 */ 699/* user can define reverb modes up to 32 */
700#define SNDRV_EMU8000_REVERB_NUMBERS 32 700#define SNDRV_EMU8000_REVERB_NUMBERS 32
701 701
702typedef struct soundfont_reverb_fx_t { 702struct soundfont_reverb_fx {
703 unsigned short parms[28]; 703 unsigned short parms[28];
704} soundfont_reverb_fx_t; 704};
705 705
706/* reverb mode settings; write the following 28 data of 16 bit length 706/* reverb mode settings; write the following 28 data of 16 bit length
707 * on the corresponding ports in the reverb_cmds array 707 * on the corresponding ports in the reverb_cmds array
708 */ 708 */
709static char reverb_defined[SNDRV_EMU8000_CHORUS_NUMBERS]; 709static char reverb_defined[SNDRV_EMU8000_CHORUS_NUMBERS];
710static soundfont_reverb_fx_t reverb_parm[SNDRV_EMU8000_REVERB_NUMBERS] = { 710static struct soundfont_reverb_fx reverb_parm[SNDRV_EMU8000_REVERB_NUMBERS] = {
711{{ /* room 1 */ 711{{ /* room 1 */
712 0xB488, 0xA450, 0x9550, 0x84B5, 0x383A, 0x3EB5, 0x72F4, 712 0xB488, 0xA450, 0x9550, 0x84B5, 0x383A, 0x3EB5, 0x72F4,
713 0x72A4, 0x7254, 0x7204, 0x7204, 0x7204, 0x4416, 0x4516, 713 0x72A4, 0x7254, 0x7204, 0x7204, 0x7204, 0x4416, 0x4516,
@@ -777,9 +777,9 @@ static struct reverb_cmd_pair {
777}; 777};
778 778
779/*exported*/ int 779/*exported*/ int
780snd_emu8000_load_reverb_fx(emu8000_t *emu, int mode, const void __user *buf, long len) 780snd_emu8000_load_reverb_fx(struct snd_emu8000 *emu, int mode, const void __user *buf, long len)
781{ 781{
782 soundfont_reverb_fx_t rec; 782 struct soundfont_reverb_fx rec;
783 783
784 if (mode < SNDRV_EMU8000_REVERB_PREDEFINED || mode >= SNDRV_EMU8000_REVERB_NUMBERS) { 784 if (mode < SNDRV_EMU8000_REVERB_PREDEFINED || mode >= SNDRV_EMU8000_REVERB_NUMBERS) {
785 snd_printk(KERN_WARNING "invalid reverb mode %d for uploading\n", mode); 785 snd_printk(KERN_WARNING "invalid reverb mode %d for uploading\n", mode);
@@ -793,7 +793,7 @@ snd_emu8000_load_reverb_fx(emu8000_t *emu, int mode, const void __user *buf, lon
793} 793}
794 794
795/*exported*/ void 795/*exported*/ void
796snd_emu8000_update_reverb_mode(emu8000_t *emu) 796snd_emu8000_update_reverb_mode(struct snd_emu8000 *emu)
797{ 797{
798 int effect = emu->reverb_mode; 798 int effect = emu->reverb_mode;
799 int i; 799 int i;
@@ -819,7 +819,7 @@ snd_emu8000_update_reverb_mode(emu8000_t *emu)
819/* 819/*
820 * bass/treble 820 * bass/treble
821 */ 821 */
822static int mixer_bass_treble_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 822static int mixer_bass_treble_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
823{ 823{
824 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 824 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
825 uinfo->count = 1; 825 uinfo->count = 1;
@@ -828,17 +828,17 @@ static int mixer_bass_treble_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
828 return 0; 828 return 0;
829} 829}
830 830
831static int mixer_bass_treble_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 831static int mixer_bass_treble_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
832{ 832{
833 emu8000_t *emu = snd_kcontrol_chip(kcontrol); 833 struct snd_emu8000 *emu = snd_kcontrol_chip(kcontrol);
834 834
835 ucontrol->value.integer.value[0] = kcontrol->private_value ? emu->treble_level : emu->bass_level; 835 ucontrol->value.integer.value[0] = kcontrol->private_value ? emu->treble_level : emu->bass_level;
836 return 0; 836 return 0;
837} 837}
838 838
839static int mixer_bass_treble_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 839static int mixer_bass_treble_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
840{ 840{
841 emu8000_t *emu = snd_kcontrol_chip(kcontrol); 841 struct snd_emu8000 *emu = snd_kcontrol_chip(kcontrol);
842 unsigned long flags; 842 unsigned long flags;
843 int change; 843 int change;
844 unsigned short val1; 844 unsigned short val1;
@@ -857,7 +857,7 @@ static int mixer_bass_treble_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
857 return change; 857 return change;
858} 858}
859 859
860static snd_kcontrol_new_t mixer_bass_control = 860static struct snd_kcontrol_new mixer_bass_control =
861{ 861{
862 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 862 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
863 .name = "Synth Tone Control - Bass", 863 .name = "Synth Tone Control - Bass",
@@ -867,7 +867,7 @@ static snd_kcontrol_new_t mixer_bass_control =
867 .private_value = 0, 867 .private_value = 0,
868}; 868};
869 869
870static snd_kcontrol_new_t mixer_treble_control = 870static struct snd_kcontrol_new mixer_treble_control =
871{ 871{
872 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 872 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
873 .name = "Synth Tone Control - Treble", 873 .name = "Synth Tone Control - Treble",
@@ -880,7 +880,7 @@ static snd_kcontrol_new_t mixer_treble_control =
880/* 880/*
881 * chorus/reverb mode 881 * chorus/reverb mode
882 */ 882 */
883static int mixer_chorus_reverb_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 883static int mixer_chorus_reverb_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
884{ 884{
885 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 885 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
886 uinfo->count = 1; 886 uinfo->count = 1;
@@ -889,17 +889,17 @@ static int mixer_chorus_reverb_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_
889 return 0; 889 return 0;
890} 890}
891 891
892static int mixer_chorus_reverb_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 892static int mixer_chorus_reverb_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
893{ 893{
894 emu8000_t *emu = snd_kcontrol_chip(kcontrol); 894 struct snd_emu8000 *emu = snd_kcontrol_chip(kcontrol);
895 895
896 ucontrol->value.integer.value[0] = kcontrol->private_value ? emu->chorus_mode : emu->reverb_mode; 896 ucontrol->value.integer.value[0] = kcontrol->private_value ? emu->chorus_mode : emu->reverb_mode;
897 return 0; 897 return 0;
898} 898}
899 899
900static int mixer_chorus_reverb_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 900static int mixer_chorus_reverb_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
901{ 901{
902 emu8000_t *emu = snd_kcontrol_chip(kcontrol); 902 struct snd_emu8000 *emu = snd_kcontrol_chip(kcontrol);
903 unsigned long flags; 903 unsigned long flags;
904 int change; 904 int change;
905 unsigned short val1; 905 unsigned short val1;
@@ -924,7 +924,7 @@ static int mixer_chorus_reverb_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value
924 return change; 924 return change;
925} 925}
926 926
927static snd_kcontrol_new_t mixer_chorus_mode_control = 927static struct snd_kcontrol_new mixer_chorus_mode_control =
928{ 928{
929 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 929 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
930 .name = "Chorus Mode", 930 .name = "Chorus Mode",
@@ -934,7 +934,7 @@ static snd_kcontrol_new_t mixer_chorus_mode_control =
934 .private_value = 1, 934 .private_value = 1,
935}; 935};
936 936
937static snd_kcontrol_new_t mixer_reverb_mode_control = 937static struct snd_kcontrol_new mixer_reverb_mode_control =
938{ 938{
939 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 939 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
940 .name = "Reverb Mode", 940 .name = "Reverb Mode",
@@ -947,7 +947,7 @@ static snd_kcontrol_new_t mixer_reverb_mode_control =
947/* 947/*
948 * FM OPL3 chorus/reverb depth 948 * FM OPL3 chorus/reverb depth
949 */ 949 */
950static int mixer_fm_depth_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 950static int mixer_fm_depth_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
951{ 951{
952 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 952 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
953 uinfo->count = 1; 953 uinfo->count = 1;
@@ -956,17 +956,17 @@ static int mixer_fm_depth_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * u
956 return 0; 956 return 0;
957} 957}
958 958
959static int mixer_fm_depth_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 959static int mixer_fm_depth_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
960{ 960{
961 emu8000_t *emu = snd_kcontrol_chip(kcontrol); 961 struct snd_emu8000 *emu = snd_kcontrol_chip(kcontrol);
962 962
963 ucontrol->value.integer.value[0] = kcontrol->private_value ? emu->fm_chorus_depth : emu->fm_reverb_depth; 963 ucontrol->value.integer.value[0] = kcontrol->private_value ? emu->fm_chorus_depth : emu->fm_reverb_depth;
964 return 0; 964 return 0;
965} 965}
966 966
967static int mixer_fm_depth_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 967static int mixer_fm_depth_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
968{ 968{
969 emu8000_t *emu = snd_kcontrol_chip(kcontrol); 969 struct snd_emu8000 *emu = snd_kcontrol_chip(kcontrol);
970 unsigned long flags; 970 unsigned long flags;
971 int change; 971 int change;
972 unsigned short val1; 972 unsigned short val1;
@@ -986,7 +986,7 @@ static int mixer_fm_depth_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
986 return change; 986 return change;
987} 987}
988 988
989static snd_kcontrol_new_t mixer_fm_chorus_depth_control = 989static struct snd_kcontrol_new mixer_fm_chorus_depth_control =
990{ 990{
991 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 991 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
992 .name = "FM Chorus Depth", 992 .name = "FM Chorus Depth",
@@ -996,7 +996,7 @@ static snd_kcontrol_new_t mixer_fm_chorus_depth_control =
996 .private_value = 1, 996 .private_value = 1,
997}; 997};
998 998
999static snd_kcontrol_new_t mixer_fm_reverb_depth_control = 999static struct snd_kcontrol_new mixer_fm_reverb_depth_control =
1000{ 1000{
1001 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1001 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1002 .name = "FM Reverb Depth", 1002 .name = "FM Reverb Depth",
@@ -1007,7 +1007,7 @@ static snd_kcontrol_new_t mixer_fm_reverb_depth_control =
1007}; 1007};
1008 1008
1009 1009
1010static snd_kcontrol_new_t *mixer_defs[EMU8000_NUM_CONTROLS] = { 1010static struct snd_kcontrol_new *mixer_defs[EMU8000_NUM_CONTROLS] = {
1011 &mixer_bass_control, 1011 &mixer_bass_control,
1012 &mixer_treble_control, 1012 &mixer_treble_control,
1013 &mixer_chorus_mode_control, 1013 &mixer_chorus_mode_control,
@@ -1020,7 +1020,7 @@ static snd_kcontrol_new_t *mixer_defs[EMU8000_NUM_CONTROLS] = {
1020 * create and attach mixer elements for WaveTable treble/bass controls 1020 * create and attach mixer elements for WaveTable treble/bass controls
1021 */ 1021 */
1022static int __init 1022static int __init
1023snd_emu8000_create_mixer(snd_card_t *card, emu8000_t *emu) 1023snd_emu8000_create_mixer(struct snd_card *card, struct snd_emu8000 *emu)
1024{ 1024{
1025 int i, err = 0; 1025 int i, err = 0;
1026 1026
@@ -1049,7 +1049,7 @@ __error:
1049/* 1049/*
1050 * free resources 1050 * free resources
1051 */ 1051 */
1052static int snd_emu8000_free(emu8000_t *hw) 1052static int snd_emu8000_free(struct snd_emu8000 *hw)
1053{ 1053{
1054 release_and_free_resource(hw->res_port1); 1054 release_and_free_resource(hw->res_port1);
1055 release_and_free_resource(hw->res_port2); 1055 release_and_free_resource(hw->res_port2);
@@ -1060,9 +1060,9 @@ static int snd_emu8000_free(emu8000_t *hw)
1060 1060
1061/* 1061/*
1062 */ 1062 */
1063static int snd_emu8000_dev_free(snd_device_t *device) 1063static int snd_emu8000_dev_free(struct snd_device *device)
1064{ 1064{
1065 emu8000_t *hw = device->device_data; 1065 struct snd_emu8000 *hw = device->device_data;
1066 return snd_emu8000_free(hw); 1066 return snd_emu8000_free(hw);
1067} 1067}
1068 1068
@@ -1070,12 +1070,13 @@ static int snd_emu8000_dev_free(snd_device_t *device)
1070 * initialize and register emu8000 synth device. 1070 * initialize and register emu8000 synth device.
1071 */ 1071 */
1072int __init 1072int __init
1073snd_emu8000_new(snd_card_t *card, int index, long port, int seq_ports, snd_seq_device_t **awe_ret) 1073snd_emu8000_new(struct snd_card *card, int index, long port, int seq_ports,
1074 struct snd_seq_device **awe_ret)
1074{ 1075{
1075 snd_seq_device_t *awe; 1076 struct snd_seq_device *awe;
1076 emu8000_t *hw; 1077 struct snd_emu8000 *hw;
1077 int err; 1078 int err;
1078 static snd_device_ops_t ops = { 1079 static struct snd_device_ops ops = {
1079 .dev_free = snd_emu8000_dev_free, 1080 .dev_free = snd_emu8000_dev_free,
1080 }; 1081 };
1081 1082
@@ -1127,9 +1128,9 @@ snd_emu8000_new(snd_card_t *card, int index, long port, int seq_ports, snd_seq_d
1127 } 1128 }
1128#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE)) 1129#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
1129 if (snd_seq_device_new(card, index, SNDRV_SEQ_DEV_ID_EMU8000, 1130 if (snd_seq_device_new(card, index, SNDRV_SEQ_DEV_ID_EMU8000,
1130 sizeof(emu8000_t*), &awe) >= 0) { 1131 sizeof(struct snd_emu8000*), &awe) >= 0) {
1131 strcpy(awe->name, "EMU-8000"); 1132 strcpy(awe->name, "EMU-8000");
1132 *(emu8000_t**)SNDRV_SEQ_DEVICE_ARGPTR(awe) = hw; 1133 *(struct snd_emu8000 **)SNDRV_SEQ_DEVICE_ARGPTR(awe) = hw;
1133 } 1134 }
1134#else 1135#else
1135 awe = NULL; 1136 awe = NULL;
diff --git a/sound/isa/sb/emu8000_callback.c b/sound/isa/sb/emu8000_callback.c
index 1cc4101a17a4..9a3c71cc2e07 100644
--- a/sound/isa/sb/emu8000_callback.c
+++ b/sound/isa/sb/emu8000_callback.c
@@ -25,27 +25,30 @@
25/* 25/*
26 * prototypes 26 * prototypes
27 */ 27 */
28static snd_emux_voice_t *get_voice(snd_emux_t *emu, snd_emux_port_t *port); 28static struct snd_emux_voice *get_voice(struct snd_emux *emu,
29static int start_voice(snd_emux_voice_t *vp); 29 struct snd_emux_port *port);
30static void trigger_voice(snd_emux_voice_t *vp); 30static int start_voice(struct snd_emux_voice *vp);
31static void release_voice(snd_emux_voice_t *vp); 31static void trigger_voice(struct snd_emux_voice *vp);
32static void update_voice(snd_emux_voice_t *vp, int update); 32static void release_voice(struct snd_emux_voice *vp);
33static void reset_voice(snd_emux_t *emu, int ch); 33static void update_voice(struct snd_emux_voice *vp, int update);
34static void terminate_voice(snd_emux_voice_t *vp); 34static void reset_voice(struct snd_emux *emu, int ch);
35static void sysex(snd_emux_t *emu, char *buf, int len, int parsed, snd_midi_channel_set_t *chset); 35static void terminate_voice(struct snd_emux_voice *vp);
36static void sysex(struct snd_emux *emu, char *buf, int len, int parsed,
37 struct snd_midi_channel_set *chset);
36#ifdef CONFIG_SND_SEQUENCER_OSS 38#ifdef CONFIG_SND_SEQUENCER_OSS
37static int oss_ioctl(snd_emux_t *emu, int cmd, int p1, int p2); 39static int oss_ioctl(struct snd_emux *emu, int cmd, int p1, int p2);
38#endif 40#endif
39static int load_fx(snd_emux_t *emu, int type, int mode, const void __user *buf, long len); 41static int load_fx(struct snd_emux *emu, int type, int mode,
40 42 const void __user *buf, long len);
41static void set_pitch(emu8000_t *hw, snd_emux_voice_t *vp); 43
42static void set_volume(emu8000_t *hw, snd_emux_voice_t *vp); 44static void set_pitch(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
43static void set_pan(emu8000_t *hw, snd_emux_voice_t *vp); 45static void set_volume(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
44static void set_fmmod(emu8000_t *hw, snd_emux_voice_t *vp); 46static void set_pan(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
45static void set_tremfreq(emu8000_t *hw, snd_emux_voice_t *vp); 47static void set_fmmod(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
46static void set_fm2frq2(emu8000_t *hw, snd_emux_voice_t *vp); 48static void set_tremfreq(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
47static void set_filterQ(emu8000_t *hw, snd_emux_voice_t *vp); 49static void set_fm2frq2(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
48static void snd_emu8000_tweak_voice(emu8000_t *emu, int ch); 50static void set_filterQ(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
51static void snd_emu8000_tweak_voice(struct snd_emu8000 *emu, int ch);
49 52
50/* 53/*
51 * Ensure a value is between two points 54 * Ensure a value is between two points
@@ -58,7 +61,7 @@ static void snd_emu8000_tweak_voice(emu8000_t *emu, int ch);
58/* 61/*
59 * set up operators 62 * set up operators
60 */ 63 */
61static snd_emux_operators_t emu8000_ops = { 64static struct snd_emux_operators emu8000_ops = {
62 .owner = THIS_MODULE, 65 .owner = THIS_MODULE,
63 .get_voice = get_voice, 66 .get_voice = get_voice,
64 .prepare = start_voice, 67 .prepare = start_voice,
@@ -78,7 +81,7 @@ static snd_emux_operators_t emu8000_ops = {
78}; 81};
79 82
80void 83void
81snd_emu8000_ops_setup(emu8000_t *hw) 84snd_emu8000_ops_setup(struct snd_emu8000 *hw)
82{ 85{
83 hw->emu->ops = emu8000_ops; 86 hw->emu->ops = emu8000_ops;
84} 87}
@@ -89,10 +92,10 @@ snd_emu8000_ops_setup(emu8000_t *hw)
89 * Terminate a voice 92 * Terminate a voice
90 */ 93 */
91static void 94static void
92release_voice(snd_emux_voice_t *vp) 95release_voice(struct snd_emux_voice *vp)
93{ 96{
94 int dcysusv; 97 int dcysusv;
95 emu8000_t *hw; 98 struct snd_emu8000 *hw;
96 99
97 hw = vp->hw; 100 hw = vp->hw;
98 dcysusv = 0x8000 | (unsigned char)vp->reg.parm.modrelease; 101 dcysusv = 0x8000 | (unsigned char)vp->reg.parm.modrelease;
@@ -105,9 +108,9 @@ release_voice(snd_emux_voice_t *vp)
105/* 108/*
106 */ 109 */
107static void 110static void
108terminate_voice(snd_emux_voice_t *vp) 111terminate_voice(struct snd_emux_voice *vp)
109{ 112{
110 emu8000_t *hw; 113 struct snd_emu8000 *hw;
111 114
112 hw = vp->hw; 115 hw = vp->hw;
113 EMU8000_DCYSUSV_WRITE(hw, vp->ch, 0x807F); 116 EMU8000_DCYSUSV_WRITE(hw, vp->ch, 0x807F);
@@ -117,9 +120,9 @@ terminate_voice(snd_emux_voice_t *vp)
117/* 120/*
118 */ 121 */
119static void 122static void
120update_voice(snd_emux_voice_t *vp, int update) 123update_voice(struct snd_emux_voice *vp, int update)
121{ 124{
122 emu8000_t *hw; 125 struct snd_emu8000 *hw;
123 126
124 hw = vp->hw; 127 hw = vp->hw;
125 if (update & SNDRV_EMUX_UPDATE_VOLUME) 128 if (update & SNDRV_EMUX_UPDATE_VOLUME)
@@ -149,12 +152,12 @@ update_voice(snd_emux_voice_t *vp, int update)
149 * The channel index (vp->ch) must be initialized in this routine. 152 * The channel index (vp->ch) must be initialized in this routine.
150 * In Emu8k, it is identical with the array index. 153 * In Emu8k, it is identical with the array index.
151 */ 154 */
152static snd_emux_voice_t * 155static struct snd_emux_voice *
153get_voice(snd_emux_t *emu, snd_emux_port_t *port) 156get_voice(struct snd_emux *emu, struct snd_emux_port *port)
154{ 157{
155 int i; 158 int i;
156 snd_emux_voice_t *vp; 159 struct snd_emux_voice *vp;
157 emu8000_t *hw; 160 struct snd_emu8000 *hw;
158 161
159 /* what we are looking for, in order of preference */ 162 /* what we are looking for, in order of preference */
160 enum { 163 enum {
@@ -227,13 +230,13 @@ get_voice(snd_emux_t *emu, snd_emux_port_t *port)
227/* 230/*
228 */ 231 */
229static int 232static int
230start_voice(snd_emux_voice_t *vp) 233start_voice(struct snd_emux_voice *vp)
231{ 234{
232 unsigned int temp; 235 unsigned int temp;
233 int ch; 236 int ch;
234 int addr; 237 int addr;
235 snd_midi_channel_t *chan; 238 struct snd_midi_channel *chan;
236 emu8000_t *hw; 239 struct snd_emu8000 *hw;
237 240
238 hw = vp->hw; 241 hw = vp->hw;
239 ch = vp->ch; 242 ch = vp->ch;
@@ -307,11 +310,11 @@ start_voice(snd_emux_voice_t *vp)
307 * Start envelope 310 * Start envelope
308 */ 311 */
309static void 312static void
310trigger_voice(snd_emux_voice_t *vp) 313trigger_voice(struct snd_emux_voice *vp)
311{ 314{
312 int ch = vp->ch; 315 int ch = vp->ch;
313 unsigned int temp; 316 unsigned int temp;
314 emu8000_t *hw; 317 struct snd_emu8000 *hw;
315 318
316 hw = vp->hw; 319 hw = vp->hw;
317 320
@@ -329,9 +332,9 @@ trigger_voice(snd_emux_voice_t *vp)
329 * reset voice parameters 332 * reset voice parameters
330 */ 333 */
331static void 334static void
332reset_voice(snd_emux_t *emu, int ch) 335reset_voice(struct snd_emux *emu, int ch)
333{ 336{
334 emu8000_t *hw; 337 struct snd_emu8000 *hw;
335 338
336 hw = emu->hw; 339 hw = emu->hw;
337 EMU8000_DCYSUSV_WRITE(hw, ch, 0x807F); 340 EMU8000_DCYSUSV_WRITE(hw, ch, 0x807F);
@@ -342,7 +345,7 @@ reset_voice(snd_emux_t *emu, int ch)
342 * Set the pitch of a possibly playing note. 345 * Set the pitch of a possibly playing note.
343 */ 346 */
344static void 347static void
345set_pitch(emu8000_t *hw, snd_emux_voice_t *vp) 348set_pitch(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
346{ 349{
347 EMU8000_IP_WRITE(hw, vp->ch, vp->apitch); 350 EMU8000_IP_WRITE(hw, vp->ch, vp->apitch);
348} 351}
@@ -351,7 +354,7 @@ set_pitch(emu8000_t *hw, snd_emux_voice_t *vp)
351 * Set the volume of a possibly already playing note 354 * Set the volume of a possibly already playing note
352 */ 355 */
353static void 356static void
354set_volume(emu8000_t *hw, snd_emux_voice_t *vp) 357set_volume(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
355{ 358{
356 int ifatn; 359 int ifatn;
357 360
@@ -365,7 +368,7 @@ set_volume(emu8000_t *hw, snd_emux_voice_t *vp)
365 * Set pan and loop start address. 368 * Set pan and loop start address.
366 */ 369 */
367static void 370static void
368set_pan(emu8000_t *hw, snd_emux_voice_t *vp) 371set_pan(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
369{ 372{
370 unsigned int temp; 373 unsigned int temp;
371 374
@@ -376,7 +379,7 @@ set_pan(emu8000_t *hw, snd_emux_voice_t *vp)
376#define MOD_SENSE 18 379#define MOD_SENSE 18
377 380
378static void 381static void
379set_fmmod(emu8000_t *hw, snd_emux_voice_t *vp) 382set_fmmod(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
380{ 383{
381 unsigned short fmmod; 384 unsigned short fmmod;
382 short pitch; 385 short pitch;
@@ -394,14 +397,14 @@ set_fmmod(emu8000_t *hw, snd_emux_voice_t *vp)
394 397
395/* set tremolo (lfo1) volume & frequency */ 398/* set tremolo (lfo1) volume & frequency */
396static void 399static void
397set_tremfreq(emu8000_t *hw, snd_emux_voice_t *vp) 400set_tremfreq(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
398{ 401{
399 EMU8000_TREMFRQ_WRITE(hw, vp->ch, vp->reg.parm.tremfrq); 402 EMU8000_TREMFRQ_WRITE(hw, vp->ch, vp->reg.parm.tremfrq);
400} 403}
401 404
402/* set lfo2 pitch & frequency */ 405/* set lfo2 pitch & frequency */
403static void 406static void
404set_fm2frq2(emu8000_t *hw, snd_emux_voice_t *vp) 407set_fm2frq2(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
405{ 408{
406 unsigned short fm2frq2; 409 unsigned short fm2frq2;
407 short pitch; 410 short pitch;
@@ -419,7 +422,7 @@ set_fm2frq2(emu8000_t *hw, snd_emux_voice_t *vp)
419 422
420/* set filterQ */ 423/* set filterQ */
421static void 424static void
422set_filterQ(emu8000_t *hw, snd_emux_voice_t *vp) 425set_filterQ(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
423{ 426{
424 unsigned int addr; 427 unsigned int addr;
425 addr = EMU8000_CCCA_READ(hw, vp->ch) & 0xffffff; 428 addr = EMU8000_CCCA_READ(hw, vp->ch) & 0xffffff;
@@ -431,7 +434,7 @@ set_filterQ(emu8000_t *hw, snd_emux_voice_t *vp)
431 * set the envelope & LFO parameters to the default values 434 * set the envelope & LFO parameters to the default values
432 */ 435 */
433static void 436static void
434snd_emu8000_tweak_voice(emu8000_t *emu, int i) 437snd_emu8000_tweak_voice(struct snd_emu8000 *emu, int i)
435{ 438{
436 /* set all mod/vol envelope shape to minimum */ 439 /* set all mod/vol envelope shape to minimum */
437 EMU8000_ENVVOL_WRITE(emu, i, 0x8000); 440 EMU8000_ENVVOL_WRITE(emu, i, 0x8000);
@@ -453,9 +456,9 @@ snd_emu8000_tweak_voice(emu8000_t *emu, int i)
453 * sysex callback 456 * sysex callback
454 */ 457 */
455static void 458static void
456sysex(snd_emux_t *emu, char *buf, int len, int parsed, snd_midi_channel_set_t *chset) 459sysex(struct snd_emux *emu, char *buf, int len, int parsed, struct snd_midi_channel_set *chset)
457{ 460{
458 emu8000_t *hw; 461 struct snd_emu8000 *hw;
459 462
460 hw = emu->hw; 463 hw = emu->hw;
461 464
@@ -478,9 +481,9 @@ sysex(snd_emux_t *emu, char *buf, int len, int parsed, snd_midi_channel_set_t *c
478 * OSS ioctl callback 481 * OSS ioctl callback
479 */ 482 */
480static int 483static int
481oss_ioctl(snd_emux_t *emu, int cmd, int p1, int p2) 484oss_ioctl(struct snd_emux *emu, int cmd, int p1, int p2)
482{ 485{
483 emu8000_t *hw; 486 struct snd_emu8000 *hw;
484 487
485 hw = emu->hw; 488 hw = emu->hw;
486 489
@@ -523,9 +526,9 @@ oss_ioctl(snd_emux_t *emu, int cmd, int p1, int p2)
523 */ 526 */
524 527
525static int 528static int
526load_fx(snd_emux_t *emu, int type, int mode, const void __user *buf, long len) 529load_fx(struct snd_emux *emu, int type, int mode, const void __user *buf, long len)
527{ 530{
528 emu8000_t *hw; 531 struct snd_emu8000 *hw;
529 hw = emu->hw; 532 hw = emu->hw;
530 533
531 /* skip header */ 534 /* skip header */
diff --git a/sound/isa/sb/emu8000_local.h b/sound/isa/sb/emu8000_local.h
index ea4996a895fc..2ac77f10bb4e 100644
--- a/sound/isa/sb/emu8000_local.h
+++ b/sound/isa/sb/emu8000_local.h
@@ -30,14 +30,17 @@
30#include <sound/emu8000_reg.h> 30#include <sound/emu8000_reg.h>
31 31
32/* emu8000_patch.c */ 32/* emu8000_patch.c */
33int snd_emu8000_sample_new(snd_emux_t *rec, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr, const void __user *data, long count); 33int snd_emu8000_sample_new(struct snd_emux *rec, struct snd_sf_sample *sp,
34int snd_emu8000_sample_free(snd_emux_t *rec, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr); 34 struct snd_util_memhdr *hdr,
35void snd_emu8000_sample_reset(snd_emux_t *rec); 35 const void __user *data, long count);
36int snd_emu8000_sample_free(struct snd_emux *rec, struct snd_sf_sample *sp,
37 struct snd_util_memhdr *hdr);
38void snd_emu8000_sample_reset(struct snd_emux *rec);
36 39
37/* emu8000_callback.c */ 40/* emu8000_callback.c */
38void snd_emu8000_ops_setup(emu8000_t *emu); 41void snd_emu8000_ops_setup(struct snd_emu8000 *emu);
39 42
40/* emu8000_pcm.c */ 43/* emu8000_pcm.c */
41int snd_emu8000_pcm_new(snd_card_t *card, emu8000_t *emu, int index); 44int snd_emu8000_pcm_new(struct snd_card *card, struct snd_emu8000 *emu, int index);
42 45
43#endif /* __EMU8000_LOCAL_H */ 46#endif /* __EMU8000_LOCAL_H */
diff --git a/sound/isa/sb/emu8000_patch.c b/sound/isa/sb/emu8000_patch.c
index 2fea67e71c78..80b1cf84a1ae 100644
--- a/sound/isa/sb/emu8000_patch.c
+++ b/sound/isa/sb/emu8000_patch.c
@@ -32,7 +32,7 @@ MODULE_PARM_DESC(emu8000_reset_addr, "reset write address at each time (makes sl
32 * Open up channels. 32 * Open up channels.
33 */ 33 */
34static int 34static int
35snd_emu8000_open_dma(emu8000_t *emu, int write) 35snd_emu8000_open_dma(struct snd_emu8000 *emu, int write)
36{ 36{
37 int i; 37 int i;
38 38
@@ -59,7 +59,7 @@ snd_emu8000_open_dma(emu8000_t *emu, int write)
59 * Close all dram channels. 59 * Close all dram channels.
60 */ 60 */
61static void 61static void
62snd_emu8000_close_dma(emu8000_t *emu) 62snd_emu8000_close_dma(struct snd_emu8000 *emu)
63{ 63{
64 int i; 64 int i;
65 65
@@ -106,7 +106,7 @@ read_word(const void __user *buf, int offset, int mode)
106/* 106/*
107 */ 107 */
108static void 108static void
109snd_emu8000_write_wait(emu8000_t *emu) 109snd_emu8000_write_wait(struct snd_emu8000 *emu)
110{ 110{
111 while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) { 111 while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) {
112 schedule_timeout_interruptible(1); 112 schedule_timeout_interruptible(1);
@@ -128,7 +128,7 @@ snd_emu8000_write_wait(emu8000_t *emu)
128 * working. 128 * working.
129 */ 129 */
130static inline void 130static inline void
131write_word(emu8000_t *emu, int *offset, unsigned short data) 131write_word(struct snd_emu8000 *emu, int *offset, unsigned short data)
132{ 132{
133 if (emu8000_reset_addr) { 133 if (emu8000_reset_addr) {
134 if (emu8000_reset_addr > 1) 134 if (emu8000_reset_addr > 1)
@@ -144,15 +144,16 @@ write_word(emu8000_t *emu, int *offset, unsigned short data)
144 * the generic soundfont routines as a callback. 144 * the generic soundfont routines as a callback.
145 */ 145 */
146int 146int
147snd_emu8000_sample_new(snd_emux_t *rec, snd_sf_sample_t *sp, 147snd_emu8000_sample_new(struct snd_emux *rec, struct snd_sf_sample *sp,
148 snd_util_memhdr_t *hdr, const void __user *data, long count) 148 struct snd_util_memhdr *hdr,
149 const void __user *data, long count)
149{ 150{
150 int i; 151 int i;
151 int rc; 152 int rc;
152 int offset; 153 int offset;
153 int truesize; 154 int truesize;
154 int dram_offset, dram_start; 155 int dram_offset, dram_start;
155 emu8000_t *emu; 156 struct snd_emu8000 *emu;
156 157
157 emu = rec->hw; 158 emu = rec->hw;
158 snd_assert(sp != NULL, return -EINVAL); 159 snd_assert(sp != NULL, return -EINVAL);
@@ -282,7 +283,8 @@ snd_emu8000_sample_new(snd_emux_t *rec, snd_sf_sample_t *sp,
282 * free a sample block 283 * free a sample block
283 */ 284 */
284int 285int
285snd_emu8000_sample_free(snd_emux_t *rec, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr) 286snd_emu8000_sample_free(struct snd_emux *rec, struct snd_sf_sample *sp,
287 struct snd_util_memhdr *hdr)
286{ 288{
287 if (sp->block) { 289 if (sp->block) {
288 snd_util_mem_free(hdr, sp->block); 290 snd_util_mem_free(hdr, sp->block);
@@ -296,7 +298,7 @@ snd_emu8000_sample_free(snd_emux_t *rec, snd_sf_sample_t *sp, snd_util_memhdr_t
296 * sample_reset callback - terminate voices 298 * sample_reset callback - terminate voices
297 */ 299 */
298void 300void
299snd_emu8000_sample_reset(snd_emux_t *rec) 301snd_emu8000_sample_reset(struct snd_emux *rec)
300{ 302{
301 snd_emux_terminate_all(rec); 303 snd_emux_terminate_all(rec);
302} 304}
diff --git a/sound/isa/sb/emu8000_pcm.c b/sound/isa/sb/emu8000_pcm.c
index b323beeeda15..91dc3d83e2cf 100644
--- a/sound/isa/sb/emu8000_pcm.c
+++ b/sound/isa/sb/emu8000_pcm.c
@@ -46,14 +46,12 @@
46 */ 46 */
47 47
48 48
49typedef struct snd_emu8k_pcm emu8k_pcm_t;
50
51struct snd_emu8k_pcm { 49struct snd_emu8k_pcm {
52 emu8000_t *emu; 50 struct snd_emu8000 *emu;
53 snd_pcm_substream_t *substream; 51 struct snd_pcm_substream *substream;
54 52
55 unsigned int allocated_bytes; 53 unsigned int allocated_bytes;
56 snd_util_memblk_t *block; 54 struct snd_util_memblk *block;
57 unsigned int offset; 55 unsigned int offset;
58 unsigned int buf_size; 56 unsigned int buf_size;
59 unsigned int period_size; 57 unsigned int period_size;
@@ -77,7 +75,7 @@ struct snd_emu8k_pcm {
77 * open up channels for the simultaneous data transfer and playback 75 * open up channels for the simultaneous data transfer and playback
78 */ 76 */
79static int 77static int
80emu8k_open_dram_for_pcm(emu8000_t *emu, int channels) 78emu8k_open_dram_for_pcm(struct snd_emu8000 *emu, int channels)
81{ 79{
82 int i; 80 int i;
83 81
@@ -113,7 +111,7 @@ emu8k_open_dram_for_pcm(emu8000_t *emu, int channels)
113/* 111/*
114 */ 112 */
115static void 113static void
116snd_emu8000_write_wait(emu8000_t *emu, int can_schedule) 114snd_emu8000_write_wait(struct snd_emu8000 *emu, int can_schedule)
117{ 115{
118 while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) { 116 while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) {
119 if (can_schedule) { 117 if (can_schedule) {
@@ -128,7 +126,7 @@ snd_emu8000_write_wait(emu8000_t *emu, int can_schedule)
128 * close all channels 126 * close all channels
129 */ 127 */
130static void 128static void
131emu8k_close_dram(emu8000_t *emu) 129emu8k_close_dram(struct snd_emu8000 *emu)
132{ 130{
133 int i; 131 int i;
134 132
@@ -156,7 +154,7 @@ static int calc_rate_offset(int hz)
156/* 154/*
157 */ 155 */
158 156
159static snd_pcm_hardware_t emu8k_pcm_hw = { 157static struct snd_pcm_hardware emu8k_pcm_hw = {
160#ifdef USE_NONINTERLEAVE 158#ifdef USE_NONINTERLEAVE
161 .info = SNDRV_PCM_INFO_NONINTERLEAVED, 159 .info = SNDRV_PCM_INFO_NONINTERLEAVED,
162#else 160#else
@@ -180,7 +178,7 @@ static snd_pcm_hardware_t emu8k_pcm_hw = {
180/* 178/*
181 * get the current position at the given channel from CCCA register 179 * get the current position at the given channel from CCCA register
182 */ 180 */
183static inline int emu8k_get_curpos(emu8k_pcm_t *rec, int ch) 181static inline int emu8k_get_curpos(struct snd_emu8k_pcm *rec, int ch)
184{ 182{
185 int val = EMU8000_CCCA_READ(rec->emu, ch) & 0xfffffff; 183 int val = EMU8000_CCCA_READ(rec->emu, ch) & 0xfffffff;
186 val -= rec->loop_start[ch] - 1; 184 val -= rec->loop_start[ch] - 1;
@@ -194,7 +192,7 @@ static inline int emu8k_get_curpos(emu8k_pcm_t *rec, int ch)
194 */ 192 */
195static void emu8k_pcm_timer_func(unsigned long data) 193static void emu8k_pcm_timer_func(unsigned long data)
196{ 194{
197 emu8k_pcm_t *rec = (emu8k_pcm_t *)data; 195 struct snd_emu8k_pcm *rec = (struct snd_emu8k_pcm *)data;
198 int ptr, delta; 196 int ptr, delta;
199 197
200 spin_lock(&rec->timer_lock); 198 spin_lock(&rec->timer_lock);
@@ -226,11 +224,11 @@ static void emu8k_pcm_timer_func(unsigned long data)
226 * open pcm 224 * open pcm
227 * creating an instance here 225 * creating an instance here
228 */ 226 */
229static int emu8k_pcm_open(snd_pcm_substream_t *subs) 227static int emu8k_pcm_open(struct snd_pcm_substream *subs)
230{ 228{
231 emu8000_t *emu = snd_pcm_substream_chip(subs); 229 struct snd_emu8000 *emu = snd_pcm_substream_chip(subs);
232 emu8k_pcm_t *rec; 230 struct snd_emu8k_pcm *rec;
233 snd_pcm_runtime_t *runtime = subs->runtime; 231 struct snd_pcm_runtime *runtime = subs->runtime;
234 232
235 rec = kzalloc(sizeof(*rec), GFP_KERNEL); 233 rec = kzalloc(sizeof(*rec), GFP_KERNEL);
236 if (! rec) 234 if (! rec)
@@ -256,9 +254,9 @@ static int emu8k_pcm_open(snd_pcm_substream_t *subs)
256 return 0; 254 return 0;
257} 255}
258 256
259static int emu8k_pcm_close(snd_pcm_substream_t *subs) 257static int emu8k_pcm_close(struct snd_pcm_substream *subs)
260{ 258{
261 emu8k_pcm_t *rec = subs->runtime->private_data; 259 struct snd_emu8k_pcm *rec = subs->runtime->private_data;
262 kfree(rec); 260 kfree(rec);
263 subs->runtime->private_data = NULL; 261 subs->runtime->private_data = NULL;
264 return 0; 262 return 0;
@@ -281,9 +279,9 @@ static int calc_pitch_target(int pitch)
281/* 279/*
282 * set up the voice 280 * set up the voice
283 */ 281 */
284static void setup_voice(emu8k_pcm_t *rec, int ch) 282static void setup_voice(struct snd_emu8k_pcm *rec, int ch)
285{ 283{
286 emu8000_t *hw = rec->emu; 284 struct snd_emu8000 *hw = rec->emu;
287 unsigned int temp; 285 unsigned int temp;
288 286
289 /* channel to be silent and idle */ 287 /* channel to be silent and idle */
@@ -334,10 +332,10 @@ static void setup_voice(emu8k_pcm_t *rec, int ch)
334/* 332/*
335 * trigger the voice 333 * trigger the voice
336 */ 334 */
337static void start_voice(emu8k_pcm_t *rec, int ch) 335static void start_voice(struct snd_emu8k_pcm *rec, int ch)
338{ 336{
339 unsigned long flags; 337 unsigned long flags;
340 emu8000_t *hw = rec->emu; 338 struct snd_emu8000 *hw = rec->emu;
341 unsigned int temp, aux; 339 unsigned int temp, aux;
342 int pt = calc_pitch_target(rec->pitch); 340 int pt = calc_pitch_target(rec->pitch);
343 341
@@ -370,10 +368,10 @@ static void start_voice(emu8k_pcm_t *rec, int ch)
370/* 368/*
371 * stop the voice immediately 369 * stop the voice immediately
372 */ 370 */
373static void stop_voice(emu8k_pcm_t *rec, int ch) 371static void stop_voice(struct snd_emu8k_pcm *rec, int ch)
374{ 372{
375 unsigned long flags; 373 unsigned long flags;
376 emu8000_t *hw = rec->emu; 374 struct snd_emu8000 *hw = rec->emu;
377 375
378 EMU8000_DCYSUSV_WRITE(hw, ch, 0x807F); 376 EMU8000_DCYSUSV_WRITE(hw, ch, 0x807F);
379 377
@@ -386,9 +384,9 @@ static void stop_voice(emu8k_pcm_t *rec, int ch)
386 spin_unlock_irqrestore(&rec->timer_lock, flags); 384 spin_unlock_irqrestore(&rec->timer_lock, flags);
387} 385}
388 386
389static int emu8k_pcm_trigger(snd_pcm_substream_t *subs, int cmd) 387static int emu8k_pcm_trigger(struct snd_pcm_substream *subs, int cmd)
390{ 388{
391 emu8k_pcm_t *rec = subs->runtime->private_data; 389 struct snd_emu8k_pcm *rec = subs->runtime->private_data;
392 int ch; 390 int ch;
393 391
394 switch (cmd) { 392 switch (cmd) {
@@ -428,7 +426,7 @@ do { \
428 426
429#ifdef USE_NONINTERLEAVE 427#ifdef USE_NONINTERLEAVE
430/* copy one channel block */ 428/* copy one channel block */
431static int emu8k_transfer_block(emu8000_t *emu, int offset, unsigned short *buf, int count) 429static int emu8k_transfer_block(struct snd_emu8000 *emu, int offset, unsigned short *buf, int count)
432{ 430{
433 EMU8000_SMALW_WRITE(emu, offset); 431 EMU8000_SMALW_WRITE(emu, offset);
434 while (count > 0) { 432 while (count > 0) {
@@ -442,14 +440,14 @@ static int emu8k_transfer_block(emu8000_t *emu, int offset, unsigned short *buf,
442 return 0; 440 return 0;
443} 441}
444 442
445static int emu8k_pcm_copy(snd_pcm_substream_t *subs, 443static int emu8k_pcm_copy(struct snd_pcm_substream *subs,
446 int voice, 444 int voice,
447 snd_pcm_uframes_t pos, 445 snd_pcm_uframes_t pos,
448 void *src, 446 void *src,
449 snd_pcm_uframes_t count) 447 snd_pcm_uframes_t count)
450{ 448{
451 emu8k_pcm_t *rec = subs->runtime->private_data; 449 struct snd_emu8k_pcm *rec = subs->runtime->private_data;
452 emu8000_t *emu = rec->emu; 450 struct snd_emu8000 *emu = rec->emu;
453 451
454 snd_emu8000_write_wait(emu, 1); 452 snd_emu8000_write_wait(emu, 1);
455 if (voice == -1) { 453 if (voice == -1) {
@@ -469,7 +467,7 @@ static int emu8k_pcm_copy(snd_pcm_substream_t *subs,
469} 467}
470 468
471/* make a channel block silence */ 469/* make a channel block silence */
472static int emu8k_silence_block(emu8000_t *emu, int offset, int count) 470static int emu8k_silence_block(struct snd_emu8000 *emu, int offset, int count)
473{ 471{
474 EMU8000_SMALW_WRITE(emu, offset); 472 EMU8000_SMALW_WRITE(emu, offset);
475 while (count > 0) { 473 while (count > 0) {
@@ -480,13 +478,13 @@ static int emu8k_silence_block(emu8000_t *emu, int offset, int count)
480 return 0; 478 return 0;
481} 479}
482 480
483static int emu8k_pcm_silence(snd_pcm_substream_t *subs, 481static int emu8k_pcm_silence(struct snd_pcm_substream *subs,
484 int voice, 482 int voice,
485 snd_pcm_uframes_t pos, 483 snd_pcm_uframes_t pos,
486 snd_pcm_uframes_t count) 484 snd_pcm_uframes_t count)
487{ 485{
488 emu8k_pcm_t *rec = subs->runtime->private_data; 486 struct snd_emu8k_pcm *rec = subs->runtime->private_data;
489 emu8000_t *emu = rec->emu; 487 struct snd_emu8000 *emu = rec->emu;
490 488
491 snd_emu8000_write_wait(emu, 1); 489 snd_emu8000_write_wait(emu, 1);
492 if (voice == -1 && rec->voices == 1) 490 if (voice == -1 && rec->voices == 1)
@@ -508,14 +506,14 @@ static int emu8k_pcm_silence(snd_pcm_substream_t *subs,
508 * copy the interleaved data can be done easily by using 506 * copy the interleaved data can be done easily by using
509 * DMA "left" and "right" channels on emu8k engine. 507 * DMA "left" and "right" channels on emu8k engine.
510 */ 508 */
511static int emu8k_pcm_copy(snd_pcm_substream_t *subs, 509static int emu8k_pcm_copy(struct snd_pcm_substream *subs,
512 int voice, 510 int voice,
513 snd_pcm_uframes_t pos, 511 snd_pcm_uframes_t pos,
514 void __user *src, 512 void __user *src,
515 snd_pcm_uframes_t count) 513 snd_pcm_uframes_t count)
516{ 514{
517 emu8k_pcm_t *rec = subs->runtime->private_data; 515 struct snd_emu8k_pcm *rec = subs->runtime->private_data;
518 emu8000_t *emu = rec->emu; 516 struct snd_emu8000 *emu = rec->emu;
519 unsigned short __user *buf = src; 517 unsigned short __user *buf = src;
520 518
521 snd_emu8000_write_wait(emu, 1); 519 snd_emu8000_write_wait(emu, 1);
@@ -539,13 +537,13 @@ static int emu8k_pcm_copy(snd_pcm_substream_t *subs,
539 return 0; 537 return 0;
540} 538}
541 539
542static int emu8k_pcm_silence(snd_pcm_substream_t *subs, 540static int emu8k_pcm_silence(struct snd_pcm_substream *subs,
543 int voice, 541 int voice,
544 snd_pcm_uframes_t pos, 542 snd_pcm_uframes_t pos,
545 snd_pcm_uframes_t count) 543 snd_pcm_uframes_t count)
546{ 544{
547 emu8k_pcm_t *rec = subs->runtime->private_data; 545 struct snd_emu8k_pcm *rec = subs->runtime->private_data;
548 emu8000_t *emu = rec->emu; 546 struct snd_emu8000 *emu = rec->emu;
549 547
550 snd_emu8000_write_wait(emu, 1); 548 snd_emu8000_write_wait(emu, 1);
551 EMU8000_SMALW_WRITE(emu, rec->loop_start[0] + pos); 549 EMU8000_SMALW_WRITE(emu, rec->loop_start[0] + pos);
@@ -567,10 +565,10 @@ static int emu8k_pcm_silence(snd_pcm_substream_t *subs,
567/* 565/*
568 * allocate a memory block 566 * allocate a memory block
569 */ 567 */
570static int emu8k_pcm_hw_params(snd_pcm_substream_t *subs, 568static int emu8k_pcm_hw_params(struct snd_pcm_substream *subs,
571 snd_pcm_hw_params_t *hw_params) 569 struct snd_pcm_hw_params *hw_params)
572{ 570{
573 emu8k_pcm_t *rec = subs->runtime->private_data; 571 struct snd_emu8k_pcm *rec = subs->runtime->private_data;
574 572
575 if (rec->block) { 573 if (rec->block) {
576 /* reallocation - release the old block */ 574 /* reallocation - release the old block */
@@ -592,9 +590,9 @@ static int emu8k_pcm_hw_params(snd_pcm_substream_t *subs,
592/* 590/*
593 * free the memory block 591 * free the memory block
594 */ 592 */
595static int emu8k_pcm_hw_free(snd_pcm_substream_t *subs) 593static int emu8k_pcm_hw_free(struct snd_pcm_substream *subs)
596{ 594{
597 emu8k_pcm_t *rec = subs->runtime->private_data; 595 struct snd_emu8k_pcm *rec = subs->runtime->private_data;
598 596
599 if (rec->block) { 597 if (rec->block) {
600 int ch; 598 int ch;
@@ -610,9 +608,9 @@ static int emu8k_pcm_hw_free(snd_pcm_substream_t *subs)
610 608
611/* 609/*
612 */ 610 */
613static int emu8k_pcm_prepare(snd_pcm_substream_t *subs) 611static int emu8k_pcm_prepare(struct snd_pcm_substream *subs)
614{ 612{
615 emu8k_pcm_t *rec = subs->runtime->private_data; 613 struct snd_emu8k_pcm *rec = subs->runtime->private_data;
616 614
617 rec->pitch = 0xe000 + calc_rate_offset(subs->runtime->rate); 615 rec->pitch = 0xe000 + calc_rate_offset(subs->runtime->rate);
618 rec->last_ptr = 0; 616 rec->last_ptr = 0;
@@ -656,16 +654,16 @@ static int emu8k_pcm_prepare(snd_pcm_substream_t *subs)
656 return 0; 654 return 0;
657} 655}
658 656
659static snd_pcm_uframes_t emu8k_pcm_pointer(snd_pcm_substream_t *subs) 657static snd_pcm_uframes_t emu8k_pcm_pointer(struct snd_pcm_substream *subs)
660{ 658{
661 emu8k_pcm_t *rec = subs->runtime->private_data; 659 struct snd_emu8k_pcm *rec = subs->runtime->private_data;
662 if (rec->running) 660 if (rec->running)
663 return emu8k_get_curpos(rec, 0); 661 return emu8k_get_curpos(rec, 0);
664 return 0; 662 return 0;
665} 663}
666 664
667 665
668static snd_pcm_ops_t emu8k_pcm_ops = { 666static struct snd_pcm_ops emu8k_pcm_ops = {
669 .open = emu8k_pcm_open, 667 .open = emu8k_pcm_open,
670 .close = emu8k_pcm_close, 668 .close = emu8k_pcm_close,
671 .ioctl = snd_pcm_lib_ioctl, 669 .ioctl = snd_pcm_lib_ioctl,
@@ -679,15 +677,15 @@ static snd_pcm_ops_t emu8k_pcm_ops = {
679}; 677};
680 678
681 679
682static void snd_emu8000_pcm_free(snd_pcm_t *pcm) 680static void snd_emu8000_pcm_free(struct snd_pcm *pcm)
683{ 681{
684 emu8000_t *emu = pcm->private_data; 682 struct snd_emu8000 *emu = pcm->private_data;
685 emu->pcm = NULL; 683 emu->pcm = NULL;
686} 684}
687 685
688int snd_emu8000_pcm_new(snd_card_t *card, emu8000_t *emu, int index) 686int snd_emu8000_pcm_new(struct snd_card *card, struct snd_emu8000 *emu, int index)
689{ 687{
690 snd_pcm_t *pcm; 688 struct snd_pcm *pcm;
691 int err; 689 int err;
692 690
693 if ((err = snd_pcm_new(card, "Emu8000 PCM", index, 1, 0, &pcm)) < 0) 691 if ((err = snd_pcm_new(card, "Emu8000 PCM", index, 1, 0, &pcm)) < 0)
diff --git a/sound/isa/sb/emu8000_synth.c b/sound/isa/sb/emu8000_synth.c
index f68e217416a6..3d72742b342f 100644
--- a/sound/isa/sb/emu8000_synth.c
+++ b/sound/isa/sb/emu8000_synth.c
@@ -33,12 +33,12 @@ MODULE_LICENSE("GPL");
33/* 33/*
34 * create a new hardware dependent device for Emu8000 34 * create a new hardware dependent device for Emu8000
35 */ 35 */
36static int snd_emu8000_new_device(snd_seq_device_t *dev) 36static int snd_emu8000_new_device(struct snd_seq_device *dev)
37{ 37{
38 emu8000_t *hw; 38 struct snd_emu8000 *hw;
39 snd_emux_t *emu; 39 struct snd_emux *emu;
40 40
41 hw = *(emu8000_t**)SNDRV_SEQ_DEVICE_ARGPTR(dev); 41 hw = *(struct snd_emu8000**)SNDRV_SEQ_DEVICE_ARGPTR(dev);
42 if (hw == NULL) 42 if (hw == NULL)
43 return -EINVAL; 43 return -EINVAL;
44 44
@@ -92,9 +92,9 @@ static int snd_emu8000_new_device(snd_seq_device_t *dev)
92/* 92/*
93 * free all resources 93 * free all resources
94 */ 94 */
95static int snd_emu8000_delete_device(snd_seq_device_t *dev) 95static int snd_emu8000_delete_device(struct snd_seq_device *dev)
96{ 96{
97 emu8000_t *hw; 97 struct snd_emu8000 *hw;
98 98
99 if (dev->driver_data == NULL) 99 if (dev->driver_data == NULL)
100 return 0; /* no synth was allocated actually */ 100 return 0; /* no synth was allocated actually */
@@ -118,11 +118,12 @@ static int snd_emu8000_delete_device(snd_seq_device_t *dev)
118static int __init alsa_emu8000_init(void) 118static int __init alsa_emu8000_init(void)
119{ 119{
120 120
121 static snd_seq_dev_ops_t ops = { 121 static struct snd_seq_dev_ops ops = {
122 snd_emu8000_new_device, 122 snd_emu8000_new_device,
123 snd_emu8000_delete_device, 123 snd_emu8000_delete_device,
124 }; 124 };
125 return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_EMU8000, &ops, sizeof(emu8000_t*)); 125 return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_EMU8000, &ops,
126 sizeof(struct snd_emu8000*));
126} 127}
127 128
128static void __exit alsa_emu8000_exit(void) 129static void __exit alsa_emu8000_exit(void)
diff --git a/sound/isa/sb/es968.c b/sound/isa/sb/es968.c
index c859917c14db..f7d1afe83dfe 100644
--- a/sound/isa/sb/es968.c
+++ b/sound/isa/sb/es968.c
@@ -72,7 +72,7 @@ MODULE_DEVICE_TABLE(pnp_card, snd_es968_pnpids);
72static irqreturn_t snd_card_es968_interrupt(int irq, void *dev_id, 72static irqreturn_t snd_card_es968_interrupt(int irq, void *dev_id,
73 struct pt_regs *regs) 73 struct pt_regs *regs)
74{ 74{
75 sb_t *chip = dev_id; 75 struct snd_sb *chip = dev_id;
76 76
77 if (chip->open & SB_OPEN_PCM) { 77 if (chip->open & SB_OPEN_PCM) {
78 return snd_sb8dsp_interrupt(chip); 78 return snd_sb8dsp_interrupt(chip);
@@ -128,8 +128,8 @@ static int __init snd_card_es968_probe(int dev,
128 const struct pnp_card_device_id *pid) 128 const struct pnp_card_device_id *pid)
129{ 129{
130 int error; 130 int error;
131 sb_t *chip; 131 struct snd_sb *chip;
132 snd_card_t *card; 132 struct snd_card *card;
133 struct snd_card_es968 *acard; 133 struct snd_card_es968 *acard;
134 134
135 if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE, 135 if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE,
@@ -200,7 +200,7 @@ static int __devinit snd_es968_pnp_detect(struct pnp_card_link *card,
200 200
201static void __devexit snd_es968_pnp_remove(struct pnp_card_link * pcard) 201static void __devexit snd_es968_pnp_remove(struct pnp_card_link * pcard)
202{ 202{
203 snd_card_t *card = (snd_card_t *) pnp_get_card_drvdata(pcard); 203 struct snd_card *card = (struct snd_card *) pnp_get_card_drvdata(pcard);
204 204
205 snd_card_disconnect(card); 205 snd_card_disconnect(card);
206 snd_card_free_in_thread(card); 206 snd_card_free_in_thread(card);
diff --git a/sound/isa/sb/sb16.c b/sound/isa/sb/sb16.c
index c2fa451bc8f0..96e401333437 100644
--- a/sound/isa/sb/sb16.c
+++ b/sound/isa/sb/sb16.c
@@ -138,7 +138,7 @@ struct snd_card_sb16 {
138#endif 138#endif
139}; 139};
140 140
141static snd_card_t *snd_sb16_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; 141static struct snd_card *snd_sb16_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
142 142
143#ifdef CONFIG_PNP 143#ifdef CONFIG_PNP
144 144
@@ -339,7 +339,7 @@ __wt_error:
339 339
340#endif /* CONFIG_PNP */ 340#endif /* CONFIG_PNP */
341 341
342static void snd_sb16_free(snd_card_t *card) 342static void snd_sb16_free(struct snd_card *card)
343{ 343{
344 struct snd_card_sb16 *acard = (struct snd_card_sb16 *)card->private_data; 344 struct snd_card_sb16 *acard = (struct snd_card_sb16 *)card->private_data;
345 345
@@ -362,13 +362,13 @@ static int __init snd_sb16_probe(int dev,
362 static int possible_dmas8[] = {1, 3, 0, -1}; 362 static int possible_dmas8[] = {1, 3, 0, -1};
363 static int possible_dmas16[] = {5, 6, 7, -1}; 363 static int possible_dmas16[] = {5, 6, 7, -1};
364 int xirq, xdma8, xdma16; 364 int xirq, xdma8, xdma16;
365 sb_t *chip; 365 struct snd_sb *chip;
366 snd_card_t *card; 366 struct snd_card *card;
367 struct snd_card_sb16 *acard; 367 struct snd_card_sb16 *acard;
368 opl3_t *opl3; 368 struct snd_opl3 *opl3;
369 snd_hwdep_t *synth = NULL; 369 struct snd_hwdep *synth = NULL;
370#ifdef CONFIG_SND_SB16_CSP 370#ifdef CONFIG_SND_SB16_CSP
371 snd_hwdep_t *xcsp = NULL; 371 struct snd_hwdep *xcsp = NULL;
372#endif 372#endif
373 unsigned long flags; 373 unsigned long flags;
374 int err; 374 int err;
@@ -583,7 +583,7 @@ static int __devinit snd_sb16_pnp_detect(struct pnp_card_link *card,
583 583
584static void __devexit snd_sb16_pnp_remove(struct pnp_card_link * pcard) 584static void __devexit snd_sb16_pnp_remove(struct pnp_card_link * pcard)
585{ 585{
586 snd_card_t *card = (snd_card_t *) pnp_get_card_drvdata(pcard); 586 struct snd_card *card = (struct snd_card *) pnp_get_card_drvdata(pcard);
587 587
588 snd_card_disconnect(card); 588 snd_card_disconnect(card);
589 snd_card_free_in_thread(card); 589 snd_card_free_in_thread(card);
diff --git a/sound/isa/sb/sb16_csp.c b/sound/isa/sb/sb16_csp.c
index 7192d4c758e6..9c2b5efbacbf 100644
--- a/sound/isa/sb/sb16_csp.c
+++ b/sound/isa/sb/sb16_csp.c
@@ -72,46 +72,47 @@ struct desc_header {
72/* 72/*
73 * prototypes 73 * prototypes
74 */ 74 */
75static void snd_sb_csp_free(snd_hwdep_t *hw); 75static void snd_sb_csp_free(struct snd_hwdep *hw);
76static int snd_sb_csp_open(snd_hwdep_t * hw, struct file *file); 76static int snd_sb_csp_open(struct snd_hwdep * hw, struct file *file);
77static int snd_sb_csp_ioctl(snd_hwdep_t * hw, struct file *file, unsigned int cmd, unsigned long arg); 77static int snd_sb_csp_ioctl(struct snd_hwdep * hw, struct file *file, unsigned int cmd, unsigned long arg);
78static int snd_sb_csp_release(snd_hwdep_t * hw, struct file *file); 78static int snd_sb_csp_release(struct snd_hwdep * hw, struct file *file);
79 79
80static int csp_detect(sb_t *chip, int *version); 80static int csp_detect(struct snd_sb *chip, int *version);
81static int set_codec_parameter(sb_t *chip, unsigned char par, unsigned char val); 81static int set_codec_parameter(struct snd_sb *chip, unsigned char par, unsigned char val);
82static int set_register(sb_t *chip, unsigned char reg, unsigned char val); 82static int set_register(struct snd_sb *chip, unsigned char reg, unsigned char val);
83static int read_register(sb_t *chip, unsigned char reg); 83static int read_register(struct snd_sb *chip, unsigned char reg);
84static int set_mode_register(sb_t *chip, unsigned char mode); 84static int set_mode_register(struct snd_sb *chip, unsigned char mode);
85static int get_version(sb_t *chip); 85static int get_version(struct snd_sb *chip);
86 86
87static int snd_sb_csp_riff_load(snd_sb_csp_t * p, snd_sb_csp_microcode_t __user * code); 87static int snd_sb_csp_riff_load(struct snd_sb_csp * p,
88static int snd_sb_csp_unload(snd_sb_csp_t * p); 88 struct snd_sb_csp_microcode __user * code);
89static int snd_sb_csp_load_user(snd_sb_csp_t * p, const unsigned char __user *buf, int size, int load_flags); 89static int snd_sb_csp_unload(struct snd_sb_csp * p);
90static int snd_sb_csp_autoload(snd_sb_csp_t * p, int pcm_sfmt, int play_rec_mode); 90static int snd_sb_csp_load_user(struct snd_sb_csp * p, const unsigned char __user *buf, int size, int load_flags);
91static int snd_sb_csp_check_version(snd_sb_csp_t * p); 91static int snd_sb_csp_autoload(struct snd_sb_csp * p, int pcm_sfmt, int play_rec_mode);
92 92static int snd_sb_csp_check_version(struct snd_sb_csp * p);
93static int snd_sb_csp_use(snd_sb_csp_t * p); 93
94static int snd_sb_csp_unuse(snd_sb_csp_t * p); 94static int snd_sb_csp_use(struct snd_sb_csp * p);
95static int snd_sb_csp_start(snd_sb_csp_t * p, int sample_width, int channels); 95static int snd_sb_csp_unuse(struct snd_sb_csp * p);
96static int snd_sb_csp_stop(snd_sb_csp_t * p); 96static int snd_sb_csp_start(struct snd_sb_csp * p, int sample_width, int channels);
97static int snd_sb_csp_pause(snd_sb_csp_t * p); 97static int snd_sb_csp_stop(struct snd_sb_csp * p);
98static int snd_sb_csp_restart(snd_sb_csp_t * p); 98static int snd_sb_csp_pause(struct snd_sb_csp * p);
99 99static int snd_sb_csp_restart(struct snd_sb_csp * p);
100static int snd_sb_qsound_build(snd_sb_csp_t * p); 100
101static void snd_sb_qsound_destroy(snd_sb_csp_t * p); 101static int snd_sb_qsound_build(struct snd_sb_csp * p);
102static int snd_sb_csp_qsound_transfer(snd_sb_csp_t * p); 102static void snd_sb_qsound_destroy(struct snd_sb_csp * p);
103 103static int snd_sb_csp_qsound_transfer(struct snd_sb_csp * p);
104static int init_proc_entry(snd_sb_csp_t * p, int device); 104
105static void info_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer); 105static int init_proc_entry(struct snd_sb_csp * p, int device);
106static void info_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer);
106 107
107/* 108/*
108 * Detect CSP chip and create a new instance 109 * Detect CSP chip and create a new instance
109 */ 110 */
110int snd_sb_csp_new(sb_t *chip, int device, snd_hwdep_t ** rhwdep) 111int snd_sb_csp_new(struct snd_sb *chip, int device, struct snd_hwdep ** rhwdep)
111{ 112{
112 snd_sb_csp_t *p; 113 struct snd_sb_csp *p;
113 int version, err; 114 int version, err;
114 snd_hwdep_t *hw; 115 struct snd_hwdep *hw;
115 116
116 if (rhwdep) 117 if (rhwdep)
117 *rhwdep = NULL; 118 *rhwdep = NULL;
@@ -158,9 +159,9 @@ int snd_sb_csp_new(sb_t *chip, int device, snd_hwdep_t ** rhwdep)
158/* 159/*
159 * free_private for hwdep instance 160 * free_private for hwdep instance
160 */ 161 */
161static void snd_sb_csp_free(snd_hwdep_t *hwdep) 162static void snd_sb_csp_free(struct snd_hwdep *hwdep)
162{ 163{
163 snd_sb_csp_t *p = hwdep->private_data; 164 struct snd_sb_csp *p = hwdep->private_data;
164 if (p) { 165 if (p) {
165 if (p->running & SNDRV_SB_CSP_ST_RUNNING) 166 if (p->running & SNDRV_SB_CSP_ST_RUNNING)
166 snd_sb_csp_stop(p); 167 snd_sb_csp_stop(p);
@@ -173,20 +174,20 @@ static void snd_sb_csp_free(snd_hwdep_t *hwdep)
173/* 174/*
174 * open the device exclusively 175 * open the device exclusively
175 */ 176 */
176static int snd_sb_csp_open(snd_hwdep_t * hw, struct file *file) 177static int snd_sb_csp_open(struct snd_hwdep * hw, struct file *file)
177{ 178{
178 snd_sb_csp_t *p = hw->private_data; 179 struct snd_sb_csp *p = hw->private_data;
179 return (snd_sb_csp_use(p)); 180 return (snd_sb_csp_use(p));
180} 181}
181 182
182/* 183/*
183 * ioctl for hwdep device: 184 * ioctl for hwdep device:
184 */ 185 */
185static int snd_sb_csp_ioctl(snd_hwdep_t * hw, struct file *file, unsigned int cmd, unsigned long arg) 186static int snd_sb_csp_ioctl(struct snd_hwdep * hw, struct file *file, unsigned int cmd, unsigned long arg)
186{ 187{
187 snd_sb_csp_t *p = hw->private_data; 188 struct snd_sb_csp *p = hw->private_data;
188 snd_sb_csp_info_t info; 189 struct snd_sb_csp_info info;
189 snd_sb_csp_start_t start_info; 190 struct snd_sb_csp_start start_info;
190 int err; 191 int err;
191 192
192 snd_assert(p != NULL, return -EINVAL); 193 snd_assert(p != NULL, return -EINVAL);
@@ -217,7 +218,7 @@ static int snd_sb_csp_ioctl(snd_hwdep_t * hw, struct file *file, unsigned int cm
217 /* load CSP microcode */ 218 /* load CSP microcode */
218 case SNDRV_SB_CSP_IOCTL_LOAD_CODE: 219 case SNDRV_SB_CSP_IOCTL_LOAD_CODE:
219 err = (p->running & SNDRV_SB_CSP_ST_RUNNING ? 220 err = (p->running & SNDRV_SB_CSP_ST_RUNNING ?
220 -EBUSY : snd_sb_csp_riff_load(p, (snd_sb_csp_microcode_t __user *) arg)); 221 -EBUSY : snd_sb_csp_riff_load(p, (struct snd_sb_csp_microcode __user *) arg));
221 break; 222 break;
222 case SNDRV_SB_CSP_IOCTL_UNLOAD_CODE: 223 case SNDRV_SB_CSP_IOCTL_UNLOAD_CODE:
223 err = (p->running & SNDRV_SB_CSP_ST_RUNNING ? 224 err = (p->running & SNDRV_SB_CSP_ST_RUNNING ?
@@ -251,9 +252,9 @@ static int snd_sb_csp_ioctl(snd_hwdep_t * hw, struct file *file, unsigned int cm
251/* 252/*
252 * close the device 253 * close the device
253 */ 254 */
254static int snd_sb_csp_release(snd_hwdep_t * hw, struct file *file) 255static int snd_sb_csp_release(struct snd_hwdep * hw, struct file *file)
255{ 256{
256 snd_sb_csp_t *p = hw->private_data; 257 struct snd_sb_csp *p = hw->private_data;
257 return (snd_sb_csp_unuse(p)); 258 return (snd_sb_csp_unuse(p));
258} 259}
259 260
@@ -262,7 +263,7 @@ static int snd_sb_csp_release(snd_hwdep_t * hw, struct file *file)
262/* 263/*
263 * acquire device 264 * acquire device
264 */ 265 */
265static int snd_sb_csp_use(snd_sb_csp_t * p) 266static int snd_sb_csp_use(struct snd_sb_csp * p)
266{ 267{
267 down(&p->access_mutex); 268 down(&p->access_mutex);
268 if (p->used) { 269 if (p->used) {
@@ -279,7 +280,7 @@ static int snd_sb_csp_use(snd_sb_csp_t * p)
279/* 280/*
280 * release device 281 * release device
281 */ 282 */
282static int snd_sb_csp_unuse(snd_sb_csp_t * p) 283static int snd_sb_csp_unuse(struct snd_sb_csp * p)
283{ 284{
284 down(&p->access_mutex); 285 down(&p->access_mutex);
285 p->used--; 286 p->used--;
@@ -292,9 +293,10 @@ static int snd_sb_csp_unuse(snd_sb_csp_t * p)
292 * load microcode via ioctl: 293 * load microcode via ioctl:
293 * code is user-space pointer 294 * code is user-space pointer
294 */ 295 */
295static int snd_sb_csp_riff_load(snd_sb_csp_t * p, snd_sb_csp_microcode_t __user * mcode) 296static int snd_sb_csp_riff_load(struct snd_sb_csp * p,
297 struct snd_sb_csp_microcode __user * mcode)
296{ 298{
297 snd_sb_csp_mc_header_t info; 299 struct snd_sb_csp_mc_header info;
298 300
299 unsigned char __user *data_ptr; 301 unsigned char __user *data_ptr;
300 unsigned char __user *data_end; 302 unsigned char __user *data_end;
@@ -449,7 +451,7 @@ static int snd_sb_csp_riff_load(snd_sb_csp_t * p, snd_sb_csp_microcode_t __user
449/* 451/*
450 * unload CSP microcode 452 * unload CSP microcode
451 */ 453 */
452static int snd_sb_csp_unload(snd_sb_csp_t * p) 454static int snd_sb_csp_unload(struct snd_sb_csp * p)
453{ 455{
454 if (p->running & SNDRV_SB_CSP_ST_RUNNING) 456 if (p->running & SNDRV_SB_CSP_ST_RUNNING)
455 return -EBUSY; 457 return -EBUSY;
@@ -472,7 +474,7 @@ static int snd_sb_csp_unload(snd_sb_csp_t * p)
472/* 474/*
473 * send command sequence to DSP 475 * send command sequence to DSP
474 */ 476 */
475static inline int command_seq(sb_t *chip, const unsigned char *seq, int size) 477static inline int command_seq(struct snd_sb *chip, const unsigned char *seq, int size)
476{ 478{
477 int i; 479 int i;
478 for (i = 0; i < size; i++) { 480 for (i = 0; i < size; i++) {
@@ -485,7 +487,7 @@ static inline int command_seq(sb_t *chip, const unsigned char *seq, int size)
485/* 487/*
486 * set CSP codec parameter 488 * set CSP codec parameter
487 */ 489 */
488static int set_codec_parameter(sb_t *chip, unsigned char par, unsigned char val) 490static int set_codec_parameter(struct snd_sb *chip, unsigned char par, unsigned char val)
489{ 491{
490 unsigned char dsp_cmd[3]; 492 unsigned char dsp_cmd[3];
491 493
@@ -502,7 +504,7 @@ static int set_codec_parameter(sb_t *chip, unsigned char par, unsigned char val)
502/* 504/*
503 * set CSP register 505 * set CSP register
504 */ 506 */
505static int set_register(sb_t *chip, unsigned char reg, unsigned char val) 507static int set_register(struct snd_sb *chip, unsigned char reg, unsigned char val)
506{ 508{
507 unsigned char dsp_cmd[3]; 509 unsigned char dsp_cmd[3];
508 510
@@ -516,7 +518,7 @@ static int set_register(sb_t *chip, unsigned char reg, unsigned char val)
516 * read CSP register 518 * read CSP register
517 * return < 0 -> error 519 * return < 0 -> error
518 */ 520 */
519static int read_register(sb_t *chip, unsigned char reg) 521static int read_register(struct snd_sb *chip, unsigned char reg)
520{ 522{
521 unsigned char dsp_cmd[2]; 523 unsigned char dsp_cmd[2];
522 524
@@ -529,7 +531,7 @@ static int read_register(sb_t *chip, unsigned char reg)
529/* 531/*
530 * set CSP mode register 532 * set CSP mode register
531 */ 533 */
532static int set_mode_register(sb_t *chip, unsigned char mode) 534static int set_mode_register(struct snd_sb *chip, unsigned char mode)
533{ 535{
534 unsigned char dsp_cmd[2]; 536 unsigned char dsp_cmd[2];
535 537
@@ -542,7 +544,7 @@ static int set_mode_register(sb_t *chip, unsigned char mode)
542 * Detect CSP 544 * Detect CSP
543 * return 0 if CSP exists. 545 * return 0 if CSP exists.
544 */ 546 */
545static int csp_detect(sb_t *chip, int *version) 547static int csp_detect(struct snd_sb *chip, int *version)
546{ 548{
547 unsigned char csp_test1, csp_test2; 549 unsigned char csp_test1, csp_test2;
548 unsigned long flags; 550 unsigned long flags;
@@ -579,7 +581,7 @@ static int csp_detect(sb_t *chip, int *version)
579/* 581/*
580 * get CSP version number 582 * get CSP version number
581 */ 583 */
582static int get_version(sb_t *chip) 584static int get_version(struct snd_sb *chip)
583{ 585{
584 unsigned char dsp_cmd[2]; 586 unsigned char dsp_cmd[2];
585 587
@@ -593,7 +595,7 @@ static int get_version(sb_t *chip)
593/* 595/*
594 * check if the CSP version is valid 596 * check if the CSP version is valid
595 */ 597 */
596static int snd_sb_csp_check_version(snd_sb_csp_t * p) 598static int snd_sb_csp_check_version(struct snd_sb_csp * p)
597{ 599{
598 if (p->version < 0x10 || p->version > 0x1f) { 600 if (p->version < 0x10 || p->version > 0x1f) {
599 snd_printd("%s: Invalid CSP version: 0x%x\n", __FUNCTION__, p->version); 601 snd_printd("%s: Invalid CSP version: 0x%x\n", __FUNCTION__, p->version);
@@ -605,7 +607,7 @@ static int snd_sb_csp_check_version(snd_sb_csp_t * p)
605/* 607/*
606 * download microcode to CSP (microcode should have one "main" block). 608 * download microcode to CSP (microcode should have one "main" block).
607 */ 609 */
608static int snd_sb_csp_load(snd_sb_csp_t * p, const unsigned char *buf, int size, int load_flags) 610static int snd_sb_csp_load(struct snd_sb_csp * p, const unsigned char *buf, int size, int load_flags)
609{ 611{
610 int status, i; 612 int status, i;
611 int err; 613 int err;
@@ -671,7 +673,7 @@ static int snd_sb_csp_load(snd_sb_csp_t * p, const unsigned char *buf, int size,
671 return result; 673 return result;
672} 674}
673 675
674static int snd_sb_csp_load_user(snd_sb_csp_t * p, const unsigned char __user *buf, int size, int load_flags) 676static int snd_sb_csp_load_user(struct snd_sb_csp * p, const unsigned char __user *buf, int size, int load_flags)
675{ 677{
676 int err = -ENOMEM; 678 int err = -ENOMEM;
677 unsigned char *kbuf = kmalloc(size, GFP_KERNEL); 679 unsigned char *kbuf = kmalloc(size, GFP_KERNEL);
@@ -691,7 +693,7 @@ static int snd_sb_csp_load_user(snd_sb_csp_t * p, const unsigned char __user *bu
691 * autoload hardware codec if necessary 693 * autoload hardware codec if necessary
692 * return 0 if CSP is loaded and ready to run (p->running != 0) 694 * return 0 if CSP is loaded and ready to run (p->running != 0)
693 */ 695 */
694static int snd_sb_csp_autoload(snd_sb_csp_t * p, int pcm_sfmt, int play_rec_mode) 696static int snd_sb_csp_autoload(struct snd_sb_csp * p, int pcm_sfmt, int play_rec_mode)
695{ 697{
696 unsigned long flags; 698 unsigned long flags;
697 int err = 0; 699 int err = 0;
@@ -763,7 +765,7 @@ static int snd_sb_csp_autoload(snd_sb_csp_t * p, int pcm_sfmt, int play_rec_mode
763/* 765/*
764 * start CSP 766 * start CSP
765 */ 767 */
766static int snd_sb_csp_start(snd_sb_csp_t * p, int sample_width, int channels) 768static int snd_sb_csp_start(struct snd_sb_csp * p, int sample_width, int channels)
767{ 769{
768 unsigned char s_type; /* sample type */ 770 unsigned char s_type; /* sample type */
769 unsigned char mixL, mixR; 771 unsigned char mixL, mixR;
@@ -842,7 +844,7 @@ static int snd_sb_csp_start(snd_sb_csp_t * p, int sample_width, int channels)
842/* 844/*
843 * stop CSP 845 * stop CSP
844 */ 846 */
845static int snd_sb_csp_stop(snd_sb_csp_t * p) 847static int snd_sb_csp_stop(struct snd_sb_csp * p)
846{ 848{
847 int result; 849 int result;
848 unsigned char mixL, mixR; 850 unsigned char mixL, mixR;
@@ -883,7 +885,7 @@ static int snd_sb_csp_stop(snd_sb_csp_t * p)
883/* 885/*
884 * pause CSP codec and hold DMA transfer 886 * pause CSP codec and hold DMA transfer
885 */ 887 */
886static int snd_sb_csp_pause(snd_sb_csp_t * p) 888static int snd_sb_csp_pause(struct snd_sb_csp * p)
887{ 889{
888 int result; 890 int result;
889 unsigned long flags; 891 unsigned long flags;
@@ -903,7 +905,7 @@ static int snd_sb_csp_pause(snd_sb_csp_t * p)
903/* 905/*
904 * restart CSP codec and resume DMA transfer 906 * restart CSP codec and resume DMA transfer
905 */ 907 */
906static int snd_sb_csp_restart(snd_sb_csp_t * p) 908static int snd_sb_csp_restart(struct snd_sb_csp * p)
907{ 909{
908 int result; 910 int result;
909 unsigned long flags; 911 unsigned long flags;
@@ -926,7 +928,7 @@ static int snd_sb_csp_restart(snd_sb_csp_t * p)
926 * QSound mixer control for PCM 928 * QSound mixer control for PCM
927 */ 929 */
928 930
929static int snd_sb_qsound_switch_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 931static int snd_sb_qsound_switch_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
930{ 932{
931 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 933 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
932 uinfo->count = 1; 934 uinfo->count = 1;
@@ -935,17 +937,17 @@ static int snd_sb_qsound_switch_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info
935 return 0; 937 return 0;
936} 938}
937 939
938static int snd_sb_qsound_switch_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 940static int snd_sb_qsound_switch_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
939{ 941{
940 snd_sb_csp_t *p = snd_kcontrol_chip(kcontrol); 942 struct snd_sb_csp *p = snd_kcontrol_chip(kcontrol);
941 943
942 ucontrol->value.integer.value[0] = p->q_enabled ? 1 : 0; 944 ucontrol->value.integer.value[0] = p->q_enabled ? 1 : 0;
943 return 0; 945 return 0;
944} 946}
945 947
946static int snd_sb_qsound_switch_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 948static int snd_sb_qsound_switch_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
947{ 949{
948 snd_sb_csp_t *p = snd_kcontrol_chip(kcontrol); 950 struct snd_sb_csp *p = snd_kcontrol_chip(kcontrol);
949 unsigned long flags; 951 unsigned long flags;
950 int change; 952 int change;
951 unsigned char nval; 953 unsigned char nval;
@@ -958,7 +960,7 @@ static int snd_sb_qsound_switch_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_valu
958 return change; 960 return change;
959} 961}
960 962
961static int snd_sb_qsound_space_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 963static int snd_sb_qsound_space_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
962{ 964{
963 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 965 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
964 uinfo->count = 2; 966 uinfo->count = 2;
@@ -967,9 +969,9 @@ static int snd_sb_qsound_space_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_
967 return 0; 969 return 0;
968} 970}
969 971
970static int snd_sb_qsound_space_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 972static int snd_sb_qsound_space_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
971{ 973{
972 snd_sb_csp_t *p = snd_kcontrol_chip(kcontrol); 974 struct snd_sb_csp *p = snd_kcontrol_chip(kcontrol);
973 unsigned long flags; 975 unsigned long flags;
974 976
975 spin_lock_irqsave(&p->q_lock, flags); 977 spin_lock_irqsave(&p->q_lock, flags);
@@ -979,9 +981,9 @@ static int snd_sb_qsound_space_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value
979 return 0; 981 return 0;
980} 982}
981 983
982static int snd_sb_qsound_space_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 984static int snd_sb_qsound_space_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
983{ 985{
984 snd_sb_csp_t *p = snd_kcontrol_chip(kcontrol); 986 struct snd_sb_csp *p = snd_kcontrol_chip(kcontrol);
985 unsigned long flags; 987 unsigned long flags;
986 int change; 988 int change;
987 unsigned char nval1, nval2; 989 unsigned char nval1, nval2;
@@ -1001,7 +1003,7 @@ static int snd_sb_qsound_space_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value
1001 return change; 1003 return change;
1002} 1004}
1003 1005
1004static snd_kcontrol_new_t snd_sb_qsound_switch = { 1006static struct snd_kcontrol_new snd_sb_qsound_switch = {
1005 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1007 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1006 .name = "3D Control - Switch", 1008 .name = "3D Control - Switch",
1007 .info = snd_sb_qsound_switch_info, 1009 .info = snd_sb_qsound_switch_info,
@@ -1009,7 +1011,7 @@ static snd_kcontrol_new_t snd_sb_qsound_switch = {
1009 .put = snd_sb_qsound_switch_put 1011 .put = snd_sb_qsound_switch_put
1010}; 1012};
1011 1013
1012static snd_kcontrol_new_t snd_sb_qsound_space = { 1014static struct snd_kcontrol_new snd_sb_qsound_space = {
1013 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1015 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1014 .name = "3D Control - Space", 1016 .name = "3D Control - Space",
1015 .info = snd_sb_qsound_space_info, 1017 .info = snd_sb_qsound_space_info,
@@ -1017,9 +1019,9 @@ static snd_kcontrol_new_t snd_sb_qsound_space = {
1017 .put = snd_sb_qsound_space_put 1019 .put = snd_sb_qsound_space_put
1018}; 1020};
1019 1021
1020static int snd_sb_qsound_build(snd_sb_csp_t * p) 1022static int snd_sb_qsound_build(struct snd_sb_csp * p)
1021{ 1023{
1022 snd_card_t * card; 1024 struct snd_card *card;
1023 int err; 1025 int err;
1024 1026
1025 snd_assert(p != NULL, return -EINVAL); 1027 snd_assert(p != NULL, return -EINVAL);
@@ -1042,9 +1044,9 @@ static int snd_sb_qsound_build(snd_sb_csp_t * p)
1042 return err; 1044 return err;
1043} 1045}
1044 1046
1045static void snd_sb_qsound_destroy(snd_sb_csp_t * p) 1047static void snd_sb_qsound_destroy(struct snd_sb_csp * p)
1046{ 1048{
1047 snd_card_t * card; 1049 struct snd_card *card;
1048 unsigned long flags; 1050 unsigned long flags;
1049 1051
1050 snd_assert(p != NULL, return); 1052 snd_assert(p != NULL, return);
@@ -1068,7 +1070,7 @@ static void snd_sb_qsound_destroy(snd_sb_csp_t * p)
1068 * Transfer qsound parameters to CSP, 1070 * Transfer qsound parameters to CSP,
1069 * function should be called from interrupt routine 1071 * function should be called from interrupt routine
1070 */ 1072 */
1071static int snd_sb_csp_qsound_transfer(snd_sb_csp_t * p) 1073static int snd_sb_csp_qsound_transfer(struct snd_sb_csp * p)
1072{ 1074{
1073 int err = -ENXIO; 1075 int err = -ENXIO;
1074 1076
@@ -1093,19 +1095,19 @@ static int snd_sb_csp_qsound_transfer(snd_sb_csp_t * p)
1093/* 1095/*
1094 * proc interface 1096 * proc interface
1095 */ 1097 */
1096static int init_proc_entry(snd_sb_csp_t * p, int device) 1098static int init_proc_entry(struct snd_sb_csp * p, int device)
1097{ 1099{
1098 char name[16]; 1100 char name[16];
1099 snd_info_entry_t *entry; 1101 struct snd_info_entry *entry;
1100 sprintf(name, "cspD%d", device); 1102 sprintf(name, "cspD%d", device);
1101 if (! snd_card_proc_new(p->chip->card, name, &entry)) 1103 if (! snd_card_proc_new(p->chip->card, name, &entry))
1102 snd_info_set_text_ops(entry, p, 1024, info_read); 1104 snd_info_set_text_ops(entry, p, 1024, info_read);
1103 return 0; 1105 return 0;
1104} 1106}
1105 1107
1106static void info_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer) 1108static void info_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
1107{ 1109{
1108 snd_sb_csp_t *p = entry->private_data; 1110 struct snd_sb_csp *p = entry->private_data;
1109 1111
1110 snd_iprintf(buffer, "Creative Signal Processor [v%d.%d]\n", (p->version >> 4), (p->version & 0x0f)); 1112 snd_iprintf(buffer, "Creative Signal Processor [v%d.%d]\n", (p->version >> 4), (p->version & 0x0f));
1111 snd_iprintf(buffer, "State: %cx%c%c%c\n", ((p->running & SNDRV_SB_CSP_ST_QSOUND) ? 'Q' : '-'), 1113 snd_iprintf(buffer, "State: %cx%c%c%c\n", ((p->running & SNDRV_SB_CSP_ST_QSOUND) ? 'Q' : '-'),
diff --git a/sound/isa/sb/sb16_main.c b/sound/isa/sb/sb16_main.c
index 17312e060a17..97786ed37dd6 100644
--- a/sound/isa/sb/sb16_main.c
+++ b/sound/isa/sb/sb16_main.c
@@ -50,10 +50,10 @@ MODULE_DESCRIPTION("Routines for control of 16-bit SoundBlaster cards and clones
50MODULE_LICENSE("GPL"); 50MODULE_LICENSE("GPL");
51 51
52#ifdef CONFIG_SND_SB16_CSP 52#ifdef CONFIG_SND_SB16_CSP
53static void snd_sb16_csp_playback_prepare(sb_t *chip, snd_pcm_runtime_t *runtime) 53static void snd_sb16_csp_playback_prepare(struct snd_sb *chip, struct snd_pcm_runtime *runtime)
54{ 54{
55 if (chip->hardware == SB_HW_16CSP) { 55 if (chip->hardware == SB_HW_16CSP) {
56 snd_sb_csp_t *csp = chip->csp; 56 struct snd_sb_csp *csp = chip->csp;
57 57
58 if (csp->running & SNDRV_SB_CSP_ST_LOADED) { 58 if (csp->running & SNDRV_SB_CSP_ST_LOADED) {
59 /* manually loaded codec */ 59 /* manually loaded codec */
@@ -98,10 +98,10 @@ static void snd_sb16_csp_playback_prepare(sb_t *chip, snd_pcm_runtime_t *runtime
98 } 98 }
99} 99}
100 100
101static void snd_sb16_csp_capture_prepare(sb_t *chip, snd_pcm_runtime_t *runtime) 101static void snd_sb16_csp_capture_prepare(struct snd_sb *chip, struct snd_pcm_runtime *runtime)
102{ 102{
103 if (chip->hardware == SB_HW_16CSP) { 103 if (chip->hardware == SB_HW_16CSP) {
104 snd_sb_csp_t *csp = chip->csp; 104 struct snd_sb_csp *csp = chip->csp;
105 105
106 if (csp->running & SNDRV_SB_CSP_ST_LOADED) { 106 if (csp->running & SNDRV_SB_CSP_ST_LOADED) {
107 /* manually loaded codec */ 107 /* manually loaded codec */
@@ -136,10 +136,10 @@ static void snd_sb16_csp_capture_prepare(sb_t *chip, snd_pcm_runtime_t *runtime)
136 } 136 }
137} 137}
138 138
139static void snd_sb16_csp_update(sb_t *chip) 139static void snd_sb16_csp_update(struct snd_sb *chip)
140{ 140{
141 if (chip->hardware == SB_HW_16CSP) { 141 if (chip->hardware == SB_HW_16CSP) {
142 snd_sb_csp_t *csp = chip->csp; 142 struct snd_sb_csp *csp = chip->csp;
143 143
144 if (csp->qpos_changed) { 144 if (csp->qpos_changed) {
145 spin_lock(&chip->reg_lock); 145 spin_lock(&chip->reg_lock);
@@ -149,11 +149,11 @@ static void snd_sb16_csp_update(sb_t *chip)
149 } 149 }
150} 150}
151 151
152static void snd_sb16_csp_playback_open(sb_t *chip, snd_pcm_runtime_t *runtime) 152static void snd_sb16_csp_playback_open(struct snd_sb *chip, struct snd_pcm_runtime *runtime)
153{ 153{
154 /* CSP decoders (QSound excluded) support only 16bit transfers */ 154 /* CSP decoders (QSound excluded) support only 16bit transfers */
155 if (chip->hardware == SB_HW_16CSP) { 155 if (chip->hardware == SB_HW_16CSP) {
156 snd_sb_csp_t *csp = chip->csp; 156 struct snd_sb_csp *csp = chip->csp;
157 157
158 if (csp->running & SNDRV_SB_CSP_ST_LOADED) { 158 if (csp->running & SNDRV_SB_CSP_ST_LOADED) {
159 /* manually loaded codec */ 159 /* manually loaded codec */
@@ -168,10 +168,10 @@ static void snd_sb16_csp_playback_open(sb_t *chip, snd_pcm_runtime_t *runtime)
168 } 168 }
169} 169}
170 170
171static void snd_sb16_csp_playback_close(sb_t *chip) 171static void snd_sb16_csp_playback_close(struct snd_sb *chip)
172{ 172{
173 if ((chip->hardware == SB_HW_16CSP) && (chip->open == SNDRV_SB_CSP_MODE_DSP_WRITE)) { 173 if ((chip->hardware == SB_HW_16CSP) && (chip->open == SNDRV_SB_CSP_MODE_DSP_WRITE)) {
174 snd_sb_csp_t *csp = chip->csp; 174 struct snd_sb_csp *csp = chip->csp;
175 175
176 if (csp->ops.csp_stop(csp) == 0) { 176 if (csp->ops.csp_stop(csp) == 0) {
177 csp->ops.csp_unuse(csp); 177 csp->ops.csp_unuse(csp);
@@ -180,11 +180,11 @@ static void snd_sb16_csp_playback_close(sb_t *chip)
180 } 180 }
181} 181}
182 182
183static void snd_sb16_csp_capture_open(sb_t *chip, snd_pcm_runtime_t *runtime) 183static void snd_sb16_csp_capture_open(struct snd_sb *chip, struct snd_pcm_runtime *runtime)
184{ 184{
185 /* CSP coders support only 16bit transfers */ 185 /* CSP coders support only 16bit transfers */
186 if (chip->hardware == SB_HW_16CSP) { 186 if (chip->hardware == SB_HW_16CSP) {
187 snd_sb_csp_t *csp = chip->csp; 187 struct snd_sb_csp *csp = chip->csp;
188 188
189 if (csp->running & SNDRV_SB_CSP_ST_LOADED) { 189 if (csp->running & SNDRV_SB_CSP_ST_LOADED) {
190 /* manually loaded codec */ 190 /* manually loaded codec */
@@ -199,10 +199,10 @@ static void snd_sb16_csp_capture_open(sb_t *chip, snd_pcm_runtime_t *runtime)
199 } 199 }
200} 200}
201 201
202static void snd_sb16_csp_capture_close(sb_t *chip) 202static void snd_sb16_csp_capture_close(struct snd_sb *chip)
203{ 203{
204 if ((chip->hardware == SB_HW_16CSP) && (chip->open == SNDRV_SB_CSP_MODE_DSP_READ)) { 204 if ((chip->hardware == SB_HW_16CSP) && (chip->open == SNDRV_SB_CSP_MODE_DSP_READ)) {
205 snd_sb_csp_t *csp = chip->csp; 205 struct snd_sb_csp *csp = chip->csp;
206 206
207 if (csp->ops.csp_stop(csp) == 0) { 207 if (csp->ops.csp_stop(csp) == 0) {
208 csp->ops.csp_unuse(csp); 208 csp->ops.csp_unuse(csp);
@@ -221,7 +221,7 @@ static void snd_sb16_csp_capture_close(sb_t *chip)
221#endif 221#endif
222 222
223 223
224static void snd_sb16_setup_rate(sb_t *chip, 224static void snd_sb16_setup_rate(struct snd_sb *chip,
225 unsigned short rate, 225 unsigned short rate,
226 int channel) 226 int channel)
227{ 227{
@@ -244,23 +244,23 @@ static void snd_sb16_setup_rate(sb_t *chip,
244 spin_unlock_irqrestore(&chip->reg_lock, flags); 244 spin_unlock_irqrestore(&chip->reg_lock, flags);
245} 245}
246 246
247static int snd_sb16_hw_params(snd_pcm_substream_t * substream, 247static int snd_sb16_hw_params(struct snd_pcm_substream *substream,
248 snd_pcm_hw_params_t * hw_params) 248 struct snd_pcm_hw_params *hw_params)
249{ 249{
250 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); 250 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
251} 251}
252 252
253static int snd_sb16_hw_free(snd_pcm_substream_t * substream) 253static int snd_sb16_hw_free(struct snd_pcm_substream *substream)
254{ 254{
255 snd_pcm_lib_free_pages(substream); 255 snd_pcm_lib_free_pages(substream);
256 return 0; 256 return 0;
257} 257}
258 258
259static int snd_sb16_playback_prepare(snd_pcm_substream_t * substream) 259static int snd_sb16_playback_prepare(struct snd_pcm_substream *substream)
260{ 260{
261 unsigned long flags; 261 unsigned long flags;
262 sb_t *chip = snd_pcm_substream_chip(substream); 262 struct snd_sb *chip = snd_pcm_substream_chip(substream);
263 snd_pcm_runtime_t *runtime = substream->runtime; 263 struct snd_pcm_runtime *runtime = substream->runtime;
264 unsigned char format; 264 unsigned char format;
265 unsigned int size, count, dma; 265 unsigned int size, count, dma;
266 266
@@ -298,10 +298,10 @@ static int snd_sb16_playback_prepare(snd_pcm_substream_t * substream)
298 return 0; 298 return 0;
299} 299}
300 300
301static int snd_sb16_playback_trigger(snd_pcm_substream_t * substream, 301static int snd_sb16_playback_trigger(struct snd_pcm_substream *substream,
302 int cmd) 302 int cmd)
303{ 303{
304 sb_t *chip = snd_pcm_substream_chip(substream); 304 struct snd_sb *chip = snd_pcm_substream_chip(substream);
305 int result = 0; 305 int result = 0;
306 306
307 spin_lock(&chip->reg_lock); 307 spin_lock(&chip->reg_lock);
@@ -324,11 +324,11 @@ static int snd_sb16_playback_trigger(snd_pcm_substream_t * substream,
324 return result; 324 return result;
325} 325}
326 326
327static int snd_sb16_capture_prepare(snd_pcm_substream_t * substream) 327static int snd_sb16_capture_prepare(struct snd_pcm_substream *substream)
328{ 328{
329 unsigned long flags; 329 unsigned long flags;
330 sb_t *chip = snd_pcm_substream_chip(substream); 330 struct snd_sb *chip = snd_pcm_substream_chip(substream);
331 snd_pcm_runtime_t *runtime = substream->runtime; 331 struct snd_pcm_runtime *runtime = substream->runtime;
332 unsigned char format; 332 unsigned char format;
333 unsigned int size, count, dma; 333 unsigned int size, count, dma;
334 334
@@ -365,10 +365,10 @@ static int snd_sb16_capture_prepare(snd_pcm_substream_t * substream)
365 return 0; 365 return 0;
366} 366}
367 367
368static int snd_sb16_capture_trigger(snd_pcm_substream_t * substream, 368static int snd_sb16_capture_trigger(struct snd_pcm_substream *substream,
369 int cmd) 369 int cmd)
370{ 370{
371 sb_t *chip = snd_pcm_substream_chip(substream); 371 struct snd_sb *chip = snd_pcm_substream_chip(substream);
372 int result = 0; 372 int result = 0;
373 373
374 spin_lock(&chip->reg_lock); 374 spin_lock(&chip->reg_lock);
@@ -393,7 +393,7 @@ static int snd_sb16_capture_trigger(snd_pcm_substream_t * substream,
393 393
394irqreturn_t snd_sb16dsp_interrupt(int irq, void *dev_id, struct pt_regs *regs) 394irqreturn_t snd_sb16dsp_interrupt(int irq, void *dev_id, struct pt_regs *regs)
395{ 395{
396 sb_t *chip = dev_id; 396 struct snd_sb *chip = dev_id;
397 unsigned char status; 397 unsigned char status;
398 int ok; 398 int ok;
399 399
@@ -443,9 +443,9 @@ irqreturn_t snd_sb16dsp_interrupt(int irq, void *dev_id, struct pt_regs *regs)
443 443
444 */ 444 */
445 445
446static snd_pcm_uframes_t snd_sb16_playback_pointer(snd_pcm_substream_t * substream) 446static snd_pcm_uframes_t snd_sb16_playback_pointer(struct snd_pcm_substream *substream)
447{ 447{
448 sb_t *chip = snd_pcm_substream_chip(substream); 448 struct snd_sb *chip = snd_pcm_substream_chip(substream);
449 unsigned int dma; 449 unsigned int dma;
450 size_t ptr; 450 size_t ptr;
451 451
@@ -454,9 +454,9 @@ static snd_pcm_uframes_t snd_sb16_playback_pointer(snd_pcm_substream_t * substre
454 return bytes_to_frames(substream->runtime, ptr); 454 return bytes_to_frames(substream->runtime, ptr);
455} 455}
456 456
457static snd_pcm_uframes_t snd_sb16_capture_pointer(snd_pcm_substream_t * substream) 457static snd_pcm_uframes_t snd_sb16_capture_pointer(struct snd_pcm_substream *substream)
458{ 458{
459 sb_t *chip = snd_pcm_substream_chip(substream); 459 struct snd_sb *chip = snd_pcm_substream_chip(substream);
460 unsigned int dma; 460 unsigned int dma;
461 size_t ptr; 461 size_t ptr;
462 462
@@ -469,7 +469,7 @@ static snd_pcm_uframes_t snd_sb16_capture_pointer(snd_pcm_substream_t * substrea
469 469
470 */ 470 */
471 471
472static snd_pcm_hardware_t snd_sb16_playback = 472static struct snd_pcm_hardware snd_sb16_playback =
473{ 473{
474 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 474 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
475 SNDRV_PCM_INFO_MMAP_VALID), 475 SNDRV_PCM_INFO_MMAP_VALID),
@@ -487,7 +487,7 @@ static snd_pcm_hardware_t snd_sb16_playback =
487 .fifo_size = 0, 487 .fifo_size = 0,
488}; 488};
489 489
490static snd_pcm_hardware_t snd_sb16_capture = 490static struct snd_pcm_hardware snd_sb16_capture =
491{ 491{
492 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 492 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
493 SNDRV_PCM_INFO_MMAP_VALID), 493 SNDRV_PCM_INFO_MMAP_VALID),
@@ -509,11 +509,11 @@ static snd_pcm_hardware_t snd_sb16_capture =
509 * open/close 509 * open/close
510 */ 510 */
511 511
512static int snd_sb16_playback_open(snd_pcm_substream_t * substream) 512static int snd_sb16_playback_open(struct snd_pcm_substream *substream)
513{ 513{
514 unsigned long flags; 514 unsigned long flags;
515 sb_t *chip = snd_pcm_substream_chip(substream); 515 struct snd_sb *chip = snd_pcm_substream_chip(substream);
516 snd_pcm_runtime_t *runtime = substream->runtime; 516 struct snd_pcm_runtime *runtime = substream->runtime;
517 517
518 spin_lock_irqsave(&chip->open_lock, flags); 518 spin_lock_irqsave(&chip->open_lock, flags);
519 if (chip->mode & SB_MODE_PLAYBACK) { 519 if (chip->mode & SB_MODE_PLAYBACK) {
@@ -566,10 +566,10 @@ static int snd_sb16_playback_open(snd_pcm_substream_t * substream)
566 return 0; 566 return 0;
567} 567}
568 568
569static int snd_sb16_playback_close(snd_pcm_substream_t * substream) 569static int snd_sb16_playback_close(struct snd_pcm_substream *substream)
570{ 570{
571 unsigned long flags; 571 unsigned long flags;
572 sb_t *chip = snd_pcm_substream_chip(substream); 572 struct snd_sb *chip = snd_pcm_substream_chip(substream);
573 573
574 snd_sb16_csp_playback_close(chip); 574 snd_sb16_csp_playback_close(chip);
575 spin_lock_irqsave(&chip->open_lock, flags); 575 spin_lock_irqsave(&chip->open_lock, flags);
@@ -579,11 +579,11 @@ static int snd_sb16_playback_close(snd_pcm_substream_t * substream)
579 return 0; 579 return 0;
580} 580}
581 581
582static int snd_sb16_capture_open(snd_pcm_substream_t * substream) 582static int snd_sb16_capture_open(struct snd_pcm_substream *substream)
583{ 583{
584 unsigned long flags; 584 unsigned long flags;
585 sb_t *chip = snd_pcm_substream_chip(substream); 585 struct snd_sb *chip = snd_pcm_substream_chip(substream);
586 snd_pcm_runtime_t *runtime = substream->runtime; 586 struct snd_pcm_runtime *runtime = substream->runtime;
587 587
588 spin_lock_irqsave(&chip->open_lock, flags); 588 spin_lock_irqsave(&chip->open_lock, flags);
589 if (chip->mode & SB_MODE_CAPTURE) { 589 if (chip->mode & SB_MODE_CAPTURE) {
@@ -636,10 +636,10 @@ static int snd_sb16_capture_open(snd_pcm_substream_t * substream)
636 return 0; 636 return 0;
637} 637}
638 638
639static int snd_sb16_capture_close(snd_pcm_substream_t * substream) 639static int snd_sb16_capture_close(struct snd_pcm_substream *substream)
640{ 640{
641 unsigned long flags; 641 unsigned long flags;
642 sb_t *chip = snd_pcm_substream_chip(substream); 642 struct snd_sb *chip = snd_pcm_substream_chip(substream);
643 643
644 snd_sb16_csp_capture_close(chip); 644 snd_sb16_csp_capture_close(chip);
645 spin_lock_irqsave(&chip->open_lock, flags); 645 spin_lock_irqsave(&chip->open_lock, flags);
@@ -653,7 +653,7 @@ static int snd_sb16_capture_close(snd_pcm_substream_t * substream)
653 * DMA control interface 653 * DMA control interface
654 */ 654 */
655 655
656static int snd_sb16_set_dma_mode(sb_t *chip, int what) 656static int snd_sb16_set_dma_mode(struct snd_sb *chip, int what)
657{ 657{
658 if (chip->dma8 < 0 || chip->dma16 < 0) { 658 if (chip->dma8 < 0 || chip->dma16 < 0) {
659 snd_assert(what == 0, return -EINVAL); 659 snd_assert(what == 0, return -EINVAL);
@@ -671,7 +671,7 @@ static int snd_sb16_set_dma_mode(sb_t *chip, int what)
671 return 0; 671 return 0;
672} 672}
673 673
674static int snd_sb16_get_dma_mode(sb_t *chip) 674static int snd_sb16_get_dma_mode(struct snd_sb *chip)
675{ 675{
676 if (chip->dma8 < 0 || chip->dma16 < 0) 676 if (chip->dma8 < 0 || chip->dma16 < 0)
677 return 0; 677 return 0;
@@ -685,7 +685,7 @@ static int snd_sb16_get_dma_mode(sb_t *chip)
685 } 685 }
686} 686}
687 687
688static int snd_sb16_dma_control_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 688static int snd_sb16_dma_control_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
689{ 689{
690 static char *texts[3] = { 690 static char *texts[3] = {
691 "Auto", "Playback", "Capture" 691 "Auto", "Playback", "Capture"
@@ -700,9 +700,9 @@ static int snd_sb16_dma_control_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info
700 return 0; 700 return 0;
701} 701}
702 702
703static int snd_sb16_dma_control_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 703static int snd_sb16_dma_control_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
704{ 704{
705 sb_t *chip = snd_kcontrol_chip(kcontrol); 705 struct snd_sb *chip = snd_kcontrol_chip(kcontrol);
706 unsigned long flags; 706 unsigned long flags;
707 707
708 spin_lock_irqsave(&chip->reg_lock, flags); 708 spin_lock_irqsave(&chip->reg_lock, flags);
@@ -711,9 +711,9 @@ static int snd_sb16_dma_control_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_valu
711 return 0; 711 return 0;
712} 712}
713 713
714static int snd_sb16_dma_control_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 714static int snd_sb16_dma_control_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
715{ 715{
716 sb_t *chip = snd_kcontrol_chip(kcontrol); 716 struct snd_sb *chip = snd_kcontrol_chip(kcontrol);
717 unsigned long flags; 717 unsigned long flags;
718 unsigned char nval, oval; 718 unsigned char nval, oval;
719 int change; 719 int change;
@@ -728,7 +728,7 @@ static int snd_sb16_dma_control_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_valu
728 return change; 728 return change;
729} 729}
730 730
731static snd_kcontrol_new_t snd_sb16_dma_control = { 731static struct snd_kcontrol_new snd_sb16_dma_control = {
732 .iface = SNDRV_CTL_ELEM_IFACE_CARD, 732 .iface = SNDRV_CTL_ELEM_IFACE_CARD,
733 .name = "16-bit DMA Allocation", 733 .name = "16-bit DMA Allocation",
734 .info = snd_sb16_dma_control_info, 734 .info = snd_sb16_dma_control_info,
@@ -740,7 +740,7 @@ static snd_kcontrol_new_t snd_sb16_dma_control = {
740 * Initialization part 740 * Initialization part
741 */ 741 */
742 742
743int snd_sb16dsp_configure(sb_t * chip) 743int snd_sb16dsp_configure(struct snd_sb * chip)
744{ 744{
745 unsigned long flags; 745 unsigned long flags;
746 unsigned char irqreg = 0, dmareg = 0, mpureg; 746 unsigned char irqreg = 0, dmareg = 0, mpureg;
@@ -829,7 +829,7 @@ int snd_sb16dsp_configure(sb_t * chip)
829 return 0; 829 return 0;
830} 830}
831 831
832static snd_pcm_ops_t snd_sb16_playback_ops = { 832static struct snd_pcm_ops snd_sb16_playback_ops = {
833 .open = snd_sb16_playback_open, 833 .open = snd_sb16_playback_open,
834 .close = snd_sb16_playback_close, 834 .close = snd_sb16_playback_close,
835 .ioctl = snd_pcm_lib_ioctl, 835 .ioctl = snd_pcm_lib_ioctl,
@@ -840,7 +840,7 @@ static snd_pcm_ops_t snd_sb16_playback_ops = {
840 .pointer = snd_sb16_playback_pointer, 840 .pointer = snd_sb16_playback_pointer,
841}; 841};
842 842
843static snd_pcm_ops_t snd_sb16_capture_ops = { 843static struct snd_pcm_ops snd_sb16_capture_ops = {
844 .open = snd_sb16_capture_open, 844 .open = snd_sb16_capture_open,
845 .close = snd_sb16_capture_close, 845 .close = snd_sb16_capture_close,
846 .ioctl = snd_pcm_lib_ioctl, 846 .ioctl = snd_pcm_lib_ioctl,
@@ -851,10 +851,10 @@ static snd_pcm_ops_t snd_sb16_capture_ops = {
851 .pointer = snd_sb16_capture_pointer, 851 .pointer = snd_sb16_capture_pointer,
852}; 852};
853 853
854int snd_sb16dsp_pcm(sb_t * chip, int device, snd_pcm_t ** rpcm) 854int snd_sb16dsp_pcm(struct snd_sb * chip, int device, struct snd_pcm ** rpcm)
855{ 855{
856 snd_card_t *card = chip->card; 856 struct snd_card *card = chip->card;
857 snd_pcm_t *pcm; 857 struct snd_pcm *pcm;
858 int err; 858 int err;
859 859
860 if (rpcm) 860 if (rpcm)
@@ -882,7 +882,7 @@ int snd_sb16dsp_pcm(sb_t * chip, int device, snd_pcm_t ** rpcm)
882 return 0; 882 return 0;
883} 883}
884 884
885const snd_pcm_ops_t *snd_sb16dsp_get_pcm_ops(int direction) 885const struct snd_pcm_ops *snd_sb16dsp_get_pcm_ops(int direction)
886{ 886{
887 return direction == SNDRV_PCM_STREAM_PLAYBACK ? 887 return direction == SNDRV_PCM_STREAM_PLAYBACK ?
888 &snd_sb16_playback_ops : &snd_sb16_capture_ops; 888 &snd_sb16_playback_ops : &snd_sb16_capture_ops;
diff --git a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c
index 0bc0a3afdabc..5116038fcb4a 100644
--- a/sound/isa/sb/sb8.c
+++ b/sound/isa/sb/sb8.c
@@ -59,11 +59,11 @@ struct snd_sb8 {
59 struct resource *fm_res; /* used to block FM i/o region for legacy cards */ 59 struct resource *fm_res; /* used to block FM i/o region for legacy cards */
60}; 60};
61 61
62static snd_card_t *snd_sb8_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; 62static struct snd_card *snd_sb8_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
63 63
64static irqreturn_t snd_sb8_interrupt(int irq, void *dev_id, struct pt_regs *regs) 64static irqreturn_t snd_sb8_interrupt(int irq, void *dev_id, struct pt_regs *regs)
65{ 65{
66 sb_t *chip = dev_id; 66 struct snd_sb *chip = dev_id;
67 67
68 if (chip->open & SB_OPEN_PCM) { 68 if (chip->open & SB_OPEN_PCM) {
69 return snd_sb8dsp_interrupt(chip); 69 return snd_sb8dsp_interrupt(chip);
@@ -72,7 +72,7 @@ static irqreturn_t snd_sb8_interrupt(int irq, void *dev_id, struct pt_regs *regs
72 } 72 }
73} 73}
74 74
75static void snd_sb8_free(snd_card_t *card) 75static void snd_sb8_free(struct snd_card *card)
76{ 76{
77 struct snd_sb8 *acard = (struct snd_sb8 *)card->private_data; 77 struct snd_sb8 *acard = (struct snd_sb8 *)card->private_data;
78 78
@@ -83,10 +83,10 @@ static void snd_sb8_free(snd_card_t *card)
83 83
84static int __init snd_sb8_probe(int dev) 84static int __init snd_sb8_probe(int dev)
85{ 85{
86 sb_t *chip; 86 struct snd_sb *chip;
87 snd_card_t *card; 87 struct snd_card *card;
88 struct snd_sb8 *acard; 88 struct snd_sb8 *acard;
89 opl3_t *opl3; 89 struct snd_opl3 *opl3;
90 int err; 90 int err;
91 91
92 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 92 card = snd_card_new(index[dev], id[dev], THIS_MODULE,
diff --git a/sound/isa/sb/sb8_main.c b/sound/isa/sb/sb8_main.c
index 28d8afdf6891..aea9e5ec7b36 100644
--- a/sound/isa/sb/sb8_main.c
+++ b/sound/isa/sb/sb8_main.c
@@ -46,19 +46,19 @@ MODULE_LICENSE("GPL");
46#define SB8_DEN(v) ((SB8_CLOCK + (v) / 2) / (v)) 46#define SB8_DEN(v) ((SB8_CLOCK + (v) / 2) / (v))
47#define SB8_RATE(v) (SB8_CLOCK / SB8_DEN(v)) 47#define SB8_RATE(v) (SB8_CLOCK / SB8_DEN(v))
48 48
49static ratnum_t clock = { 49static struct snd_ratnum clock = {
50 .num = SB8_CLOCK, 50 .num = SB8_CLOCK,
51 .den_min = 1, 51 .den_min = 1,
52 .den_max = 256, 52 .den_max = 256,
53 .den_step = 1, 53 .den_step = 1,
54}; 54};
55 55
56static snd_pcm_hw_constraint_ratnums_t hw_constraints_clock = { 56static struct snd_pcm_hw_constraint_ratnums hw_constraints_clock = {
57 .nrats = 1, 57 .nrats = 1,
58 .rats = &clock, 58 .rats = &clock,
59}; 59};
60 60
61static ratnum_t stereo_clocks[] = { 61static struct snd_ratnum stereo_clocks[] = {
62 { 62 {
63 .num = SB8_CLOCK, 63 .num = SB8_CLOCK,
64 .den_min = SB8_DEN(22050), 64 .den_min = SB8_DEN(22050),
@@ -73,10 +73,10 @@ static ratnum_t stereo_clocks[] = {
73 } 73 }
74}; 74};
75 75
76static int snd_sb8_hw_constraint_rate_channels(snd_pcm_hw_params_t *params, 76static int snd_sb8_hw_constraint_rate_channels(struct snd_pcm_hw_params *params,
77 snd_pcm_hw_rule_t *rule) 77 struct snd_pcm_hw_rule *rule)
78{ 78{
79 snd_interval_t *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); 79 struct snd_interval *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
80 if (c->min > 1) { 80 if (c->min > 1) {
81 unsigned int num = 0, den = 0; 81 unsigned int num = 0, den = 0;
82 int err = snd_interval_ratnum(hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE), 82 int err = snd_interval_ratnum(hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE),
@@ -90,22 +90,22 @@ static int snd_sb8_hw_constraint_rate_channels(snd_pcm_hw_params_t *params,
90 return 0; 90 return 0;
91} 91}
92 92
93static int snd_sb8_hw_constraint_channels_rate(snd_pcm_hw_params_t *params, 93static int snd_sb8_hw_constraint_channels_rate(struct snd_pcm_hw_params *params,
94 snd_pcm_hw_rule_t *rule) 94 struct snd_pcm_hw_rule *rule)
95{ 95{
96 snd_interval_t *r = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); 96 struct snd_interval *r = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
97 if (r->min > SB8_RATE(22050) || r->max <= SB8_RATE(11025)) { 97 if (r->min > SB8_RATE(22050) || r->max <= SB8_RATE(11025)) {
98 snd_interval_t t = { .min = 1, .max = 1 }; 98 struct snd_interval t = { .min = 1, .max = 1 };
99 return snd_interval_refine(hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS), &t); 99 return snd_interval_refine(hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS), &t);
100 } 100 }
101 return 0; 101 return 0;
102} 102}
103 103
104static int snd_sb8_playback_prepare(snd_pcm_substream_t * substream) 104static int snd_sb8_playback_prepare(struct snd_pcm_substream *substream)
105{ 105{
106 unsigned long flags; 106 unsigned long flags;
107 sb_t *chip = snd_pcm_substream_chip(substream); 107 struct snd_sb *chip = snd_pcm_substream_chip(substream);
108 snd_pcm_runtime_t *runtime = substream->runtime; 108 struct snd_pcm_runtime *runtime = substream->runtime;
109 unsigned int mixreg, rate, size, count; 109 unsigned int mixreg, rate, size, count;
110 110
111 rate = runtime->rate; 111 rate = runtime->rate;
@@ -178,11 +178,11 @@ static int snd_sb8_playback_prepare(snd_pcm_substream_t * substream)
178 return 0; 178 return 0;
179} 179}
180 180
181static int snd_sb8_playback_trigger(snd_pcm_substream_t * substream, 181static int snd_sb8_playback_trigger(struct snd_pcm_substream *substream,
182 int cmd) 182 int cmd)
183{ 183{
184 unsigned long flags; 184 unsigned long flags;
185 sb_t *chip = snd_pcm_substream_chip(substream); 185 struct snd_sb *chip = snd_pcm_substream_chip(substream);
186 unsigned int count; 186 unsigned int count;
187 187
188 spin_lock_irqsave(&chip->reg_lock, flags); 188 spin_lock_irqsave(&chip->reg_lock, flags);
@@ -197,7 +197,7 @@ static int snd_sb8_playback_trigger(snd_pcm_substream_t * substream,
197 break; 197 break;
198 case SNDRV_PCM_TRIGGER_STOP: 198 case SNDRV_PCM_TRIGGER_STOP:
199 if (chip->playback_format == SB_DSP_HI_OUTPUT_AUTO) { 199 if (chip->playback_format == SB_DSP_HI_OUTPUT_AUTO) {
200 snd_pcm_runtime_t *runtime = substream->runtime; 200 struct snd_pcm_runtime *runtime = substream->runtime;
201 snd_sbdsp_reset(chip); 201 snd_sbdsp_reset(chip);
202 if (runtime->channels > 1) { 202 if (runtime->channels > 1) {
203 spin_lock(&chip->mixer_lock); 203 spin_lock(&chip->mixer_lock);
@@ -215,23 +215,23 @@ static int snd_sb8_playback_trigger(snd_pcm_substream_t * substream,
215 return 0; 215 return 0;
216} 216}
217 217
218static int snd_sb8_hw_params(snd_pcm_substream_t * substream, 218static int snd_sb8_hw_params(struct snd_pcm_substream *substream,
219 snd_pcm_hw_params_t * hw_params) 219 struct snd_pcm_hw_params *hw_params)
220{ 220{
221 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); 221 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
222} 222}
223 223
224static int snd_sb8_hw_free(snd_pcm_substream_t * substream) 224static int snd_sb8_hw_free(struct snd_pcm_substream *substream)
225{ 225{
226 snd_pcm_lib_free_pages(substream); 226 snd_pcm_lib_free_pages(substream);
227 return 0; 227 return 0;
228} 228}
229 229
230static int snd_sb8_capture_prepare(snd_pcm_substream_t * substream) 230static int snd_sb8_capture_prepare(struct snd_pcm_substream *substream)
231{ 231{
232 unsigned long flags; 232 unsigned long flags;
233 sb_t *chip = snd_pcm_substream_chip(substream); 233 struct snd_sb *chip = snd_pcm_substream_chip(substream);
234 snd_pcm_runtime_t *runtime = substream->runtime; 234 struct snd_pcm_runtime *runtime = substream->runtime;
235 unsigned int mixreg, rate, size, count; 235 unsigned int mixreg, rate, size, count;
236 236
237 rate = runtime->rate; 237 rate = runtime->rate;
@@ -290,11 +290,11 @@ static int snd_sb8_capture_prepare(snd_pcm_substream_t * substream)
290 return 0; 290 return 0;
291} 291}
292 292
293static int snd_sb8_capture_trigger(snd_pcm_substream_t * substream, 293static int snd_sb8_capture_trigger(struct snd_pcm_substream *substream,
294 int cmd) 294 int cmd)
295{ 295{
296 unsigned long flags; 296 unsigned long flags;
297 sb_t *chip = snd_pcm_substream_chip(substream); 297 struct snd_sb *chip = snd_pcm_substream_chip(substream);
298 unsigned int count; 298 unsigned int count;
299 299
300 spin_lock_irqsave(&chip->reg_lock, flags); 300 spin_lock_irqsave(&chip->reg_lock, flags);
@@ -309,7 +309,7 @@ static int snd_sb8_capture_trigger(snd_pcm_substream_t * substream,
309 break; 309 break;
310 case SNDRV_PCM_TRIGGER_STOP: 310 case SNDRV_PCM_TRIGGER_STOP:
311 if (chip->capture_format == SB_DSP_HI_INPUT_AUTO) { 311 if (chip->capture_format == SB_DSP_HI_INPUT_AUTO) {
312 snd_pcm_runtime_t *runtime = substream->runtime; 312 struct snd_pcm_runtime *runtime = substream->runtime;
313 snd_sbdsp_reset(chip); 313 snd_sbdsp_reset(chip);
314 if (runtime->channels > 1) { 314 if (runtime->channels > 1) {
315 /* restore input filter status */ 315 /* restore input filter status */
@@ -329,10 +329,10 @@ static int snd_sb8_capture_trigger(snd_pcm_substream_t * substream,
329 return 0; 329 return 0;
330} 330}
331 331
332irqreturn_t snd_sb8dsp_interrupt(sb_t *chip) 332irqreturn_t snd_sb8dsp_interrupt(struct snd_sb *chip)
333{ 333{
334 snd_pcm_substream_t *substream; 334 struct snd_pcm_substream *substream;
335 snd_pcm_runtime_t *runtime; 335 struct snd_pcm_runtime *runtime;
336 336
337 snd_sb_ack_8bit(chip); 337 snd_sb_ack_8bit(chip);
338 switch (chip->mode) { 338 switch (chip->mode) {
@@ -354,9 +354,9 @@ irqreturn_t snd_sb8dsp_interrupt(sb_t *chip)
354 return IRQ_HANDLED; 354 return IRQ_HANDLED;
355} 355}
356 356
357static snd_pcm_uframes_t snd_sb8_playback_pointer(snd_pcm_substream_t * substream) 357static snd_pcm_uframes_t snd_sb8_playback_pointer(struct snd_pcm_substream *substream)
358{ 358{
359 sb_t *chip = snd_pcm_substream_chip(substream); 359 struct snd_sb *chip = snd_pcm_substream_chip(substream);
360 size_t ptr; 360 size_t ptr;
361 361
362 if (chip->mode != SB_MODE_PLAYBACK_8) 362 if (chip->mode != SB_MODE_PLAYBACK_8)
@@ -365,9 +365,9 @@ static snd_pcm_uframes_t snd_sb8_playback_pointer(snd_pcm_substream_t * substrea
365 return bytes_to_frames(substream->runtime, ptr); 365 return bytes_to_frames(substream->runtime, ptr);
366} 366}
367 367
368static snd_pcm_uframes_t snd_sb8_capture_pointer(snd_pcm_substream_t * substream) 368static snd_pcm_uframes_t snd_sb8_capture_pointer(struct snd_pcm_substream *substream)
369{ 369{
370 sb_t *chip = snd_pcm_substream_chip(substream); 370 struct snd_sb *chip = snd_pcm_substream_chip(substream);
371 size_t ptr; 371 size_t ptr;
372 372
373 if (chip->mode != SB_MODE_CAPTURE_8) 373 if (chip->mode != SB_MODE_CAPTURE_8)
@@ -380,7 +380,7 @@ static snd_pcm_uframes_t snd_sb8_capture_pointer(snd_pcm_substream_t * substream
380 380
381 */ 381 */
382 382
383static snd_pcm_hardware_t snd_sb8_playback = 383static struct snd_pcm_hardware snd_sb8_playback =
384{ 384{
385 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 385 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
386 SNDRV_PCM_INFO_MMAP_VALID), 386 SNDRV_PCM_INFO_MMAP_VALID),
@@ -399,7 +399,7 @@ static snd_pcm_hardware_t snd_sb8_playback =
399 .fifo_size = 0, 399 .fifo_size = 0,
400}; 400};
401 401
402static snd_pcm_hardware_t snd_sb8_capture = 402static struct snd_pcm_hardware snd_sb8_capture =
403{ 403{
404 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 404 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
405 SNDRV_PCM_INFO_MMAP_VALID), 405 SNDRV_PCM_INFO_MMAP_VALID),
@@ -422,10 +422,10 @@ static snd_pcm_hardware_t snd_sb8_capture =
422 * 422 *
423 */ 423 */
424 424
425static int snd_sb8_open(snd_pcm_substream_t *substream) 425static int snd_sb8_open(struct snd_pcm_substream *substream)
426{ 426{
427 sb_t *chip = snd_pcm_substream_chip(substream); 427 struct snd_sb *chip = snd_pcm_substream_chip(substream);
428 snd_pcm_runtime_t *runtime = substream->runtime; 428 struct snd_pcm_runtime *runtime = substream->runtime;
429 unsigned long flags; 429 unsigned long flags;
430 430
431 spin_lock_irqsave(&chip->open_lock, flags); 431 spin_lock_irqsave(&chip->open_lock, flags);
@@ -468,10 +468,10 @@ static int snd_sb8_open(snd_pcm_substream_t *substream)
468 return 0; 468 return 0;
469} 469}
470 470
471static int snd_sb8_close(snd_pcm_substream_t *substream) 471static int snd_sb8_close(struct snd_pcm_substream *substream)
472{ 472{
473 unsigned long flags; 473 unsigned long flags;
474 sb_t *chip = snd_pcm_substream_chip(substream); 474 struct snd_sb *chip = snd_pcm_substream_chip(substream);
475 475
476 chip->playback_substream = NULL; 476 chip->playback_substream = NULL;
477 chip->capture_substream = NULL; 477 chip->capture_substream = NULL;
@@ -485,7 +485,7 @@ static int snd_sb8_close(snd_pcm_substream_t *substream)
485 * Initialization part 485 * Initialization part
486 */ 486 */
487 487
488static snd_pcm_ops_t snd_sb8_playback_ops = { 488static struct snd_pcm_ops snd_sb8_playback_ops = {
489 .open = snd_sb8_open, 489 .open = snd_sb8_open,
490 .close = snd_sb8_close, 490 .close = snd_sb8_close,
491 .ioctl = snd_pcm_lib_ioctl, 491 .ioctl = snd_pcm_lib_ioctl,
@@ -496,7 +496,7 @@ static snd_pcm_ops_t snd_sb8_playback_ops = {
496 .pointer = snd_sb8_playback_pointer, 496 .pointer = snd_sb8_playback_pointer,
497}; 497};
498 498
499static snd_pcm_ops_t snd_sb8_capture_ops = { 499static struct snd_pcm_ops snd_sb8_capture_ops = {
500 .open = snd_sb8_open, 500 .open = snd_sb8_open,
501 .close = snd_sb8_close, 501 .close = snd_sb8_close,
502 .ioctl = snd_pcm_lib_ioctl, 502 .ioctl = snd_pcm_lib_ioctl,
@@ -507,10 +507,10 @@ static snd_pcm_ops_t snd_sb8_capture_ops = {
507 .pointer = snd_sb8_capture_pointer, 507 .pointer = snd_sb8_capture_pointer,
508}; 508};
509 509
510int snd_sb8dsp_pcm(sb_t *chip, int device, snd_pcm_t ** rpcm) 510int snd_sb8dsp_pcm(struct snd_sb *chip, int device, struct snd_pcm ** rpcm)
511{ 511{
512 snd_card_t *card = chip->card; 512 struct snd_card *card = chip->card;
513 snd_pcm_t *pcm; 513 struct snd_pcm *pcm;
514 int err; 514 int err;
515 515
516 if (rpcm) 516 if (rpcm)
diff --git a/sound/isa/sb/sb8_midi.c b/sound/isa/sb/sb8_midi.c
index d2c633a40e74..c549aceea294 100644
--- a/sound/isa/sb/sb8_midi.c
+++ b/sound/isa/sb/sb8_midi.c
@@ -36,9 +36,9 @@
36 36
37 */ 37 */
38 38
39irqreturn_t snd_sb8dsp_midi_interrupt(sb_t * chip) 39irqreturn_t snd_sb8dsp_midi_interrupt(struct snd_sb * chip)
40{ 40{
41 snd_rawmidi_t *rmidi; 41 struct snd_rawmidi *rmidi;
42 int max = 64; 42 int max = 64;
43 char byte; 43 char byte;
44 44
@@ -63,10 +63,10 @@ irqreturn_t snd_sb8dsp_midi_interrupt(sb_t * chip)
63 63
64 */ 64 */
65 65
66static int snd_sb8dsp_midi_input_open(snd_rawmidi_substream_t * substream) 66static int snd_sb8dsp_midi_input_open(struct snd_rawmidi_substream *substream)
67{ 67{
68 unsigned long flags; 68 unsigned long flags;
69 sb_t *chip; 69 struct snd_sb *chip;
70 unsigned int valid_open_flags; 70 unsigned int valid_open_flags;
71 71
72 chip = substream->rmidi->private_data; 72 chip = substream->rmidi->private_data;
@@ -90,10 +90,10 @@ static int snd_sb8dsp_midi_input_open(snd_rawmidi_substream_t * substream)
90 return 0; 90 return 0;
91} 91}
92 92
93static int snd_sb8dsp_midi_output_open(snd_rawmidi_substream_t * substream) 93static int snd_sb8dsp_midi_output_open(struct snd_rawmidi_substream *substream)
94{ 94{
95 unsigned long flags; 95 unsigned long flags;
96 sb_t *chip; 96 struct snd_sb *chip;
97 unsigned int valid_open_flags; 97 unsigned int valid_open_flags;
98 98
99 chip = substream->rmidi->private_data; 99 chip = substream->rmidi->private_data;
@@ -117,10 +117,10 @@ static int snd_sb8dsp_midi_output_open(snd_rawmidi_substream_t * substream)
117 return 0; 117 return 0;
118} 118}
119 119
120static int snd_sb8dsp_midi_input_close(snd_rawmidi_substream_t * substream) 120static int snd_sb8dsp_midi_input_close(struct snd_rawmidi_substream *substream)
121{ 121{
122 unsigned long flags; 122 unsigned long flags;
123 sb_t *chip; 123 struct snd_sb *chip;
124 124
125 chip = substream->rmidi->private_data; 125 chip = substream->rmidi->private_data;
126 spin_lock_irqsave(&chip->open_lock, flags); 126 spin_lock_irqsave(&chip->open_lock, flags);
@@ -135,10 +135,10 @@ static int snd_sb8dsp_midi_input_close(snd_rawmidi_substream_t * substream)
135 return 0; 135 return 0;
136} 136}
137 137
138static int snd_sb8dsp_midi_output_close(snd_rawmidi_substream_t * substream) 138static int snd_sb8dsp_midi_output_close(struct snd_rawmidi_substream *substream)
139{ 139{
140 unsigned long flags; 140 unsigned long flags;
141 sb_t *chip; 141 struct snd_sb *chip;
142 142
143 chip = substream->rmidi->private_data; 143 chip = substream->rmidi->private_data;
144 spin_lock_irqsave(&chip->open_lock, flags); 144 spin_lock_irqsave(&chip->open_lock, flags);
@@ -153,10 +153,10 @@ static int snd_sb8dsp_midi_output_close(snd_rawmidi_substream_t * substream)
153 return 0; 153 return 0;
154} 154}
155 155
156static void snd_sb8dsp_midi_input_trigger(snd_rawmidi_substream_t * substream, int up) 156static void snd_sb8dsp_midi_input_trigger(struct snd_rawmidi_substream *substream, int up)
157{ 157{
158 unsigned long flags; 158 unsigned long flags;
159 sb_t *chip; 159 struct snd_sb *chip;
160 160
161 chip = substream->rmidi->private_data; 161 chip = substream->rmidi->private_data;
162 spin_lock_irqsave(&chip->open_lock, flags); 162 spin_lock_irqsave(&chip->open_lock, flags);
@@ -176,10 +176,10 @@ static void snd_sb8dsp_midi_input_trigger(snd_rawmidi_substream_t * substream, i
176 spin_unlock_irqrestore(&chip->open_lock, flags); 176 spin_unlock_irqrestore(&chip->open_lock, flags);
177} 177}
178 178
179static void snd_sb8dsp_midi_output_write(snd_rawmidi_substream_t * substream) 179static void snd_sb8dsp_midi_output_write(struct snd_rawmidi_substream *substream)
180{ 180{
181 unsigned long flags; 181 unsigned long flags;
182 sb_t *chip; 182 struct snd_sb *chip;
183 char byte; 183 char byte;
184 int max = 32; 184 int max = 32;
185 185
@@ -214,8 +214,8 @@ static void snd_sb8dsp_midi_output_write(snd_rawmidi_substream_t * substream)
214 214
215static void snd_sb8dsp_midi_output_timer(unsigned long data) 215static void snd_sb8dsp_midi_output_timer(unsigned long data)
216{ 216{
217 snd_rawmidi_substream_t * substream = (snd_rawmidi_substream_t *) data; 217 struct snd_rawmidi_substream *substream = (struct snd_rawmidi_substream *) data;
218 sb_t * chip = substream->rmidi->private_data; 218 struct snd_sb * chip = substream->rmidi->private_data;
219 unsigned long flags; 219 unsigned long flags;
220 220
221 spin_lock_irqsave(&chip->open_lock, flags); 221 spin_lock_irqsave(&chip->open_lock, flags);
@@ -225,10 +225,10 @@ static void snd_sb8dsp_midi_output_timer(unsigned long data)
225 snd_sb8dsp_midi_output_write(substream); 225 snd_sb8dsp_midi_output_write(substream);
226} 226}
227 227
228static void snd_sb8dsp_midi_output_trigger(snd_rawmidi_substream_t * substream, int up) 228static void snd_sb8dsp_midi_output_trigger(struct snd_rawmidi_substream *substream, int up)
229{ 229{
230 unsigned long flags; 230 unsigned long flags;
231 sb_t *chip; 231 struct snd_sb *chip;
232 232
233 chip = substream->rmidi->private_data; 233 chip = substream->rmidi->private_data;
234 spin_lock_irqsave(&chip->open_lock, flags); 234 spin_lock_irqsave(&chip->open_lock, flags);
@@ -256,23 +256,23 @@ static void snd_sb8dsp_midi_output_trigger(snd_rawmidi_substream_t * substream,
256 256
257 */ 257 */
258 258
259static snd_rawmidi_ops_t snd_sb8dsp_midi_output = 259static struct snd_rawmidi_ops snd_sb8dsp_midi_output =
260{ 260{
261 .open = snd_sb8dsp_midi_output_open, 261 .open = snd_sb8dsp_midi_output_open,
262 .close = snd_sb8dsp_midi_output_close, 262 .close = snd_sb8dsp_midi_output_close,
263 .trigger = snd_sb8dsp_midi_output_trigger, 263 .trigger = snd_sb8dsp_midi_output_trigger,
264}; 264};
265 265
266static snd_rawmidi_ops_t snd_sb8dsp_midi_input = 266static struct snd_rawmidi_ops snd_sb8dsp_midi_input =
267{ 267{
268 .open = snd_sb8dsp_midi_input_open, 268 .open = snd_sb8dsp_midi_input_open,
269 .close = snd_sb8dsp_midi_input_close, 269 .close = snd_sb8dsp_midi_input_close,
270 .trigger = snd_sb8dsp_midi_input_trigger, 270 .trigger = snd_sb8dsp_midi_input_trigger,
271}; 271};
272 272
273int snd_sb8dsp_midi(sb_t *chip, int device, snd_rawmidi_t ** rrawmidi) 273int snd_sb8dsp_midi(struct snd_sb *chip, int device, struct snd_rawmidi ** rrawmidi)
274{ 274{
275 snd_rawmidi_t *rmidi; 275 struct snd_rawmidi *rmidi;
276 int err; 276 int err;
277 277
278 if (rrawmidi) 278 if (rrawmidi)
diff --git a/sound/isa/sb/sb_common.c b/sound/isa/sb/sb_common.c
index 603e923b5d2f..eb86b4456eef 100644
--- a/sound/isa/sb/sb_common.c
+++ b/sound/isa/sb/sb_common.c
@@ -41,7 +41,7 @@ MODULE_LICENSE("GPL");
41 41
42#undef IO_DEBUG 42#undef IO_DEBUG
43 43
44int snd_sbdsp_command(sb_t *chip, unsigned char val) 44int snd_sbdsp_command(struct snd_sb *chip, unsigned char val)
45{ 45{
46 int i; 46 int i;
47#ifdef IO_DEBUG 47#ifdef IO_DEBUG
@@ -56,7 +56,7 @@ int snd_sbdsp_command(sb_t *chip, unsigned char val)
56 return 0; 56 return 0;
57} 57}
58 58
59int snd_sbdsp_get_byte(sb_t *chip) 59int snd_sbdsp_get_byte(struct snd_sb *chip)
60{ 60{
61 int val; 61 int val;
62 int i; 62 int i;
@@ -73,7 +73,7 @@ int snd_sbdsp_get_byte(sb_t *chip)
73 return -ENODEV; 73 return -ENODEV;
74} 74}
75 75
76int snd_sbdsp_reset(sb_t *chip) 76int snd_sbdsp_reset(struct snd_sb *chip)
77{ 77{
78 int i; 78 int i;
79 79
@@ -92,7 +92,7 @@ int snd_sbdsp_reset(sb_t *chip)
92 return -ENODEV; 92 return -ENODEV;
93} 93}
94 94
95static int snd_sbdsp_version(sb_t * chip) 95static int snd_sbdsp_version(struct snd_sb * chip)
96{ 96{
97 unsigned int result = -ENODEV; 97 unsigned int result = -ENODEV;
98 98
@@ -102,7 +102,7 @@ static int snd_sbdsp_version(sb_t * chip)
102 return result; 102 return result;
103} 103}
104 104
105static int snd_sbdsp_probe(sb_t * chip) 105static int snd_sbdsp_probe(struct snd_sb * chip)
106{ 106{
107 int version; 107 int version;
108 int major, minor; 108 int major, minor;
@@ -176,7 +176,7 @@ static int snd_sbdsp_probe(sb_t * chip)
176 return 0; 176 return 0;
177} 177}
178 178
179static int snd_sbdsp_free(sb_t *chip) 179static int snd_sbdsp_free(struct snd_sb *chip)
180{ 180{
181 if (chip->res_port) 181 if (chip->res_port)
182 release_and_free_resource(chip->res_port); 182 release_and_free_resource(chip->res_port);
@@ -196,24 +196,24 @@ static int snd_sbdsp_free(sb_t *chip)
196 return 0; 196 return 0;
197} 197}
198 198
199static int snd_sbdsp_dev_free(snd_device_t *device) 199static int snd_sbdsp_dev_free(struct snd_device *device)
200{ 200{
201 sb_t *chip = device->device_data; 201 struct snd_sb *chip = device->device_data;
202 return snd_sbdsp_free(chip); 202 return snd_sbdsp_free(chip);
203} 203}
204 204
205int snd_sbdsp_create(snd_card_t *card, 205int snd_sbdsp_create(struct snd_card *card,
206 unsigned long port, 206 unsigned long port,
207 int irq, 207 int irq,
208 irqreturn_t (*irq_handler)(int, void *, struct pt_regs *), 208 irqreturn_t (*irq_handler)(int, void *, struct pt_regs *),
209 int dma8, 209 int dma8,
210 int dma16, 210 int dma16,
211 unsigned short hardware, 211 unsigned short hardware,
212 sb_t **r_chip) 212 struct snd_sb **r_chip)
213{ 213{
214 sb_t *chip; 214 struct snd_sb *chip;
215 int err; 215 int err;
216 static snd_device_ops_t ops = { 216 static struct snd_device_ops ops = {
217 .dev_free = snd_sbdsp_dev_free, 217 .dev_free = snd_sbdsp_dev_free,
218 }; 218 };
219 219
diff --git a/sound/isa/sb/sb_mixer.c b/sound/isa/sb/sb_mixer.c
index 23cfa6a6a0af..6e0b935a8b85 100644
--- a/sound/isa/sb/sb_mixer.c
+++ b/sound/isa/sb/sb_mixer.c
@@ -29,7 +29,7 @@
29 29
30#undef IO_DEBUG 30#undef IO_DEBUG
31 31
32void snd_sbmixer_write(sb_t *chip, unsigned char reg, unsigned char data) 32void snd_sbmixer_write(struct snd_sb *chip, unsigned char reg, unsigned char data)
33{ 33{
34 outb(reg, SBP(chip, MIXER_ADDR)); 34 outb(reg, SBP(chip, MIXER_ADDR));
35 udelay(10); 35 udelay(10);
@@ -40,7 +40,7 @@ void snd_sbmixer_write(sb_t *chip, unsigned char reg, unsigned char data)
40#endif 40#endif
41} 41}
42 42
43unsigned char snd_sbmixer_read(sb_t *chip, unsigned char reg) 43unsigned char snd_sbmixer_read(struct snd_sb *chip, unsigned char reg)
44{ 44{
45 unsigned char result; 45 unsigned char result;
46 46
@@ -58,7 +58,7 @@ unsigned char snd_sbmixer_read(sb_t *chip, unsigned char reg)
58 * Single channel mixer element 58 * Single channel mixer element
59 */ 59 */
60 60
61static int snd_sbmixer_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 61static int snd_sbmixer_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
62{ 62{
63 int mask = (kcontrol->private_value >> 24) & 0xff; 63 int mask = (kcontrol->private_value >> 24) & 0xff;
64 64
@@ -69,9 +69,9 @@ static int snd_sbmixer_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
69 return 0; 69 return 0;
70} 70}
71 71
72static int snd_sbmixer_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 72static int snd_sbmixer_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
73{ 73{
74 sb_t *sb = snd_kcontrol_chip(kcontrol); 74 struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
75 unsigned long flags; 75 unsigned long flags;
76 int reg = kcontrol->private_value & 0xff; 76 int reg = kcontrol->private_value & 0xff;
77 int shift = (kcontrol->private_value >> 16) & 0xff; 77 int shift = (kcontrol->private_value >> 16) & 0xff;
@@ -85,9 +85,9 @@ static int snd_sbmixer_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
85 return 0; 85 return 0;
86} 86}
87 87
88static int snd_sbmixer_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 88static int snd_sbmixer_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
89{ 89{
90 sb_t *sb = snd_kcontrol_chip(kcontrol); 90 struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
91 unsigned long flags; 91 unsigned long flags;
92 int reg = kcontrol->private_value & 0xff; 92 int reg = kcontrol->private_value & 0xff;
93 int shift = (kcontrol->private_value >> 16) & 0x07; 93 int shift = (kcontrol->private_value >> 16) & 0x07;
@@ -110,7 +110,7 @@ static int snd_sbmixer_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
110 * Double channel mixer element 110 * Double channel mixer element
111 */ 111 */
112 112
113static int snd_sbmixer_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 113static int snd_sbmixer_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
114{ 114{
115 int mask = (kcontrol->private_value >> 24) & 0xff; 115 int mask = (kcontrol->private_value >> 24) & 0xff;
116 116
@@ -121,9 +121,9 @@ static int snd_sbmixer_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
121 return 0; 121 return 0;
122} 122}
123 123
124static int snd_sbmixer_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 124static int snd_sbmixer_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
125{ 125{
126 sb_t *sb = snd_kcontrol_chip(kcontrol); 126 struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
127 unsigned long flags; 127 unsigned long flags;
128 int left_reg = kcontrol->private_value & 0xff; 128 int left_reg = kcontrol->private_value & 0xff;
129 int right_reg = (kcontrol->private_value >> 8) & 0xff; 129 int right_reg = (kcontrol->private_value >> 8) & 0xff;
@@ -141,9 +141,9 @@ static int snd_sbmixer_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
141 return 0; 141 return 0;
142} 142}
143 143
144static int snd_sbmixer_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 144static int snd_sbmixer_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
145{ 145{
146 sb_t *sb = snd_kcontrol_chip(kcontrol); 146 struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
147 unsigned long flags; 147 unsigned long flags;
148 int left_reg = kcontrol->private_value & 0xff; 148 int left_reg = kcontrol->private_value & 0xff;
149 int right_reg = (kcontrol->private_value >> 8) & 0xff; 149 int right_reg = (kcontrol->private_value >> 8) & 0xff;
@@ -181,7 +181,7 @@ static int snd_sbmixer_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
181 * DT-019x / ALS-007 capture/input switch 181 * DT-019x / ALS-007 capture/input switch
182 */ 182 */
183 183
184static int snd_dt019x_input_sw_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 184static int snd_dt019x_input_sw_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
185{ 185{
186 static char *texts[5] = { 186 static char *texts[5] = {
187 "CD", "Mic", "Line", "Synth", "Master" 187 "CD", "Mic", "Line", "Synth", "Master"
@@ -196,9 +196,9 @@ static int snd_dt019x_input_sw_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_
196 return 0; 196 return 0;
197} 197}
198 198
199static int snd_dt019x_input_sw_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 199static int snd_dt019x_input_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
200{ 200{
201 sb_t *sb = snd_kcontrol_chip(kcontrol); 201 struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
202 unsigned long flags; 202 unsigned long flags;
203 unsigned char oval; 203 unsigned char oval;
204 204
@@ -232,9 +232,9 @@ static int snd_dt019x_input_sw_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value
232 return 0; 232 return 0;
233} 233}
234 234
235static int snd_dt019x_input_sw_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 235static int snd_dt019x_input_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
236{ 236{
237 sb_t *sb = snd_kcontrol_chip(kcontrol); 237 struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
238 unsigned long flags; 238 unsigned long flags;
239 int change; 239 int change;
240 unsigned char nval, oval; 240 unsigned char nval, oval;
@@ -273,7 +273,7 @@ static int snd_dt019x_input_sw_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value
273 * SBPRO input multiplexer 273 * SBPRO input multiplexer
274 */ 274 */
275 275
276static int snd_sb8mixer_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 276static int snd_sb8mixer_info_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
277{ 277{
278 static char *texts[3] = { 278 static char *texts[3] = {
279 "Mic", "CD", "Line" 279 "Mic", "CD", "Line"
@@ -289,9 +289,9 @@ static int snd_sb8mixer_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *
289} 289}
290 290
291 291
292static int snd_sb8mixer_get_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 292static int snd_sb8mixer_get_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
293{ 293{
294 sb_t *sb = snd_kcontrol_chip(kcontrol); 294 struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
295 unsigned long flags; 295 unsigned long flags;
296 unsigned char oval; 296 unsigned char oval;
297 297
@@ -312,9 +312,9 @@ static int snd_sb8mixer_get_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
312 return 0; 312 return 0;
313} 313}
314 314
315static int snd_sb8mixer_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 315static int snd_sb8mixer_put_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
316{ 316{
317 sb_t *sb = snd_kcontrol_chip(kcontrol); 317 struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
318 unsigned long flags; 318 unsigned long flags;
319 int change; 319 int change;
320 unsigned char nval, oval; 320 unsigned char nval, oval;
@@ -346,7 +346,7 @@ static int snd_sb8mixer_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
346 * SB16 input switch 346 * SB16 input switch
347 */ 347 */
348 348
349static int snd_sb16mixer_info_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) 349static int snd_sb16mixer_info_input_sw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
350{ 350{
351 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 351 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
352 uinfo->count = 4; 352 uinfo->count = 4;
@@ -355,9 +355,9 @@ static int snd_sb16mixer_info_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_i
355 return 0; 355 return 0;
356} 356}
357 357
358static int snd_sb16mixer_get_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 358static int snd_sb16mixer_get_input_sw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
359{ 359{
360 sb_t *sb = snd_kcontrol_chip(kcontrol); 360 struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
361 unsigned long flags; 361 unsigned long flags;
362 int reg1 = kcontrol->private_value & 0xff; 362 int reg1 = kcontrol->private_value & 0xff;
363 int reg2 = (kcontrol->private_value >> 8) & 0xff; 363 int reg2 = (kcontrol->private_value >> 8) & 0xff;
@@ -376,9 +376,9 @@ static int snd_sb16mixer_get_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_va
376 return 0; 376 return 0;
377} 377}
378 378
379static int snd_sb16mixer_put_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 379static int snd_sb16mixer_put_input_sw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
380{ 380{
381 sb_t *sb = snd_kcontrol_chip(kcontrol); 381 struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
382 unsigned long flags; 382 unsigned long flags;
383 int reg1 = kcontrol->private_value & 0xff; 383 int reg1 = kcontrol->private_value & 0xff;
384 int reg2 = (kcontrol->private_value >> 8) & 0xff; 384 int reg2 = (kcontrol->private_value >> 8) & 0xff;
@@ -410,9 +410,9 @@ static int snd_sb16mixer_put_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_va
410 */ 410 */
411/* 411/*
412 */ 412 */
413int snd_sbmixer_add_ctl(sb_t *chip, const char *name, int index, int type, unsigned long value) 413int snd_sbmixer_add_ctl(struct snd_sb *chip, const char *name, int index, int type, unsigned long value)
414{ 414{
415 static snd_kcontrol_new_t newctls[] = { 415 static struct snd_kcontrol_new newctls[] = {
416 [SB_MIX_SINGLE] = { 416 [SB_MIX_SINGLE] = {
417 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 417 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
418 .info = snd_sbmixer_info_single, 418 .info = snd_sbmixer_info_single,
@@ -444,7 +444,7 @@ int snd_sbmixer_add_ctl(sb_t *chip, const char *name, int index, int type, unsig
444 .put = snd_dt019x_input_sw_put, 444 .put = snd_dt019x_input_sw_put,
445 }, 445 },
446 }; 446 };
447 snd_kcontrol_t *ctl; 447 struct snd_kcontrol *ctl;
448 int err; 448 int err;
449 449
450 ctl = snd_ctl_new1(&newctls[type], chip); 450 ctl = snd_ctl_new1(&newctls[type], chip);
@@ -758,7 +758,7 @@ static unsigned char snd_als4000_init_values[][2] = {
758 758
759/* 759/*
760 */ 760 */
761static int snd_sbmixer_init(sb_t *chip, 761static int snd_sbmixer_init(struct snd_sb *chip,
762 struct sbmix_elem **controls, 762 struct sbmix_elem **controls,
763 int controls_count, 763 int controls_count,
764 unsigned char map[][2], 764 unsigned char map[][2],
@@ -766,7 +766,7 @@ static int snd_sbmixer_init(sb_t *chip,
766 char *name) 766 char *name)
767{ 767{
768 unsigned long flags; 768 unsigned long flags;
769 snd_card_t *card = chip->card; 769 struct snd_card *card = chip->card;
770 int idx, err; 770 int idx, err;
771 771
772 /* mixer reset */ 772 /* mixer reset */
@@ -790,9 +790,9 @@ static int snd_sbmixer_init(sb_t *chip,
790 return 0; 790 return 0;
791} 791}
792 792
793int snd_sbmixer_new(sb_t *chip) 793int snd_sbmixer_new(struct snd_sb *chip)
794{ 794{
795 snd_card_t * card; 795 struct snd_card *card;
796 int err; 796 int err;
797 797
798 snd_assert(chip != NULL && chip->card != NULL, return -EINVAL); 798 snd_assert(chip != NULL && chip->card != NULL, return -EINVAL);