diff options
Diffstat (limited to 'sound/isa/sb/emu8000.c')
-rw-r--r-- | sound/isa/sb/emu8000.c | 121 |
1 files changed, 61 insertions, 60 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 */ |
48 | void snd_emu8000_poke(emu8000_t *emu, unsigned int port, unsigned int reg, unsigned int val) | 48 | void 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 */ |
61 | unsigned short snd_emu8000_peek(emu8000_t *emu, unsigned int port, unsigned int reg) | 61 | unsigned 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 */ |
76 | void snd_emu8000_poke_dw(emu8000_t *emu, unsigned int port, unsigned int reg, unsigned int val) | 76 | void 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 */ |
90 | unsigned int snd_emu8000_peek_dw(emu8000_t *emu, unsigned int port, unsigned int reg) | 90 | unsigned 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 |
110 | snd_emu8000_dma_chan(emu8000_t *emu, int ch, int mode) | 110 | snd_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 | */ |
134 | static void __init | 134 | static void __init |
135 | snd_emu8000_read_wait(emu8000_t *emu) | 135 | snd_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 | */ |
146 | static void __init | 146 | static void __init |
147 | snd_emu8000_write_wait(emu8000_t *emu) | 147 | snd_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 | */ |
159 | static int __init | 159 | static int __init |
160 | snd_emu8000_detect(emu8000_t *emu) | 160 | snd_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 | */ |
185 | static void __init | 185 | static void __init |
186 | init_audio(emu8000_t *emu) | 186 | init_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 | */ |
226 | static void __init | 226 | static void __init |
227 | init_dma(emu8000_t *emu) | 227 | init_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 | */ |
330 | static void __init | 330 | static void __init |
331 | send_array(emu8000_t *emu, unsigned short *data, int size) | 331 | send_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 | */ |
352 | static void __init | 352 | static void __init |
353 | init_arrays(emu8000_t *emu) | 353 | init_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 | */ |
378 | static void __init | 378 | static void __init |
379 | size_dram(emu8000_t *emu) | 379 | size_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 |
458 | snd_emu8000_init_fm(emu8000_t *emu) | 458 | snd_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 | */ |
503 | static void __init | 503 | static void __init |
504 | snd_emu8000_init_hw(emu8000_t *emu) | 504 | snd_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 |
588 | snd_emu8000_update_equalizer(emu8000_t *emu) | 588 | snd_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 | ||
631 | typedef struct soundfont_chorus_fx_t { | 631 | struct 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 */ |
640 | static char chorus_defined[SNDRV_EMU8000_CHORUS_NUMBERS]; | 640 | static char chorus_defined[SNDRV_EMU8000_CHORUS_NUMBERS]; |
641 | static soundfont_chorus_fx_t chorus_parm[SNDRV_EMU8000_CHORUS_NUMBERS] = { | 641 | static 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 |
653 | snd_emu8000_load_chorus_fx(emu8000_t *emu, int mode, const void __user *buf, long len) | 653 | snd_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 |
668 | snd_emu8000_update_chorus_mode(emu8000_t *emu) | 668 | snd_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 | ||
702 | typedef struct soundfont_reverb_fx_t { | 702 | struct 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 | */ |
709 | static char reverb_defined[SNDRV_EMU8000_CHORUS_NUMBERS]; | 709 | static char reverb_defined[SNDRV_EMU8000_CHORUS_NUMBERS]; |
710 | static soundfont_reverb_fx_t reverb_parm[SNDRV_EMU8000_REVERB_NUMBERS] = { | 710 | static 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 |
780 | snd_emu8000_load_reverb_fx(emu8000_t *emu, int mode, const void __user *buf, long len) | 780 | snd_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 |
796 | snd_emu8000_update_reverb_mode(emu8000_t *emu) | 796 | snd_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 | */ |
822 | static int mixer_bass_treble_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) | 822 | static 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 | ||
831 | static int mixer_bass_treble_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 831 | static 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 | ||
839 | static int mixer_bass_treble_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 839 | static 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 | ||
860 | static snd_kcontrol_new_t mixer_bass_control = | 860 | static 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 | ||
870 | static snd_kcontrol_new_t mixer_treble_control = | 870 | static 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 | */ |
883 | static int mixer_chorus_reverb_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) | 883 | static 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 | ||
892 | static int mixer_chorus_reverb_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 892 | static 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 | ||
900 | static int mixer_chorus_reverb_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 900 | static 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 | ||
927 | static snd_kcontrol_new_t mixer_chorus_mode_control = | 927 | static 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 | ||
937 | static snd_kcontrol_new_t mixer_reverb_mode_control = | 937 | static 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 | */ |
950 | static int mixer_fm_depth_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) | 950 | static 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 | ||
959 | static int mixer_fm_depth_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 959 | static 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 | ||
967 | static int mixer_fm_depth_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 967 | static 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 | ||
989 | static snd_kcontrol_new_t mixer_fm_chorus_depth_control = | 989 | static 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 | ||
999 | static snd_kcontrol_new_t mixer_fm_reverb_depth_control = | 999 | static 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 | ||
1010 | static snd_kcontrol_new_t *mixer_defs[EMU8000_NUM_CONTROLS] = { | 1010 | static 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 | */ |
1022 | static int __init | 1022 | static int __init |
1023 | snd_emu8000_create_mixer(snd_card_t *card, emu8000_t *emu) | 1023 | snd_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 | */ |
1052 | static int snd_emu8000_free(emu8000_t *hw) | 1052 | static 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 | */ |
1063 | static int snd_emu8000_dev_free(snd_device_t *device) | 1063 | static 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 | */ |
1072 | int __init | 1072 | int __init |
1073 | snd_emu8000_new(snd_card_t *card, int index, long port, int seq_ports, snd_seq_device_t **awe_ret) | 1073 | snd_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; |