aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/gus/gus_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/isa/gus/gus_io.c')
-rw-r--r--sound/isa/gus/gus_io.c72
1 files changed, 36 insertions, 36 deletions
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
28void snd_gf1_delay(snd_gus_card_t * gus) 28void 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
47static inline void __snd_gf1_ctrl_stop(snd_gus_card_t * gus, unsigned char reg) 47static 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
61static inline void __snd_gf1_write8(snd_gus_card_t * gus, 61static 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
71static inline unsigned char __snd_gf1_look8(snd_gus_card_t * gus, 71static 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
79static inline void __snd_gf1_write16(snd_gus_card_t * gus, 79static 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
88static inline unsigned short __snd_gf1_look16(snd_gus_card_t * gus, 88static 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
96static inline void __snd_gf1_adlib_write(snd_gus_card_t * gus, 96static 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
107static inline void __snd_gf1_write_addr(snd_gus_card_t * gus, unsigned char reg, 107static 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
120static inline unsigned int __snd_gf1_read_addr(snd_gus_card_t * gus, 120static 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
141void snd_gf1_ctrl_stop(snd_gus_card_t * gus, unsigned char reg) 141void 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
146void snd_gf1_write8(snd_gus_card_t * gus, 146void 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
153unsigned char snd_gf1_look8(snd_gus_card_t * gus, unsigned char reg) 153unsigned 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
158void snd_gf1_write16(snd_gus_card_t * gus, 158void 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
165unsigned short snd_gf1_look16(snd_gus_card_t * gus, unsigned char reg) 165unsigned 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
170void snd_gf1_adlib_write(snd_gus_card_t * gus, 170void 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
177void snd_gf1_write_addr(snd_gus_card_t * gus, unsigned char reg, 177void 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
183unsigned int snd_gf1_read_addr(snd_gus_card_t * gus, 183unsigned 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
194void snd_gf1_i_ctrl_stop(snd_gus_card_t * gus, unsigned char reg) 194void 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
203void snd_gf1_i_write8(snd_gus_card_t * gus, 203void 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
214unsigned char snd_gf1_i_look8(snd_gus_card_t * gus, unsigned char reg) 214unsigned 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
225void snd_gf1_i_write16(snd_gus_card_t * gus, 225void 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
236unsigned short snd_gf1_i_look16(snd_gus_card_t * gus, unsigned char reg) 236unsigned 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
249void snd_gf1_i_adlib_write(snd_gus_card_t * gus, 249void 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
260void snd_gf1_i_write_addr(snd_gus_card_t * gus, unsigned char reg, 260void 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
273static unsigned int snd_gf1_i_read_addr(snd_gus_card_t * gus, 273static 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
290void snd_gf1_dram_addr(snd_gus_card_t * gus, unsigned int addr) 290void 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
302void snd_gf1_poke(snd_gus_card_t * gus, unsigned int addr, unsigned char data) 302void 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
319unsigned char snd_gf1_peek(snd_gus_card_t * gus, unsigned int addr) 319unsigned 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
340void snd_gf1_pokew(snd_gus_card_t * gus, unsigned int addr, unsigned short data) 340void 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
363unsigned short snd_gf1_peekw(snd_gus_card_t * gus, unsigned int addr) 363unsigned 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
388void snd_gf1_dram_setmem(snd_gus_card_t * gus, unsigned int addr, 388void 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
418void snd_gf1_select_active_voices(snd_gus_card_t * gus) 418void 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
446void snd_gf1_print_voice_registers(snd_gus_card_t * gus) 446void 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
480void snd_gf1_print_global_registers(snd_gus_card_t * gus) 480void 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
507void snd_gf1_print_setup_registers(snd_gus_card_t * gus) 507void 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
526void snd_gf1_peek_print_block(snd_gus_card_t * gus, unsigned int addr, int count, int w_16bit) 526void 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)