diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-11-17 08:36:44 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 06:18:27 -0500 |
commit | 5e2da20648e39a0e3cb33861499b686a6fe38112 (patch) | |
tree | e5f3117e2f44b262f9b6d45cfbd9e17a0ea913bd /sound/isa/gus | |
parent | 029d64b0cfa30abc10f722e2f67d282abe09c9da (diff) |
[ALSA] Remove xxx_t typedefs: ISA GUS
Remove xxx_t typedefs from the ISA GUS drivers.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa/gus')
-rw-r--r-- | sound/isa/gus/gus_dma.c | 24 | ||||
-rw-r--r-- | sound/isa/gus/gus_dram.c | 8 | ||||
-rw-r--r-- | sound/isa/gus/gus_instr.c | 42 | ||||
-rw-r--r-- | sound/isa/gus/gus_io.c | 72 | ||||
-rw-r--r-- | sound/isa/gus/gus_irq.c | 16 | ||||
-rw-r--r-- | sound/isa/gus/gus_main.c | 54 | ||||
-rw-r--r-- | sound/isa/gus/gus_mem.c | 64 | ||||
-rw-r--r-- | sound/isa/gus/gus_mem_proc.c | 26 | ||||
-rw-r--r-- | sound/isa/gus/gus_mixer.c | 28 | ||||
-rw-r--r-- | sound/isa/gus/gus_pcm.c | 194 | ||||
-rw-r--r-- | sound/isa/gus/gus_reset.c | 54 | ||||
-rw-r--r-- | sound/isa/gus/gus_sample.c | 42 | ||||
-rw-r--r-- | sound/isa/gus/gus_simple.c | 86 | ||||
-rw-r--r-- | sound/isa/gus/gus_synth.c | 70 | ||||
-rw-r--r-- | sound/isa/gus/gus_timer.c | 44 | ||||
-rw-r--r-- | sound/isa/gus/gus_uart.c | 38 | ||||
-rw-r--r-- | sound/isa/gus/gus_volume.c | 4 | ||||
-rw-r--r-- | sound/isa/gus/gusclassic.c | 10 | ||||
-rw-r--r-- | sound/isa/gus/gusextreme.c | 26 | ||||
-rw-r--r-- | sound/isa/gus/gusmax.c | 26 | ||||
-rw-r--r-- | sound/isa/gus/interwave.c | 60 |
21 files changed, 500 insertions, 488 deletions
diff --git a/sound/isa/gus/gus_dma.c b/sound/isa/gus/gus_dma.c index ef1b2e9832e4..930f4bc56f34 100644 --- a/sound/isa/gus/gus_dma.c +++ b/sound/isa/gus/gus_dma.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <sound/core.h> | 25 | #include <sound/core.h> |
26 | #include <sound/gus.h> | 26 | #include <sound/gus.h> |
27 | 27 | ||
28 | static void snd_gf1_dma_ack(snd_gus_card_t * gus) | 28 | static void snd_gf1_dma_ack(struct snd_gus_card * gus) |
29 | { | 29 | { |
30 | unsigned long flags; | 30 | unsigned long flags; |
31 | 31 | ||
@@ -35,7 +35,7 @@ static void snd_gf1_dma_ack(snd_gus_card_t * gus) | |||
35 | spin_unlock_irqrestore(&gus->reg_lock, flags); | 35 | spin_unlock_irqrestore(&gus->reg_lock, flags); |
36 | } | 36 | } |
37 | 37 | ||
38 | static void snd_gf1_dma_program(snd_gus_card_t * gus, | 38 | static void snd_gf1_dma_program(struct snd_gus_card * gus, |
39 | unsigned int addr, | 39 | unsigned int addr, |
40 | unsigned long buf_addr, | 40 | unsigned long buf_addr, |
41 | unsigned int count, | 41 | unsigned int count, |
@@ -91,9 +91,9 @@ static void snd_gf1_dma_program(snd_gus_card_t * gus, | |||
91 | spin_unlock_irqrestore(&gus->reg_lock, flags); | 91 | spin_unlock_irqrestore(&gus->reg_lock, flags); |
92 | } | 92 | } |
93 | 93 | ||
94 | static snd_gf1_dma_block_t *snd_gf1_dma_next_block(snd_gus_card_t * gus) | 94 | static struct snd_gf1_dma_block *snd_gf1_dma_next_block(struct snd_gus_card * gus) |
95 | { | 95 | { |
96 | snd_gf1_dma_block_t *block; | 96 | struct snd_gf1_dma_block *block; |
97 | 97 | ||
98 | /* PCM block have bigger priority than synthesizer one */ | 98 | /* PCM block have bigger priority than synthesizer one */ |
99 | if (gus->gf1.dma_data_pcm) { | 99 | if (gus->gf1.dma_data_pcm) { |
@@ -123,9 +123,9 @@ static snd_gf1_dma_block_t *snd_gf1_dma_next_block(snd_gus_card_t * gus) | |||
123 | } | 123 | } |
124 | 124 | ||
125 | 125 | ||
126 | static void snd_gf1_dma_interrupt(snd_gus_card_t * gus) | 126 | static void snd_gf1_dma_interrupt(struct snd_gus_card * gus) |
127 | { | 127 | { |
128 | snd_gf1_dma_block_t *block; | 128 | struct snd_gf1_dma_block *block; |
129 | 129 | ||
130 | snd_gf1_dma_ack(gus); | 130 | snd_gf1_dma_ack(gus); |
131 | if (gus->gf1.dma_ack) | 131 | if (gus->gf1.dma_ack) |
@@ -147,7 +147,7 @@ static void snd_gf1_dma_interrupt(snd_gus_card_t * gus) | |||
147 | #endif | 147 | #endif |
148 | } | 148 | } |
149 | 149 | ||
150 | int snd_gf1_dma_init(snd_gus_card_t * gus) | 150 | int snd_gf1_dma_init(struct snd_gus_card * gus) |
151 | { | 151 | { |
152 | down(&gus->dma_mutex); | 152 | down(&gus->dma_mutex); |
153 | gus->gf1.dma_shared++; | 153 | gus->gf1.dma_shared++; |
@@ -164,9 +164,9 @@ int snd_gf1_dma_init(snd_gus_card_t * gus) | |||
164 | return 0; | 164 | return 0; |
165 | } | 165 | } |
166 | 166 | ||
167 | int snd_gf1_dma_done(snd_gus_card_t * gus) | 167 | int snd_gf1_dma_done(struct snd_gus_card * gus) |
168 | { | 168 | { |
169 | snd_gf1_dma_block_t *block; | 169 | struct snd_gf1_dma_block *block; |
170 | 170 | ||
171 | down(&gus->dma_mutex); | 171 | down(&gus->dma_mutex); |
172 | gus->gf1.dma_shared--; | 172 | gus->gf1.dma_shared--; |
@@ -189,13 +189,13 @@ int snd_gf1_dma_done(snd_gus_card_t * gus) | |||
189 | return 0; | 189 | return 0; |
190 | } | 190 | } |
191 | 191 | ||
192 | int snd_gf1_dma_transfer_block(snd_gus_card_t * gus, | 192 | int snd_gf1_dma_transfer_block(struct snd_gus_card * gus, |
193 | snd_gf1_dma_block_t * __block, | 193 | struct snd_gf1_dma_block * __block, |
194 | int atomic, | 194 | int atomic, |
195 | int synth) | 195 | int synth) |
196 | { | 196 | { |
197 | unsigned long flags; | 197 | unsigned long flags; |
198 | snd_gf1_dma_block_t *block; | 198 | struct snd_gf1_dma_block *block; |
199 | 199 | ||
200 | block = kmalloc(sizeof(*block), atomic ? GFP_ATOMIC : GFP_KERNEL); | 200 | block = kmalloc(sizeof(*block), atomic ? GFP_ATOMIC : GFP_KERNEL); |
201 | if (block == NULL) { | 201 | if (block == NULL) { |
diff --git a/sound/isa/gus/gus_dram.c b/sound/isa/gus/gus_dram.c index 22120b868b5c..f22fe7967fcc 100644 --- a/sound/isa/gus/gus_dram.c +++ b/sound/isa/gus/gus_dram.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <sound/info.h> | 26 | #include <sound/info.h> |
27 | 27 | ||
28 | 28 | ||
29 | static int snd_gus_dram_poke(snd_gus_card_t *gus, char __user *_buffer, | 29 | static int snd_gus_dram_poke(struct snd_gus_card *gus, char __user *_buffer, |
30 | unsigned int address, unsigned int size) | 30 | unsigned int address, unsigned int size) |
31 | { | 31 | { |
32 | unsigned long flags; | 32 | unsigned long flags; |
@@ -57,13 +57,13 @@ static int snd_gus_dram_poke(snd_gus_card_t *gus, char __user *_buffer, | |||
57 | } | 57 | } |
58 | 58 | ||
59 | 59 | ||
60 | int snd_gus_dram_write(snd_gus_card_t *gus, char __user *buffer, | 60 | int snd_gus_dram_write(struct snd_gus_card *gus, char __user *buffer, |
61 | unsigned int address, unsigned int size) | 61 | unsigned int address, unsigned int size) |
62 | { | 62 | { |
63 | return snd_gus_dram_poke(gus, buffer, address, size); | 63 | return snd_gus_dram_poke(gus, buffer, address, size); |
64 | } | 64 | } |
65 | 65 | ||
66 | static int snd_gus_dram_peek(snd_gus_card_t *gus, char __user *_buffer, | 66 | static int snd_gus_dram_peek(struct snd_gus_card *gus, char __user *_buffer, |
67 | unsigned int address, unsigned int size, | 67 | unsigned int address, unsigned int size, |
68 | int rom) | 68 | int rom) |
69 | { | 69 | { |
@@ -95,7 +95,7 @@ static int snd_gus_dram_peek(snd_gus_card_t *gus, char __user *_buffer, | |||
95 | return 0; | 95 | return 0; |
96 | } | 96 | } |
97 | 97 | ||
98 | int snd_gus_dram_read(snd_gus_card_t *gus, char __user *buffer, | 98 | int snd_gus_dram_read(struct snd_gus_card *gus, char __user *buffer, |
99 | unsigned int address, unsigned int size, | 99 | unsigned int address, unsigned int size, |
100 | int rom) | 100 | int rom) |
101 | { | 101 | { |
diff --git a/sound/isa/gus/gus_instr.c b/sound/isa/gus/gus_instr.c index 591a9a17feb5..d0c38e1856ef 100644 --- a/sound/isa/gus/gus_instr.c +++ b/sound/isa/gus/gus_instr.c | |||
@@ -28,11 +28,11 @@ | |||
28 | * | 28 | * |
29 | */ | 29 | */ |
30 | 30 | ||
31 | int snd_gus_iwffff_put_sample(void *private_data, iwffff_wave_t *wave, | 31 | int snd_gus_iwffff_put_sample(void *private_data, struct iwffff_wave *wave, |
32 | char __user *data, long len, int atomic) | 32 | char __user *data, long len, int atomic) |
33 | { | 33 | { |
34 | snd_gus_card_t *gus = private_data; | 34 | struct snd_gus_card *gus = private_data; |
35 | snd_gf1_mem_block_t *block; | 35 | struct snd_gf1_mem_block *block; |
36 | int err; | 36 | int err; |
37 | 37 | ||
38 | if (wave->format & IWFFFF_WAVE_ROM) | 38 | if (wave->format & IWFFFF_WAVE_ROM) |
@@ -58,19 +58,19 @@ int snd_gus_iwffff_put_sample(void *private_data, iwffff_wave_t *wave, | |||
58 | return 0; | 58 | return 0; |
59 | } | 59 | } |
60 | 60 | ||
61 | int snd_gus_iwffff_get_sample(void *private_data, iwffff_wave_t *wave, | 61 | int snd_gus_iwffff_get_sample(void *private_data, struct iwffff_wave *wave, |
62 | char __user *data, long len, int atomic) | 62 | char __user *data, long len, int atomic) |
63 | { | 63 | { |
64 | snd_gus_card_t *gus = private_data; | 64 | struct snd_gus_card *gus = private_data; |
65 | 65 | ||
66 | return snd_gus_dram_read(gus, data, wave->address.memory, wave->size, | 66 | return snd_gus_dram_read(gus, data, wave->address.memory, wave->size, |
67 | wave->format & IWFFFF_WAVE_ROM ? 1 : 0); | 67 | wave->format & IWFFFF_WAVE_ROM ? 1 : 0); |
68 | } | 68 | } |
69 | 69 | ||
70 | int snd_gus_iwffff_remove_sample(void *private_data, iwffff_wave_t *wave, | 70 | int snd_gus_iwffff_remove_sample(void *private_data, struct iwffff_wave *wave, |
71 | int atomic) | 71 | int atomic) |
72 | { | 72 | { |
73 | snd_gus_card_t *gus = private_data; | 73 | struct snd_gus_card *gus = private_data; |
74 | 74 | ||
75 | if (wave->format & IWFFFF_WAVE_ROM) | 75 | if (wave->format & IWFFFF_WAVE_ROM) |
76 | return 0; /* it's probably ok - verify the address? */ | 76 | return 0; /* it's probably ok - verify the address? */ |
@@ -81,11 +81,11 @@ int snd_gus_iwffff_remove_sample(void *private_data, iwffff_wave_t *wave, | |||
81 | * | 81 | * |
82 | */ | 82 | */ |
83 | 83 | ||
84 | int snd_gus_gf1_put_sample(void *private_data, gf1_wave_t *wave, | 84 | int snd_gus_gf1_put_sample(void *private_data, struct gf1_wave *wave, |
85 | char __user *data, long len, int atomic) | 85 | char __user *data, long len, int atomic) |
86 | { | 86 | { |
87 | snd_gus_card_t *gus = private_data; | 87 | struct snd_gus_card *gus = private_data; |
88 | snd_gf1_mem_block_t *block; | 88 | struct snd_gf1_mem_block *block; |
89 | int err; | 89 | int err; |
90 | 90 | ||
91 | if (wave->format & GF1_WAVE_STEREO) | 91 | if (wave->format & GF1_WAVE_STEREO) |
@@ -109,18 +109,18 @@ int snd_gus_gf1_put_sample(void *private_data, gf1_wave_t *wave, | |||
109 | return 0; | 109 | return 0; |
110 | } | 110 | } |
111 | 111 | ||
112 | int snd_gus_gf1_get_sample(void *private_data, gf1_wave_t *wave, | 112 | int snd_gus_gf1_get_sample(void *private_data, struct gf1_wave *wave, |
113 | char __user *data, long len, int atomic) | 113 | char __user *data, long len, int atomic) |
114 | { | 114 | { |
115 | snd_gus_card_t *gus = private_data; | 115 | struct snd_gus_card *gus = private_data; |
116 | 116 | ||
117 | return snd_gus_dram_read(gus, data, wave->address.memory, wave->size, 0); | 117 | return snd_gus_dram_read(gus, data, wave->address.memory, wave->size, 0); |
118 | } | 118 | } |
119 | 119 | ||
120 | int snd_gus_gf1_remove_sample(void *private_data, gf1_wave_t *wave, | 120 | int snd_gus_gf1_remove_sample(void *private_data, struct gf1_wave *wave, |
121 | int atomic) | 121 | int atomic) |
122 | { | 122 | { |
123 | snd_gus_card_t *gus = private_data; | 123 | struct snd_gus_card *gus = private_data; |
124 | 124 | ||
125 | return snd_gf1_mem_free(&gus->gf1.mem_alloc, wave->address.memory); | 125 | return snd_gf1_mem_free(&gus->gf1.mem_alloc, wave->address.memory); |
126 | } | 126 | } |
@@ -129,11 +129,11 @@ int snd_gus_gf1_remove_sample(void *private_data, gf1_wave_t *wave, | |||
129 | * | 129 | * |
130 | */ | 130 | */ |
131 | 131 | ||
132 | int snd_gus_simple_put_sample(void *private_data, simple_instrument_t *instr, | 132 | int snd_gus_simple_put_sample(void *private_data, struct simple_instrument *instr, |
133 | char __user *data, long len, int atomic) | 133 | char __user *data, long len, int atomic) |
134 | { | 134 | { |
135 | snd_gus_card_t *gus = private_data; | 135 | struct snd_gus_card *gus = private_data; |
136 | snd_gf1_mem_block_t *block; | 136 | struct snd_gf1_mem_block *block; |
137 | int err; | 137 | int err; |
138 | 138 | ||
139 | if (instr->format & SIMPLE_WAVE_STEREO) | 139 | if (instr->format & SIMPLE_WAVE_STEREO) |
@@ -156,18 +156,18 @@ int snd_gus_simple_put_sample(void *private_data, simple_instrument_t *instr, | |||
156 | return 0; | 156 | return 0; |
157 | } | 157 | } |
158 | 158 | ||
159 | int snd_gus_simple_get_sample(void *private_data, simple_instrument_t *instr, | 159 | int snd_gus_simple_get_sample(void *private_data, struct simple_instrument *instr, |
160 | char __user *data, long len, int atomic) | 160 | char __user *data, long len, int atomic) |
161 | { | 161 | { |
162 | snd_gus_card_t *gus = private_data; | 162 | struct snd_gus_card *gus = private_data; |
163 | 163 | ||
164 | return snd_gus_dram_read(gus, data, instr->address.memory, instr->size, 0); | 164 | return snd_gus_dram_read(gus, data, instr->address.memory, instr->size, 0); |
165 | } | 165 | } |
166 | 166 | ||
167 | int snd_gus_simple_remove_sample(void *private_data, simple_instrument_t *instr, | 167 | int snd_gus_simple_remove_sample(void *private_data, struct simple_instrument *instr, |
168 | int atomic) | 168 | int atomic) |
169 | { | 169 | { |
170 | snd_gus_card_t *gus = private_data; | 170 | struct snd_gus_card *gus = private_data; |
171 | 171 | ||
172 | return snd_gf1_mem_free(&gus->gf1.mem_alloc, instr->address.memory); | 172 | return snd_gf1_mem_free(&gus->gf1.mem_alloc, instr->address.memory); |
173 | } | 173 | } |
diff --git a/sound/isa/gus/gus_io.c b/sound/isa/gus/gus_io.c index 8d5752b23787..9b1fe292de4d 100644 --- a/sound/isa/gus/gus_io.c +++ b/sound/isa/gus/gus_io.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <sound/core.h> | 25 | #include <sound/core.h> |
26 | #include <sound/gus.h> | 26 | #include <sound/gus.h> |
27 | 27 | ||
28 | void snd_gf1_delay(snd_gus_card_t * gus) | 28 | void snd_gf1_delay(struct snd_gus_card * gus) |
29 | { | 29 | { |
30 | int i; | 30 | int i; |
31 | 31 | ||
@@ -44,7 +44,7 @@ void snd_gf1_delay(snd_gus_card_t * gus) | |||
44 | * big UltraClick (tm) elimination... | 44 | * big UltraClick (tm) elimination... |
45 | */ | 45 | */ |
46 | 46 | ||
47 | static inline void __snd_gf1_ctrl_stop(snd_gus_card_t * gus, unsigned char reg) | 47 | static inline void __snd_gf1_ctrl_stop(struct snd_gus_card * gus, unsigned char reg) |
48 | { | 48 | { |
49 | unsigned char value; | 49 | unsigned char value; |
50 | 50 | ||
@@ -58,7 +58,7 @@ static inline void __snd_gf1_ctrl_stop(snd_gus_card_t * gus, unsigned char reg) | |||
58 | mb(); | 58 | mb(); |
59 | } | 59 | } |
60 | 60 | ||
61 | static inline void __snd_gf1_write8(snd_gus_card_t * gus, | 61 | static inline void __snd_gf1_write8(struct snd_gus_card * gus, |
62 | unsigned char reg, | 62 | unsigned char reg, |
63 | unsigned char data) | 63 | unsigned char data) |
64 | { | 64 | { |
@@ -68,7 +68,7 @@ static inline void __snd_gf1_write8(snd_gus_card_t * gus, | |||
68 | mb(); | 68 | mb(); |
69 | } | 69 | } |
70 | 70 | ||
71 | static inline unsigned char __snd_gf1_look8(snd_gus_card_t * gus, | 71 | static inline unsigned char __snd_gf1_look8(struct snd_gus_card * gus, |
72 | unsigned char reg) | 72 | unsigned char reg) |
73 | { | 73 | { |
74 | outb(reg, gus->gf1.reg_regsel); | 74 | outb(reg, gus->gf1.reg_regsel); |
@@ -76,7 +76,7 @@ static inline unsigned char __snd_gf1_look8(snd_gus_card_t * gus, | |||
76 | return inb(gus->gf1.reg_data8); | 76 | return inb(gus->gf1.reg_data8); |
77 | } | 77 | } |
78 | 78 | ||
79 | static inline void __snd_gf1_write16(snd_gus_card_t * gus, | 79 | static inline void __snd_gf1_write16(struct snd_gus_card * gus, |
80 | unsigned char reg, unsigned int data) | 80 | unsigned char reg, unsigned int data) |
81 | { | 81 | { |
82 | outb(reg, gus->gf1.reg_regsel); | 82 | outb(reg, gus->gf1.reg_regsel); |
@@ -85,7 +85,7 @@ static inline void __snd_gf1_write16(snd_gus_card_t * gus, | |||
85 | mb(); | 85 | mb(); |
86 | } | 86 | } |
87 | 87 | ||
88 | static inline unsigned short __snd_gf1_look16(snd_gus_card_t * gus, | 88 | static inline unsigned short __snd_gf1_look16(struct snd_gus_card * gus, |
89 | unsigned char reg) | 89 | unsigned char reg) |
90 | { | 90 | { |
91 | outb(reg, gus->gf1.reg_regsel); | 91 | outb(reg, gus->gf1.reg_regsel); |
@@ -93,7 +93,7 @@ static inline unsigned short __snd_gf1_look16(snd_gus_card_t * gus, | |||
93 | return inw(gus->gf1.reg_data16); | 93 | return inw(gus->gf1.reg_data16); |
94 | } | 94 | } |
95 | 95 | ||
96 | static inline void __snd_gf1_adlib_write(snd_gus_card_t * gus, | 96 | static inline void __snd_gf1_adlib_write(struct snd_gus_card * gus, |
97 | unsigned char reg, unsigned char data) | 97 | unsigned char reg, unsigned char data) |
98 | { | 98 | { |
99 | outb(reg, gus->gf1.reg_timerctrl); | 99 | outb(reg, gus->gf1.reg_timerctrl); |
@@ -104,7 +104,7 @@ static inline void __snd_gf1_adlib_write(snd_gus_card_t * gus, | |||
104 | inb(gus->gf1.reg_timerctrl); | 104 | inb(gus->gf1.reg_timerctrl); |
105 | } | 105 | } |
106 | 106 | ||
107 | static inline void __snd_gf1_write_addr(snd_gus_card_t * gus, unsigned char reg, | 107 | static inline void __snd_gf1_write_addr(struct snd_gus_card * gus, unsigned char reg, |
108 | unsigned int addr, int w_16bit) | 108 | unsigned int addr, int w_16bit) |
109 | { | 109 | { |
110 | if (gus->gf1.enh_mode) { | 110 | if (gus->gf1.enh_mode) { |
@@ -117,7 +117,7 @@ static inline void __snd_gf1_write_addr(snd_gus_card_t * gus, unsigned char reg, | |||
117 | __snd_gf1_write16(gus, reg + 1, (unsigned short) (addr << 5)); | 117 | __snd_gf1_write16(gus, reg + 1, (unsigned short) (addr << 5)); |
118 | } | 118 | } |
119 | 119 | ||
120 | static inline unsigned int __snd_gf1_read_addr(snd_gus_card_t * gus, | 120 | static inline unsigned int __snd_gf1_read_addr(struct snd_gus_card * gus, |
121 | unsigned char reg, short w_16bit) | 121 | unsigned char reg, short w_16bit) |
122 | { | 122 | { |
123 | unsigned int res; | 123 | unsigned int res; |
@@ -138,49 +138,49 @@ static inline unsigned int __snd_gf1_read_addr(snd_gus_card_t * gus, | |||
138 | * ======================================================================= | 138 | * ======================================================================= |
139 | */ | 139 | */ |
140 | 140 | ||
141 | void snd_gf1_ctrl_stop(snd_gus_card_t * gus, unsigned char reg) | 141 | void snd_gf1_ctrl_stop(struct snd_gus_card * gus, unsigned char reg) |
142 | { | 142 | { |
143 | __snd_gf1_ctrl_stop(gus, reg); | 143 | __snd_gf1_ctrl_stop(gus, reg); |
144 | } | 144 | } |
145 | 145 | ||
146 | void snd_gf1_write8(snd_gus_card_t * gus, | 146 | void snd_gf1_write8(struct snd_gus_card * gus, |
147 | unsigned char reg, | 147 | unsigned char reg, |
148 | unsigned char data) | 148 | unsigned char data) |
149 | { | 149 | { |
150 | __snd_gf1_write8(gus, reg, data); | 150 | __snd_gf1_write8(gus, reg, data); |
151 | } | 151 | } |
152 | 152 | ||
153 | unsigned char snd_gf1_look8(snd_gus_card_t * gus, unsigned char reg) | 153 | unsigned char snd_gf1_look8(struct snd_gus_card * gus, unsigned char reg) |
154 | { | 154 | { |
155 | return __snd_gf1_look8(gus, reg); | 155 | return __snd_gf1_look8(gus, reg); |
156 | } | 156 | } |
157 | 157 | ||
158 | void snd_gf1_write16(snd_gus_card_t * gus, | 158 | void snd_gf1_write16(struct snd_gus_card * gus, |
159 | unsigned char reg, | 159 | unsigned char reg, |
160 | unsigned int data) | 160 | unsigned int data) |
161 | { | 161 | { |
162 | __snd_gf1_write16(gus, reg, data); | 162 | __snd_gf1_write16(gus, reg, data); |
163 | } | 163 | } |
164 | 164 | ||
165 | unsigned short snd_gf1_look16(snd_gus_card_t * gus, unsigned char reg) | 165 | unsigned short snd_gf1_look16(struct snd_gus_card * gus, unsigned char reg) |
166 | { | 166 | { |
167 | return __snd_gf1_look16(gus, reg); | 167 | return __snd_gf1_look16(gus, reg); |
168 | } | 168 | } |
169 | 169 | ||
170 | void snd_gf1_adlib_write(snd_gus_card_t * gus, | 170 | void snd_gf1_adlib_write(struct snd_gus_card * gus, |
171 | unsigned char reg, | 171 | unsigned char reg, |
172 | unsigned char data) | 172 | unsigned char data) |
173 | { | 173 | { |
174 | __snd_gf1_adlib_write(gus, reg, data); | 174 | __snd_gf1_adlib_write(gus, reg, data); |
175 | } | 175 | } |
176 | 176 | ||
177 | void snd_gf1_write_addr(snd_gus_card_t * gus, unsigned char reg, | 177 | void snd_gf1_write_addr(struct snd_gus_card * gus, unsigned char reg, |
178 | unsigned int addr, short w_16bit) | 178 | unsigned int addr, short w_16bit) |
179 | { | 179 | { |
180 | __snd_gf1_write_addr(gus, reg, addr, w_16bit); | 180 | __snd_gf1_write_addr(gus, reg, addr, w_16bit); |
181 | } | 181 | } |
182 | 182 | ||
183 | unsigned int snd_gf1_read_addr(snd_gus_card_t * gus, | 183 | unsigned int snd_gf1_read_addr(struct snd_gus_card * gus, |
184 | unsigned char reg, | 184 | unsigned char reg, |
185 | short w_16bit) | 185 | short w_16bit) |
186 | { | 186 | { |
@@ -191,7 +191,7 @@ unsigned int snd_gf1_read_addr(snd_gus_card_t * gus, | |||
191 | 191 | ||
192 | */ | 192 | */ |
193 | 193 | ||
194 | void snd_gf1_i_ctrl_stop(snd_gus_card_t * gus, unsigned char reg) | 194 | void snd_gf1_i_ctrl_stop(struct snd_gus_card * gus, unsigned char reg) |
195 | { | 195 | { |
196 | unsigned long flags; | 196 | unsigned long flags; |
197 | 197 | ||
@@ -200,7 +200,7 @@ void snd_gf1_i_ctrl_stop(snd_gus_card_t * gus, unsigned char reg) | |||
200 | spin_unlock_irqrestore(&gus->reg_lock, flags); | 200 | spin_unlock_irqrestore(&gus->reg_lock, flags); |
201 | } | 201 | } |
202 | 202 | ||
203 | void snd_gf1_i_write8(snd_gus_card_t * gus, | 203 | void snd_gf1_i_write8(struct snd_gus_card * gus, |
204 | unsigned char reg, | 204 | unsigned char reg, |
205 | unsigned char data) | 205 | unsigned char data) |
206 | { | 206 | { |
@@ -211,7 +211,7 @@ void snd_gf1_i_write8(snd_gus_card_t * gus, | |||
211 | spin_unlock_irqrestore(&gus->reg_lock, flags); | 211 | spin_unlock_irqrestore(&gus->reg_lock, flags); |
212 | } | 212 | } |
213 | 213 | ||
214 | unsigned char snd_gf1_i_look8(snd_gus_card_t * gus, unsigned char reg) | 214 | unsigned char snd_gf1_i_look8(struct snd_gus_card * gus, unsigned char reg) |
215 | { | 215 | { |
216 | unsigned long flags; | 216 | unsigned long flags; |
217 | unsigned char res; | 217 | unsigned char res; |
@@ -222,7 +222,7 @@ unsigned char snd_gf1_i_look8(snd_gus_card_t * gus, unsigned char reg) | |||
222 | return res; | 222 | return res; |
223 | } | 223 | } |
224 | 224 | ||
225 | void snd_gf1_i_write16(snd_gus_card_t * gus, | 225 | void snd_gf1_i_write16(struct snd_gus_card * gus, |
226 | unsigned char reg, | 226 | unsigned char reg, |
227 | unsigned int data) | 227 | unsigned int data) |
228 | { | 228 | { |
@@ -233,7 +233,7 @@ void snd_gf1_i_write16(snd_gus_card_t * gus, | |||
233 | spin_unlock_irqrestore(&gus->reg_lock, flags); | 233 | spin_unlock_irqrestore(&gus->reg_lock, flags); |
234 | } | 234 | } |
235 | 235 | ||
236 | unsigned short snd_gf1_i_look16(snd_gus_card_t * gus, unsigned char reg) | 236 | unsigned short snd_gf1_i_look16(struct snd_gus_card * gus, unsigned char reg) |
237 | { | 237 | { |
238 | unsigned long flags; | 238 | unsigned long flags; |
239 | unsigned short res; | 239 | unsigned short res; |
@@ -246,7 +246,7 @@ unsigned short snd_gf1_i_look16(snd_gus_card_t * gus, unsigned char reg) | |||
246 | 246 | ||
247 | #if 0 | 247 | #if 0 |
248 | 248 | ||
249 | void snd_gf1_i_adlib_write(snd_gus_card_t * gus, | 249 | void snd_gf1_i_adlib_write(struct snd_gus_card * gus, |
250 | unsigned char reg, | 250 | unsigned char reg, |
251 | unsigned char data) | 251 | unsigned char data) |
252 | { | 252 | { |
@@ -257,7 +257,7 @@ void snd_gf1_i_adlib_write(snd_gus_card_t * gus, | |||
257 | spin_unlock_irqrestore(&gus->reg_lock, flags); | 257 | spin_unlock_irqrestore(&gus->reg_lock, flags); |
258 | } | 258 | } |
259 | 259 | ||
260 | void snd_gf1_i_write_addr(snd_gus_card_t * gus, unsigned char reg, | 260 | void snd_gf1_i_write_addr(struct snd_gus_card * gus, unsigned char reg, |
261 | unsigned int addr, short w_16bit) | 261 | unsigned int addr, short w_16bit) |
262 | { | 262 | { |
263 | unsigned long flags; | 263 | unsigned long flags; |
@@ -270,7 +270,7 @@ void snd_gf1_i_write_addr(snd_gus_card_t * gus, unsigned char reg, | |||
270 | #endif /* 0 */ | 270 | #endif /* 0 */ |
271 | 271 | ||
272 | #ifdef CONFIG_SND_DEBUG | 272 | #ifdef CONFIG_SND_DEBUG |
273 | static unsigned int snd_gf1_i_read_addr(snd_gus_card_t * gus, | 273 | static unsigned int snd_gf1_i_read_addr(struct snd_gus_card * gus, |
274 | unsigned char reg, short w_16bit) | 274 | unsigned char reg, short w_16bit) |
275 | { | 275 | { |
276 | unsigned int res; | 276 | unsigned int res; |
@@ -287,7 +287,7 @@ static unsigned int snd_gf1_i_read_addr(snd_gus_card_t * gus, | |||
287 | 287 | ||
288 | */ | 288 | */ |
289 | 289 | ||
290 | void snd_gf1_dram_addr(snd_gus_card_t * gus, unsigned int addr) | 290 | void snd_gf1_dram_addr(struct snd_gus_card * gus, unsigned int addr) |
291 | { | 291 | { |
292 | outb(0x43, gus->gf1.reg_regsel); | 292 | outb(0x43, gus->gf1.reg_regsel); |
293 | mb(); | 293 | mb(); |
@@ -299,7 +299,7 @@ void snd_gf1_dram_addr(snd_gus_card_t * gus, unsigned int addr) | |||
299 | mb(); | 299 | mb(); |
300 | } | 300 | } |
301 | 301 | ||
302 | void snd_gf1_poke(snd_gus_card_t * gus, unsigned int addr, unsigned char data) | 302 | void snd_gf1_poke(struct snd_gus_card * gus, unsigned int addr, unsigned char data) |
303 | { | 303 | { |
304 | unsigned long flags; | 304 | unsigned long flags; |
305 | 305 | ||
@@ -316,7 +316,7 @@ void snd_gf1_poke(snd_gus_card_t * gus, unsigned int addr, unsigned char data) | |||
316 | spin_unlock_irqrestore(&gus->reg_lock, flags); | 316 | spin_unlock_irqrestore(&gus->reg_lock, flags); |
317 | } | 317 | } |
318 | 318 | ||
319 | unsigned char snd_gf1_peek(snd_gus_card_t * gus, unsigned int addr) | 319 | unsigned char snd_gf1_peek(struct snd_gus_card * gus, unsigned int addr) |
320 | { | 320 | { |
321 | unsigned long flags; | 321 | unsigned long flags; |
322 | unsigned char res; | 322 | unsigned char res; |
@@ -337,7 +337,7 @@ unsigned char snd_gf1_peek(snd_gus_card_t * gus, unsigned int addr) | |||
337 | 337 | ||
338 | #if 0 | 338 | #if 0 |
339 | 339 | ||
340 | void snd_gf1_pokew(snd_gus_card_t * gus, unsigned int addr, unsigned short data) | 340 | void snd_gf1_pokew(struct snd_gus_card * gus, unsigned int addr, unsigned short data) |
341 | { | 341 | { |
342 | unsigned long flags; | 342 | unsigned long flags; |
343 | 343 | ||
@@ -360,7 +360,7 @@ void snd_gf1_pokew(snd_gus_card_t * gus, unsigned int addr, unsigned short data) | |||
360 | spin_unlock_irqrestore(&gus->reg_lock, flags); | 360 | spin_unlock_irqrestore(&gus->reg_lock, flags); |
361 | } | 361 | } |
362 | 362 | ||
363 | unsigned short snd_gf1_peekw(snd_gus_card_t * gus, unsigned int addr) | 363 | unsigned short snd_gf1_peekw(struct snd_gus_card * gus, unsigned int addr) |
364 | { | 364 | { |
365 | unsigned long flags; | 365 | unsigned long flags; |
366 | unsigned short res; | 366 | unsigned short res; |
@@ -385,7 +385,7 @@ unsigned short snd_gf1_peekw(snd_gus_card_t * gus, unsigned int addr) | |||
385 | return res; | 385 | return res; |
386 | } | 386 | } |
387 | 387 | ||
388 | void snd_gf1_dram_setmem(snd_gus_card_t * gus, unsigned int addr, | 388 | void snd_gf1_dram_setmem(struct snd_gus_card * gus, unsigned int addr, |
389 | unsigned short value, unsigned int count) | 389 | unsigned short value, unsigned int count) |
390 | { | 390 | { |
391 | unsigned long port; | 391 | unsigned long port; |
@@ -415,7 +415,7 @@ void snd_gf1_dram_setmem(snd_gus_card_t * gus, unsigned int addr, | |||
415 | 415 | ||
416 | #endif /* 0 */ | 416 | #endif /* 0 */ |
417 | 417 | ||
418 | void snd_gf1_select_active_voices(snd_gus_card_t * gus) | 418 | void snd_gf1_select_active_voices(struct snd_gus_card * gus) |
419 | { | 419 | { |
420 | unsigned short voices; | 420 | unsigned short voices; |
421 | 421 | ||
@@ -443,7 +443,7 @@ void snd_gf1_select_active_voices(snd_gus_card_t * gus) | |||
443 | 443 | ||
444 | #ifdef CONFIG_SND_DEBUG | 444 | #ifdef CONFIG_SND_DEBUG |
445 | 445 | ||
446 | void snd_gf1_print_voice_registers(snd_gus_card_t * gus) | 446 | void snd_gf1_print_voice_registers(struct snd_gus_card * gus) |
447 | { | 447 | { |
448 | unsigned char mode; | 448 | unsigned char mode; |
449 | int voice, ctrl; | 449 | int voice, ctrl; |
@@ -477,7 +477,7 @@ void snd_gf1_print_voice_registers(snd_gus_card_t * gus) | |||
477 | 477 | ||
478 | #if 0 | 478 | #if 0 |
479 | 479 | ||
480 | void snd_gf1_print_global_registers(snd_gus_card_t * gus) | 480 | void snd_gf1_print_global_registers(struct snd_gus_card * gus) |
481 | { | 481 | { |
482 | unsigned char global_mode = 0x00; | 482 | unsigned char global_mode = 0x00; |
483 | 483 | ||
@@ -504,7 +504,7 @@ void snd_gf1_print_global_registers(snd_gus_card_t * gus) | |||
504 | } | 504 | } |
505 | } | 505 | } |
506 | 506 | ||
507 | void snd_gf1_print_setup_registers(snd_gus_card_t * gus) | 507 | void snd_gf1_print_setup_registers(struct snd_gus_card * gus) |
508 | { | 508 | { |
509 | printk(KERN_INFO " -S- mix control = 0x%x\n", inb(GUSP(gus, MIXCNTRLREG))); | 509 | printk(KERN_INFO " -S- mix control = 0x%x\n", inb(GUSP(gus, MIXCNTRLREG))); |
510 | printk(KERN_INFO " -S- IRQ status = 0x%x\n", inb(GUSP(gus, IRQSTAT))); | 510 | printk(KERN_INFO " -S- IRQ status = 0x%x\n", inb(GUSP(gus, IRQSTAT))); |
@@ -523,7 +523,7 @@ void snd_gf1_print_setup_registers(snd_gus_card_t * gus) | |||
523 | } | 523 | } |
524 | } | 524 | } |
525 | 525 | ||
526 | void snd_gf1_peek_print_block(snd_gus_card_t * gus, unsigned int addr, int count, int w_16bit) | 526 | void snd_gf1_peek_print_block(struct snd_gus_card * gus, unsigned int addr, int count, int w_16bit) |
527 | { | 527 | { |
528 | if (!w_16bit) { | 528 | if (!w_16bit) { |
529 | while (count-- > 0) | 529 | while (count-- > 0) |
diff --git a/sound/isa/gus/gus_irq.c b/sound/isa/gus/gus_irq.c index 1e2a15eb8106..c19ba2910b72 100644 --- a/sound/isa/gus/gus_irq.c +++ b/sound/isa/gus/gus_irq.c | |||
@@ -32,7 +32,7 @@ | |||
32 | 32 | ||
33 | irqreturn_t snd_gus_interrupt(int irq, void *dev_id, struct pt_regs *regs) | 33 | irqreturn_t snd_gus_interrupt(int irq, void *dev_id, struct pt_regs *regs) |
34 | { | 34 | { |
35 | snd_gus_card_t * gus = dev_id; | 35 | struct snd_gus_card * gus = dev_id; |
36 | unsigned char status; | 36 | unsigned char status; |
37 | int loop = 100; | 37 | int loop = 100; |
38 | int handled = 0; | 38 | int handled = 0; |
@@ -54,7 +54,7 @@ __again: | |||
54 | if (status & (0x20 | 0x40)) { | 54 | if (status & (0x20 | 0x40)) { |
55 | unsigned int already, _current_; | 55 | unsigned int already, _current_; |
56 | unsigned char voice_status, voice; | 56 | unsigned char voice_status, voice; |
57 | snd_gus_voice_t *pvoice; | 57 | struct snd_gus_voice *pvoice; |
58 | 58 | ||
59 | already = 0; | 59 | already = 0; |
60 | while (((voice_status = snd_gf1_i_read8(gus, SNDRV_GF1_GB_VOICES_IRQ)) & 0xc0) != 0xc0) { | 60 | while (((voice_status = snd_gf1_i_read8(gus, SNDRV_GF1_GB_VOICES_IRQ)) & 0xc0) != 0xc0) { |
@@ -107,11 +107,11 @@ __again: | |||
107 | } | 107 | } |
108 | 108 | ||
109 | #ifdef CONFIG_SND_DEBUG | 109 | #ifdef CONFIG_SND_DEBUG |
110 | static void snd_gus_irq_info_read(snd_info_entry_t *entry, | 110 | static void snd_gus_irq_info_read(struct snd_info_entry *entry, |
111 | snd_info_buffer_t * buffer) | 111 | struct snd_info_buffer *buffer) |
112 | { | 112 | { |
113 | snd_gus_card_t *gus; | 113 | struct snd_gus_card *gus; |
114 | snd_gus_voice_t *pvoice; | 114 | struct snd_gus_voice *pvoice; |
115 | int idx; | 115 | int idx; |
116 | 116 | ||
117 | gus = entry->private_data; | 117 | gus = entry->private_data; |
@@ -131,9 +131,9 @@ static void snd_gus_irq_info_read(snd_info_entry_t *entry, | |||
131 | } | 131 | } |
132 | } | 132 | } |
133 | 133 | ||
134 | void snd_gus_irq_profile_init(snd_gus_card_t *gus) | 134 | void snd_gus_irq_profile_init(struct snd_gus_card *gus) |
135 | { | 135 | { |
136 | snd_info_entry_t *entry; | 136 | struct snd_info_entry *entry; |
137 | 137 | ||
138 | if (! snd_card_proc_new(gus->card, "gusirq", &entry)) | 138 | if (! snd_card_proc_new(gus->card, "gusirq", &entry)) |
139 | snd_info_set_text_ops(entry, gus, 1024, snd_gus_irq_info_read); | 139 | snd_info_set_text_ops(entry, gus, 1024, snd_gus_irq_info_read); |
diff --git a/sound/isa/gus/gus_main.c b/sound/isa/gus/gus_main.c index 4f57ff4ab351..6d15b3d18a87 100644 --- a/sound/isa/gus/gus_main.c +++ b/sound/isa/gus/gus_main.c | |||
@@ -35,21 +35,21 @@ MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>"); | |||
35 | MODULE_DESCRIPTION("Routines for Gravis UltraSound soundcards"); | 35 | MODULE_DESCRIPTION("Routines for Gravis UltraSound soundcards"); |
36 | MODULE_LICENSE("GPL"); | 36 | MODULE_LICENSE("GPL"); |
37 | 37 | ||
38 | static int snd_gus_init_dma_irq(snd_gus_card_t * gus, int latches); | 38 | static int snd_gus_init_dma_irq(struct snd_gus_card * gus, int latches); |
39 | 39 | ||
40 | int snd_gus_use_inc(snd_gus_card_t * gus) | 40 | int snd_gus_use_inc(struct snd_gus_card * gus) |
41 | { | 41 | { |
42 | if (!try_module_get(gus->card->module)) | 42 | if (!try_module_get(gus->card->module)) |
43 | return 0; | 43 | return 0; |
44 | return 1; | 44 | return 1; |
45 | } | 45 | } |
46 | 46 | ||
47 | void snd_gus_use_dec(snd_gus_card_t * gus) | 47 | void snd_gus_use_dec(struct snd_gus_card * gus) |
48 | { | 48 | { |
49 | module_put(gus->card->module); | 49 | module_put(gus->card->module); |
50 | } | 50 | } |
51 | 51 | ||
52 | static int snd_gus_joystick_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) | 52 | static int snd_gus_joystick_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
53 | { | 53 | { |
54 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; | 54 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; |
55 | uinfo->count = 1; | 55 | uinfo->count = 1; |
@@ -58,17 +58,17 @@ static int snd_gus_joystick_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * | |||
58 | return 0; | 58 | return 0; |
59 | } | 59 | } |
60 | 60 | ||
61 | static int snd_gus_joystick_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 61 | static int snd_gus_joystick_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
62 | { | 62 | { |
63 | snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol); | 63 | struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol); |
64 | 64 | ||
65 | ucontrol->value.integer.value[0] = gus->joystick_dac & 31; | 65 | ucontrol->value.integer.value[0] = gus->joystick_dac & 31; |
66 | return 0; | 66 | return 0; |
67 | } | 67 | } |
68 | 68 | ||
69 | static int snd_gus_joystick_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 69 | static int snd_gus_joystick_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
70 | { | 70 | { |
71 | snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol); | 71 | struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol); |
72 | unsigned long flags; | 72 | unsigned long flags; |
73 | int change; | 73 | int change; |
74 | unsigned char nval; | 74 | unsigned char nval; |
@@ -82,7 +82,7 @@ static int snd_gus_joystick_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t | |||
82 | return change; | 82 | return change; |
83 | } | 83 | } |
84 | 84 | ||
85 | static snd_kcontrol_new_t snd_gus_joystick_control = { | 85 | static struct snd_kcontrol_new snd_gus_joystick_control = { |
86 | .iface = SNDRV_CTL_ELEM_IFACE_CARD, | 86 | .iface = SNDRV_CTL_ELEM_IFACE_CARD, |
87 | .name = "Joystick Speed", | 87 | .name = "Joystick Speed", |
88 | .info = snd_gus_joystick_info, | 88 | .info = snd_gus_joystick_info, |
@@ -90,7 +90,7 @@ static snd_kcontrol_new_t snd_gus_joystick_control = { | |||
90 | .put = snd_gus_joystick_put | 90 | .put = snd_gus_joystick_put |
91 | }; | 91 | }; |
92 | 92 | ||
93 | static void snd_gus_init_control(snd_gus_card_t *gus) | 93 | static void snd_gus_init_control(struct snd_gus_card *gus) |
94 | { | 94 | { |
95 | if (!gus->ace_flag) | 95 | if (!gus->ace_flag) |
96 | snd_ctl_add(gus->card, snd_ctl_new1(&snd_gus_joystick_control, gus)); | 96 | snd_ctl_add(gus->card, snd_ctl_new1(&snd_gus_joystick_control, gus)); |
@@ -100,7 +100,7 @@ static void snd_gus_init_control(snd_gus_card_t *gus) | |||
100 | * | 100 | * |
101 | */ | 101 | */ |
102 | 102 | ||
103 | static int snd_gus_free(snd_gus_card_t *gus) | 103 | static int snd_gus_free(struct snd_gus_card *gus) |
104 | { | 104 | { |
105 | if (gus->gf1.res_port2 == NULL) | 105 | if (gus->gf1.res_port2 == NULL) |
106 | goto __hw_end; | 106 | goto __hw_end; |
@@ -129,24 +129,24 @@ static int snd_gus_free(snd_gus_card_t *gus) | |||
129 | return 0; | 129 | return 0; |
130 | } | 130 | } |
131 | 131 | ||
132 | static int snd_gus_dev_free(snd_device_t *device) | 132 | static int snd_gus_dev_free(struct snd_device *device) |
133 | { | 133 | { |
134 | snd_gus_card_t *gus = device->device_data; | 134 | struct snd_gus_card *gus = device->device_data; |
135 | return snd_gus_free(gus); | 135 | return snd_gus_free(gus); |
136 | } | 136 | } |
137 | 137 | ||
138 | int snd_gus_create(snd_card_t * card, | 138 | int snd_gus_create(struct snd_card *card, |
139 | unsigned long port, | 139 | unsigned long port, |
140 | int irq, int dma1, int dma2, | 140 | int irq, int dma1, int dma2, |
141 | int timer_dev, | 141 | int timer_dev, |
142 | int voices, | 142 | int voices, |
143 | int pcm_channels, | 143 | int pcm_channels, |
144 | int effect, | 144 | int effect, |
145 | snd_gus_card_t **rgus) | 145 | struct snd_gus_card **rgus) |
146 | { | 146 | { |
147 | snd_gus_card_t *gus; | 147 | struct snd_gus_card *gus; |
148 | int err; | 148 | int err; |
149 | static snd_device_ops_t ops = { | 149 | static struct snd_device_ops ops = { |
150 | .dev_free = snd_gus_dev_free, | 150 | .dev_free = snd_gus_dev_free, |
151 | }; | 151 | }; |
152 | 152 | ||
@@ -238,7 +238,7 @@ int snd_gus_create(snd_card_t * card, | |||
238 | * Memory detection routine for plain GF1 soundcards | 238 | * Memory detection routine for plain GF1 soundcards |
239 | */ | 239 | */ |
240 | 240 | ||
241 | static int snd_gus_detect_memory(snd_gus_card_t * gus) | 241 | static int snd_gus_detect_memory(struct snd_gus_card * gus) |
242 | { | 242 | { |
243 | int l, idx, local; | 243 | int l, idx, local; |
244 | unsigned char d; | 244 | unsigned char d; |
@@ -273,9 +273,9 @@ static int snd_gus_detect_memory(snd_gus_card_t * gus) | |||
273 | return 0; /* some memory were detected */ | 273 | return 0; /* some memory were detected */ |
274 | } | 274 | } |
275 | 275 | ||
276 | static int snd_gus_init_dma_irq(snd_gus_card_t * gus, int latches) | 276 | static int snd_gus_init_dma_irq(struct snd_gus_card * gus, int latches) |
277 | { | 277 | { |
278 | snd_card_t *card; | 278 | struct snd_card *card; |
279 | unsigned long flags; | 279 | unsigned long flags; |
280 | int irq, dma1, dma2; | 280 | int irq, dma1, dma2; |
281 | static unsigned char irqs[16] = | 281 | static unsigned char irqs[16] = |
@@ -360,11 +360,11 @@ static int snd_gus_init_dma_irq(snd_gus_card_t * gus, int latches) | |||
360 | return 0; | 360 | return 0; |
361 | } | 361 | } |
362 | 362 | ||
363 | static int snd_gus_check_version(snd_gus_card_t * gus) | 363 | static int snd_gus_check_version(struct snd_gus_card * gus) |
364 | { | 364 | { |
365 | unsigned long flags; | 365 | unsigned long flags; |
366 | unsigned char val, rev; | 366 | unsigned char val, rev; |
367 | snd_card_t *card; | 367 | struct snd_card *card; |
368 | 368 | ||
369 | card = gus->card; | 369 | card = gus->card; |
370 | spin_lock_irqsave(&gus->reg_lock, flags); | 370 | spin_lock_irqsave(&gus->reg_lock, flags); |
@@ -409,14 +409,14 @@ static int snd_gus_check_version(snd_gus_card_t * gus) | |||
409 | } | 409 | } |
410 | 410 | ||
411 | #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE)) | 411 | #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE)) |
412 | static void snd_gus_seq_dev_free(snd_seq_device_t *seq_dev) | 412 | static void snd_gus_seq_dev_free(struct snd_seq_device *seq_dev) |
413 | { | 413 | { |
414 | snd_gus_card_t *gus = seq_dev->private_data; | 414 | struct snd_gus_card *gus = seq_dev->private_data; |
415 | gus->seq_dev = NULL; | 415 | gus->seq_dev = NULL; |
416 | } | 416 | } |
417 | #endif | 417 | #endif |
418 | 418 | ||
419 | int snd_gus_initialize(snd_gus_card_t *gus) | 419 | int snd_gus_initialize(struct snd_gus_card *gus) |
420 | { | 420 | { |
421 | int err; | 421 | int err; |
422 | 422 | ||
@@ -432,9 +432,9 @@ int snd_gus_initialize(snd_gus_card_t *gus) | |||
432 | return err; | 432 | return err; |
433 | #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE)) | 433 | #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE)) |
434 | if (snd_seq_device_new(gus->card, 1, SNDRV_SEQ_DEV_ID_GUS, | 434 | if (snd_seq_device_new(gus->card, 1, SNDRV_SEQ_DEV_ID_GUS, |
435 | sizeof(snd_gus_card_t*), &gus->seq_dev) >= 0) { | 435 | sizeof(struct snd_gus_card *), &gus->seq_dev) >= 0) { |
436 | strcpy(gus->seq_dev->name, "GUS"); | 436 | strcpy(gus->seq_dev->name, "GUS"); |
437 | *(snd_gus_card_t**)SNDRV_SEQ_DEVICE_ARGPTR(gus->seq_dev) = gus; | 437 | *(struct snd_gus_card **)SNDRV_SEQ_DEVICE_ARGPTR(gus->seq_dev) = gus; |
438 | gus->seq_dev->private_data = gus; | 438 | gus->seq_dev->private_data = gus; |
439 | gus->seq_dev->private_free = snd_gus_seq_dev_free; | 439 | gus->seq_dev->private_free = snd_gus_seq_dev_free; |
440 | } | 440 | } |
diff --git a/sound/isa/gus/gus_mem.c b/sound/isa/gus/gus_mem.c index 2e23f2a8c627..e8bdb860a19f 100644 --- a/sound/isa/gus/gus_mem.c +++ b/sound/isa/gus/gus_mem.c | |||
@@ -27,11 +27,11 @@ | |||
27 | #include <sound/info.h> | 27 | #include <sound/info.h> |
28 | 28 | ||
29 | #ifdef CONFIG_SND_DEBUG | 29 | #ifdef CONFIG_SND_DEBUG |
30 | static void snd_gf1_mem_info_read(snd_info_entry_t *entry, | 30 | static void snd_gf1_mem_info_read(struct snd_info_entry *entry, |
31 | snd_info_buffer_t * buffer); | 31 | struct snd_info_buffer *buffer); |
32 | #endif | 32 | #endif |
33 | 33 | ||
34 | void snd_gf1_mem_lock(snd_gf1_mem_t * alloc, int xup) | 34 | void snd_gf1_mem_lock(struct snd_gf1_mem * alloc, int xup) |
35 | { | 35 | { |
36 | if (!xup) { | 36 | if (!xup) { |
37 | down(&alloc->memory_mutex); | 37 | down(&alloc->memory_mutex); |
@@ -40,12 +40,12 @@ void snd_gf1_mem_lock(snd_gf1_mem_t * alloc, int xup) | |||
40 | } | 40 | } |
41 | } | 41 | } |
42 | 42 | ||
43 | static snd_gf1_mem_block_t *snd_gf1_mem_xalloc(snd_gf1_mem_t * alloc, | 43 | static struct snd_gf1_mem_block *snd_gf1_mem_xalloc(struct snd_gf1_mem * alloc, |
44 | snd_gf1_mem_block_t * block) | 44 | struct snd_gf1_mem_block * block) |
45 | { | 45 | { |
46 | snd_gf1_mem_block_t *pblock, *nblock; | 46 | struct snd_gf1_mem_block *pblock, *nblock; |
47 | 47 | ||
48 | nblock = (snd_gf1_mem_block_t *) kmalloc(sizeof(snd_gf1_mem_block_t), GFP_KERNEL); | 48 | nblock = kmalloc(sizeof(struct snd_gf1_mem_block), GFP_KERNEL); |
49 | if (nblock == NULL) | 49 | if (nblock == NULL) |
50 | return NULL; | 50 | return NULL; |
51 | *nblock = *block; | 51 | *nblock = *block; |
@@ -76,7 +76,7 @@ static snd_gf1_mem_block_t *snd_gf1_mem_xalloc(snd_gf1_mem_t * alloc, | |||
76 | return nblock; | 76 | return nblock; |
77 | } | 77 | } |
78 | 78 | ||
79 | int snd_gf1_mem_xfree(snd_gf1_mem_t * alloc, snd_gf1_mem_block_t * block) | 79 | int snd_gf1_mem_xfree(struct snd_gf1_mem * alloc, struct snd_gf1_mem_block * block) |
80 | { | 80 | { |
81 | if (block->share) { /* ok.. shared block */ | 81 | if (block->share) { /* ok.. shared block */ |
82 | block->share--; | 82 | block->share--; |
@@ -106,10 +106,10 @@ int snd_gf1_mem_xfree(snd_gf1_mem_t * alloc, snd_gf1_mem_block_t * block) | |||
106 | return 0; | 106 | return 0; |
107 | } | 107 | } |
108 | 108 | ||
109 | static snd_gf1_mem_block_t *snd_gf1_mem_look(snd_gf1_mem_t * alloc, | 109 | static struct snd_gf1_mem_block *snd_gf1_mem_look(struct snd_gf1_mem * alloc, |
110 | unsigned int address) | 110 | unsigned int address) |
111 | { | 111 | { |
112 | snd_gf1_mem_block_t *block; | 112 | struct snd_gf1_mem_block *block; |
113 | 113 | ||
114 | for (block = alloc->first; block; block = block->next) { | 114 | for (block = alloc->first; block; block = block->next) { |
115 | if (block->ptr == address) { | 115 | if (block->ptr == address) { |
@@ -119,10 +119,10 @@ static snd_gf1_mem_block_t *snd_gf1_mem_look(snd_gf1_mem_t * alloc, | |||
119 | return NULL; | 119 | return NULL; |
120 | } | 120 | } |
121 | 121 | ||
122 | static snd_gf1_mem_block_t *snd_gf1_mem_share(snd_gf1_mem_t * alloc, | 122 | static struct snd_gf1_mem_block *snd_gf1_mem_share(struct snd_gf1_mem * alloc, |
123 | unsigned int *share_id) | 123 | unsigned int *share_id) |
124 | { | 124 | { |
125 | snd_gf1_mem_block_t *block; | 125 | struct snd_gf1_mem_block *block; |
126 | 126 | ||
127 | if (!share_id[0] && !share_id[1] && | 127 | if (!share_id[0] && !share_id[1] && |
128 | !share_id[2] && !share_id[3]) | 128 | !share_id[2] && !share_id[3]) |
@@ -133,14 +133,14 @@ static snd_gf1_mem_block_t *snd_gf1_mem_share(snd_gf1_mem_t * alloc, | |||
133 | return NULL; | 133 | return NULL; |
134 | } | 134 | } |
135 | 135 | ||
136 | static int snd_gf1_mem_find(snd_gf1_mem_t * alloc, | 136 | static int snd_gf1_mem_find(struct snd_gf1_mem * alloc, |
137 | snd_gf1_mem_block_t * block, | 137 | struct snd_gf1_mem_block * block, |
138 | unsigned int size, int w_16, int align) | 138 | unsigned int size, int w_16, int align) |
139 | { | 139 | { |
140 | snd_gf1_bank_info_t *info = w_16 ? alloc->banks_16 : alloc->banks_8; | 140 | struct snd_gf1_bank_info *info = w_16 ? alloc->banks_16 : alloc->banks_8; |
141 | unsigned int idx, boundary; | 141 | unsigned int idx, boundary; |
142 | int size1; | 142 | int size1; |
143 | snd_gf1_mem_block_t *pblock; | 143 | struct snd_gf1_mem_block *pblock; |
144 | unsigned int ptr1, ptr2; | 144 | unsigned int ptr1, ptr2; |
145 | 145 | ||
146 | align--; | 146 | align--; |
@@ -186,11 +186,11 @@ static int snd_gf1_mem_find(snd_gf1_mem_t * alloc, | |||
186 | return -ENOMEM; | 186 | return -ENOMEM; |
187 | } | 187 | } |
188 | 188 | ||
189 | snd_gf1_mem_block_t *snd_gf1_mem_alloc(snd_gf1_mem_t * alloc, int owner, | 189 | struct snd_gf1_mem_block *snd_gf1_mem_alloc(struct snd_gf1_mem * alloc, int owner, |
190 | char *name, int size, int w_16, int align, | 190 | char *name, int size, int w_16, int align, |
191 | unsigned int *share_id) | 191 | unsigned int *share_id) |
192 | { | 192 | { |
193 | snd_gf1_mem_block_t block, *nblock; | 193 | struct snd_gf1_mem_block block, *nblock; |
194 | 194 | ||
195 | snd_gf1_mem_lock(alloc, 0); | 195 | snd_gf1_mem_lock(alloc, 0); |
196 | if (share_id != NULL) { | 196 | if (share_id != NULL) { |
@@ -220,10 +220,10 @@ snd_gf1_mem_block_t *snd_gf1_mem_alloc(snd_gf1_mem_t * alloc, int owner, | |||
220 | return nblock; | 220 | return nblock; |
221 | } | 221 | } |
222 | 222 | ||
223 | int snd_gf1_mem_free(snd_gf1_mem_t * alloc, unsigned int address) | 223 | int snd_gf1_mem_free(struct snd_gf1_mem * alloc, unsigned int address) |
224 | { | 224 | { |
225 | int result; | 225 | int result; |
226 | snd_gf1_mem_block_t *block; | 226 | struct snd_gf1_mem_block *block; |
227 | 227 | ||
228 | snd_gf1_mem_lock(alloc, 0); | 228 | snd_gf1_mem_lock(alloc, 0); |
229 | if ((block = snd_gf1_mem_look(alloc, address)) != NULL) { | 229 | if ((block = snd_gf1_mem_look(alloc, address)) != NULL) { |
@@ -235,12 +235,12 @@ int snd_gf1_mem_free(snd_gf1_mem_t * alloc, unsigned int address) | |||
235 | return -EINVAL; | 235 | return -EINVAL; |
236 | } | 236 | } |
237 | 237 | ||
238 | int snd_gf1_mem_init(snd_gus_card_t * gus) | 238 | int snd_gf1_mem_init(struct snd_gus_card * gus) |
239 | { | 239 | { |
240 | snd_gf1_mem_t *alloc; | 240 | struct snd_gf1_mem *alloc; |
241 | snd_gf1_mem_block_t block; | 241 | struct snd_gf1_mem_block block; |
242 | #ifdef CONFIG_SND_DEBUG | 242 | #ifdef CONFIG_SND_DEBUG |
243 | snd_info_entry_t *entry; | 243 | struct snd_info_entry *entry; |
244 | #endif | 244 | #endif |
245 | 245 | ||
246 | alloc = &gus->gf1.mem_alloc; | 246 | alloc = &gus->gf1.mem_alloc; |
@@ -272,10 +272,10 @@ int snd_gf1_mem_init(snd_gus_card_t * gus) | |||
272 | return 0; | 272 | return 0; |
273 | } | 273 | } |
274 | 274 | ||
275 | int snd_gf1_mem_done(snd_gus_card_t * gus) | 275 | int snd_gf1_mem_done(struct snd_gus_card * gus) |
276 | { | 276 | { |
277 | snd_gf1_mem_t *alloc; | 277 | struct snd_gf1_mem *alloc; |
278 | snd_gf1_mem_block_t *block, *nblock; | 278 | struct snd_gf1_mem_block *block, *nblock; |
279 | 279 | ||
280 | alloc = &gus->gf1.mem_alloc; | 280 | alloc = &gus->gf1.mem_alloc; |
281 | block = alloc->first; | 281 | block = alloc->first; |
@@ -288,12 +288,12 @@ int snd_gf1_mem_done(snd_gus_card_t * gus) | |||
288 | } | 288 | } |
289 | 289 | ||
290 | #ifdef CONFIG_SND_DEBUG | 290 | #ifdef CONFIG_SND_DEBUG |
291 | static void snd_gf1_mem_info_read(snd_info_entry_t *entry, | 291 | static void snd_gf1_mem_info_read(struct snd_info_entry *entry, |
292 | snd_info_buffer_t * buffer) | 292 | struct snd_info_buffer *buffer) |
293 | { | 293 | { |
294 | snd_gus_card_t *gus; | 294 | struct snd_gus_card *gus; |
295 | snd_gf1_mem_t *alloc; | 295 | struct snd_gf1_mem *alloc; |
296 | snd_gf1_mem_block_t *block; | 296 | struct snd_gf1_mem_block *block; |
297 | unsigned int total, used; | 297 | unsigned int total, used; |
298 | int i; | 298 | int i; |
299 | 299 | ||
diff --git a/sound/isa/gus/gus_mem_proc.c b/sound/isa/gus/gus_mem_proc.c index 7f96ac237f3c..4080255007d5 100644 --- a/sound/isa/gus/gus_mem_proc.c +++ b/sound/isa/gus/gus_mem_proc.c | |||
@@ -25,20 +25,20 @@ | |||
25 | #include <sound/gus.h> | 25 | #include <sound/gus.h> |
26 | #include <sound/info.h> | 26 | #include <sound/info.h> |
27 | 27 | ||
28 | typedef struct gus_proc_private { | 28 | struct gus_proc_private { |
29 | int rom; /* data are in ROM */ | 29 | int rom; /* data are in ROM */ |
30 | unsigned int address; | 30 | unsigned int address; |
31 | unsigned int size; | 31 | unsigned int size; |
32 | snd_gus_card_t * gus; | 32 | struct snd_gus_card * gus; |
33 | } gus_proc_private_t; | 33 | }; |
34 | 34 | ||
35 | static long snd_gf1_mem_proc_dump(snd_info_entry_t *entry, void *file_private_data, | 35 | static long snd_gf1_mem_proc_dump(struct snd_info_entry *entry, void *file_private_data, |
36 | struct file *file, char __user *buf, | 36 | struct file *file, char __user *buf, |
37 | unsigned long count, unsigned long pos) | 37 | unsigned long count, unsigned long pos) |
38 | { | 38 | { |
39 | long size; | 39 | long size; |
40 | gus_proc_private_t *priv = entry->private_data; | 40 | struct gus_proc_private *priv = entry->private_data; |
41 | snd_gus_card_t *gus = priv->gus; | 41 | struct snd_gus_card *gus = priv->gus; |
42 | int err; | 42 | int err; |
43 | 43 | ||
44 | size = count; | 44 | size = count; |
@@ -52,13 +52,13 @@ static long snd_gf1_mem_proc_dump(snd_info_entry_t *entry, void *file_private_da | |||
52 | return 0; | 52 | return 0; |
53 | } | 53 | } |
54 | 54 | ||
55 | static long long snd_gf1_mem_proc_llseek(snd_info_entry_t *entry, | 55 | static long long snd_gf1_mem_proc_llseek(struct snd_info_entry *entry, |
56 | void *private_file_data, | 56 | void *private_file_data, |
57 | struct file *file, | 57 | struct file *file, |
58 | long long offset, | 58 | long long offset, |
59 | int orig) | 59 | int orig) |
60 | { | 60 | { |
61 | gus_proc_private_t *priv = entry->private_data; | 61 | struct gus_proc_private *priv = entry->private_data; |
62 | 62 | ||
63 | switch (orig) { | 63 | switch (orig) { |
64 | case 0: /* SEEK_SET */ | 64 | case 0: /* SEEK_SET */ |
@@ -78,9 +78,9 @@ static long long snd_gf1_mem_proc_llseek(snd_info_entry_t *entry, | |||
78 | return file->f_pos; | 78 | return file->f_pos; |
79 | } | 79 | } |
80 | 80 | ||
81 | static void snd_gf1_mem_proc_free(snd_info_entry_t *entry) | 81 | static void snd_gf1_mem_proc_free(struct snd_info_entry *entry) |
82 | { | 82 | { |
83 | gus_proc_private_t *priv = entry->private_data; | 83 | struct gus_proc_private *priv = entry->private_data; |
84 | kfree(priv); | 84 | kfree(priv); |
85 | } | 85 | } |
86 | 86 | ||
@@ -89,12 +89,12 @@ static struct snd_info_entry_ops snd_gf1_mem_proc_ops = { | |||
89 | .llseek = snd_gf1_mem_proc_llseek, | 89 | .llseek = snd_gf1_mem_proc_llseek, |
90 | }; | 90 | }; |
91 | 91 | ||
92 | int snd_gf1_mem_proc_init(snd_gus_card_t * gus) | 92 | int snd_gf1_mem_proc_init(struct snd_gus_card * gus) |
93 | { | 93 | { |
94 | int idx; | 94 | int idx; |
95 | char name[16]; | 95 | char name[16]; |
96 | gus_proc_private_t *priv; | 96 | struct gus_proc_private *priv; |
97 | snd_info_entry_t *entry; | 97 | struct snd_info_entry *entry; |
98 | 98 | ||
99 | for (idx = 0; idx < 4; idx++) { | 99 | for (idx = 0; idx < 4; idx++) { |
100 | if (gus->gf1.mem_alloc.banks_8[idx].size > 0) { | 100 | if (gus->gf1.mem_alloc.banks_8[idx].size > 0) { |
diff --git a/sound/isa/gus/gus_mixer.c b/sound/isa/gus/gus_mixer.c index a051094d510e..acc25a297200 100644 --- a/sound/isa/gus/gus_mixer.c +++ b/sound/isa/gus/gus_mixer.c | |||
@@ -36,7 +36,7 @@ | |||
36 | .get = snd_gf1_get_single, .put = snd_gf1_put_single, \ | 36 | .get = snd_gf1_get_single, .put = snd_gf1_put_single, \ |
37 | .private_value = shift | (invert << 8) } | 37 | .private_value = shift | (invert << 8) } |
38 | 38 | ||
39 | static int snd_gf1_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) | 39 | static int snd_gf1_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
40 | { | 40 | { |
41 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | 41 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; |
42 | uinfo->count = 1; | 42 | uinfo->count = 1; |
@@ -45,9 +45,9 @@ static int snd_gf1_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * u | |||
45 | return 0; | 45 | return 0; |
46 | } | 46 | } |
47 | 47 | ||
48 | static int snd_gf1_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 48 | static int snd_gf1_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
49 | { | 49 | { |
50 | snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol); | 50 | struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol); |
51 | int shift = kcontrol->private_value & 0xff; | 51 | int shift = kcontrol->private_value & 0xff; |
52 | int invert = (kcontrol->private_value >> 8) & 1; | 52 | int invert = (kcontrol->private_value >> 8) & 1; |
53 | 53 | ||
@@ -57,9 +57,9 @@ static int snd_gf1_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * | |||
57 | return 0; | 57 | return 0; |
58 | } | 58 | } |
59 | 59 | ||
60 | static int snd_gf1_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 60 | static int snd_gf1_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
61 | { | 61 | { |
62 | snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol); | 62 | struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol); |
63 | unsigned long flags; | 63 | unsigned long flags; |
64 | int shift = kcontrol->private_value & 0xff; | 64 | int shift = kcontrol->private_value & 0xff; |
65 | int invert = (kcontrol->private_value >> 8) & 1; | 65 | int invert = (kcontrol->private_value >> 8) & 1; |
@@ -86,7 +86,7 @@ static int snd_gf1_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * | |||
86 | .get = snd_ics_get_double, .put = snd_ics_put_double, \ | 86 | .get = snd_ics_get_double, .put = snd_ics_put_double, \ |
87 | .private_value = addr } | 87 | .private_value = addr } |
88 | 88 | ||
89 | static int snd_ics_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) | 89 | static int snd_ics_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
90 | { | 90 | { |
91 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; | 91 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; |
92 | uinfo->count = 2; | 92 | uinfo->count = 2; |
@@ -95,9 +95,9 @@ static int snd_ics_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * u | |||
95 | return 0; | 95 | return 0; |
96 | } | 96 | } |
97 | 97 | ||
98 | static int snd_ics_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 98 | static int snd_ics_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
99 | { | 99 | { |
100 | snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol); | 100 | struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol); |
101 | unsigned long flags; | 101 | unsigned long flags; |
102 | int addr = kcontrol->private_value & 0xff; | 102 | int addr = kcontrol->private_value & 0xff; |
103 | unsigned char left, right; | 103 | unsigned char left, right; |
@@ -111,9 +111,9 @@ static int snd_ics_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * | |||
111 | return 0; | 111 | return 0; |
112 | } | 112 | } |
113 | 113 | ||
114 | static int snd_ics_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 114 | static int snd_ics_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
115 | { | 115 | { |
116 | snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol); | 116 | struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol); |
117 | unsigned long flags; | 117 | unsigned long flags; |
118 | int addr = kcontrol->private_value & 0xff; | 118 | int addr = kcontrol->private_value & 0xff; |
119 | int change; | 119 | int change; |
@@ -146,13 +146,13 @@ static int snd_ics_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * | |||
146 | return change; | 146 | return change; |
147 | } | 147 | } |
148 | 148 | ||
149 | static snd_kcontrol_new_t snd_gf1_controls[] = { | 149 | static struct snd_kcontrol_new snd_gf1_controls[] = { |
150 | GF1_SINGLE("Master Playback Switch", 0, 1, 1), | 150 | GF1_SINGLE("Master Playback Switch", 0, 1, 1), |
151 | GF1_SINGLE("Line Switch", 0, 0, 1), | 151 | GF1_SINGLE("Line Switch", 0, 0, 1), |
152 | GF1_SINGLE("Mic Switch", 0, 2, 0) | 152 | GF1_SINGLE("Mic Switch", 0, 2, 0) |
153 | }; | 153 | }; |
154 | 154 | ||
155 | static snd_kcontrol_new_t snd_ics_controls[] = { | 155 | static struct snd_kcontrol_new snd_ics_controls[] = { |
156 | GF1_SINGLE("Master Playback Switch", 0, 1, 1), | 156 | GF1_SINGLE("Master Playback Switch", 0, 1, 1), |
157 | ICS_DOUBLE("Master Playback Volume", 0, SNDRV_ICS_MASTER_DEV), | 157 | ICS_DOUBLE("Master Playback Volume", 0, SNDRV_ICS_MASTER_DEV), |
158 | ICS_DOUBLE("Synth Playback Volume", 0, SNDRV_ICS_GF1_DEV), | 158 | ICS_DOUBLE("Synth Playback Volume", 0, SNDRV_ICS_GF1_DEV), |
@@ -163,9 +163,9 @@ ICS_DOUBLE("Mic Playback Volume", 0, SNDRV_ICS_MIC_DEV), | |||
163 | ICS_DOUBLE("CD Playback Volume", 0, SNDRV_ICS_CD_DEV) | 163 | ICS_DOUBLE("CD Playback Volume", 0, SNDRV_ICS_CD_DEV) |
164 | }; | 164 | }; |
165 | 165 | ||
166 | int snd_gf1_new_mixer(snd_gus_card_t * gus) | 166 | int snd_gf1_new_mixer(struct snd_gus_card * gus) |
167 | { | 167 | { |
168 | snd_card_t *card; | 168 | struct snd_card *card; |
169 | unsigned int idx, max; | 169 | unsigned int idx, max; |
170 | int err; | 170 | int err; |
171 | 171 | ||
diff --git a/sound/isa/gus/gus_pcm.c b/sound/isa/gus/gus_pcm.c index bae0fee705ee..d0829393ec8a 100644 --- a/sound/isa/gus/gus_pcm.c +++ b/sound/isa/gus/gus_pcm.c | |||
@@ -42,12 +42,12 @@ | |||
42 | #define SNDRV_GF1_PCM_PFLG_ACTIVE (1<<0) | 42 | #define SNDRV_GF1_PCM_PFLG_ACTIVE (1<<0) |
43 | #define SNDRV_GF1_PCM_PFLG_NEUTRAL (2<<0) | 43 | #define SNDRV_GF1_PCM_PFLG_NEUTRAL (2<<0) |
44 | 44 | ||
45 | typedef struct { | 45 | struct gus_pcm_private { |
46 | snd_gus_card_t * gus; | 46 | struct snd_gus_card * gus; |
47 | snd_pcm_substream_t * substream; | 47 | struct snd_pcm_substream *substream; |
48 | spinlock_t lock; | 48 | spinlock_t lock; |
49 | unsigned int voices; | 49 | unsigned int voices; |
50 | snd_gus_voice_t *pvoices[2]; | 50 | struct snd_gus_voice *pvoices[2]; |
51 | unsigned int memory; | 51 | unsigned int memory; |
52 | unsigned short flags; | 52 | unsigned short flags; |
53 | unsigned char voice_ctrl, ramp_ctrl; | 53 | unsigned char voice_ctrl, ramp_ctrl; |
@@ -58,13 +58,13 @@ typedef struct { | |||
58 | wait_queue_head_t sleep; | 58 | wait_queue_head_t sleep; |
59 | atomic_t dma_count; | 59 | atomic_t dma_count; |
60 | int final_volume; | 60 | int final_volume; |
61 | } gus_pcm_private_t; | 61 | }; |
62 | 62 | ||
63 | static int snd_gf1_pcm_use_dma = 1; | 63 | static int snd_gf1_pcm_use_dma = 1; |
64 | 64 | ||
65 | static void snd_gf1_pcm_block_change_ack(snd_gus_card_t * gus, void *private_data) | 65 | static void snd_gf1_pcm_block_change_ack(struct snd_gus_card * gus, void *private_data) |
66 | { | 66 | { |
67 | gus_pcm_private_t *pcmp = private_data; | 67 | struct gus_pcm_private *pcmp = private_data; |
68 | 68 | ||
69 | if (pcmp) { | 69 | if (pcmp) { |
70 | atomic_dec(&pcmp->dma_count); | 70 | atomic_dec(&pcmp->dma_count); |
@@ -72,14 +72,14 @@ static void snd_gf1_pcm_block_change_ack(snd_gus_card_t * gus, void *private_dat | |||
72 | } | 72 | } |
73 | } | 73 | } |
74 | 74 | ||
75 | static int snd_gf1_pcm_block_change(snd_pcm_substream_t * substream, | 75 | static int snd_gf1_pcm_block_change(struct snd_pcm_substream *substream, |
76 | unsigned int offset, | 76 | unsigned int offset, |
77 | unsigned int addr, | 77 | unsigned int addr, |
78 | unsigned int count) | 78 | unsigned int count) |
79 | { | 79 | { |
80 | snd_gf1_dma_block_t block; | 80 | struct snd_gf1_dma_block block; |
81 | snd_pcm_runtime_t *runtime = substream->runtime; | 81 | struct snd_pcm_runtime *runtime = substream->runtime; |
82 | gus_pcm_private_t *pcmp = runtime->private_data; | 82 | struct gus_pcm_private *pcmp = runtime->private_data; |
83 | 83 | ||
84 | count += offset & 31; | 84 | count += offset & 31; |
85 | offset &= ~31; | 85 | offset &= ~31; |
@@ -101,11 +101,11 @@ static int snd_gf1_pcm_block_change(snd_pcm_substream_t * substream, | |||
101 | return 0; | 101 | return 0; |
102 | } | 102 | } |
103 | 103 | ||
104 | static void snd_gf1_pcm_trigger_up(snd_pcm_substream_t * substream) | 104 | static void snd_gf1_pcm_trigger_up(struct snd_pcm_substream *substream) |
105 | { | 105 | { |
106 | snd_pcm_runtime_t *runtime = substream->runtime; | 106 | struct snd_pcm_runtime *runtime = substream->runtime; |
107 | gus_pcm_private_t *pcmp = runtime->private_data; | 107 | struct gus_pcm_private *pcmp = runtime->private_data; |
108 | snd_gus_card_t * gus = pcmp->gus; | 108 | struct snd_gus_card * gus = pcmp->gus; |
109 | unsigned long flags; | 109 | unsigned long flags; |
110 | unsigned char voice_ctrl, ramp_ctrl; | 110 | unsigned char voice_ctrl, ramp_ctrl; |
111 | unsigned short rate; | 111 | unsigned short rate; |
@@ -179,10 +179,11 @@ static void snd_gf1_pcm_trigger_up(snd_pcm_substream_t * substream) | |||
179 | spin_unlock_irqrestore(&gus->reg_lock, flags); | 179 | spin_unlock_irqrestore(&gus->reg_lock, flags); |
180 | } | 180 | } |
181 | 181 | ||
182 | static void snd_gf1_pcm_interrupt_wave(snd_gus_card_t * gus, snd_gus_voice_t *pvoice) | 182 | static void snd_gf1_pcm_interrupt_wave(struct snd_gus_card * gus, |
183 | struct snd_gus_voice *pvoice) | ||
183 | { | 184 | { |
184 | gus_pcm_private_t * pcmp; | 185 | struct gus_pcm_private * pcmp; |
185 | snd_pcm_runtime_t * runtime; | 186 | struct snd_pcm_runtime *runtime; |
186 | unsigned char voice_ctrl, ramp_ctrl; | 187 | unsigned char voice_ctrl, ramp_ctrl; |
187 | unsigned int idx; | 188 | unsigned int idx; |
188 | unsigned int end, step; | 189 | unsigned int end, step; |
@@ -261,11 +262,12 @@ static void snd_gf1_pcm_interrupt_wave(snd_gus_card_t * gus, snd_gus_voice_t *pv | |||
261 | #endif | 262 | #endif |
262 | } | 263 | } |
263 | 264 | ||
264 | static void snd_gf1_pcm_interrupt_volume(snd_gus_card_t * gus, snd_gus_voice_t * pvoice) | 265 | static void snd_gf1_pcm_interrupt_volume(struct snd_gus_card * gus, |
266 | struct snd_gus_voice * pvoice) | ||
265 | { | 267 | { |
266 | unsigned short vol; | 268 | unsigned short vol; |
267 | int cvoice; | 269 | int cvoice; |
268 | gus_pcm_private_t *pcmp = pvoice->private_data; | 270 | struct gus_pcm_private *pcmp = pvoice->private_data; |
269 | 271 | ||
270 | /* stop ramp, but leave rollover bit untouched */ | 272 | /* stop ramp, but leave rollover bit untouched */ |
271 | spin_lock(&gus->reg_lock); | 273 | spin_lock(&gus->reg_lock); |
@@ -289,11 +291,11 @@ static void snd_gf1_pcm_interrupt_volume(snd_gus_card_t * gus, snd_gus_voice_t * | |||
289 | spin_unlock(&gus->reg_lock); | 291 | spin_unlock(&gus->reg_lock); |
290 | } | 292 | } |
291 | 293 | ||
292 | static void snd_gf1_pcm_volume_change(snd_gus_card_t * gus) | 294 | static void snd_gf1_pcm_volume_change(struct snd_gus_card * gus) |
293 | { | 295 | { |
294 | } | 296 | } |
295 | 297 | ||
296 | static int snd_gf1_pcm_poke_block(snd_gus_card_t *gus, unsigned char *buf, | 298 | static int snd_gf1_pcm_poke_block(struct snd_gus_card *gus, unsigned char *buf, |
297 | unsigned int pos, unsigned int count, | 299 | unsigned int pos, unsigned int count, |
298 | int w16, int invert) | 300 | int w16, int invert) |
299 | { | 301 | { |
@@ -341,14 +343,14 @@ static int snd_gf1_pcm_poke_block(snd_gus_card_t *gus, unsigned char *buf, | |||
341 | return 0; | 343 | return 0; |
342 | } | 344 | } |
343 | 345 | ||
344 | static int snd_gf1_pcm_playback_copy(snd_pcm_substream_t *substream, | 346 | static int snd_gf1_pcm_playback_copy(struct snd_pcm_substream *substream, |
345 | int voice, | 347 | int voice, |
346 | snd_pcm_uframes_t pos, | 348 | snd_pcm_uframes_t pos, |
347 | void __user *src, | 349 | void __user *src, |
348 | snd_pcm_uframes_t count) | 350 | snd_pcm_uframes_t count) |
349 | { | 351 | { |
350 | snd_pcm_runtime_t *runtime = substream->runtime; | 352 | struct snd_pcm_runtime *runtime = substream->runtime; |
351 | gus_pcm_private_t *pcmp = runtime->private_data; | 353 | struct gus_pcm_private *pcmp = runtime->private_data; |
352 | unsigned int bpos, len; | 354 | unsigned int bpos, len; |
353 | 355 | ||
354 | bpos = samples_to_bytes(runtime, pos) + (voice * (pcmp->dma_size / 2)); | 356 | bpos = samples_to_bytes(runtime, pos) + (voice * (pcmp->dma_size / 2)); |
@@ -360,7 +362,7 @@ static int snd_gf1_pcm_playback_copy(snd_pcm_substream_t *substream, | |||
360 | if (snd_gf1_pcm_use_dma && len > 32) { | 362 | if (snd_gf1_pcm_use_dma && len > 32) { |
361 | return snd_gf1_pcm_block_change(substream, bpos, pcmp->memory + bpos, len); | 363 | return snd_gf1_pcm_block_change(substream, bpos, pcmp->memory + bpos, len); |
362 | } else { | 364 | } else { |
363 | snd_gus_card_t *gus = pcmp->gus; | 365 | struct snd_gus_card *gus = pcmp->gus; |
364 | int err, w16, invert; | 366 | int err, w16, invert; |
365 | 367 | ||
366 | w16 = (snd_pcm_format_width(runtime->format) == 16); | 368 | w16 = (snd_pcm_format_width(runtime->format) == 16); |
@@ -371,13 +373,13 @@ static int snd_gf1_pcm_playback_copy(snd_pcm_substream_t *substream, | |||
371 | return 0; | 373 | return 0; |
372 | } | 374 | } |
373 | 375 | ||
374 | static int snd_gf1_pcm_playback_silence(snd_pcm_substream_t *substream, | 376 | static int snd_gf1_pcm_playback_silence(struct snd_pcm_substream *substream, |
375 | int voice, | 377 | int voice, |
376 | snd_pcm_uframes_t pos, | 378 | snd_pcm_uframes_t pos, |
377 | snd_pcm_uframes_t count) | 379 | snd_pcm_uframes_t count) |
378 | { | 380 | { |
379 | snd_pcm_runtime_t *runtime = substream->runtime; | 381 | struct snd_pcm_runtime *runtime = substream->runtime; |
380 | gus_pcm_private_t *pcmp = runtime->private_data; | 382 | struct gus_pcm_private *pcmp = runtime->private_data; |
381 | unsigned int bpos, len; | 383 | unsigned int bpos, len; |
382 | 384 | ||
383 | bpos = samples_to_bytes(runtime, pos) + (voice * (pcmp->dma_size / 2)); | 385 | bpos = samples_to_bytes(runtime, pos) + (voice * (pcmp->dma_size / 2)); |
@@ -388,7 +390,7 @@ static int snd_gf1_pcm_playback_silence(snd_pcm_substream_t *substream, | |||
388 | if (snd_gf1_pcm_use_dma && len > 32) { | 390 | if (snd_gf1_pcm_use_dma && len > 32) { |
389 | return snd_gf1_pcm_block_change(substream, bpos, pcmp->memory + bpos, len); | 391 | return snd_gf1_pcm_block_change(substream, bpos, pcmp->memory + bpos, len); |
390 | } else { | 392 | } else { |
391 | snd_gus_card_t *gus = pcmp->gus; | 393 | struct snd_gus_card *gus = pcmp->gus; |
392 | int err, w16, invert; | 394 | int err, w16, invert; |
393 | 395 | ||
394 | w16 = (snd_pcm_format_width(runtime->format) == 16); | 396 | w16 = (snd_pcm_format_width(runtime->format) == 16); |
@@ -399,18 +401,18 @@ static int snd_gf1_pcm_playback_silence(snd_pcm_substream_t *substream, | |||
399 | return 0; | 401 | return 0; |
400 | } | 402 | } |
401 | 403 | ||
402 | static int snd_gf1_pcm_playback_hw_params(snd_pcm_substream_t * substream, | 404 | static int snd_gf1_pcm_playback_hw_params(struct snd_pcm_substream *substream, |
403 | snd_pcm_hw_params_t * hw_params) | 405 | struct snd_pcm_hw_params *hw_params) |
404 | { | 406 | { |
405 | snd_gus_card_t *gus = snd_pcm_substream_chip(substream); | 407 | struct snd_gus_card *gus = snd_pcm_substream_chip(substream); |
406 | snd_pcm_runtime_t *runtime = substream->runtime; | 408 | struct snd_pcm_runtime *runtime = substream->runtime; |
407 | gus_pcm_private_t *pcmp = runtime->private_data; | 409 | struct gus_pcm_private *pcmp = runtime->private_data; |
408 | int err; | 410 | int err; |
409 | 411 | ||
410 | if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params))) < 0) | 412 | if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params))) < 0) |
411 | return err; | 413 | return err; |
412 | if (err > 0) { /* change */ | 414 | if (err > 0) { /* change */ |
413 | snd_gf1_mem_block_t *block; | 415 | struct snd_gf1_mem_block *block; |
414 | if (pcmp->memory > 0) { | 416 | if (pcmp->memory > 0) { |
415 | snd_gf1_mem_free(&gus->gf1.mem_alloc, pcmp->memory); | 417 | snd_gf1_mem_free(&gus->gf1.mem_alloc, pcmp->memory); |
416 | pcmp->memory = 0; | 418 | pcmp->memory = 0; |
@@ -448,10 +450,10 @@ static int snd_gf1_pcm_playback_hw_params(snd_pcm_substream_t * substream, | |||
448 | return 0; | 450 | return 0; |
449 | } | 451 | } |
450 | 452 | ||
451 | static int snd_gf1_pcm_playback_hw_free(snd_pcm_substream_t * substream) | 453 | static int snd_gf1_pcm_playback_hw_free(struct snd_pcm_substream *substream) |
452 | { | 454 | { |
453 | snd_pcm_runtime_t *runtime = substream->runtime; | 455 | struct snd_pcm_runtime *runtime = substream->runtime; |
454 | gus_pcm_private_t *pcmp = runtime->private_data; | 456 | struct gus_pcm_private *pcmp = runtime->private_data; |
455 | 457 | ||
456 | snd_pcm_lib_free_pages(substream); | 458 | snd_pcm_lib_free_pages(substream); |
457 | if (pcmp->pvoices[0]) { | 459 | if (pcmp->pvoices[0]) { |
@@ -469,10 +471,10 @@ static int snd_gf1_pcm_playback_hw_free(snd_pcm_substream_t * substream) | |||
469 | return 0; | 471 | return 0; |
470 | } | 472 | } |
471 | 473 | ||
472 | static int snd_gf1_pcm_playback_prepare(snd_pcm_substream_t * substream) | 474 | static int snd_gf1_pcm_playback_prepare(struct snd_pcm_substream *substream) |
473 | { | 475 | { |
474 | snd_pcm_runtime_t *runtime = substream->runtime; | 476 | struct snd_pcm_runtime *runtime = substream->runtime; |
475 | gus_pcm_private_t *pcmp = runtime->private_data; | 477 | struct gus_pcm_private *pcmp = runtime->private_data; |
476 | 478 | ||
477 | pcmp->bpos = 0; | 479 | pcmp->bpos = 0; |
478 | pcmp->dma_size = snd_pcm_lib_buffer_bytes(substream); | 480 | pcmp->dma_size = snd_pcm_lib_buffer_bytes(substream); |
@@ -481,12 +483,12 @@ static int snd_gf1_pcm_playback_prepare(snd_pcm_substream_t * substream) | |||
481 | return 0; | 483 | return 0; |
482 | } | 484 | } |
483 | 485 | ||
484 | static int snd_gf1_pcm_playback_trigger(snd_pcm_substream_t * substream, | 486 | static int snd_gf1_pcm_playback_trigger(struct snd_pcm_substream *substream, |
485 | int cmd) | 487 | int cmd) |
486 | { | 488 | { |
487 | snd_gus_card_t *gus = snd_pcm_substream_chip(substream); | 489 | struct snd_gus_card *gus = snd_pcm_substream_chip(substream); |
488 | snd_pcm_runtime_t *runtime = substream->runtime; | 490 | struct snd_pcm_runtime *runtime = substream->runtime; |
489 | gus_pcm_private_t *pcmp = runtime->private_data; | 491 | struct gus_pcm_private *pcmp = runtime->private_data; |
490 | int voice; | 492 | int voice; |
491 | 493 | ||
492 | if (cmd == SNDRV_PCM_TRIGGER_START) { | 494 | if (cmd == SNDRV_PCM_TRIGGER_START) { |
@@ -507,11 +509,11 @@ static int snd_gf1_pcm_playback_trigger(snd_pcm_substream_t * substream, | |||
507 | return 0; | 509 | return 0; |
508 | } | 510 | } |
509 | 511 | ||
510 | static snd_pcm_uframes_t snd_gf1_pcm_playback_pointer(snd_pcm_substream_t * substream) | 512 | static snd_pcm_uframes_t snd_gf1_pcm_playback_pointer(struct snd_pcm_substream *substream) |
511 | { | 513 | { |
512 | snd_gus_card_t *gus = snd_pcm_substream_chip(substream); | 514 | struct snd_gus_card *gus = snd_pcm_substream_chip(substream); |
513 | snd_pcm_runtime_t *runtime = substream->runtime; | 515 | struct snd_pcm_runtime *runtime = substream->runtime; |
514 | gus_pcm_private_t *pcmp = runtime->private_data; | 516 | struct gus_pcm_private *pcmp = runtime->private_data; |
515 | unsigned int pos; | 517 | unsigned int pos; |
516 | unsigned char voice_ctrl; | 518 | unsigned char voice_ctrl; |
517 | 519 | ||
@@ -529,22 +531,22 @@ static snd_pcm_uframes_t snd_gf1_pcm_playback_pointer(snd_pcm_substream_t * subs | |||
529 | return pos; | 531 | return pos; |
530 | } | 532 | } |
531 | 533 | ||
532 | static ratnum_t clock = { | 534 | static struct snd_ratnum clock = { |
533 | .num = 9878400/16, | 535 | .num = 9878400/16, |
534 | .den_min = 2, | 536 | .den_min = 2, |
535 | .den_max = 257, | 537 | .den_max = 257, |
536 | .den_step = 1, | 538 | .den_step = 1, |
537 | }; | 539 | }; |
538 | 540 | ||
539 | static snd_pcm_hw_constraint_ratnums_t hw_constraints_clocks = { | 541 | static struct snd_pcm_hw_constraint_ratnums hw_constraints_clocks = { |
540 | .nrats = 1, | 542 | .nrats = 1, |
541 | .rats = &clock, | 543 | .rats = &clock, |
542 | }; | 544 | }; |
543 | 545 | ||
544 | static int snd_gf1_pcm_capture_hw_params(snd_pcm_substream_t * substream, | 546 | static int snd_gf1_pcm_capture_hw_params(struct snd_pcm_substream *substream, |
545 | snd_pcm_hw_params_t * hw_params) | 547 | struct snd_pcm_hw_params *hw_params) |
546 | { | 548 | { |
547 | snd_gus_card_t *gus = snd_pcm_substream_chip(substream); | 549 | struct snd_gus_card *gus = snd_pcm_substream_chip(substream); |
548 | 550 | ||
549 | gus->c_dma_size = params_buffer_bytes(hw_params); | 551 | gus->c_dma_size = params_buffer_bytes(hw_params); |
550 | gus->c_period_size = params_period_bytes(hw_params); | 552 | gus->c_period_size = params_period_bytes(hw_params); |
@@ -559,15 +561,15 @@ static int snd_gf1_pcm_capture_hw_params(snd_pcm_substream_t * substream, | |||
559 | return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); | 561 | return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); |
560 | } | 562 | } |
561 | 563 | ||
562 | static int snd_gf1_pcm_capture_hw_free(snd_pcm_substream_t * substream) | 564 | static int snd_gf1_pcm_capture_hw_free(struct snd_pcm_substream *substream) |
563 | { | 565 | { |
564 | return snd_pcm_lib_free_pages(substream); | 566 | return snd_pcm_lib_free_pages(substream); |
565 | } | 567 | } |
566 | 568 | ||
567 | static int snd_gf1_pcm_capture_prepare(snd_pcm_substream_t * substream) | 569 | static int snd_gf1_pcm_capture_prepare(struct snd_pcm_substream *substream) |
568 | { | 570 | { |
569 | snd_gus_card_t *gus = snd_pcm_substream_chip(substream); | 571 | struct snd_gus_card *gus = snd_pcm_substream_chip(substream); |
570 | snd_pcm_runtime_t *runtime = substream->runtime; | 572 | struct snd_pcm_runtime *runtime = substream->runtime; |
571 | 573 | ||
572 | snd_gf1_i_write8(gus, SNDRV_GF1_GB_RECORD_RATE, runtime->rate_den - 2); | 574 | snd_gf1_i_write8(gus, SNDRV_GF1_GB_RECORD_RATE, runtime->rate_den - 2); |
573 | snd_gf1_i_write8(gus, SNDRV_GF1_GB_REC_DMA_CONTROL, 0); /* disable sampling */ | 575 | snd_gf1_i_write8(gus, SNDRV_GF1_GB_REC_DMA_CONTROL, 0); /* disable sampling */ |
@@ -576,10 +578,10 @@ static int snd_gf1_pcm_capture_prepare(snd_pcm_substream_t * substream) | |||
576 | return 0; | 578 | return 0; |
577 | } | 579 | } |
578 | 580 | ||
579 | static int snd_gf1_pcm_capture_trigger(snd_pcm_substream_t * substream, | 581 | static int snd_gf1_pcm_capture_trigger(struct snd_pcm_substream *substream, |
580 | int cmd) | 582 | int cmd) |
581 | { | 583 | { |
582 | snd_gus_card_t *gus = snd_pcm_substream_chip(substream); | 584 | struct snd_gus_card *gus = snd_pcm_substream_chip(substream); |
583 | int val; | 585 | int val; |
584 | 586 | ||
585 | if (cmd == SNDRV_PCM_TRIGGER_START) { | 587 | if (cmd == SNDRV_PCM_TRIGGER_START) { |
@@ -597,15 +599,15 @@ static int snd_gf1_pcm_capture_trigger(snd_pcm_substream_t * substream, | |||
597 | return 0; | 599 | return 0; |
598 | } | 600 | } |
599 | 601 | ||
600 | static snd_pcm_uframes_t snd_gf1_pcm_capture_pointer(snd_pcm_substream_t * substream) | 602 | static snd_pcm_uframes_t snd_gf1_pcm_capture_pointer(struct snd_pcm_substream *substream) |
601 | { | 603 | { |
602 | snd_gus_card_t *gus = snd_pcm_substream_chip(substream); | 604 | struct snd_gus_card *gus = snd_pcm_substream_chip(substream); |
603 | int pos = snd_dma_pointer(gus->gf1.dma2, gus->c_period_size); | 605 | int pos = snd_dma_pointer(gus->gf1.dma2, gus->c_period_size); |
604 | pos = bytes_to_frames(substream->runtime, (gus->c_pos + pos) % gus->c_dma_size); | 606 | pos = bytes_to_frames(substream->runtime, (gus->c_pos + pos) % gus->c_dma_size); |
605 | return pos; | 607 | return pos; |
606 | } | 608 | } |
607 | 609 | ||
608 | static void snd_gf1_pcm_interrupt_dma_read(snd_gus_card_t * gus) | 610 | static void snd_gf1_pcm_interrupt_dma_read(struct snd_gus_card * gus) |
609 | { | 611 | { |
610 | snd_gf1_i_write8(gus, SNDRV_GF1_GB_REC_DMA_CONTROL, 0); /* disable sampling */ | 612 | snd_gf1_i_write8(gus, SNDRV_GF1_GB_REC_DMA_CONTROL, 0); /* disable sampling */ |
611 | snd_gf1_i_look8(gus, SNDRV_GF1_GB_REC_DMA_CONTROL); /* Sampling Control Register */ | 613 | snd_gf1_i_look8(gus, SNDRV_GF1_GB_REC_DMA_CONTROL); /* Sampling Control Register */ |
@@ -617,7 +619,7 @@ static void snd_gf1_pcm_interrupt_dma_read(snd_gus_card_t * gus) | |||
617 | } | 619 | } |
618 | } | 620 | } |
619 | 621 | ||
620 | static snd_pcm_hardware_t snd_gf1_pcm_playback = | 622 | static struct snd_pcm_hardware snd_gf1_pcm_playback = |
621 | { | 623 | { |
622 | .info = SNDRV_PCM_INFO_NONINTERLEAVED, | 624 | .info = SNDRV_PCM_INFO_NONINTERLEAVED, |
623 | .formats = (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U8 | | 625 | .formats = (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U8 | |
@@ -635,7 +637,7 @@ static snd_pcm_hardware_t snd_gf1_pcm_playback = | |||
635 | .fifo_size = 0, | 637 | .fifo_size = 0, |
636 | }; | 638 | }; |
637 | 639 | ||
638 | static snd_pcm_hardware_t snd_gf1_pcm_capture = | 640 | static struct snd_pcm_hardware snd_gf1_pcm_capture = |
639 | { | 641 | { |
640 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | | 642 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | |
641 | SNDRV_PCM_INFO_MMAP_VALID), | 643 | SNDRV_PCM_INFO_MMAP_VALID), |
@@ -653,16 +655,16 @@ static snd_pcm_hardware_t snd_gf1_pcm_capture = | |||
653 | .fifo_size = 0, | 655 | .fifo_size = 0, |
654 | }; | 656 | }; |
655 | 657 | ||
656 | static void snd_gf1_pcm_playback_free(snd_pcm_runtime_t *runtime) | 658 | static void snd_gf1_pcm_playback_free(struct snd_pcm_runtime *runtime) |
657 | { | 659 | { |
658 | kfree(runtime->private_data); | 660 | kfree(runtime->private_data); |
659 | } | 661 | } |
660 | 662 | ||
661 | static int snd_gf1_pcm_playback_open(snd_pcm_substream_t *substream) | 663 | static int snd_gf1_pcm_playback_open(struct snd_pcm_substream *substream) |
662 | { | 664 | { |
663 | gus_pcm_private_t *pcmp; | 665 | struct gus_pcm_private *pcmp; |
664 | snd_gus_card_t *gus = snd_pcm_substream_chip(substream); | 666 | struct snd_gus_card *gus = snd_pcm_substream_chip(substream); |
665 | snd_pcm_runtime_t *runtime = substream->runtime; | 667 | struct snd_pcm_runtime *runtime = substream->runtime; |
666 | int err; | 668 | int err; |
667 | 669 | ||
668 | pcmp = kzalloc(sizeof(*pcmp), GFP_KERNEL); | 670 | pcmp = kzalloc(sizeof(*pcmp), GFP_KERNEL); |
@@ -690,11 +692,11 @@ static int snd_gf1_pcm_playback_open(snd_pcm_substream_t *substream) | |||
690 | return 0; | 692 | return 0; |
691 | } | 693 | } |
692 | 694 | ||
693 | static int snd_gf1_pcm_playback_close(snd_pcm_substream_t * substream) | 695 | static int snd_gf1_pcm_playback_close(struct snd_pcm_substream *substream) |
694 | { | 696 | { |
695 | snd_gus_card_t *gus = snd_pcm_substream_chip(substream); | 697 | struct snd_gus_card *gus = snd_pcm_substream_chip(substream); |
696 | snd_pcm_runtime_t *runtime = substream->runtime; | 698 | struct snd_pcm_runtime *runtime = substream->runtime; |
697 | gus_pcm_private_t *pcmp = runtime->private_data; | 699 | struct gus_pcm_private *pcmp = runtime->private_data; |
698 | 700 | ||
699 | if (!wait_event_timeout(pcmp->sleep, (atomic_read(&pcmp->dma_count) <= 0), 2*HZ)) | 701 | if (!wait_event_timeout(pcmp->sleep, (atomic_read(&pcmp->dma_count) <= 0), 2*HZ)) |
700 | snd_printk(KERN_ERR "gf1 pcm - serious DMA problem\n"); | 702 | snd_printk(KERN_ERR "gf1 pcm - serious DMA problem\n"); |
@@ -703,10 +705,10 @@ static int snd_gf1_pcm_playback_close(snd_pcm_substream_t * substream) | |||
703 | return 0; | 705 | return 0; |
704 | } | 706 | } |
705 | 707 | ||
706 | static int snd_gf1_pcm_capture_open(snd_pcm_substream_t * substream) | 708 | static int snd_gf1_pcm_capture_open(struct snd_pcm_substream *substream) |
707 | { | 709 | { |
708 | snd_pcm_runtime_t *runtime = substream->runtime; | 710 | struct snd_pcm_runtime *runtime = substream->runtime; |
709 | snd_gus_card_t *gus = snd_pcm_substream_chip(substream); | 711 | struct snd_gus_card *gus = snd_pcm_substream_chip(substream); |
710 | 712 | ||
711 | gus->gf1.interrupt_handler_dma_read = snd_gf1_pcm_interrupt_dma_read; | 713 | gus->gf1.interrupt_handler_dma_read = snd_gf1_pcm_interrupt_dma_read; |
712 | gus->pcm_cap_substream = substream; | 714 | gus->pcm_cap_substream = substream; |
@@ -718,16 +720,16 @@ static int snd_gf1_pcm_capture_open(snd_pcm_substream_t * substream) | |||
718 | return 0; | 720 | return 0; |
719 | } | 721 | } |
720 | 722 | ||
721 | static int snd_gf1_pcm_capture_close(snd_pcm_substream_t * substream) | 723 | static int snd_gf1_pcm_capture_close(struct snd_pcm_substream *substream) |
722 | { | 724 | { |
723 | snd_gus_card_t *gus = snd_pcm_substream_chip(substream); | 725 | struct snd_gus_card *gus = snd_pcm_substream_chip(substream); |
724 | 726 | ||
725 | gus->pcm_cap_substream = NULL; | 727 | gus->pcm_cap_substream = NULL; |
726 | snd_gf1_set_default_handlers(gus, SNDRV_GF1_HANDLER_DMA_READ); | 728 | snd_gf1_set_default_handlers(gus, SNDRV_GF1_HANDLER_DMA_READ); |
727 | return 0; | 729 | return 0; |
728 | } | 730 | } |
729 | 731 | ||
730 | static int snd_gf1_pcm_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) | 732 | static int snd_gf1_pcm_volume_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
731 | { | 733 | { |
732 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; | 734 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; |
733 | uinfo->count = 2; | 735 | uinfo->count = 2; |
@@ -736,9 +738,9 @@ static int snd_gf1_pcm_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t | |||
736 | return 0; | 738 | return 0; |
737 | } | 739 | } |
738 | 740 | ||
739 | static int snd_gf1_pcm_volume_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 741 | static int snd_gf1_pcm_volume_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
740 | { | 742 | { |
741 | snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol); | 743 | struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol); |
742 | unsigned long flags; | 744 | unsigned long flags; |
743 | 745 | ||
744 | spin_lock_irqsave(&gus->pcm_volume_level_lock, flags); | 746 | spin_lock_irqsave(&gus->pcm_volume_level_lock, flags); |
@@ -748,15 +750,15 @@ static int snd_gf1_pcm_volume_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_ | |||
748 | return 0; | 750 | return 0; |
749 | } | 751 | } |
750 | 752 | ||
751 | static int snd_gf1_pcm_volume_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 753 | static int snd_gf1_pcm_volume_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
752 | { | 754 | { |
753 | snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol); | 755 | struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol); |
754 | unsigned long flags; | 756 | unsigned long flags; |
755 | int change; | 757 | int change; |
756 | unsigned int idx; | 758 | unsigned int idx; |
757 | unsigned short val1, val2, vol; | 759 | unsigned short val1, val2, vol; |
758 | gus_pcm_private_t *pcmp; | 760 | struct gus_pcm_private *pcmp; |
759 | snd_gus_voice_t *pvoice; | 761 | struct snd_gus_voice *pvoice; |
760 | 762 | ||
761 | val1 = ucontrol->value.integer.value[0] & 127; | 763 | val1 = ucontrol->value.integer.value[0] & 127; |
762 | val2 = ucontrol->value.integer.value[1] & 127; | 764 | val2 = ucontrol->value.integer.value[1] & 127; |
@@ -790,7 +792,7 @@ static int snd_gf1_pcm_volume_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_ | |||
790 | return change; | 792 | return change; |
791 | } | 793 | } |
792 | 794 | ||
793 | static snd_kcontrol_new_t snd_gf1_pcm_volume_control = | 795 | static struct snd_kcontrol_new snd_gf1_pcm_volume_control = |
794 | { | 796 | { |
795 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 797 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
796 | .name = "PCM Playback Volume", | 798 | .name = "PCM Playback Volume", |
@@ -799,7 +801,7 @@ static snd_kcontrol_new_t snd_gf1_pcm_volume_control = | |||
799 | .put = snd_gf1_pcm_volume_put | 801 | .put = snd_gf1_pcm_volume_put |
800 | }; | 802 | }; |
801 | 803 | ||
802 | static snd_kcontrol_new_t snd_gf1_pcm_volume_control1 = | 804 | static struct snd_kcontrol_new snd_gf1_pcm_volume_control1 = |
803 | { | 805 | { |
804 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 806 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
805 | .name = "GPCM Playback Volume", | 807 | .name = "GPCM Playback Volume", |
@@ -808,7 +810,7 @@ static snd_kcontrol_new_t snd_gf1_pcm_volume_control1 = | |||
808 | .put = snd_gf1_pcm_volume_put | 810 | .put = snd_gf1_pcm_volume_put |
809 | }; | 811 | }; |
810 | 812 | ||
811 | static snd_pcm_ops_t snd_gf1_pcm_playback_ops = { | 813 | static struct snd_pcm_ops snd_gf1_pcm_playback_ops = { |
812 | .open = snd_gf1_pcm_playback_open, | 814 | .open = snd_gf1_pcm_playback_open, |
813 | .close = snd_gf1_pcm_playback_close, | 815 | .close = snd_gf1_pcm_playback_close, |
814 | .ioctl = snd_pcm_lib_ioctl, | 816 | .ioctl = snd_pcm_lib_ioctl, |
@@ -821,7 +823,7 @@ static snd_pcm_ops_t snd_gf1_pcm_playback_ops = { | |||
821 | .silence = snd_gf1_pcm_playback_silence, | 823 | .silence = snd_gf1_pcm_playback_silence, |
822 | }; | 824 | }; |
823 | 825 | ||
824 | static snd_pcm_ops_t snd_gf1_pcm_capture_ops = { | 826 | static struct snd_pcm_ops snd_gf1_pcm_capture_ops = { |
825 | .open = snd_gf1_pcm_capture_open, | 827 | .open = snd_gf1_pcm_capture_open, |
826 | .close = snd_gf1_pcm_capture_close, | 828 | .close = snd_gf1_pcm_capture_close, |
827 | .ioctl = snd_pcm_lib_ioctl, | 829 | .ioctl = snd_pcm_lib_ioctl, |
@@ -832,12 +834,12 @@ static snd_pcm_ops_t snd_gf1_pcm_capture_ops = { | |||
832 | .pointer = snd_gf1_pcm_capture_pointer, | 834 | .pointer = snd_gf1_pcm_capture_pointer, |
833 | }; | 835 | }; |
834 | 836 | ||
835 | int snd_gf1_pcm_new(snd_gus_card_t * gus, int pcm_dev, int control_index, snd_pcm_t ** rpcm) | 837 | int snd_gf1_pcm_new(struct snd_gus_card * gus, int pcm_dev, int control_index, struct snd_pcm ** rpcm) |
836 | { | 838 | { |
837 | snd_card_t *card; | 839 | struct snd_card *card; |
838 | snd_kcontrol_t *kctl; | 840 | struct snd_kcontrol *kctl; |
839 | snd_pcm_t *pcm; | 841 | struct snd_pcm *pcm; |
840 | snd_pcm_substream_t *substream; | 842 | struct snd_pcm_substream *substream; |
841 | int capture, err; | 843 | int capture, err; |
842 | 844 | ||
843 | if (rpcm) | 845 | if (rpcm) |
diff --git a/sound/isa/gus/gus_reset.c b/sound/isa/gus/gus_reset.c index 90710969ef7f..b263655c4116 100644 --- a/sound/isa/gus/gus_reset.c +++ b/sound/isa/gus/gus_reset.c | |||
@@ -25,52 +25,52 @@ | |||
25 | #include <sound/core.h> | 25 | #include <sound/core.h> |
26 | #include <sound/gus.h> | 26 | #include <sound/gus.h> |
27 | 27 | ||
28 | extern void snd_gf1_timers_init(snd_gus_card_t * gus); | 28 | extern void snd_gf1_timers_init(struct snd_gus_card * gus); |
29 | extern void snd_gf1_timers_done(snd_gus_card_t * gus); | 29 | extern void snd_gf1_timers_done(struct snd_gus_card * gus); |
30 | extern int snd_gf1_synth_init(snd_gus_card_t * gus); | 30 | extern int snd_gf1_synth_init(struct snd_gus_card * gus); |
31 | extern void snd_gf1_synth_done(snd_gus_card_t * gus); | 31 | extern void snd_gf1_synth_done(struct snd_gus_card * gus); |
32 | 32 | ||
33 | /* | 33 | /* |
34 | * ok.. default interrupt handlers... | 34 | * ok.. default interrupt handlers... |
35 | */ | 35 | */ |
36 | 36 | ||
37 | static void snd_gf1_default_interrupt_handler_midi_out(snd_gus_card_t * gus) | 37 | static void snd_gf1_default_interrupt_handler_midi_out(struct snd_gus_card * gus) |
38 | { | 38 | { |
39 | snd_gf1_uart_cmd(gus, gus->gf1.uart_cmd &= ~0x20); | 39 | snd_gf1_uart_cmd(gus, gus->gf1.uart_cmd &= ~0x20); |
40 | } | 40 | } |
41 | 41 | ||
42 | static void snd_gf1_default_interrupt_handler_midi_in(snd_gus_card_t * gus) | 42 | static void snd_gf1_default_interrupt_handler_midi_in(struct snd_gus_card * gus) |
43 | { | 43 | { |
44 | snd_gf1_uart_cmd(gus, gus->gf1.uart_cmd &= ~0x80); | 44 | snd_gf1_uart_cmd(gus, gus->gf1.uart_cmd &= ~0x80); |
45 | } | 45 | } |
46 | 46 | ||
47 | static void snd_gf1_default_interrupt_handler_timer1(snd_gus_card_t * gus) | 47 | static void snd_gf1_default_interrupt_handler_timer1(struct snd_gus_card * gus) |
48 | { | 48 | { |
49 | snd_gf1_i_write8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL, gus->gf1.timer_enabled &= ~4); | 49 | snd_gf1_i_write8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL, gus->gf1.timer_enabled &= ~4); |
50 | } | 50 | } |
51 | 51 | ||
52 | static void snd_gf1_default_interrupt_handler_timer2(snd_gus_card_t * gus) | 52 | static void snd_gf1_default_interrupt_handler_timer2(struct snd_gus_card * gus) |
53 | { | 53 | { |
54 | snd_gf1_i_write8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL, gus->gf1.timer_enabled &= ~8); | 54 | snd_gf1_i_write8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL, gus->gf1.timer_enabled &= ~8); |
55 | } | 55 | } |
56 | 56 | ||
57 | static void snd_gf1_default_interrupt_handler_wave_and_volume(snd_gus_card_t * gus, snd_gus_voice_t * voice) | 57 | static void snd_gf1_default_interrupt_handler_wave_and_volume(struct snd_gus_card * gus, struct snd_gus_voice * voice) |
58 | { | 58 | { |
59 | snd_gf1_i_ctrl_stop(gus, 0x00); | 59 | snd_gf1_i_ctrl_stop(gus, 0x00); |
60 | snd_gf1_i_ctrl_stop(gus, 0x0d); | 60 | snd_gf1_i_ctrl_stop(gus, 0x0d); |
61 | } | 61 | } |
62 | 62 | ||
63 | static void snd_gf1_default_interrupt_handler_dma_write(snd_gus_card_t * gus) | 63 | static void snd_gf1_default_interrupt_handler_dma_write(struct snd_gus_card * gus) |
64 | { | 64 | { |
65 | snd_gf1_i_write8(gus, 0x41, 0x00); | 65 | snd_gf1_i_write8(gus, 0x41, 0x00); |
66 | } | 66 | } |
67 | 67 | ||
68 | static void snd_gf1_default_interrupt_handler_dma_read(snd_gus_card_t * gus) | 68 | static void snd_gf1_default_interrupt_handler_dma_read(struct snd_gus_card * gus) |
69 | { | 69 | { |
70 | snd_gf1_i_write8(gus, 0x49, 0x00); | 70 | snd_gf1_i_write8(gus, 0x49, 0x00); |
71 | } | 71 | } |
72 | 72 | ||
73 | void snd_gf1_set_default_handlers(snd_gus_card_t * gus, unsigned int what) | 73 | void snd_gf1_set_default_handlers(struct snd_gus_card * gus, unsigned int what) |
74 | { | 74 | { |
75 | if (what & SNDRV_GF1_HANDLER_MIDI_OUT) | 75 | if (what & SNDRV_GF1_HANDLER_MIDI_OUT) |
76 | gus->gf1.interrupt_handler_midi_out = snd_gf1_default_interrupt_handler_midi_out; | 76 | gus->gf1.interrupt_handler_midi_out = snd_gf1_default_interrupt_handler_midi_out; |
@@ -81,7 +81,7 @@ void snd_gf1_set_default_handlers(snd_gus_card_t * gus, unsigned int what) | |||
81 | if (what & SNDRV_GF1_HANDLER_TIMER2) | 81 | if (what & SNDRV_GF1_HANDLER_TIMER2) |
82 | gus->gf1.interrupt_handler_timer2 = snd_gf1_default_interrupt_handler_timer2; | 82 | gus->gf1.interrupt_handler_timer2 = snd_gf1_default_interrupt_handler_timer2; |
83 | if (what & SNDRV_GF1_HANDLER_VOICE) { | 83 | if (what & SNDRV_GF1_HANDLER_VOICE) { |
84 | snd_gus_voice_t *voice; | 84 | struct snd_gus_voice *voice; |
85 | 85 | ||
86 | voice = &gus->gf1.voices[what & 0xffff]; | 86 | voice = &gus->gf1.voices[what & 0xffff]; |
87 | voice->handler_wave = | 87 | voice->handler_wave = |
@@ -99,7 +99,7 @@ void snd_gf1_set_default_handlers(snd_gus_card_t * gus, unsigned int what) | |||
99 | 99 | ||
100 | */ | 100 | */ |
101 | 101 | ||
102 | static void snd_gf1_clear_regs(snd_gus_card_t * gus) | 102 | static void snd_gf1_clear_regs(struct snd_gus_card * gus) |
103 | { | 103 | { |
104 | unsigned long flags; | 104 | unsigned long flags; |
105 | 105 | ||
@@ -111,7 +111,7 @@ static void snd_gf1_clear_regs(snd_gus_card_t * gus) | |||
111 | spin_unlock_irqrestore(&gus->reg_lock, flags); | 111 | spin_unlock_irqrestore(&gus->reg_lock, flags); |
112 | } | 112 | } |
113 | 113 | ||
114 | static void snd_gf1_look_regs(snd_gus_card_t * gus) | 114 | static void snd_gf1_look_regs(struct snd_gus_card * gus) |
115 | { | 115 | { |
116 | unsigned long flags; | 116 | unsigned long flags; |
117 | 117 | ||
@@ -127,7 +127,7 @@ static void snd_gf1_look_regs(snd_gus_card_t * gus) | |||
127 | * put selected GF1 voices to initial stage... | 127 | * put selected GF1 voices to initial stage... |
128 | */ | 128 | */ |
129 | 129 | ||
130 | void snd_gf1_smart_stop_voice(snd_gus_card_t * gus, unsigned short voice) | 130 | void snd_gf1_smart_stop_voice(struct snd_gus_card * gus, unsigned short voice) |
131 | { | 131 | { |
132 | unsigned long flags; | 132 | unsigned long flags; |
133 | 133 | ||
@@ -141,7 +141,7 @@ void snd_gf1_smart_stop_voice(snd_gus_card_t * gus, unsigned short voice) | |||
141 | spin_unlock_irqrestore(&gus->reg_lock, flags); | 141 | spin_unlock_irqrestore(&gus->reg_lock, flags); |
142 | } | 142 | } |
143 | 143 | ||
144 | void snd_gf1_stop_voice(snd_gus_card_t * gus, unsigned short voice) | 144 | void snd_gf1_stop_voice(struct snd_gus_card * gus, unsigned short voice) |
145 | { | 145 | { |
146 | unsigned long flags; | 146 | unsigned long flags; |
147 | 147 | ||
@@ -161,7 +161,7 @@ void snd_gf1_stop_voice(snd_gus_card_t * gus, unsigned short voice) | |||
161 | #endif | 161 | #endif |
162 | } | 162 | } |
163 | 163 | ||
164 | static void snd_gf1_clear_voices(snd_gus_card_t * gus, unsigned short v_min, | 164 | static void snd_gf1_clear_voices(struct snd_gus_card * gus, unsigned short v_min, |
165 | unsigned short v_max) | 165 | unsigned short v_max) |
166 | { | 166 | { |
167 | unsigned long flags; | 167 | unsigned long flags; |
@@ -203,7 +203,7 @@ static void snd_gf1_clear_voices(snd_gus_card_t * gus, unsigned short v_min, | |||
203 | } | 203 | } |
204 | } | 204 | } |
205 | 205 | ||
206 | void snd_gf1_stop_voices(snd_gus_card_t * gus, unsigned short v_min, unsigned short v_max) | 206 | void snd_gf1_stop_voices(struct snd_gus_card * gus, unsigned short v_min, unsigned short v_max) |
207 | { | 207 | { |
208 | unsigned long flags; | 208 | unsigned long flags; |
209 | short i, ramp_ok; | 209 | short i, ramp_ok; |
@@ -232,8 +232,8 @@ void snd_gf1_stop_voices(snd_gus_card_t * gus, unsigned short v_min, unsigned sh | |||
232 | snd_gf1_clear_voices(gus, v_min, v_max); | 232 | snd_gf1_clear_voices(gus, v_min, v_max); |
233 | } | 233 | } |
234 | 234 | ||
235 | static void snd_gf1_alloc_voice_use(snd_gus_card_t * gus, | 235 | static void snd_gf1_alloc_voice_use(struct snd_gus_card * gus, |
236 | snd_gus_voice_t * pvoice, | 236 | struct snd_gus_voice * pvoice, |
237 | int type, int client, int port) | 237 | int type, int client, int port) |
238 | { | 238 | { |
239 | pvoice->use = 1; | 239 | pvoice->use = 1; |
@@ -255,9 +255,9 @@ static void snd_gf1_alloc_voice_use(snd_gus_card_t * gus, | |||
255 | } | 255 | } |
256 | } | 256 | } |
257 | 257 | ||
258 | snd_gus_voice_t *snd_gf1_alloc_voice(snd_gus_card_t * gus, int type, int client, int port) | 258 | struct snd_gus_voice *snd_gf1_alloc_voice(struct snd_gus_card * gus, int type, int client, int port) |
259 | { | 259 | { |
260 | snd_gus_voice_t *pvoice; | 260 | struct snd_gus_voice *pvoice; |
261 | unsigned long flags; | 261 | unsigned long flags; |
262 | int idx; | 262 | int idx; |
263 | 263 | ||
@@ -289,10 +289,10 @@ snd_gus_voice_t *snd_gf1_alloc_voice(snd_gus_card_t * gus, int type, int client, | |||
289 | return NULL; | 289 | return NULL; |
290 | } | 290 | } |
291 | 291 | ||
292 | void snd_gf1_free_voice(snd_gus_card_t * gus, snd_gus_voice_t *voice) | 292 | void snd_gf1_free_voice(struct snd_gus_card * gus, struct snd_gus_voice *voice) |
293 | { | 293 | { |
294 | unsigned long flags; | 294 | unsigned long flags; |
295 | void (*private_free)(snd_gus_voice_t *voice); | 295 | void (*private_free)(struct snd_gus_voice *voice); |
296 | void *private_data; | 296 | void *private_data; |
297 | 297 | ||
298 | if (voice == NULL || !voice->use) | 298 | if (voice == NULL || !voice->use) |
@@ -317,7 +317,7 @@ void snd_gf1_free_voice(snd_gus_card_t * gus, snd_gus_voice_t *voice) | |||
317 | * call this function only by start of driver | 317 | * call this function only by start of driver |
318 | */ | 318 | */ |
319 | 319 | ||
320 | int snd_gf1_start(snd_gus_card_t * gus) | 320 | int snd_gf1_start(struct snd_gus_card * gus) |
321 | { | 321 | { |
322 | unsigned long flags; | 322 | unsigned long flags; |
323 | unsigned int i; | 323 | unsigned int i; |
@@ -400,7 +400,7 @@ int snd_gf1_start(snd_gus_card_t * gus) | |||
400 | * call this function only by shutdown of driver | 400 | * call this function only by shutdown of driver |
401 | */ | 401 | */ |
402 | 402 | ||
403 | int snd_gf1_stop(snd_gus_card_t * gus) | 403 | int snd_gf1_stop(struct snd_gus_card * gus) |
404 | { | 404 | { |
405 | snd_gf1_i_write8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL, 0); /* stop all timers */ | 405 | snd_gf1_i_write8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL, 0); /* stop all timers */ |
406 | snd_gf1_stop_voices(gus, 0, 31); /* stop all voices */ | 406 | snd_gf1_stop_voices(gus, 0, 31); /* stop all voices */ |
diff --git a/sound/isa/gus/gus_sample.c b/sound/isa/gus/gus_sample.c index 4290e03acd51..9e0c55ab25b2 100644 --- a/sound/isa/gus/gus_sample.c +++ b/sound/isa/gus/gus_sample.c | |||
@@ -28,9 +28,9 @@ | |||
28 | * | 28 | * |
29 | */ | 29 | */ |
30 | 30 | ||
31 | static void select_instrument(snd_gus_card_t * gus, snd_gus_voice_t * v) | 31 | static void select_instrument(struct snd_gus_card * gus, struct snd_gus_voice * v) |
32 | { | 32 | { |
33 | snd_seq_kinstr_t *instr; | 33 | struct snd_seq_kinstr *instr; |
34 | 34 | ||
35 | #if 0 | 35 | #if 0 |
36 | printk("select instrument: cluster = %li, std = 0x%x, bank = %i, prg = %i\n", | 36 | printk("select instrument: cluster = %li, std = 0x%x, bank = %i, prg = %i\n", |
@@ -53,7 +53,8 @@ static void select_instrument(snd_gus_card_t * gus, snd_gus_voice_t * v) | |||
53 | * | 53 | * |
54 | */ | 54 | */ |
55 | 55 | ||
56 | static void event_sample(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v) | 56 | static void event_sample(struct snd_seq_event *ev, struct snd_gus_port *p, |
57 | struct snd_gus_voice *v) | ||
57 | { | 58 | { |
58 | if (v->sample_ops && v->sample_ops->sample_stop) | 59 | if (v->sample_ops && v->sample_ops->sample_stop) |
59 | v->sample_ops->sample_stop(p->gus, v, SAMPLE_STOP_IMMEDIATELY); | 60 | v->sample_ops->sample_stop(p->gus, v, SAMPLE_STOP_IMMEDIATELY); |
@@ -67,7 +68,8 @@ static void event_sample(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t | |||
67 | select_instrument(p->gus, v); | 68 | select_instrument(p->gus, v); |
68 | } | 69 | } |
69 | 70 | ||
70 | static void event_cluster(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v) | 71 | static void event_cluster(struct snd_seq_event *ev, struct snd_gus_port *p, |
72 | struct snd_gus_voice *v) | ||
71 | { | 73 | { |
72 | if (v->sample_ops && v->sample_ops->sample_stop) | 74 | if (v->sample_ops && v->sample_ops->sample_stop) |
73 | v->sample_ops->sample_stop(p->gus, v, SAMPLE_STOP_IMMEDIATELY); | 75 | v->sample_ops->sample_stop(p->gus, v, SAMPLE_STOP_IMMEDIATELY); |
@@ -75,50 +77,58 @@ static void event_cluster(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_ | |||
75 | select_instrument(p->gus, v); | 77 | select_instrument(p->gus, v); |
76 | } | 78 | } |
77 | 79 | ||
78 | static void event_start(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v) | 80 | static void event_start(struct snd_seq_event *ev, struct snd_gus_port *p, |
81 | struct snd_gus_voice *v) | ||
79 | { | 82 | { |
80 | if (v->sample_ops && v->sample_ops->sample_start) | 83 | if (v->sample_ops && v->sample_ops->sample_start) |
81 | v->sample_ops->sample_start(p->gus, v, ev->data.sample.param.position); | 84 | v->sample_ops->sample_start(p->gus, v, ev->data.sample.param.position); |
82 | } | 85 | } |
83 | 86 | ||
84 | static void event_stop(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v) | 87 | static void event_stop(struct snd_seq_event *ev, struct snd_gus_port *p, |
88 | struct snd_gus_voice *v) | ||
85 | { | 89 | { |
86 | if (v->sample_ops && v->sample_ops->sample_stop) | 90 | if (v->sample_ops && v->sample_ops->sample_stop) |
87 | v->sample_ops->sample_stop(p->gus, v, ev->data.sample.param.stop_mode); | 91 | v->sample_ops->sample_stop(p->gus, v, ev->data.sample.param.stop_mode); |
88 | } | 92 | } |
89 | 93 | ||
90 | static void event_freq(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v) | 94 | static void event_freq(struct snd_seq_event *ev, struct snd_gus_port *p, |
95 | struct snd_gus_voice *v) | ||
91 | { | 96 | { |
92 | if (v->sample_ops && v->sample_ops->sample_freq) | 97 | if (v->sample_ops && v->sample_ops->sample_freq) |
93 | v->sample_ops->sample_freq(p->gus, v, ev->data.sample.param.frequency); | 98 | v->sample_ops->sample_freq(p->gus, v, ev->data.sample.param.frequency); |
94 | } | 99 | } |
95 | 100 | ||
96 | static void event_volume(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v) | 101 | static void event_volume(struct snd_seq_event *ev, struct snd_gus_port *p, |
102 | struct snd_gus_voice *v) | ||
97 | { | 103 | { |
98 | if (v->sample_ops && v->sample_ops->sample_volume) | 104 | if (v->sample_ops && v->sample_ops->sample_volume) |
99 | v->sample_ops->sample_volume(p->gus, v, &ev->data.sample.param.volume); | 105 | v->sample_ops->sample_volume(p->gus, v, &ev->data.sample.param.volume); |
100 | } | 106 | } |
101 | 107 | ||
102 | static void event_loop(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v) | 108 | static void event_loop(struct snd_seq_event *ev, struct snd_gus_port *p, |
109 | struct snd_gus_voice *v) | ||
103 | { | 110 | { |
104 | if (v->sample_ops && v->sample_ops->sample_loop) | 111 | if (v->sample_ops && v->sample_ops->sample_loop) |
105 | v->sample_ops->sample_loop(p->gus, v, &ev->data.sample.param.loop); | 112 | v->sample_ops->sample_loop(p->gus, v, &ev->data.sample.param.loop); |
106 | } | 113 | } |
107 | 114 | ||
108 | static void event_position(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v) | 115 | static void event_position(struct snd_seq_event *ev, struct snd_gus_port *p, |
116 | struct snd_gus_voice *v) | ||
109 | { | 117 | { |
110 | if (v->sample_ops && v->sample_ops->sample_pos) | 118 | if (v->sample_ops && v->sample_ops->sample_pos) |
111 | v->sample_ops->sample_pos(p->gus, v, ev->data.sample.param.position); | 119 | v->sample_ops->sample_pos(p->gus, v, ev->data.sample.param.position); |
112 | } | 120 | } |
113 | 121 | ||
114 | static void event_private1(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v) | 122 | static void event_private1(struct snd_seq_event *ev, struct snd_gus_port *p, |
123 | struct snd_gus_voice *v) | ||
115 | { | 124 | { |
116 | if (v->sample_ops && v->sample_ops->sample_private1) | 125 | if (v->sample_ops && v->sample_ops->sample_private1) |
117 | v->sample_ops->sample_private1(p->gus, v, (unsigned char *)&ev->data.sample.param.raw8); | 126 | v->sample_ops->sample_private1(p->gus, v, (unsigned char *)&ev->data.sample.param.raw8); |
118 | } | 127 | } |
119 | 128 | ||
120 | typedef void (gus_sample_event_handler_t)(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v); | 129 | typedef void (gus_sample_event_handler_t)(struct snd_seq_event *ev, |
121 | 130 | struct snd_gus_port *p, | |
131 | struct snd_gus_voice *v); | ||
122 | static gus_sample_event_handler_t *gus_sample_event_handlers[9] = { | 132 | static gus_sample_event_handler_t *gus_sample_event_handlers[9] = { |
123 | event_sample, | 133 | event_sample, |
124 | event_cluster, | 134 | event_cluster, |
@@ -131,11 +141,11 @@ static gus_sample_event_handler_t *gus_sample_event_handlers[9] = { | |||
131 | event_private1 | 141 | event_private1 |
132 | }; | 142 | }; |
133 | 143 | ||
134 | void snd_gus_sample_event(snd_seq_event_t *ev, snd_gus_port_t *p) | 144 | void snd_gus_sample_event(struct snd_seq_event *ev, struct snd_gus_port *p) |
135 | { | 145 | { |
136 | int idx, voice; | 146 | int idx, voice; |
137 | snd_gus_card_t *gus = p->gus; | 147 | struct snd_gus_card *gus = p->gus; |
138 | snd_gus_voice_t *v; | 148 | struct snd_gus_voice *v; |
139 | unsigned long flags; | 149 | unsigned long flags; |
140 | 150 | ||
141 | idx = ev->type - SNDRV_SEQ_EVENT_SAMPLE; | 151 | idx = ev->type - SNDRV_SEQ_EVENT_SAMPLE; |
diff --git a/sound/isa/gus/gus_simple.c b/sound/isa/gus/gus_simple.c index dfed85b58b3a..dcad6ed0198c 100644 --- a/sound/isa/gus/gus_simple.c +++ b/sound/isa/gus/gus_simple.c | |||
@@ -29,19 +29,19 @@ | |||
29 | * | 29 | * |
30 | */ | 30 | */ |
31 | 31 | ||
32 | static void interrupt_wave(snd_gus_card_t *gus, snd_gus_voice_t *voice); | 32 | static void interrupt_wave(struct snd_gus_card *gus, struct snd_gus_voice *voice); |
33 | static void interrupt_volume(snd_gus_card_t *gus, snd_gus_voice_t *voice); | 33 | static void interrupt_volume(struct snd_gus_card *gus, struct snd_gus_voice *voice); |
34 | static void interrupt_effect(snd_gus_card_t *gus, snd_gus_voice_t *voice); | 34 | static void interrupt_effect(struct snd_gus_card *gus, struct snd_gus_voice *voice); |
35 | 35 | ||
36 | static void sample_start(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_position_t position); | 36 | static void sample_start(struct snd_gus_card *gus, struct snd_gus_voice *voice, snd_seq_position_t position); |
37 | static void sample_stop(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_stop_mode_t mode); | 37 | static void sample_stop(struct snd_gus_card *gus, struct snd_gus_voice *voice, int mode); |
38 | static void sample_freq(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_frequency_t freq); | 38 | static void sample_freq(struct snd_gus_card *gus, struct snd_gus_voice *voice, snd_seq_frequency_t freq); |
39 | static void sample_volume(snd_gus_card_t *card, snd_gus_voice_t *voice, snd_seq_ev_volume_t *volume); | 39 | static void sample_volume(struct snd_gus_card *card, struct snd_gus_voice *voice, struct snd_seq_ev_volume *volume); |
40 | static void sample_loop(snd_gus_card_t *card, snd_gus_voice_t *voice, snd_seq_ev_loop_t *loop); | 40 | static void sample_loop(struct snd_gus_card *card, struct snd_gus_voice *voice, struct snd_seq_ev_loop *loop); |
41 | static void sample_pos(snd_gus_card_t *card, snd_gus_voice_t *voice, snd_seq_position_t position); | 41 | static void sample_pos(struct snd_gus_card *card, struct snd_gus_voice *voice, snd_seq_position_t position); |
42 | static void sample_private1(snd_gus_card_t *card, snd_gus_voice_t *voice, unsigned char *data); | 42 | static void sample_private1(struct snd_gus_card *card, struct snd_gus_voice *voice, unsigned char *data); |
43 | 43 | ||
44 | static snd_gus_sample_ops_t sample_ops = { | 44 | static struct snd_gus_sample_ops sample_ops = { |
45 | sample_start, | 45 | sample_start, |
46 | sample_stop, | 46 | sample_stop, |
47 | sample_freq, | 47 | sample_freq, |
@@ -53,13 +53,13 @@ static snd_gus_sample_ops_t sample_ops = { | |||
53 | 53 | ||
54 | #if 0 | 54 | #if 0 |
55 | 55 | ||
56 | static void note_stop(snd_gus_card_t *gus, snd_gus_voice_t *voice, int wait); | 56 | static void note_stop(struct snd_gus_card *gus, struct snd_gus_voice *voice, int wait); |
57 | static void note_wait(snd_gus_card_t *gus, snd_gus_voice_t *voice); | 57 | static void note_wait(struct snd_gus_card *gus, struct snd_gus_voice *voice); |
58 | static void note_off(snd_gus_card_t *gus, snd_gus_voice_t *voice); | 58 | static void note_off(struct snd_gus_card *gus, struct snd_gus_voice *voice); |
59 | static void note_volume(snd_gus_card_t *card, snd_gus_voice_t *voice); | 59 | static void note_volume(struct snd_gus_card *card, struct snd_gus_voice *voice); |
60 | static void note_pitchbend(snd_gus_card_t *card, snd_gus_voice_t *voice); | 60 | static void note_pitchbend(struct snd_gus_card *card, struct snd_gus_voice *voice); |
61 | static void note_vibrato(snd_gus_card_t *card, snd_gus_voice_t *voice); | 61 | static void note_vibrato(struct snd_gus_card *card, struct snd_gus_voice *voice); |
62 | static void note_tremolo(snd_gus_card_t *card, snd_gus_voice_t *voice); | 62 | static void note_tremolo(struct snd_gus_card *card, struct snd_gus_voice *voice); |
63 | 63 | ||
64 | static struct snd_gus_note_handlers note_commands = { | 64 | static struct snd_gus_note_handlers note_commands = { |
65 | note_stop, | 65 | note_stop, |
@@ -71,7 +71,7 @@ static struct snd_gus_note_handlers note_commands = { | |||
71 | note_tremolo | 71 | note_tremolo |
72 | }; | 72 | }; |
73 | 73 | ||
74 | static void chn_trigger_down(snd_gus_card_t *card, ultra_channel_t *channel, ultra_instrument_t *instrument, unsigned char note, unsigned char velocity, unsigned char priority ); | 74 | static void chn_trigger_down(struct snd_gus_card *card, ultra_channel_t *channel, ultra_instrument_t *instrument, unsigned char note, unsigned char velocity, unsigned char priority ); |
75 | static void chn_trigger_up( ultra_card_t *card, ultra_note_t *note ); | 75 | static void chn_trigger_up( ultra_card_t *card, ultra_note_t *note ); |
76 | static void chn_control( ultra_card_t *card, ultra_channel_t *channel, unsigned short p1, unsigned short p2 ); | 76 | static void chn_control( ultra_card_t *card, ultra_channel_t *channel, unsigned short p1, unsigned short p2 ); |
77 | 77 | ||
@@ -83,14 +83,14 @@ static struct ULTRA_STRU_INSTRUMENT_CHANNEL_COMMANDS channel_commands = { | |||
83 | 83 | ||
84 | #endif | 84 | #endif |
85 | 85 | ||
86 | static void do_volume_envelope(snd_gus_card_t *card, snd_gus_voice_t *voice); | 86 | static void do_volume_envelope(struct snd_gus_card *card, struct snd_gus_voice *voice); |
87 | static void do_pan_envelope(snd_gus_card_t *card, snd_gus_voice_t *voice); | 87 | static void do_pan_envelope(struct snd_gus_card *card, struct snd_gus_voice *voice); |
88 | 88 | ||
89 | /* | 89 | /* |
90 | * | 90 | * |
91 | */ | 91 | */ |
92 | 92 | ||
93 | static void interrupt_wave(snd_gus_card_t *gus, snd_gus_voice_t *voice) | 93 | static void interrupt_wave(struct snd_gus_card *gus, struct snd_gus_voice *voice) |
94 | { | 94 | { |
95 | spin_lock(&gus->event_lock); | 95 | spin_lock(&gus->event_lock); |
96 | snd_gf1_stop_voice(gus, voice->number); | 96 | snd_gf1_stop_voice(gus, voice->number); |
@@ -102,7 +102,7 @@ static void interrupt_wave(snd_gus_card_t *gus, snd_gus_voice_t *voice) | |||
102 | spin_unlock(&gus->event_lock); | 102 | spin_unlock(&gus->event_lock); |
103 | } | 103 | } |
104 | 104 | ||
105 | static void interrupt_volume(snd_gus_card_t *gus, snd_gus_voice_t *voice) | 105 | static void interrupt_volume(struct snd_gus_card *gus, struct snd_gus_voice *voice) |
106 | { | 106 | { |
107 | spin_lock(&gus->event_lock); | 107 | spin_lock(&gus->event_lock); |
108 | if (voice->flags & SNDRV_GF1_VFLG_RUNNING) | 108 | if (voice->flags & SNDRV_GF1_VFLG_RUNNING) |
@@ -112,7 +112,7 @@ static void interrupt_volume(snd_gus_card_t *gus, snd_gus_voice_t *voice) | |||
112 | spin_unlock(&gus->event_lock); | 112 | spin_unlock(&gus->event_lock); |
113 | } | 113 | } |
114 | 114 | ||
115 | static void interrupt_effect(snd_gus_card_t *gus, snd_gus_voice_t *voice) | 115 | static void interrupt_effect(struct snd_gus_card *gus, struct snd_gus_voice *voice) |
116 | { | 116 | { |
117 | spin_lock(&gus->event_lock); | 117 | spin_lock(&gus->event_lock); |
118 | if ((voice->flags & (SNDRV_GF1_VFLG_RUNNING|SNDRV_GF1_VFLG_EFFECT_TIMER1)) == | 118 | if ((voice->flags & (SNDRV_GF1_VFLG_RUNNING|SNDRV_GF1_VFLG_EFFECT_TIMER1)) == |
@@ -125,7 +125,7 @@ static void interrupt_effect(snd_gus_card_t *gus, snd_gus_voice_t *voice) | |||
125 | * | 125 | * |
126 | */ | 126 | */ |
127 | 127 | ||
128 | static void do_volume_envelope(snd_gus_card_t *gus, snd_gus_voice_t *voice) | 128 | static void do_volume_envelope(struct snd_gus_card *gus, struct snd_gus_voice *voice) |
129 | { | 129 | { |
130 | unsigned short next, rate, old_volume; | 130 | unsigned short next, rate, old_volume; |
131 | int program_next_ramp; | 131 | int program_next_ramp; |
@@ -229,7 +229,7 @@ static void do_volume_envelope(snd_gus_card_t *gus, snd_gus_voice_t *voice) | |||
229 | } | 229 | } |
230 | } | 230 | } |
231 | 231 | ||
232 | static void do_pan_envelope(snd_gus_card_t *gus, snd_gus_voice_t *voice) | 232 | static void do_pan_envelope(struct snd_gus_card *gus, struct snd_gus_voice *voice) |
233 | { | 233 | { |
234 | unsigned long flags; | 234 | unsigned long flags; |
235 | unsigned char old_pan; | 235 | unsigned char old_pan; |
@@ -276,7 +276,7 @@ static void do_pan_envelope(snd_gus_card_t *gus, snd_gus_voice_t *voice) | |||
276 | #endif | 276 | #endif |
277 | } | 277 | } |
278 | 278 | ||
279 | static void set_enhanced_pan(snd_gus_card_t *gus, snd_gus_voice_t *voice, unsigned short pan) | 279 | static void set_enhanced_pan(struct snd_gus_card *gus, struct snd_gus_voice *voice, unsigned short pan) |
280 | { | 280 | { |
281 | unsigned long flags; | 281 | unsigned long flags; |
282 | unsigned short vlo, vro; | 282 | unsigned short vlo, vro; |
@@ -307,13 +307,13 @@ static void set_enhanced_pan(snd_gus_card_t *gus, snd_gus_voice_t *voice, unsign | |||
307 | * | 307 | * |
308 | */ | 308 | */ |
309 | 309 | ||
310 | static void sample_start(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_position_t position) | 310 | static void sample_start(struct snd_gus_card *gus, struct snd_gus_voice *voice, snd_seq_position_t position) |
311 | { | 311 | { |
312 | unsigned long flags; | 312 | unsigned long flags; |
313 | unsigned int begin, addr, addr_end, addr_start; | 313 | unsigned int begin, addr, addr_end, addr_start; |
314 | int w_16; | 314 | int w_16; |
315 | simple_instrument_t *simple; | 315 | struct simple_instrument *simple; |
316 | snd_seq_kinstr_t *instr; | 316 | struct snd_seq_kinstr *instr; |
317 | 317 | ||
318 | instr = snd_seq_instr_find(gus->gf1.ilist, &voice->instr, 0, 1); | 318 | instr = snd_seq_instr_find(gus->gf1.ilist, &voice->instr, 0, 1); |
319 | if (instr == NULL) | 319 | if (instr == NULL) |
@@ -397,7 +397,7 @@ static void sample_start(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_po | |||
397 | snd_seq_instr_free_use(gus->gf1.ilist, instr); | 397 | snd_seq_instr_free_use(gus->gf1.ilist, instr); |
398 | } | 398 | } |
399 | 399 | ||
400 | static void sample_stop(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_stop_mode_t mode) | 400 | static void sample_stop(struct snd_gus_card *gus, struct snd_gus_voice *voice, int mode) |
401 | { | 401 | { |
402 | unsigned char control; | 402 | unsigned char control; |
403 | unsigned long flags; | 403 | unsigned long flags; |
@@ -433,7 +433,7 @@ static void sample_stop(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_sto | |||
433 | } | 433 | } |
434 | } | 434 | } |
435 | 435 | ||
436 | static void sample_freq(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_frequency_t freq) | 436 | static void sample_freq(struct snd_gus_card *gus, struct snd_gus_voice *voice, snd_seq_frequency_t freq) |
437 | { | 437 | { |
438 | unsigned long flags; | 438 | unsigned long flags; |
439 | 439 | ||
@@ -444,7 +444,7 @@ static void sample_freq(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_fre | |||
444 | spin_unlock_irqrestore(&gus->reg_lock, flags); | 444 | spin_unlock_irqrestore(&gus->reg_lock, flags); |
445 | } | 445 | } |
446 | 446 | ||
447 | static void sample_volume(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_ev_volume_t *volume) | 447 | static void sample_volume(struct snd_gus_card *gus, struct snd_gus_voice *voice, struct snd_seq_ev_volume *volume) |
448 | { | 448 | { |
449 | if (volume->volume >= 0) { | 449 | if (volume->volume >= 0) { |
450 | volume->volume &= 0x3fff; | 450 | volume->volume &= 0x3fff; |
@@ -471,13 +471,13 @@ static void sample_volume(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_e | |||
471 | } | 471 | } |
472 | } | 472 | } |
473 | 473 | ||
474 | static void sample_loop(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_ev_loop_t *loop) | 474 | static void sample_loop(struct snd_gus_card *gus, struct snd_gus_voice *voice, struct snd_seq_ev_loop *loop) |
475 | { | 475 | { |
476 | unsigned long flags; | 476 | unsigned long flags; |
477 | int w_16 = voice->control & 0x04; | 477 | int w_16 = voice->control & 0x04; |
478 | unsigned int begin, addr_start, addr_end; | 478 | unsigned int begin, addr_start, addr_end; |
479 | simple_instrument_t *simple; | 479 | struct simple_instrument *simple; |
480 | snd_seq_kinstr_t *instr; | 480 | struct snd_seq_kinstr *instr; |
481 | 481 | ||
482 | #if 0 | 482 | #if 0 |
483 | printk("voice_loop: start = 0x%x, end = 0x%x\n", loop->start, loop->end); | 483 | printk("voice_loop: start = 0x%x, end = 0x%x\n", loop->start, loop->end); |
@@ -500,13 +500,13 @@ static void sample_loop(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_ev_ | |||
500 | snd_seq_instr_free_use(gus->gf1.ilist, instr); | 500 | snd_seq_instr_free_use(gus->gf1.ilist, instr); |
501 | } | 501 | } |
502 | 502 | ||
503 | static void sample_pos(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_position_t position) | 503 | static void sample_pos(struct snd_gus_card *gus, struct snd_gus_voice *voice, snd_seq_position_t position) |
504 | { | 504 | { |
505 | unsigned long flags; | 505 | unsigned long flags; |
506 | int w_16 = voice->control & 0x04; | 506 | int w_16 = voice->control & 0x04; |
507 | unsigned int begin, addr; | 507 | unsigned int begin, addr; |
508 | simple_instrument_t *simple; | 508 | struct simple_instrument *simple; |
509 | snd_seq_kinstr_t *instr; | 509 | struct snd_seq_kinstr *instr; |
510 | 510 | ||
511 | #if 0 | 511 | #if 0 |
512 | printk("voice_loop: start = 0x%x, end = 0x%x\n", loop->start, loop->end); | 512 | printk("voice_loop: start = 0x%x, end = 0x%x\n", loop->start, loop->end); |
@@ -537,7 +537,7 @@ static unsigned char get_effects_mask( ultra_card_t *card, int value ) | |||
537 | 537 | ||
538 | #endif | 538 | #endif |
539 | 539 | ||
540 | static void sample_private1(snd_gus_card_t *card, snd_gus_voice_t *voice, unsigned char *data) | 540 | static void sample_private1(struct snd_gus_card *card, struct snd_gus_voice *voice, unsigned char *data) |
541 | { | 541 | { |
542 | #if 0 | 542 | #if 0 |
543 | unsigned long flags; | 543 | unsigned long flags; |
@@ -624,7 +624,7 @@ static void chn_control( ultra_card_t *card, ultra_channel_t *channel, unsigned | |||
624 | 624 | ||
625 | #endif | 625 | #endif |
626 | 626 | ||
627 | void snd_gf1_simple_init(snd_gus_voice_t *voice) | 627 | void snd_gf1_simple_init(struct snd_gus_voice *voice) |
628 | { | 628 | { |
629 | voice->handler_wave = interrupt_wave; | 629 | voice->handler_wave = interrupt_wave; |
630 | voice->handler_volume = interrupt_volume; | 630 | voice->handler_volume = interrupt_volume; |
diff --git a/sound/isa/gus/gus_synth.c b/sound/isa/gus/gus_synth.c index f51c386ee192..9c7d6986f62f 100644 --- a/sound/isa/gus/gus_synth.c +++ b/sound/isa/gus/gus_synth.c | |||
@@ -34,10 +34,10 @@ MODULE_LICENSE("GPL"); | |||
34 | * | 34 | * |
35 | */ | 35 | */ |
36 | 36 | ||
37 | static void snd_gus_synth_free_voices(snd_gus_card_t * gus, int client, int port) | 37 | static void snd_gus_synth_free_voices(struct snd_gus_card * gus, int client, int port) |
38 | { | 38 | { |
39 | int idx; | 39 | int idx; |
40 | snd_gus_voice_t * voice; | 40 | struct snd_gus_voice * voice; |
41 | 41 | ||
42 | for (idx = 0; idx < 32; idx++) { | 42 | for (idx = 0; idx < 32; idx++) { |
43 | voice = &gus->gf1.voices[idx]; | 43 | voice = &gus->gf1.voices[idx]; |
@@ -46,11 +46,11 @@ static void snd_gus_synth_free_voices(snd_gus_card_t * gus, int client, int port | |||
46 | } | 46 | } |
47 | } | 47 | } |
48 | 48 | ||
49 | static int snd_gus_synth_use(void *private_data, snd_seq_port_subscribe_t *info) | 49 | static int snd_gus_synth_use(void *private_data, struct snd_seq_port_subscribe *info) |
50 | { | 50 | { |
51 | snd_gus_port_t * port = (snd_gus_port_t *)private_data; | 51 | struct snd_gus_port * port = private_data; |
52 | snd_gus_card_t * gus = port->gus; | 52 | struct snd_gus_card * gus = port->gus; |
53 | snd_gus_voice_t * voice; | 53 | struct snd_gus_voice * voice; |
54 | unsigned int idx; | 54 | unsigned int idx; |
55 | 55 | ||
56 | if (info->voices > 32) | 56 | if (info->voices > 32) |
@@ -74,10 +74,10 @@ static int snd_gus_synth_use(void *private_data, snd_seq_port_subscribe_t *info) | |||
74 | return 0; | 74 | return 0; |
75 | } | 75 | } |
76 | 76 | ||
77 | static int snd_gus_synth_unuse(void *private_data, snd_seq_port_subscribe_t *info) | 77 | static int snd_gus_synth_unuse(void *private_data, struct snd_seq_port_subscribe *info) |
78 | { | 78 | { |
79 | snd_gus_port_t * port = (snd_gus_port_t *)private_data; | 79 | struct snd_gus_port * port = private_data; |
80 | snd_gus_card_t * gus = port->gus; | 80 | struct snd_gus_card * gus = port->gus; |
81 | 81 | ||
82 | down(&gus->register_mutex); | 82 | down(&gus->register_mutex); |
83 | snd_gus_synth_free_voices(gus, info->sender.client, info->sender.port); | 83 | snd_gus_synth_free_voices(gus, info->sender.client, info->sender.port); |
@@ -90,19 +90,19 @@ static int snd_gus_synth_unuse(void *private_data, snd_seq_port_subscribe_t *inf | |||
90 | * | 90 | * |
91 | */ | 91 | */ |
92 | 92 | ||
93 | static void snd_gus_synth_free_private_instruments(snd_gus_port_t *p, int client) | 93 | static void snd_gus_synth_free_private_instruments(struct snd_gus_port *p, int client) |
94 | { | 94 | { |
95 | snd_seq_instr_header_t ifree; | 95 | struct snd_seq_instr_header ifree; |
96 | 96 | ||
97 | memset(&ifree, 0, sizeof(ifree)); | 97 | memset(&ifree, 0, sizeof(ifree)); |
98 | ifree.cmd = SNDRV_SEQ_INSTR_FREE_CMD_PRIVATE; | 98 | ifree.cmd = SNDRV_SEQ_INSTR_FREE_CMD_PRIVATE; |
99 | snd_seq_instr_list_free_cond(p->gus->gf1.ilist, &ifree, client, 0); | 99 | snd_seq_instr_list_free_cond(p->gus->gf1.ilist, &ifree, client, 0); |
100 | } | 100 | } |
101 | 101 | ||
102 | static int snd_gus_synth_event_input(snd_seq_event_t *ev, int direct, | 102 | static int snd_gus_synth_event_input(struct snd_seq_event *ev, int direct, |
103 | void *private_data, int atomic, int hop) | 103 | void *private_data, int atomic, int hop) |
104 | { | 104 | { |
105 | snd_gus_port_t * p = (snd_gus_port_t *) private_data; | 105 | struct snd_gus_port * p = private_data; |
106 | 106 | ||
107 | snd_assert(p != NULL, return -EINVAL); | 107 | snd_assert(p != NULL, return -EINVAL); |
108 | if (ev->type >= SNDRV_SEQ_EVENT_SAMPLE && | 108 | if (ev->type >= SNDRV_SEQ_EVENT_SAMPLE && |
@@ -131,12 +131,12 @@ static int snd_gus_synth_event_input(snd_seq_event_t *ev, int direct, | |||
131 | } | 131 | } |
132 | 132 | ||
133 | static void snd_gus_synth_instr_notify(void *private_data, | 133 | static void snd_gus_synth_instr_notify(void *private_data, |
134 | snd_seq_kinstr_t *instr, | 134 | struct snd_seq_kinstr *instr, |
135 | int what) | 135 | int what) |
136 | { | 136 | { |
137 | unsigned int idx; | 137 | unsigned int idx; |
138 | snd_gus_card_t *gus = private_data; | 138 | struct snd_gus_card *gus = private_data; |
139 | snd_gus_voice_t *pvoice; | 139 | struct snd_gus_voice *pvoice; |
140 | unsigned long flags; | 140 | unsigned long flags; |
141 | 141 | ||
142 | spin_lock_irqsave(&gus->event_lock, flags); | 142 | spin_lock_irqsave(&gus->event_lock, flags); |
@@ -160,16 +160,16 @@ static void snd_gus_synth_instr_notify(void *private_data, | |||
160 | 160 | ||
161 | static void snd_gus_synth_free_port(void *private_data) | 161 | static void snd_gus_synth_free_port(void *private_data) |
162 | { | 162 | { |
163 | snd_gus_port_t * p = (snd_gus_port_t *)private_data; | 163 | struct snd_gus_port * p = private_data; |
164 | 164 | ||
165 | if (p) | 165 | if (p) |
166 | snd_midi_channel_free_set(p->chset); | 166 | snd_midi_channel_free_set(p->chset); |
167 | } | 167 | } |
168 | 168 | ||
169 | static int snd_gus_synth_create_port(snd_gus_card_t * gus, int idx) | 169 | static int snd_gus_synth_create_port(struct snd_gus_card * gus, int idx) |
170 | { | 170 | { |
171 | snd_gus_port_t * p; | 171 | struct snd_gus_port * p; |
172 | snd_seq_port_callback_t callbacks; | 172 | struct snd_seq_port_callback callbacks; |
173 | char name[32]; | 173 | char name[32]; |
174 | int result; | 174 | int result; |
175 | 175 | ||
@@ -210,18 +210,18 @@ static int snd_gus_synth_create_port(snd_gus_card_t * gus, int idx) | |||
210 | * | 210 | * |
211 | */ | 211 | */ |
212 | 212 | ||
213 | static int snd_gus_synth_new_device(snd_seq_device_t *dev) | 213 | static int snd_gus_synth_new_device(struct snd_seq_device *dev) |
214 | { | 214 | { |
215 | snd_gus_card_t *gus; | 215 | struct snd_gus_card *gus; |
216 | int client, i; | 216 | int client, i; |
217 | snd_seq_client_callback_t callbacks; | 217 | struct snd_seq_client_callback callbacks; |
218 | snd_seq_client_info_t *cinfo; | 218 | struct snd_seq_client_info *cinfo; |
219 | snd_seq_port_subscribe_t sub; | 219 | struct snd_seq_port_subscribe sub; |
220 | snd_iwffff_ops_t *iwops; | 220 | struct snd_iwffff_ops *iwops; |
221 | snd_gf1_ops_t *gf1ops; | 221 | struct snd_gf1_ops *gf1ops; |
222 | snd_simple_ops_t *simpleops; | 222 | struct snd_simple_ops *simpleops; |
223 | 223 | ||
224 | gus = *(snd_gus_card_t**)SNDRV_SEQ_DEVICE_ARGPTR(dev); | 224 | gus = *(struct snd_gus_card **)SNDRV_SEQ_DEVICE_ARGPTR(dev); |
225 | if (gus == NULL) | 225 | if (gus == NULL) |
226 | return -EINVAL; | 226 | return -EINVAL; |
227 | 227 | ||
@@ -293,11 +293,11 @@ static int snd_gus_synth_new_device(snd_seq_device_t *dev) | |||
293 | return 0; | 293 | return 0; |
294 | } | 294 | } |
295 | 295 | ||
296 | static int snd_gus_synth_delete_device(snd_seq_device_t *dev) | 296 | static int snd_gus_synth_delete_device(struct snd_seq_device *dev) |
297 | { | 297 | { |
298 | snd_gus_card_t *gus; | 298 | struct snd_gus_card *gus; |
299 | 299 | ||
300 | gus = *(snd_gus_card_t**)SNDRV_SEQ_DEVICE_ARGPTR(dev); | 300 | gus = *(struct snd_gus_card **)SNDRV_SEQ_DEVICE_ARGPTR(dev); |
301 | if (gus == NULL) | 301 | if (gus == NULL) |
302 | return -EINVAL; | 302 | return -EINVAL; |
303 | 303 | ||
@@ -312,13 +312,13 @@ static int snd_gus_synth_delete_device(snd_seq_device_t *dev) | |||
312 | 312 | ||
313 | static int __init alsa_gus_synth_init(void) | 313 | static int __init alsa_gus_synth_init(void) |
314 | { | 314 | { |
315 | static snd_seq_dev_ops_t ops = { | 315 | static struct snd_seq_dev_ops ops = { |
316 | snd_gus_synth_new_device, | 316 | snd_gus_synth_new_device, |
317 | snd_gus_synth_delete_device | 317 | snd_gus_synth_delete_device |
318 | }; | 318 | }; |
319 | 319 | ||
320 | return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_GUS, &ops, | 320 | return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_GUS, &ops, |
321 | sizeof(snd_gus_card_t*)); | 321 | sizeof(struct snd_gus_card *)); |
322 | } | 322 | } |
323 | 323 | ||
324 | static void __exit alsa_gus_synth_exit(void) | 324 | static void __exit alsa_gus_synth_exit(void) |
diff --git a/sound/isa/gus/gus_timer.c b/sound/isa/gus/gus_timer.c index 9876603ff6c1..a43b662f17c7 100644 --- a/sound/isa/gus/gus_timer.c +++ b/sound/isa/gus/gus_timer.c | |||
@@ -30,12 +30,12 @@ | |||
30 | * Timer 1 - 80us | 30 | * Timer 1 - 80us |
31 | */ | 31 | */ |
32 | 32 | ||
33 | static int snd_gf1_timer1_start(snd_timer_t * timer) | 33 | static int snd_gf1_timer1_start(struct snd_timer * timer) |
34 | { | 34 | { |
35 | unsigned long flags; | 35 | unsigned long flags; |
36 | unsigned char tmp; | 36 | unsigned char tmp; |
37 | unsigned int ticks; | 37 | unsigned int ticks; |
38 | snd_gus_card_t *gus; | 38 | struct snd_gus_card *gus; |
39 | 39 | ||
40 | gus = snd_timer_chip(timer); | 40 | gus = snd_timer_chip(timer); |
41 | spin_lock_irqsave(&gus->reg_lock, flags); | 41 | spin_lock_irqsave(&gus->reg_lock, flags); |
@@ -48,11 +48,11 @@ static int snd_gf1_timer1_start(snd_timer_t * timer) | |||
48 | return 0; | 48 | return 0; |
49 | } | 49 | } |
50 | 50 | ||
51 | static int snd_gf1_timer1_stop(snd_timer_t * timer) | 51 | static int snd_gf1_timer1_stop(struct snd_timer * timer) |
52 | { | 52 | { |
53 | unsigned long flags; | 53 | unsigned long flags; |
54 | unsigned char tmp; | 54 | unsigned char tmp; |
55 | snd_gus_card_t *gus; | 55 | struct snd_gus_card *gus; |
56 | 56 | ||
57 | gus = snd_timer_chip(timer); | 57 | gus = snd_timer_chip(timer); |
58 | spin_lock_irqsave(&gus->reg_lock, flags); | 58 | spin_lock_irqsave(&gus->reg_lock, flags); |
@@ -66,12 +66,12 @@ static int snd_gf1_timer1_stop(snd_timer_t * timer) | |||
66 | * Timer 2 - 320us | 66 | * Timer 2 - 320us |
67 | */ | 67 | */ |
68 | 68 | ||
69 | static int snd_gf1_timer2_start(snd_timer_t * timer) | 69 | static int snd_gf1_timer2_start(struct snd_timer * timer) |
70 | { | 70 | { |
71 | unsigned long flags; | 71 | unsigned long flags; |
72 | unsigned char tmp; | 72 | unsigned char tmp; |
73 | unsigned int ticks; | 73 | unsigned int ticks; |
74 | snd_gus_card_t *gus; | 74 | struct snd_gus_card *gus; |
75 | 75 | ||
76 | gus = snd_timer_chip(timer); | 76 | gus = snd_timer_chip(timer); |
77 | spin_lock_irqsave(&gus->reg_lock, flags); | 77 | spin_lock_irqsave(&gus->reg_lock, flags); |
@@ -84,11 +84,11 @@ static int snd_gf1_timer2_start(snd_timer_t * timer) | |||
84 | return 0; | 84 | return 0; |
85 | } | 85 | } |
86 | 86 | ||
87 | static int snd_gf1_timer2_stop(snd_timer_t * timer) | 87 | static int snd_gf1_timer2_stop(struct snd_timer * timer) |
88 | { | 88 | { |
89 | unsigned long flags; | 89 | unsigned long flags; |
90 | unsigned char tmp; | 90 | unsigned char tmp; |
91 | snd_gus_card_t *gus; | 91 | struct snd_gus_card *gus; |
92 | 92 | ||
93 | gus = snd_timer_chip(timer); | 93 | gus = snd_timer_chip(timer); |
94 | spin_lock_irqsave(&gus->reg_lock, flags); | 94 | spin_lock_irqsave(&gus->reg_lock, flags); |
@@ -102,18 +102,18 @@ static int snd_gf1_timer2_stop(snd_timer_t * timer) | |||
102 | 102 | ||
103 | */ | 103 | */ |
104 | 104 | ||
105 | static void snd_gf1_interrupt_timer1(snd_gus_card_t * gus) | 105 | static void snd_gf1_interrupt_timer1(struct snd_gus_card * gus) |
106 | { | 106 | { |
107 | snd_timer_t *timer = gus->gf1.timer1; | 107 | struct snd_timer *timer = gus->gf1.timer1; |
108 | 108 | ||
109 | if (timer == NULL) | 109 | if (timer == NULL) |
110 | return; | 110 | return; |
111 | snd_timer_interrupt(timer, timer->sticks); | 111 | snd_timer_interrupt(timer, timer->sticks); |
112 | } | 112 | } |
113 | 113 | ||
114 | static void snd_gf1_interrupt_timer2(snd_gus_card_t * gus) | 114 | static void snd_gf1_interrupt_timer2(struct snd_gus_card * gus) |
115 | { | 115 | { |
116 | snd_timer_t *timer = gus->gf1.timer2; | 116 | struct snd_timer *timer = gus->gf1.timer2; |
117 | 117 | ||
118 | if (timer == NULL) | 118 | if (timer == NULL) |
119 | return; | 119 | return; |
@@ -124,7 +124,7 @@ static void snd_gf1_interrupt_timer2(snd_gus_card_t * gus) | |||
124 | 124 | ||
125 | */ | 125 | */ |
126 | 126 | ||
127 | static struct _snd_timer_hardware snd_gf1_timer1 = | 127 | static struct snd_timer_hardware snd_gf1_timer1 = |
128 | { | 128 | { |
129 | .flags = SNDRV_TIMER_HW_STOP, | 129 | .flags = SNDRV_TIMER_HW_STOP, |
130 | .resolution = 80000, | 130 | .resolution = 80000, |
@@ -133,7 +133,7 @@ static struct _snd_timer_hardware snd_gf1_timer1 = | |||
133 | .stop = snd_gf1_timer1_stop, | 133 | .stop = snd_gf1_timer1_stop, |
134 | }; | 134 | }; |
135 | 135 | ||
136 | static struct _snd_timer_hardware snd_gf1_timer2 = | 136 | static struct snd_timer_hardware snd_gf1_timer2 = |
137 | { | 137 | { |
138 | .flags = SNDRV_TIMER_HW_STOP, | 138 | .flags = SNDRV_TIMER_HW_STOP, |
139 | .resolution = 320000, | 139 | .resolution = 320000, |
@@ -142,22 +142,22 @@ static struct _snd_timer_hardware snd_gf1_timer2 = | |||
142 | .stop = snd_gf1_timer2_stop, | 142 | .stop = snd_gf1_timer2_stop, |
143 | }; | 143 | }; |
144 | 144 | ||
145 | static void snd_gf1_timer1_free(snd_timer_t *timer) | 145 | static void snd_gf1_timer1_free(struct snd_timer *timer) |
146 | { | 146 | { |
147 | snd_gus_card_t *gus = timer->private_data; | 147 | struct snd_gus_card *gus = timer->private_data; |
148 | gus->gf1.timer1 = NULL; | 148 | gus->gf1.timer1 = NULL; |
149 | } | 149 | } |
150 | 150 | ||
151 | static void snd_gf1_timer2_free(snd_timer_t *timer) | 151 | static void snd_gf1_timer2_free(struct snd_timer *timer) |
152 | { | 152 | { |
153 | snd_gus_card_t *gus = timer->private_data; | 153 | struct snd_gus_card *gus = timer->private_data; |
154 | gus->gf1.timer2 = NULL; | 154 | gus->gf1.timer2 = NULL; |
155 | } | 155 | } |
156 | 156 | ||
157 | void snd_gf1_timers_init(snd_gus_card_t * gus) | 157 | void snd_gf1_timers_init(struct snd_gus_card * gus) |
158 | { | 158 | { |
159 | snd_timer_t *timer; | 159 | struct snd_timer *timer; |
160 | snd_timer_id_t tid; | 160 | struct snd_timer_id tid; |
161 | 161 | ||
162 | if (gus->gf1.timer1 != NULL || gus->gf1.timer2 != NULL) | 162 | if (gus->gf1.timer1 != NULL || gus->gf1.timer2 != NULL) |
163 | return; | 163 | return; |
@@ -190,7 +190,7 @@ void snd_gf1_timers_init(snd_gus_card_t * gus) | |||
190 | gus->gf1.timer2 = timer; | 190 | gus->gf1.timer2 = timer; |
191 | } | 191 | } |
192 | 192 | ||
193 | void snd_gf1_timers_done(snd_gus_card_t * gus) | 193 | void snd_gf1_timers_done(struct snd_gus_card * gus) |
194 | { | 194 | { |
195 | snd_gf1_set_default_handlers(gus, SNDRV_GF1_HANDLER_TIMER1 | SNDRV_GF1_HANDLER_TIMER2); | 195 | snd_gf1_set_default_handlers(gus, SNDRV_GF1_HANDLER_TIMER1 | SNDRV_GF1_HANDLER_TIMER2); |
196 | if (gus->gf1.timer1) { | 196 | if (gus->gf1.timer1) { |
diff --git a/sound/isa/gus/gus_uart.c b/sound/isa/gus/gus_uart.c index fbc95e99105c..654290a8b21c 100644 --- a/sound/isa/gus/gus_uart.c +++ b/sound/isa/gus/gus_uart.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <sound/core.h> | 26 | #include <sound/core.h> |
27 | #include <sound/gus.h> | 27 | #include <sound/gus.h> |
28 | 28 | ||
29 | static void snd_gf1_interrupt_midi_in(snd_gus_card_t * gus) | 29 | static void snd_gf1_interrupt_midi_in(struct snd_gus_card * gus) |
30 | { | 30 | { |
31 | int count; | 31 | int count; |
32 | unsigned char stat, data, byte; | 32 | unsigned char stat, data, byte; |
@@ -61,7 +61,7 @@ static void snd_gf1_interrupt_midi_in(snd_gus_card_t * gus) | |||
61 | } | 61 | } |
62 | } | 62 | } |
63 | 63 | ||
64 | static void snd_gf1_interrupt_midi_out(snd_gus_card_t * gus) | 64 | static void snd_gf1_interrupt_midi_out(struct snd_gus_card * gus) |
65 | { | 65 | { |
66 | char byte; | 66 | char byte; |
67 | unsigned long flags; | 67 | unsigned long flags; |
@@ -81,7 +81,7 @@ static void snd_gf1_interrupt_midi_out(snd_gus_card_t * gus) | |||
81 | spin_unlock_irqrestore(&gus->uart_cmd_lock, flags); | 81 | spin_unlock_irqrestore(&gus->uart_cmd_lock, flags); |
82 | } | 82 | } |
83 | 83 | ||
84 | static void snd_gf1_uart_reset(snd_gus_card_t * gus, int close) | 84 | static void snd_gf1_uart_reset(struct snd_gus_card * gus, int close) |
85 | { | 85 | { |
86 | snd_gf1_uart_cmd(gus, 0x03); /* reset */ | 86 | snd_gf1_uart_cmd(gus, 0x03); /* reset */ |
87 | if (!close && gus->uart_enable) { | 87 | if (!close && gus->uart_enable) { |
@@ -90,10 +90,10 @@ static void snd_gf1_uart_reset(snd_gus_card_t * gus, int close) | |||
90 | } | 90 | } |
91 | } | 91 | } |
92 | 92 | ||
93 | static int snd_gf1_uart_output_open(snd_rawmidi_substream_t * substream) | 93 | static int snd_gf1_uart_output_open(struct snd_rawmidi_substream *substream) |
94 | { | 94 | { |
95 | unsigned long flags; | 95 | unsigned long flags; |
96 | snd_gus_card_t *gus; | 96 | struct snd_gus_card *gus; |
97 | 97 | ||
98 | gus = substream->rmidi->private_data; | 98 | gus = substream->rmidi->private_data; |
99 | spin_lock_irqsave(&gus->uart_cmd_lock, flags); | 99 | spin_lock_irqsave(&gus->uart_cmd_lock, flags); |
@@ -109,10 +109,10 @@ static int snd_gf1_uart_output_open(snd_rawmidi_substream_t * substream) | |||
109 | return 0; | 109 | return 0; |
110 | } | 110 | } |
111 | 111 | ||
112 | static int snd_gf1_uart_input_open(snd_rawmidi_substream_t * substream) | 112 | static int snd_gf1_uart_input_open(struct snd_rawmidi_substream *substream) |
113 | { | 113 | { |
114 | unsigned long flags; | 114 | unsigned long flags; |
115 | snd_gus_card_t *gus; | 115 | struct snd_gus_card *gus; |
116 | int i; | 116 | int i; |
117 | 117 | ||
118 | gus = substream->rmidi->private_data; | 118 | gus = substream->rmidi->private_data; |
@@ -136,10 +136,10 @@ static int snd_gf1_uart_input_open(snd_rawmidi_substream_t * substream) | |||
136 | return 0; | 136 | return 0; |
137 | } | 137 | } |
138 | 138 | ||
139 | static int snd_gf1_uart_output_close(snd_rawmidi_substream_t * substream) | 139 | static int snd_gf1_uart_output_close(struct snd_rawmidi_substream *substream) |
140 | { | 140 | { |
141 | unsigned long flags; | 141 | unsigned long flags; |
142 | snd_gus_card_t *gus; | 142 | struct snd_gus_card *gus; |
143 | 143 | ||
144 | gus = substream->rmidi->private_data; | 144 | gus = substream->rmidi->private_data; |
145 | spin_lock_irqsave(&gus->uart_cmd_lock, flags); | 145 | spin_lock_irqsave(&gus->uart_cmd_lock, flags); |
@@ -151,10 +151,10 @@ static int snd_gf1_uart_output_close(snd_rawmidi_substream_t * substream) | |||
151 | return 0; | 151 | return 0; |
152 | } | 152 | } |
153 | 153 | ||
154 | static int snd_gf1_uart_input_close(snd_rawmidi_substream_t * substream) | 154 | static int snd_gf1_uart_input_close(struct snd_rawmidi_substream *substream) |
155 | { | 155 | { |
156 | unsigned long flags; | 156 | unsigned long flags; |
157 | snd_gus_card_t *gus; | 157 | struct snd_gus_card *gus; |
158 | 158 | ||
159 | gus = substream->rmidi->private_data; | 159 | gus = substream->rmidi->private_data; |
160 | spin_lock_irqsave(&gus->uart_cmd_lock, flags); | 160 | spin_lock_irqsave(&gus->uart_cmd_lock, flags); |
@@ -166,9 +166,9 @@ static int snd_gf1_uart_input_close(snd_rawmidi_substream_t * substream) | |||
166 | return 0; | 166 | return 0; |
167 | } | 167 | } |
168 | 168 | ||
169 | static void snd_gf1_uart_input_trigger(snd_rawmidi_substream_t * substream, int up) | 169 | static void snd_gf1_uart_input_trigger(struct snd_rawmidi_substream *substream, int up) |
170 | { | 170 | { |
171 | snd_gus_card_t *gus; | 171 | struct snd_gus_card *gus; |
172 | unsigned long flags; | 172 | unsigned long flags; |
173 | 173 | ||
174 | gus = substream->rmidi->private_data; | 174 | gus = substream->rmidi->private_data; |
@@ -184,10 +184,10 @@ static void snd_gf1_uart_input_trigger(snd_rawmidi_substream_t * substream, int | |||
184 | spin_unlock_irqrestore(&gus->uart_cmd_lock, flags); | 184 | spin_unlock_irqrestore(&gus->uart_cmd_lock, flags); |
185 | } | 185 | } |
186 | 186 | ||
187 | static void snd_gf1_uart_output_trigger(snd_rawmidi_substream_t * substream, int up) | 187 | static void snd_gf1_uart_output_trigger(struct snd_rawmidi_substream *substream, int up) |
188 | { | 188 | { |
189 | unsigned long flags; | 189 | unsigned long flags; |
190 | snd_gus_card_t *gus; | 190 | struct snd_gus_card *gus; |
191 | char byte; | 191 | char byte; |
192 | int timeout; | 192 | int timeout; |
193 | 193 | ||
@@ -222,23 +222,23 @@ static void snd_gf1_uart_output_trigger(snd_rawmidi_substream_t * substream, int | |||
222 | spin_unlock_irqrestore(&gus->uart_cmd_lock, flags); | 222 | spin_unlock_irqrestore(&gus->uart_cmd_lock, flags); |
223 | } | 223 | } |
224 | 224 | ||
225 | static snd_rawmidi_ops_t snd_gf1_uart_output = | 225 | static struct snd_rawmidi_ops snd_gf1_uart_output = |
226 | { | 226 | { |
227 | .open = snd_gf1_uart_output_open, | 227 | .open = snd_gf1_uart_output_open, |
228 | .close = snd_gf1_uart_output_close, | 228 | .close = snd_gf1_uart_output_close, |
229 | .trigger = snd_gf1_uart_output_trigger, | 229 | .trigger = snd_gf1_uart_output_trigger, |
230 | }; | 230 | }; |
231 | 231 | ||
232 | static snd_rawmidi_ops_t snd_gf1_uart_input = | 232 | static struct snd_rawmidi_ops snd_gf1_uart_input = |
233 | { | 233 | { |
234 | .open = snd_gf1_uart_input_open, | 234 | .open = snd_gf1_uart_input_open, |
235 | .close = snd_gf1_uart_input_close, | 235 | .close = snd_gf1_uart_input_close, |
236 | .trigger = snd_gf1_uart_input_trigger, | 236 | .trigger = snd_gf1_uart_input_trigger, |
237 | }; | 237 | }; |
238 | 238 | ||
239 | int snd_gf1_rawmidi_new(snd_gus_card_t * gus, int device, snd_rawmidi_t ** rrawmidi) | 239 | int snd_gf1_rawmidi_new(struct snd_gus_card * gus, int device, struct snd_rawmidi ** rrawmidi) |
240 | { | 240 | { |
241 | snd_rawmidi_t *rmidi; | 241 | struct snd_rawmidi *rmidi; |
242 | int err; | 242 | int err; |
243 | 243 | ||
244 | if (rrawmidi) | 244 | if (rrawmidi) |
diff --git a/sound/isa/gus/gus_volume.c b/sound/isa/gus/gus_volume.c index b3382fec5298..dbbc0a6d7659 100644 --- a/sound/isa/gus/gus_volume.c +++ b/sound/isa/gus/gus_volume.c | |||
@@ -72,7 +72,7 @@ unsigned int snd_gf1_gvol_to_lvol_raw(unsigned short gf1_vol) | |||
72 | return rvol | (m >> (8 - e)); | 72 | return rvol | (m >> (8 - e)); |
73 | } | 73 | } |
74 | 74 | ||
75 | unsigned int snd_gf1_calc_ramp_rate(snd_gus_card_t * gus, | 75 | unsigned int snd_gf1_calc_ramp_rate(struct snd_gus_card * gus, |
76 | unsigned short start, | 76 | unsigned short start, |
77 | unsigned short end, | 77 | unsigned short end, |
78 | unsigned int us) | 78 | unsigned int us) |
@@ -112,7 +112,7 @@ unsigned int snd_gf1_calc_ramp_rate(snd_gus_card_t * gus, | |||
112 | 112 | ||
113 | #endif /* 0 */ | 113 | #endif /* 0 */ |
114 | 114 | ||
115 | unsigned short snd_gf1_translate_freq(snd_gus_card_t * gus, unsigned int freq16) | 115 | unsigned short snd_gf1_translate_freq(struct snd_gus_card * gus, unsigned int freq16) |
116 | { | 116 | { |
117 | freq16 >>= 3; | 117 | freq16 >>= 3; |
118 | if (freq16 < 50) | 118 | if (freq16 < 50) |
diff --git a/sound/isa/gus/gusclassic.c b/sound/isa/gus/gusclassic.c index 39cef38835ca..6db484f71367 100644 --- a/sound/isa/gus/gusclassic.c +++ b/sound/isa/gus/gusclassic.c | |||
@@ -70,11 +70,11 @@ MODULE_PARM_DESC(channels, "GF1 channels for GUS Classic driver."); | |||
70 | module_param_array(pcm_channels, int, NULL, 0444); | 70 | module_param_array(pcm_channels, int, NULL, 0444); |
71 | MODULE_PARM_DESC(pcm_channels, "Reserved PCM channels for GUS Classic driver."); | 71 | MODULE_PARM_DESC(pcm_channels, "Reserved PCM channels for GUS Classic driver."); |
72 | 72 | ||
73 | static snd_card_t *snd_gusclassic_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; | 73 | static struct snd_card *snd_gusclassic_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; |
74 | 74 | ||
75 | #define PFX "gusclassic: " | 75 | #define PFX "gusclassic: " |
76 | 76 | ||
77 | static int __init snd_gusclassic_detect(snd_gus_card_t * gus) | 77 | static int __init snd_gusclassic_detect(struct snd_gus_card * gus) |
78 | { | 78 | { |
79 | unsigned char d; | 79 | unsigned char d; |
80 | 80 | ||
@@ -93,7 +93,7 @@ static int __init snd_gusclassic_detect(snd_gus_card_t * gus) | |||
93 | return 0; | 93 | return 0; |
94 | } | 94 | } |
95 | 95 | ||
96 | static void __init snd_gusclassic_init(int dev, snd_gus_card_t * gus) | 96 | static void __init snd_gusclassic_init(int dev, struct snd_gus_card * gus) |
97 | { | 97 | { |
98 | gus->equal_irq = 0; | 98 | gus->equal_irq = 0; |
99 | gus->codec_flag = 0; | 99 | gus->codec_flag = 0; |
@@ -106,9 +106,9 @@ static int __init snd_gusclassic_probe(int dev) | |||
106 | static int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, 4, -1}; | 106 | static int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, 4, -1}; |
107 | static int possible_dmas[] = {5, 6, 7, 1, 3, -1}; | 107 | static int possible_dmas[] = {5, 6, 7, 1, 3, -1}; |
108 | int xirq, xdma1, xdma2; | 108 | int xirq, xdma1, xdma2; |
109 | snd_card_t *card; | 109 | struct snd_card *card; |
110 | struct snd_gusclassic *guscard; | 110 | struct snd_gusclassic *guscard; |
111 | snd_gus_card_t *gus = NULL; | 111 | struct snd_gus_card *gus = NULL; |
112 | int err; | 112 | int err; |
113 | 113 | ||
114 | card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); | 114 | card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); |
diff --git a/sound/isa/gus/gusextreme.c b/sound/isa/gus/gusextreme.c index d2e7cb1df537..9be59d501333 100644 --- a/sound/isa/gus/gusextreme.c +++ b/sound/isa/gus/gusextreme.c | |||
@@ -85,14 +85,14 @@ MODULE_PARM_DESC(channels, "GF1 channels for GUS Extreme driver."); | |||
85 | module_param_array(pcm_channels, int, NULL, 0444); | 85 | module_param_array(pcm_channels, int, NULL, 0444); |
86 | MODULE_PARM_DESC(pcm_channels, "Reserved PCM channels for GUS Extreme driver."); | 86 | MODULE_PARM_DESC(pcm_channels, "Reserved PCM channels for GUS Extreme driver."); |
87 | 87 | ||
88 | static snd_card_t *snd_gusextreme_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; | 88 | static struct snd_card *snd_gusextreme_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; |
89 | 89 | ||
90 | #define PFX "gusextreme: " | 90 | #define PFX "gusextreme: " |
91 | 91 | ||
92 | static int __init snd_gusextreme_detect(int dev, | 92 | static int __init snd_gusextreme_detect(int dev, |
93 | snd_card_t * card, | 93 | struct snd_card *card, |
94 | snd_gus_card_t * gus, | 94 | struct snd_gus_card * gus, |
95 | es1688_t *es1688) | 95 | struct snd_es1688 *es1688) |
96 | { | 96 | { |
97 | unsigned long flags; | 97 | unsigned long flags; |
98 | unsigned char d; | 98 | unsigned char d; |
@@ -139,15 +139,15 @@ static int __init snd_gusextreme_detect(int dev, | |||
139 | return 0; | 139 | return 0; |
140 | } | 140 | } |
141 | 141 | ||
142 | static void __init snd_gusextreme_init(int dev, snd_gus_card_t * gus) | 142 | static void __init snd_gusextreme_init(int dev, struct snd_gus_card * gus) |
143 | { | 143 | { |
144 | gus->joystick_dac = joystick_dac[dev]; | 144 | gus->joystick_dac = joystick_dac[dev]; |
145 | } | 145 | } |
146 | 146 | ||
147 | static int __init snd_gusextreme_mixer(es1688_t *chip) | 147 | static int __init snd_gusextreme_mixer(struct snd_es1688 *chip) |
148 | { | 148 | { |
149 | snd_card_t *card = chip->card; | 149 | struct snd_card *card = chip->card; |
150 | snd_ctl_elem_id_t id1, id2; | 150 | struct snd_ctl_elem_id id1, id2; |
151 | int err; | 151 | int err; |
152 | 152 | ||
153 | memset(&id1, 0, sizeof(id1)); | 153 | memset(&id1, 0, sizeof(id1)); |
@@ -173,11 +173,11 @@ static int __init snd_gusextreme_probe(int dev) | |||
173 | static int possible_gf1_irqs[] = {5, 11, 12, 9, 7, 15, 3, -1}; | 173 | static int possible_gf1_irqs[] = {5, 11, 12, 9, 7, 15, 3, -1}; |
174 | static int possible_gf1_dmas[] = {5, 6, 7, 1, 3, -1}; | 174 | static int possible_gf1_dmas[] = {5, 6, 7, 1, 3, -1}; |
175 | int xgf1_irq, xgf1_dma, xess_irq, xmpu_irq, xess_dma; | 175 | int xgf1_irq, xgf1_dma, xess_irq, xmpu_irq, xess_dma; |
176 | snd_card_t *card; | 176 | struct snd_card *card; |
177 | struct snd_gusextreme *acard; | 177 | struct snd_gusextreme *acard; |
178 | snd_gus_card_t *gus; | 178 | struct snd_gus_card *gus; |
179 | es1688_t *es1688; | 179 | struct snd_es1688 *es1688; |
180 | opl3_t *opl3; | 180 | struct snd_opl3 *opl3; |
181 | int err; | 181 | int err; |
182 | 182 | ||
183 | card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); | 183 | card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); |
@@ -345,7 +345,7 @@ static int __init alsa_card_gusextreme_init(void) | |||
345 | static void __exit alsa_card_gusextreme_exit(void) | 345 | static void __exit alsa_card_gusextreme_exit(void) |
346 | { | 346 | { |
347 | int idx; | 347 | int idx; |
348 | snd_card_t *card; | 348 | struct snd_card *card; |
349 | struct snd_gusextreme *acard; | 349 | struct snd_gusextreme *acard; |
350 | 350 | ||
351 | for (idx = 0; idx < SNDRV_CARDS; idx++) { | 351 | for (idx = 0; idx < SNDRV_CARDS; idx++) { |
diff --git a/sound/isa/gus/gusmax.c b/sound/isa/gus/gusmax.c index 0bb44b519340..63311cdb4a1a 100644 --- a/sound/isa/gus/gusmax.c +++ b/sound/isa/gus/gusmax.c | |||
@@ -73,18 +73,18 @@ MODULE_PARM_DESC(pcm_channels, "Reserved PCM channels for GUS MAX driver."); | |||
73 | 73 | ||
74 | struct snd_gusmax { | 74 | struct snd_gusmax { |
75 | int irq; | 75 | int irq; |
76 | snd_card_t *card; | 76 | struct snd_card *card; |
77 | snd_gus_card_t *gus; | 77 | struct snd_gus_card *gus; |
78 | cs4231_t *cs4231; | 78 | struct snd_cs4231 *cs4231; |
79 | unsigned short gus_status_reg; | 79 | unsigned short gus_status_reg; |
80 | unsigned short pcm_status_reg; | 80 | unsigned short pcm_status_reg; |
81 | }; | 81 | }; |
82 | 82 | ||
83 | static snd_card_t *snd_gusmax_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; | 83 | static struct snd_card *snd_gusmax_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; |
84 | 84 | ||
85 | #define PFX "gusmax: " | 85 | #define PFX "gusmax: " |
86 | 86 | ||
87 | static int __init snd_gusmax_detect(snd_gus_card_t * gus) | 87 | static int __init snd_gusmax_detect(struct snd_gus_card * gus) |
88 | { | 88 | { |
89 | unsigned char d; | 89 | unsigned char d; |
90 | 90 | ||
@@ -126,7 +126,7 @@ static irqreturn_t snd_gusmax_interrupt(int irq, void *dev_id, struct pt_regs *r | |||
126 | return IRQ_RETVAL(handled); | 126 | return IRQ_RETVAL(handled); |
127 | } | 127 | } |
128 | 128 | ||
129 | static void __init snd_gusmax_init(int dev, snd_card_t * card, snd_gus_card_t * gus) | 129 | static void __init snd_gusmax_init(int dev, struct snd_card *card, struct snd_gus_card * gus) |
130 | { | 130 | { |
131 | gus->equal_irq = 1; | 131 | gus->equal_irq = 1; |
132 | gus->codec_flag = 1; | 132 | gus->codec_flag = 1; |
@@ -144,10 +144,10 @@ static void __init snd_gusmax_init(int dev, snd_card_t * card, snd_gus_card_t * | |||
144 | #define CS4231_PRIVATE( left, right, shift, mute ) \ | 144 | #define CS4231_PRIVATE( left, right, shift, mute ) \ |
145 | ((left << 24)|(right << 16)|(shift<<8)|mute) | 145 | ((left << 24)|(right << 16)|(shift<<8)|mute) |
146 | 146 | ||
147 | static int __init snd_gusmax_mixer(cs4231_t *chip) | 147 | static int __init snd_gusmax_mixer(struct snd_cs4231 *chip) |
148 | { | 148 | { |
149 | snd_card_t *card = chip->card; | 149 | struct snd_card *card = chip->card; |
150 | snd_ctl_elem_id_t id1, id2; | 150 | struct snd_ctl_elem_id id1, id2; |
151 | int err; | 151 | int err; |
152 | 152 | ||
153 | memset(&id1, 0, sizeof(id1)); | 153 | memset(&id1, 0, sizeof(id1)); |
@@ -193,7 +193,7 @@ static int __init snd_gusmax_mixer(cs4231_t *chip) | |||
193 | return 0; | 193 | return 0; |
194 | } | 194 | } |
195 | 195 | ||
196 | static void snd_gusmax_free(snd_card_t *card) | 196 | static void snd_gusmax_free(struct snd_card *card) |
197 | { | 197 | { |
198 | struct snd_gusmax *maxcard = (struct snd_gusmax *)card->private_data; | 198 | struct snd_gusmax *maxcard = (struct snd_gusmax *)card->private_data; |
199 | 199 | ||
@@ -208,9 +208,9 @@ static int __init snd_gusmax_probe(int dev) | |||
208 | static int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, -1}; | 208 | static int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, -1}; |
209 | static int possible_dmas[] = {5, 6, 7, 1, 3, -1}; | 209 | static int possible_dmas[] = {5, 6, 7, 1, 3, -1}; |
210 | int xirq, xdma1, xdma2, err; | 210 | int xirq, xdma1, xdma2, err; |
211 | snd_card_t *card; | 211 | struct snd_card *card; |
212 | snd_gus_card_t *gus = NULL; | 212 | struct snd_gus_card *gus = NULL; |
213 | cs4231_t *cs4231; | 213 | struct snd_cs4231 *cs4231; |
214 | struct snd_gusmax *maxcard; | 214 | struct snd_gusmax *maxcard; |
215 | 215 | ||
216 | card = snd_card_new(index[dev], id[dev], THIS_MODULE, | 216 | card = snd_card_new(index[dev], id[dev], THIS_MODULE, |
diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c index f703a9f4257c..f2e9c5073548 100644 --- a/sound/isa/gus/interwave.c +++ b/sound/isa/gus/interwave.c | |||
@@ -112,9 +112,9 @@ MODULE_PARM_DESC(effect, "Effects enable for InterWave driver."); | |||
112 | 112 | ||
113 | struct snd_interwave { | 113 | struct snd_interwave { |
114 | int irq; | 114 | int irq; |
115 | snd_card_t *card; | 115 | struct snd_card *card; |
116 | snd_gus_card_t *gus; | 116 | struct snd_gus_card *gus; |
117 | cs4231_t *cs4231; | 117 | struct snd_cs4231 *cs4231; |
118 | #ifdef SNDRV_STB | 118 | #ifdef SNDRV_STB |
119 | struct resource *i2c_res; | 119 | struct resource *i2c_res; |
120 | #endif | 120 | #endif |
@@ -128,7 +128,7 @@ struct snd_interwave { | |||
128 | #endif | 128 | #endif |
129 | }; | 129 | }; |
130 | 130 | ||
131 | static snd_card_t *snd_interwave_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; | 131 | static struct snd_card *snd_interwave_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; |
132 | 132 | ||
133 | #ifdef CONFIG_PNP | 133 | #ifdef CONFIG_PNP |
134 | 134 | ||
@@ -160,7 +160,7 @@ MODULE_DEVICE_TABLE(pnp_card, snd_interwave_pnpids); | |||
160 | 160 | ||
161 | 161 | ||
162 | #ifdef SNDRV_STB | 162 | #ifdef SNDRV_STB |
163 | static void snd_interwave_i2c_setlines(snd_i2c_bus_t *bus, int ctrl, int data) | 163 | static void snd_interwave_i2c_setlines(struct snd_i2c_bus *bus, int ctrl, int data) |
164 | { | 164 | { |
165 | unsigned long port = bus->private_value; | 165 | unsigned long port = bus->private_value; |
166 | 166 | ||
@@ -171,7 +171,7 @@ static void snd_interwave_i2c_setlines(snd_i2c_bus_t *bus, int ctrl, int data) | |||
171 | udelay(10); | 171 | udelay(10); |
172 | } | 172 | } |
173 | 173 | ||
174 | static int snd_interwave_i2c_getclockline(snd_i2c_bus_t *bus) | 174 | static int snd_interwave_i2c_getclockline(struct snd_i2c_bus *bus) |
175 | { | 175 | { |
176 | unsigned long port = bus->private_value; | 176 | unsigned long port = bus->private_value; |
177 | unsigned char res; | 177 | unsigned char res; |
@@ -183,7 +183,7 @@ static int snd_interwave_i2c_getclockline(snd_i2c_bus_t *bus) | |||
183 | return res; | 183 | return res; |
184 | } | 184 | } |
185 | 185 | ||
186 | static int snd_interwave_i2c_getdataline(snd_i2c_bus_t *bus, int ack) | 186 | static int snd_interwave_i2c_getdataline(struct snd_i2c_bus *bus, int ack) |
187 | { | 187 | { |
188 | unsigned long port = bus->private_value; | 188 | unsigned long port = bus->private_value; |
189 | unsigned char res; | 189 | unsigned char res; |
@@ -197,19 +197,19 @@ static int snd_interwave_i2c_getdataline(snd_i2c_bus_t *bus, int ack) | |||
197 | return res; | 197 | return res; |
198 | } | 198 | } |
199 | 199 | ||
200 | static snd_i2c_bit_ops_t snd_interwave_i2c_bit_ops = { | 200 | static struct snd_i2c_bit_ops snd_interwave_i2c_bit_ops = { |
201 | .setlines = snd_interwave_i2c_setlines, | 201 | .setlines = snd_interwave_i2c_setlines, |
202 | .getclock = snd_interwave_i2c_getclockline, | 202 | .getclock = snd_interwave_i2c_getclockline, |
203 | .getdata = snd_interwave_i2c_getdataline, | 203 | .getdata = snd_interwave_i2c_getdataline, |
204 | }; | 204 | }; |
205 | 205 | ||
206 | static int __devinit snd_interwave_detect_stb(struct snd_interwave *iwcard, | 206 | static int __devinit snd_interwave_detect_stb(struct snd_interwave *iwcard, |
207 | snd_gus_card_t * gus, int dev, | 207 | struct snd_gus_card * gus, int dev, |
208 | snd_i2c_bus_t **rbus) | 208 | struct snd_i2c_bus **rbus) |
209 | { | 209 | { |
210 | unsigned long port; | 210 | unsigned long port; |
211 | snd_i2c_bus_t *bus; | 211 | struct snd_i2c_bus *bus; |
212 | snd_card_t *card = iwcard->card; | 212 | struct snd_card *card = iwcard->card; |
213 | char name[32]; | 213 | char name[32]; |
214 | int err; | 214 | int err; |
215 | 215 | ||
@@ -246,10 +246,10 @@ static int __devinit snd_interwave_detect_stb(struct snd_interwave *iwcard, | |||
246 | #endif | 246 | #endif |
247 | 247 | ||
248 | static int __devinit snd_interwave_detect(struct snd_interwave *iwcard, | 248 | static int __devinit snd_interwave_detect(struct snd_interwave *iwcard, |
249 | snd_gus_card_t * gus, | 249 | struct snd_gus_card * gus, |
250 | int dev | 250 | int dev |
251 | #ifdef SNDRV_STB | 251 | #ifdef SNDRV_STB |
252 | , snd_i2c_bus_t **rbus | 252 | , struct snd_i2c_bus **rbus |
253 | #endif | 253 | #endif |
254 | ) | 254 | ) |
255 | { | 255 | { |
@@ -314,7 +314,7 @@ static irqreturn_t snd_interwave_interrupt(int irq, void *dev_id, struct pt_regs | |||
314 | return IRQ_RETVAL(handled); | 314 | return IRQ_RETVAL(handled); |
315 | } | 315 | } |
316 | 316 | ||
317 | static void __devinit snd_interwave_reset(snd_gus_card_t * gus) | 317 | static void __devinit snd_interwave_reset(struct snd_gus_card * gus) |
318 | { | 318 | { |
319 | snd_gf1_write8(gus, SNDRV_GF1_GB_RESET, 0x00); | 319 | snd_gf1_write8(gus, SNDRV_GF1_GB_RESET, 0x00); |
320 | udelay(160); | 320 | udelay(160); |
@@ -322,7 +322,7 @@ static void __devinit snd_interwave_reset(snd_gus_card_t * gus) | |||
322 | udelay(160); | 322 | udelay(160); |
323 | } | 323 | } |
324 | 324 | ||
325 | static void __devinit snd_interwave_bank_sizes(snd_gus_card_t * gus, int *sizes) | 325 | static void __devinit snd_interwave_bank_sizes(struct snd_gus_card * gus, int *sizes) |
326 | { | 326 | { |
327 | unsigned int idx; | 327 | unsigned int idx; |
328 | unsigned int local; | 328 | unsigned int local; |
@@ -371,7 +371,7 @@ struct rom_hdr { | |||
371 | /* 511 */ unsigned char csum; | 371 | /* 511 */ unsigned char csum; |
372 | }; | 372 | }; |
373 | 373 | ||
374 | static void __devinit snd_interwave_detect_memory(snd_gus_card_t * gus) | 374 | static void __devinit snd_interwave_detect_memory(struct snd_gus_card * gus) |
375 | { | 375 | { |
376 | static unsigned int lmc[13] = | 376 | static unsigned int lmc[13] = |
377 | { | 377 | { |
@@ -470,7 +470,7 @@ static void __devinit snd_interwave_detect_memory(snd_gus_card_t * gus) | |||
470 | snd_interwave_reset(gus); | 470 | snd_interwave_reset(gus); |
471 | } | 471 | } |
472 | 472 | ||
473 | static void __devinit snd_interwave_init(int dev, snd_gus_card_t * gus) | 473 | static void __devinit snd_interwave_init(int dev, struct snd_gus_card * gus) |
474 | { | 474 | { |
475 | unsigned long flags; | 475 | unsigned long flags; |
476 | 476 | ||
@@ -492,17 +492,17 @@ static void __devinit snd_interwave_init(int dev, snd_gus_card_t * gus) | |||
492 | 492 | ||
493 | } | 493 | } |
494 | 494 | ||
495 | static snd_kcontrol_new_t snd_interwave_controls[] = { | 495 | static struct snd_kcontrol_new snd_interwave_controls[] = { |
496 | CS4231_DOUBLE("Master Playback Switch", 0, CS4231_LINE_LEFT_OUTPUT, CS4231_LINE_RIGHT_OUTPUT, 7, 7, 1, 1), | 496 | CS4231_DOUBLE("Master Playback Switch", 0, CS4231_LINE_LEFT_OUTPUT, CS4231_LINE_RIGHT_OUTPUT, 7, 7, 1, 1), |
497 | CS4231_DOUBLE("Master Playback Volume", 0, CS4231_LINE_LEFT_OUTPUT, CS4231_LINE_RIGHT_OUTPUT, 0, 0, 31, 1), | 497 | CS4231_DOUBLE("Master Playback Volume", 0, CS4231_LINE_LEFT_OUTPUT, CS4231_LINE_RIGHT_OUTPUT, 0, 0, 31, 1), |
498 | CS4231_DOUBLE("Mic Playback Switch", 0, CS4231_LEFT_MIC_INPUT, CS4231_RIGHT_MIC_INPUT, 7, 7, 1, 1), | 498 | CS4231_DOUBLE("Mic Playback Switch", 0, CS4231_LEFT_MIC_INPUT, CS4231_RIGHT_MIC_INPUT, 7, 7, 1, 1), |
499 | CS4231_DOUBLE("Mic Playback Volume", 0, CS4231_LEFT_MIC_INPUT, CS4231_RIGHT_MIC_INPUT, 0, 0, 31, 1) | 499 | CS4231_DOUBLE("Mic Playback Volume", 0, CS4231_LEFT_MIC_INPUT, CS4231_RIGHT_MIC_INPUT, 0, 0, 31, 1) |
500 | }; | 500 | }; |
501 | 501 | ||
502 | static int __devinit snd_interwave_mixer(cs4231_t *chip) | 502 | static int __devinit snd_interwave_mixer(struct snd_cs4231 *chip) |
503 | { | 503 | { |
504 | snd_card_t *card = chip->card; | 504 | struct snd_card *card = chip->card; |
505 | snd_ctl_elem_id_t id1, id2; | 505 | struct snd_ctl_elem_id id1, id2; |
506 | unsigned int idx; | 506 | unsigned int idx; |
507 | int err; | 507 | int err; |
508 | 508 | ||
@@ -631,7 +631,7 @@ static int __devinit snd_interwave_pnp(int dev, struct snd_interwave *iwcard, | |||
631 | } | 631 | } |
632 | #endif /* CONFIG_PNP */ | 632 | #endif /* CONFIG_PNP */ |
633 | 633 | ||
634 | static void snd_interwave_free(snd_card_t *card) | 634 | static void snd_interwave_free(struct snd_card *card) |
635 | { | 635 | { |
636 | struct snd_interwave *iwcard = (struct snd_interwave *)card->private_data; | 636 | struct snd_interwave *iwcard = (struct snd_interwave *)card->private_data; |
637 | 637 | ||
@@ -650,14 +650,14 @@ static int __devinit snd_interwave_probe(int dev, struct pnp_card_link *pcard, | |||
650 | static int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, -1}; | 650 | static int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, -1}; |
651 | static int possible_dmas[] = {0, 1, 3, 5, 6, 7, -1}; | 651 | static int possible_dmas[] = {0, 1, 3, 5, 6, 7, -1}; |
652 | int xirq, xdma1, xdma2; | 652 | int xirq, xdma1, xdma2; |
653 | snd_card_t *card; | 653 | struct snd_card *card; |
654 | struct snd_interwave *iwcard; | 654 | struct snd_interwave *iwcard; |
655 | cs4231_t *cs4231; | 655 | struct snd_cs4231 *cs4231; |
656 | snd_gus_card_t *gus; | 656 | struct snd_gus_card *gus; |
657 | #ifdef SNDRV_STB | 657 | #ifdef SNDRV_STB |
658 | snd_i2c_bus_t *i2c_bus; | 658 | struct snd_i2c_bus *i2c_bus; |
659 | #endif | 659 | #endif |
660 | snd_pcm_t *pcm; | 660 | struct snd_pcm *pcm; |
661 | char *str; | 661 | char *str; |
662 | int err; | 662 | int err; |
663 | 663 | ||
@@ -761,7 +761,7 @@ static int __devinit snd_interwave_probe(int dev, struct pnp_card_link *pcard, | |||
761 | 761 | ||
762 | #ifdef SNDRV_STB | 762 | #ifdef SNDRV_STB |
763 | { | 763 | { |
764 | snd_ctl_elem_id_t id1, id2; | 764 | struct snd_ctl_elem_id id1, id2; |
765 | memset(&id1, 0, sizeof(id1)); | 765 | memset(&id1, 0, sizeof(id1)); |
766 | memset(&id2, 0, sizeof(id2)); | 766 | memset(&id2, 0, sizeof(id2)); |
767 | id1.iface = id2.iface = SNDRV_CTL_ELEM_IFACE_MIXER; | 767 | id1.iface = id2.iface = SNDRV_CTL_ELEM_IFACE_MIXER; |
@@ -863,7 +863,7 @@ static int __devinit snd_interwave_pnp_detect(struct pnp_card_link *card, | |||
863 | 863 | ||
864 | static void __devexit snd_interwave_pnp_remove(struct pnp_card_link * pcard) | 864 | static void __devexit snd_interwave_pnp_remove(struct pnp_card_link * pcard) |
865 | { | 865 | { |
866 | snd_card_t *card = (snd_card_t *) pnp_get_card_drvdata(pcard); | 866 | struct snd_card *card = (struct snd_card *) pnp_get_card_drvdata(pcard); |
867 | 867 | ||
868 | snd_card_disconnect(card); | 868 | snd_card_disconnect(card); |
869 | snd_card_free_in_thread(card); | 869 | snd_card_free_in_thread(card); |