aboutsummaryrefslogtreecommitdiffstats
path: root/sound/drivers
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 08:13:14 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:18:04 -0500
commit5b1646a8eceff0a4ff06f309abb6e7f43f99a498 (patch)
treeecbb7c1d5ffdf2f3f732a18aae3ed6b2a3752e9e /sound/drivers
parente1fad17bb4084dc7c435360185417aed55656ec8 (diff)
[ALSA] Remove xxx_t typedefs: OPL3
Modules: OPL3,Raw OPL FM Remove xxx_t typedefs from the OPL3 driver Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/drivers')
-rw-r--r--sound/drivers/opl3/opl3_drums.c45
-rw-r--r--sound/drivers/opl3/opl3_lib.c80
-rw-r--r--sound/drivers/opl3/opl3_midi.c70
-rw-r--r--sound/drivers/opl3/opl3_oss.c68
-rw-r--r--sound/drivers/opl3/opl3_seq.c48
-rw-r--r--sound/drivers/opl3/opl3_synth.c50
-rw-r--r--sound/drivers/opl3/opl3_voice.h24
7 files changed, 194 insertions, 191 deletions
diff --git a/sound/drivers/opl3/opl3_drums.c b/sound/drivers/opl3/opl3_drums.c
index f26332680c19..73694380734a 100644
--- a/sound/drivers/opl3/opl3_drums.c
+++ b/sound/drivers/opl3/opl3_drums.c
@@ -45,7 +45,7 @@ static char snd_opl3_drum_table[47] =
45 OPL3_CYMBAL_ON, OPL3_CYMBAL_ON /* 80 - 81 */ 45 OPL3_CYMBAL_ON, OPL3_CYMBAL_ON /* 80 - 81 */
46}; 46};
47 47
48typedef struct snd_opl3_drum_voice { 48struct snd_opl3_drum_voice {
49 int voice; 49 int voice;
50 int op; 50 int op;
51 unsigned char am_vib; 51 unsigned char am_vib;
@@ -54,33 +54,34 @@ typedef struct snd_opl3_drum_voice {
54 unsigned char sustain_release; 54 unsigned char sustain_release;
55 unsigned char feedback_connection; 55 unsigned char feedback_connection;
56 unsigned char wave_select; 56 unsigned char wave_select;
57} snd_opl3_drum_voice_t; 57};
58 58
59typedef struct snd_opl3_drum_note { 59struct snd_opl3_drum_note {
60 int voice; 60 int voice;
61 unsigned char fnum; 61 unsigned char fnum;
62 unsigned char octave_f; 62 unsigned char octave_f;
63 unsigned char feedback_connection; 63 unsigned char feedback_connection;
64} snd_opl3_drum_note_t; 64};
65 65
66static snd_opl3_drum_voice_t bass_op0 = {6, 0, 0x00, 0x32, 0xf8, 0x66, 0x30, 0x00}; 66static struct snd_opl3_drum_voice bass_op0 = {6, 0, 0x00, 0x32, 0xf8, 0x66, 0x30, 0x00};
67static snd_opl3_drum_voice_t bass_op1 = {6, 1, 0x00, 0x03, 0xf6, 0x57, 0x30, 0x00}; 67static struct snd_opl3_drum_voice bass_op1 = {6, 1, 0x00, 0x03, 0xf6, 0x57, 0x30, 0x00};
68static snd_opl3_drum_note_t bass_note = {6, 0x90, 0x09}; 68static struct snd_opl3_drum_note bass_note = {6, 0x90, 0x09};
69 69
70static snd_opl3_drum_voice_t hihat = {7, 0, 0x00, 0x03, 0xf0, 0x06, 0x20, 0x00}; 70static struct snd_opl3_drum_voice hihat = {7, 0, 0x00, 0x03, 0xf0, 0x06, 0x20, 0x00};
71 71
72static snd_opl3_drum_voice_t snare = {7, 1, 0x00, 0x03, 0xf0, 0x07, 0x20, 0x02}; 72static struct snd_opl3_drum_voice snare = {7, 1, 0x00, 0x03, 0xf0, 0x07, 0x20, 0x02};
73static snd_opl3_drum_note_t snare_note = {7, 0xf4, 0x0d}; 73static struct snd_opl3_drum_note snare_note = {7, 0xf4, 0x0d};
74 74
75static snd_opl3_drum_voice_t tomtom = {8, 0, 0x02, 0x03, 0xf0, 0x06, 0x10, 0x00}; 75static struct snd_opl3_drum_voice tomtom = {8, 0, 0x02, 0x03, 0xf0, 0x06, 0x10, 0x00};
76static snd_opl3_drum_note_t tomtom_note = {8, 0xf4, 0x09}; 76static struct snd_opl3_drum_note tomtom_note = {8, 0xf4, 0x09};
77 77
78static snd_opl3_drum_voice_t cymbal = {8, 1, 0x04, 0x03, 0xf0, 0x06, 0x10, 0x00}; 78static struct snd_opl3_drum_voice cymbal = {8, 1, 0x04, 0x03, 0xf0, 0x06, 0x10, 0x00};
79 79
80/* 80/*
81 * set drum voice characteristics 81 * set drum voice characteristics
82 */ 82 */
83static void snd_opl3_drum_voice_set(opl3_t *opl3, snd_opl3_drum_voice_t *data) 83static void snd_opl3_drum_voice_set(struct snd_opl3 *opl3,
84 struct snd_opl3_drum_voice *data)
84{ 85{
85 unsigned char op_offset = snd_opl3_regmap[data->voice][data->op]; 86 unsigned char op_offset = snd_opl3_regmap[data->voice][data->op];
86 unsigned char voice_offset = data->voice; 87 unsigned char voice_offset = data->voice;
@@ -114,7 +115,8 @@ static void snd_opl3_drum_voice_set(opl3_t *opl3, snd_opl3_drum_voice_t *data)
114/* 115/*
115 * Set drum voice pitch 116 * Set drum voice pitch
116 */ 117 */
117static void snd_opl3_drum_note_set(opl3_t *opl3, snd_opl3_drum_note_t *data) 118static void snd_opl3_drum_note_set(struct snd_opl3 *opl3,
119 struct snd_opl3_drum_note *data)
118{ 120{
119 unsigned char voice_offset = data->voice; 121 unsigned char voice_offset = data->voice;
120 unsigned short opl3_reg; 122 unsigned short opl3_reg;
@@ -131,8 +133,9 @@ static void snd_opl3_drum_note_set(opl3_t *opl3, snd_opl3_drum_note_t *data)
131/* 133/*
132 * Set drum voice volume and position 134 * Set drum voice volume and position
133 */ 135 */
134static void snd_opl3_drum_vol_set(opl3_t *opl3, snd_opl3_drum_voice_t *data, 136static void snd_opl3_drum_vol_set(struct snd_opl3 *opl3,
135 int vel, snd_midi_channel_t *chan) 137 struct snd_opl3_drum_voice *data,
138 int vel, struct snd_midi_channel *chan)
136{ 139{
137 unsigned char op_offset = snd_opl3_regmap[data->voice][data->op]; 140 unsigned char op_offset = snd_opl3_regmap[data->voice][data->op];
138 unsigned char voice_offset = data->voice; 141 unsigned char voice_offset = data->voice;
@@ -159,7 +162,7 @@ static void snd_opl3_drum_vol_set(opl3_t *opl3, snd_opl3_drum_voice_t *data,
159/* 162/*
160 * Loads drum voices at init time 163 * Loads drum voices at init time
161 */ 164 */
162void snd_opl3_load_drums(opl3_t *opl3) 165void snd_opl3_load_drums(struct snd_opl3 *opl3)
163{ 166{
164 snd_opl3_drum_voice_set(opl3, &bass_op0); 167 snd_opl3_drum_voice_set(opl3, &bass_op0);
165 snd_opl3_drum_voice_set(opl3, &bass_op1); 168 snd_opl3_drum_voice_set(opl3, &bass_op1);
@@ -179,11 +182,11 @@ void snd_opl3_load_drums(opl3_t *opl3)
179/* 182/*
180 * Switch drum voice on or off 183 * Switch drum voice on or off
181 */ 184 */
182void snd_opl3_drum_switch(opl3_t *opl3, int note, int vel, int on_off, 185void snd_opl3_drum_switch(struct snd_opl3 *opl3, int note, int vel, int on_off,
183 snd_midi_channel_t *chan) 186 struct snd_midi_channel *chan)
184{ 187{
185 unsigned char drum_mask; 188 unsigned char drum_mask;
186 snd_opl3_drum_voice_t *drum_voice; 189 struct snd_opl3_drum_voice *drum_voice;
187 190
188 if (!(opl3->drum_reg & OPL3_PERCUSSION_ENABLE)) 191 if (!(opl3->drum_reg & OPL3_PERCUSSION_ENABLE))
189 return; 192 return;
diff --git a/sound/drivers/opl3/opl3_lib.c b/sound/drivers/opl3/opl3_lib.c
index 06246503083c..cbd37e919601 100644
--- a/sound/drivers/opl3/opl3_lib.c
+++ b/sound/drivers/opl3/opl3_lib.c
@@ -37,7 +37,7 @@ MODULE_LICENSE("GPL");
37 37
38extern char snd_opl3_regmap[MAX_OPL2_VOICES][4]; 38extern char snd_opl3_regmap[MAX_OPL2_VOICES][4];
39 39
40static void snd_opl2_command(opl3_t * opl3, unsigned short cmd, unsigned char val) 40static void snd_opl2_command(struct snd_opl3 * opl3, unsigned short cmd, unsigned char val)
41{ 41{
42 unsigned long flags; 42 unsigned long flags;
43 unsigned long port; 43 unsigned long port;
@@ -60,7 +60,7 @@ static void snd_opl2_command(opl3_t * opl3, unsigned short cmd, unsigned char va
60 spin_unlock_irqrestore(&opl3->reg_lock, flags); 60 spin_unlock_irqrestore(&opl3->reg_lock, flags);
61} 61}
62 62
63static void snd_opl3_command(opl3_t * opl3, unsigned short cmd, unsigned char val) 63static void snd_opl3_command(struct snd_opl3 * opl3, unsigned short cmd, unsigned char val)
64{ 64{
65 unsigned long flags; 65 unsigned long flags;
66 unsigned long port; 66 unsigned long port;
@@ -85,7 +85,7 @@ static void snd_opl3_command(opl3_t * opl3, unsigned short cmd, unsigned char va
85 spin_unlock_irqrestore(&opl3->reg_lock, flags); 85 spin_unlock_irqrestore(&opl3->reg_lock, flags);
86} 86}
87 87
88static int snd_opl3_detect(opl3_t * opl3) 88static int snd_opl3_detect(struct snd_opl3 * opl3)
89{ 89{
90 /* 90 /*
91 * This function returns 1 if the FM chip is present at the given I/O port 91 * This function returns 1 if the FM chip is present at the given I/O port
@@ -153,12 +153,12 @@ static int snd_opl3_detect(opl3_t * opl3)
153 * Timer 1 - 80us 153 * Timer 1 - 80us
154 */ 154 */
155 155
156static int snd_opl3_timer1_start(snd_timer_t * timer) 156static int snd_opl3_timer1_start(struct snd_timer * timer)
157{ 157{
158 unsigned long flags; 158 unsigned long flags;
159 unsigned char tmp; 159 unsigned char tmp;
160 unsigned int ticks; 160 unsigned int ticks;
161 opl3_t *opl3; 161 struct snd_opl3 *opl3;
162 162
163 opl3 = snd_timer_chip(timer); 163 opl3 = snd_timer_chip(timer);
164 spin_lock_irqsave(&opl3->timer_lock, flags); 164 spin_lock_irqsave(&opl3->timer_lock, flags);
@@ -171,11 +171,11 @@ static int snd_opl3_timer1_start(snd_timer_t * timer)
171 return 0; 171 return 0;
172} 172}
173 173
174static int snd_opl3_timer1_stop(snd_timer_t * timer) 174static int snd_opl3_timer1_stop(struct snd_timer * timer)
175{ 175{
176 unsigned long flags; 176 unsigned long flags;
177 unsigned char tmp; 177 unsigned char tmp;
178 opl3_t *opl3; 178 struct snd_opl3 *opl3;
179 179
180 opl3 = snd_timer_chip(timer); 180 opl3 = snd_timer_chip(timer);
181 spin_lock_irqsave(&opl3->timer_lock, flags); 181 spin_lock_irqsave(&opl3->timer_lock, flags);
@@ -190,12 +190,12 @@ static int snd_opl3_timer1_stop(snd_timer_t * timer)
190 * Timer 2 - 320us 190 * Timer 2 - 320us
191 */ 191 */
192 192
193static int snd_opl3_timer2_start(snd_timer_t * timer) 193static int snd_opl3_timer2_start(struct snd_timer * timer)
194{ 194{
195 unsigned long flags; 195 unsigned long flags;
196 unsigned char tmp; 196 unsigned char tmp;
197 unsigned int ticks; 197 unsigned int ticks;
198 opl3_t *opl3; 198 struct snd_opl3 *opl3;
199 199
200 opl3 = snd_timer_chip(timer); 200 opl3 = snd_timer_chip(timer);
201 spin_lock_irqsave(&opl3->timer_lock, flags); 201 spin_lock_irqsave(&opl3->timer_lock, flags);
@@ -208,11 +208,11 @@ static int snd_opl3_timer2_start(snd_timer_t * timer)
208 return 0; 208 return 0;
209} 209}
210 210
211static int snd_opl3_timer2_stop(snd_timer_t * timer) 211static int snd_opl3_timer2_stop(struct snd_timer * timer)
212{ 212{
213 unsigned long flags; 213 unsigned long flags;
214 unsigned char tmp; 214 unsigned char tmp;
215 opl3_t *opl3; 215 struct snd_opl3 *opl3;
216 216
217 opl3 = snd_timer_chip(timer); 217 opl3 = snd_timer_chip(timer);
218 spin_lock_irqsave(&opl3->timer_lock, flags); 218 spin_lock_irqsave(&opl3->timer_lock, flags);
@@ -227,7 +227,7 @@ static int snd_opl3_timer2_stop(snd_timer_t * timer)
227 227
228 */ 228 */
229 229
230static struct _snd_timer_hardware snd_opl3_timer1 = 230static struct snd_timer_hardware snd_opl3_timer1 =
231{ 231{
232 .flags = SNDRV_TIMER_HW_STOP, 232 .flags = SNDRV_TIMER_HW_STOP,
233 .resolution = 80000, 233 .resolution = 80000,
@@ -236,7 +236,7 @@ static struct _snd_timer_hardware snd_opl3_timer1 =
236 .stop = snd_opl3_timer1_stop, 236 .stop = snd_opl3_timer1_stop,
237}; 237};
238 238
239static struct _snd_timer_hardware snd_opl3_timer2 = 239static struct snd_timer_hardware snd_opl3_timer2 =
240{ 240{
241 .flags = SNDRV_TIMER_HW_STOP, 241 .flags = SNDRV_TIMER_HW_STOP,
242 .resolution = 320000, 242 .resolution = 320000,
@@ -245,10 +245,10 @@ static struct _snd_timer_hardware snd_opl3_timer2 =
245 .stop = snd_opl3_timer2_stop, 245 .stop = snd_opl3_timer2_stop,
246}; 246};
247 247
248static int snd_opl3_timer1_init(opl3_t * opl3, int timer_no) 248static int snd_opl3_timer1_init(struct snd_opl3 * opl3, int timer_no)
249{ 249{
250 snd_timer_t *timer = NULL; 250 struct snd_timer *timer = NULL;
251 snd_timer_id_t tid; 251 struct snd_timer_id tid;
252 int err; 252 int err;
253 253
254 tid.dev_class = SNDRV_TIMER_CLASS_CARD; 254 tid.dev_class = SNDRV_TIMER_CLASS_CARD;
@@ -265,10 +265,10 @@ static int snd_opl3_timer1_init(opl3_t * opl3, int timer_no)
265 return err; 265 return err;
266} 266}
267 267
268static int snd_opl3_timer2_init(opl3_t * opl3, int timer_no) 268static int snd_opl3_timer2_init(struct snd_opl3 * opl3, int timer_no)
269{ 269{
270 snd_timer_t *timer = NULL; 270 struct snd_timer *timer = NULL;
271 snd_timer_id_t tid; 271 struct snd_timer_id tid;
272 int err; 272 int err;
273 273
274 tid.dev_class = SNDRV_TIMER_CLASS_CARD; 274 tid.dev_class = SNDRV_TIMER_CLASS_CARD;
@@ -289,11 +289,11 @@ static int snd_opl3_timer2_init(opl3_t * opl3, int timer_no)
289 289
290 */ 290 */
291 291
292void snd_opl3_interrupt(snd_hwdep_t * hw) 292void snd_opl3_interrupt(struct snd_hwdep * hw)
293{ 293{
294 unsigned char status; 294 unsigned char status;
295 opl3_t *opl3; 295 struct snd_opl3 *opl3;
296 snd_timer_t *timer; 296 struct snd_timer *timer;
297 297
298 if (hw == NULL) 298 if (hw == NULL)
299 return; 299 return;
@@ -320,7 +320,7 @@ void snd_opl3_interrupt(snd_hwdep_t * hw)
320 320
321 */ 321 */
322 322
323static int snd_opl3_free(opl3_t *opl3) 323static int snd_opl3_free(struct snd_opl3 *opl3)
324{ 324{
325 snd_assert(opl3 != NULL, return -ENXIO); 325 snd_assert(opl3 != NULL, return -ENXIO);
326 if (opl3->private_free) 326 if (opl3->private_free)
@@ -331,20 +331,20 @@ static int snd_opl3_free(opl3_t *opl3)
331 return 0; 331 return 0;
332} 332}
333 333
334static int snd_opl3_dev_free(snd_device_t *device) 334static int snd_opl3_dev_free(struct snd_device *device)
335{ 335{
336 opl3_t *opl3 = device->device_data; 336 struct snd_opl3 *opl3 = device->device_data;
337 return snd_opl3_free(opl3); 337 return snd_opl3_free(opl3);
338} 338}
339 339
340int snd_opl3_new(snd_card_t *card, 340int snd_opl3_new(struct snd_card *card,
341 unsigned short hardware, 341 unsigned short hardware,
342 opl3_t **ropl3) 342 struct snd_opl3 **ropl3)
343{ 343{
344 static snd_device_ops_t ops = { 344 static struct snd_device_ops ops = {
345 .dev_free = snd_opl3_dev_free, 345 .dev_free = snd_opl3_dev_free,
346 }; 346 };
347 opl3_t *opl3; 347 struct snd_opl3 *opl3;
348 int err; 348 int err;
349 349
350 *ropl3 = NULL; 350 *ropl3 = NULL;
@@ -367,7 +367,7 @@ int snd_opl3_new(snd_card_t *card,
367 return 0; 367 return 0;
368} 368}
369 369
370int snd_opl3_init(opl3_t *opl3) 370int snd_opl3_init(struct snd_opl3 *opl3)
371{ 371{
372 if (! opl3->command) { 372 if (! opl3->command) {
373 printk(KERN_ERR "snd_opl3_init: command not defined!\n"); 373 printk(KERN_ERR "snd_opl3_init: command not defined!\n");
@@ -391,14 +391,14 @@ int snd_opl3_init(opl3_t *opl3)
391 return 0; 391 return 0;
392} 392}
393 393
394int snd_opl3_create(snd_card_t * card, 394int snd_opl3_create(struct snd_card *card,
395 unsigned long l_port, 395 unsigned long l_port,
396 unsigned long r_port, 396 unsigned long r_port,
397 unsigned short hardware, 397 unsigned short hardware,
398 int integrated, 398 int integrated,
399 opl3_t ** ropl3) 399 struct snd_opl3 ** ropl3)
400{ 400{
401 opl3_t *opl3; 401 struct snd_opl3 *opl3;
402 int err; 402 int err;
403 403
404 *ropl3 = NULL; 404 *ropl3 = NULL;
@@ -449,7 +449,7 @@ int snd_opl3_create(snd_card_t * card,
449 return 0; 449 return 0;
450} 450}
451 451
452int snd_opl3_timer_new(opl3_t * opl3, int timer1_dev, int timer2_dev) 452int snd_opl3_timer_new(struct snd_opl3 * opl3, int timer1_dev, int timer2_dev)
453{ 453{
454 int err; 454 int err;
455 455
@@ -466,12 +466,12 @@ int snd_opl3_timer_new(opl3_t * opl3, int timer1_dev, int timer2_dev)
466 return 0; 466 return 0;
467} 467}
468 468
469int snd_opl3_hwdep_new(opl3_t * opl3, 469int snd_opl3_hwdep_new(struct snd_opl3 * opl3,
470 int device, int seq_device, 470 int device, int seq_device,
471 snd_hwdep_t ** rhwdep) 471 struct snd_hwdep ** rhwdep)
472{ 472{
473 snd_hwdep_t *hw; 473 struct snd_hwdep *hw;
474 snd_card_t *card = opl3->card; 474 struct snd_card *card = opl3->card;
475 int err; 475 int err;
476 476
477 if (rhwdep) 477 if (rhwdep)
@@ -514,9 +514,9 @@ int snd_opl3_hwdep_new(opl3_t * opl3,
514 opl3->seq_dev_num = seq_device; 514 opl3->seq_dev_num = seq_device;
515#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE)) 515#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
516 if (snd_seq_device_new(card, seq_device, SNDRV_SEQ_DEV_ID_OPL3, 516 if (snd_seq_device_new(card, seq_device, SNDRV_SEQ_DEV_ID_OPL3,
517 sizeof(opl3_t*), &opl3->seq_dev) >= 0) { 517 sizeof(struct snd_opl3 *), &opl3->seq_dev) >= 0) {
518 strcpy(opl3->seq_dev->name, hw->name); 518 strcpy(opl3->seq_dev->name, hw->name);
519 *(opl3_t**)SNDRV_SEQ_DEVICE_ARGPTR(opl3->seq_dev) = opl3; 519 *(struct snd_opl3 **)SNDRV_SEQ_DEVICE_ARGPTR(opl3->seq_dev) = opl3;
520 } 520 }
521#endif 521#endif
522 if (rhwdep) 522 if (rhwdep)
diff --git a/sound/drivers/opl3/opl3_midi.c b/sound/drivers/opl3/opl3_midi.c
index 93d674070b71..48c480e050ce 100644
--- a/sound/drivers/opl3/opl3_midi.c
+++ b/sound/drivers/opl3/opl3_midi.c
@@ -60,7 +60,7 @@ static char opl3_volume_table[128] =
60}; 60};
61 61
62void snd_opl3_calc_volume(unsigned char *volbyte, int vel, 62void snd_opl3_calc_volume(unsigned char *volbyte, int vel,
63 snd_midi_channel_t *chan) 63 struct snd_midi_channel *chan)
64{ 64{
65 int oldvol, newvol, n; 65 int oldvol, newvol, n;
66 int volume; 66 int volume;
@@ -93,7 +93,7 @@ static short opl3_note_table[16] =
93}; 93};
94 94
95static void snd_opl3_calc_pitch(unsigned char *fnum, unsigned char *blocknum, 95static void snd_opl3_calc_pitch(unsigned char *fnum, unsigned char *blocknum,
96 int note, snd_midi_channel_t *chan) 96 int note, struct snd_midi_channel *chan)
97{ 97{
98 int block = ((note / 12) & 0x07) - 1; 98 int block = ((note / 12) & 0x07) - 1;
99 int idx = (note % 12) + 2; 99 int idx = (note % 12) + 2;
@@ -121,7 +121,7 @@ static void snd_opl3_calc_pitch(unsigned char *fnum, unsigned char *blocknum,
121 121
122 122
123#ifdef DEBUG_ALLOC 123#ifdef DEBUG_ALLOC
124static void debug_alloc(opl3_t *opl3, char *s, int voice) { 124static void debug_alloc(struct snd_opl3 *opl3, char *s, int voice) {
125 int i; 125 int i;
126 char *str = "x.24"; 126 char *str = "x.24";
127 127
@@ -135,12 +135,12 @@ static void debug_alloc(opl3_t *opl3, char *s, int voice) {
135/* 135/*
136 * Get a FM voice (channel) to play a note on. 136 * Get a FM voice (channel) to play a note on.
137 */ 137 */
138static int opl3_get_voice(opl3_t *opl3, int instr_4op, 138static int opl3_get_voice(struct snd_opl3 *opl3, int instr_4op,
139 snd_midi_channel_t *chan) { 139 struct snd_midi_channel *chan) {
140 int chan_4op_1; /* first voice for 4op instrument */ 140 int chan_4op_1; /* first voice for 4op instrument */
141 int chan_4op_2; /* second voice for 4op instrument */ 141 int chan_4op_2; /* second voice for 4op instrument */
142 142
143 snd_opl3_voice_t *vp, *vp2; 143 struct snd_opl3_voice *vp, *vp2;
144 unsigned int voice_time; 144 unsigned int voice_time;
145 int i; 145 int i;
146 146
@@ -237,13 +237,13 @@ static int opl3_get_voice(opl3_t *opl3, int instr_4op,
237void snd_opl3_timer_func(unsigned long data) 237void snd_opl3_timer_func(unsigned long data)
238{ 238{
239 239
240 opl3_t *opl3 = (opl3_t *)data; 240 struct snd_opl3 *opl3 = (struct snd_opl3 *)data;
241 int again = 0; 241 int again = 0;
242 int i; 242 int i;
243 243
244 spin_lock(&opl3->sys_timer_lock); 244 spin_lock(&opl3->sys_timer_lock);
245 for (i = 0; i < opl3->max_voices; i++) { 245 for (i = 0; i < opl3->max_voices; i++) {
246 snd_opl3_voice_t *vp = &opl3->voices[i]; 246 struct snd_opl3_voice *vp = &opl3->voices[i];
247 if (vp->state > 0 && vp->note_off_check) { 247 if (vp->state > 0 && vp->note_off_check) {
248 if (vp->note_off == jiffies) 248 if (vp->note_off == jiffies)
249 snd_opl3_note_off(opl3, vp->note, 0, vp->chan); 249 snd_opl3_note_off(opl3, vp->note, 0, vp->chan);
@@ -263,7 +263,7 @@ void snd_opl3_timer_func(unsigned long data)
263/* 263/*
264 * Start system timer 264 * Start system timer
265 */ 265 */
266static void snd_opl3_start_timer(opl3_t *opl3) 266static void snd_opl3_start_timer(struct snd_opl3 *opl3)
267{ 267{
268 unsigned long flags; 268 unsigned long flags;
269 spin_lock_irqsave(&opl3->sys_timer_lock, flags); 269 spin_lock_irqsave(&opl3->sys_timer_lock, flags);
@@ -285,15 +285,15 @@ static int snd_opl3_oss_map[MAX_OPL3_VOICES] = {
285/* 285/*
286 * Start a note. 286 * Start a note.
287 */ 287 */
288void snd_opl3_note_on(void *p, int note, int vel, snd_midi_channel_t *chan) 288void snd_opl3_note_on(void *p, int note, int vel, struct snd_midi_channel *chan)
289{ 289{
290 opl3_t *opl3; 290 struct snd_opl3 *opl3;
291 snd_seq_instr_t wanted; 291 struct snd_seq_instr wanted;
292 snd_seq_kinstr_t *kinstr; 292 struct snd_seq_kinstr *kinstr;
293 int instr_4op; 293 int instr_4op;
294 294
295 int voice; 295 int voice;
296 snd_opl3_voice_t *vp, *vp2; 296 struct snd_opl3_voice *vp, *vp2;
297 unsigned short connect_mask; 297 unsigned short connect_mask;
298 unsigned char connection; 298 unsigned char connection;
299 unsigned char vol_op[4]; 299 unsigned char vol_op[4];
@@ -310,7 +310,7 @@ void snd_opl3_note_on(void *p, int note, int vel, snd_midi_channel_t *chan)
310 unsigned char fnum, blocknum; 310 unsigned char fnum, blocknum;
311 int i; 311 int i;
312 312
313 fm_instrument_t *fm; 313 struct fm_instrument *fm;
314 unsigned long flags; 314 unsigned long flags;
315 315
316 opl3 = p; 316 opl3 = p;
@@ -615,13 +615,13 @@ void snd_opl3_note_on(void *p, int note, int vel, snd_midi_channel_t *chan)
615 spin_unlock_irqrestore(&opl3->voice_lock, flags); 615 spin_unlock_irqrestore(&opl3->voice_lock, flags);
616} 616}
617 617
618static void snd_opl3_kill_voice(opl3_t *opl3, int voice) 618static void snd_opl3_kill_voice(struct snd_opl3 *opl3, int voice)
619{ 619{
620 unsigned short reg_side; 620 unsigned short reg_side;
621 unsigned char voice_offset; 621 unsigned char voice_offset;
622 unsigned short opl3_reg; 622 unsigned short opl3_reg;
623 623
624 snd_opl3_voice_t *vp, *vp2; 624 struct snd_opl3_voice *vp, *vp2;
625 625
626 snd_assert(voice < MAX_OPL3_VOICES, return); 626 snd_assert(voice < MAX_OPL3_VOICES, return);
627 627
@@ -663,12 +663,12 @@ static void snd_opl3_kill_voice(opl3_t *opl3, int voice)
663/* 663/*
664 * Release a note in response to a midi note off. 664 * Release a note in response to a midi note off.
665 */ 665 */
666void snd_opl3_note_off(void *p, int note, int vel, snd_midi_channel_t *chan) 666void snd_opl3_note_off(void *p, int note, int vel, struct snd_midi_channel *chan)
667{ 667{
668 opl3_t *opl3; 668 struct snd_opl3 *opl3;
669 669
670 int voice; 670 int voice;
671 snd_opl3_voice_t *vp; 671 struct snd_opl3_voice *vp;
672 672
673 unsigned long flags; 673 unsigned long flags;
674 674
@@ -708,9 +708,9 @@ void snd_opl3_note_off(void *p, int note, int vel, snd_midi_channel_t *chan)
708/* 708/*
709 * key pressure change 709 * key pressure change
710 */ 710 */
711void snd_opl3_key_press(void *p, int note, int vel, snd_midi_channel_t *chan) 711void snd_opl3_key_press(void *p, int note, int vel, struct snd_midi_channel *chan)
712{ 712{
713 opl3_t *opl3; 713 struct snd_opl3 *opl3;
714 714
715 opl3 = p; 715 opl3 = p;
716#ifdef DEBUG_MIDI 716#ifdef DEBUG_MIDI
@@ -722,9 +722,9 @@ void snd_opl3_key_press(void *p, int note, int vel, snd_midi_channel_t *chan)
722/* 722/*
723 * terminate note 723 * terminate note
724 */ 724 */
725void snd_opl3_terminate_note(void *p, int note, snd_midi_channel_t *chan) 725void snd_opl3_terminate_note(void *p, int note, struct snd_midi_channel *chan)
726{ 726{
727 opl3_t *opl3; 727 struct snd_opl3 *opl3;
728 728
729 opl3 = p; 729 opl3 = p;
730#ifdef DEBUG_MIDI 730#ifdef DEBUG_MIDI
@@ -733,7 +733,7 @@ void snd_opl3_terminate_note(void *p, int note, snd_midi_channel_t *chan)
733#endif 733#endif
734} 734}
735 735
736static void snd_opl3_update_pitch(opl3_t *opl3, int voice) 736static void snd_opl3_update_pitch(struct snd_opl3 *opl3, int voice)
737{ 737{
738 unsigned short reg_side; 738 unsigned short reg_side;
739 unsigned char voice_offset; 739 unsigned char voice_offset;
@@ -741,7 +741,7 @@ static void snd_opl3_update_pitch(opl3_t *opl3, int voice)
741 741
742 unsigned char fnum, blocknum; 742 unsigned char fnum, blocknum;
743 743
744 snd_opl3_voice_t *vp; 744 struct snd_opl3_voice *vp;
745 745
746 snd_assert(voice < MAX_OPL3_VOICES, return); 746 snd_assert(voice < MAX_OPL3_VOICES, return);
747 747
@@ -780,10 +780,10 @@ static void snd_opl3_update_pitch(opl3_t *opl3, int voice)
780/* 780/*
781 * Update voice pitch controller 781 * Update voice pitch controller
782 */ 782 */
783static void snd_opl3_pitch_ctrl(opl3_t *opl3, snd_midi_channel_t *chan) 783static void snd_opl3_pitch_ctrl(struct snd_opl3 *opl3, struct snd_midi_channel *chan)
784{ 784{
785 int voice; 785 int voice;
786 snd_opl3_voice_t *vp; 786 struct snd_opl3_voice *vp;
787 787
788 unsigned long flags; 788 unsigned long flags;
789 789
@@ -810,9 +810,9 @@ static void snd_opl3_pitch_ctrl(opl3_t *opl3, snd_midi_channel_t *chan)
810 * Deal with a controler type event. This includes all types of 810 * Deal with a controler type event. This includes all types of
811 * control events, not just the midi controllers 811 * control events, not just the midi controllers
812 */ 812 */
813void snd_opl3_control(void *p, int type, snd_midi_channel_t *chan) 813void snd_opl3_control(void *p, int type, struct snd_midi_channel *chan)
814{ 814{
815 opl3_t *opl3; 815 struct snd_opl3 *opl3;
816 816
817 opl3 = p; 817 opl3 = p;
818#ifdef DEBUG_MIDI 818#ifdef DEBUG_MIDI
@@ -846,10 +846,10 @@ void snd_opl3_control(void *p, int type, snd_midi_channel_t *chan)
846/* 846/*
847 * NRPN events 847 * NRPN events
848 */ 848 */
849void snd_opl3_nrpn(void *p, snd_midi_channel_t *chan, 849void snd_opl3_nrpn(void *p, struct snd_midi_channel *chan,
850 snd_midi_channel_set_t *chset) 850 struct snd_midi_channel_set *chset)
851{ 851{
852 opl3_t *opl3; 852 struct snd_opl3 *opl3;
853 853
854 opl3 = p; 854 opl3 = p;
855#ifdef DEBUG_MIDI 855#ifdef DEBUG_MIDI
@@ -862,9 +862,9 @@ void snd_opl3_nrpn(void *p, snd_midi_channel_t *chan,
862 * receive sysex 862 * receive sysex
863 */ 863 */
864void snd_opl3_sysex(void *p, unsigned char *buf, int len, 864void snd_opl3_sysex(void *p, unsigned char *buf, int len,
865 int parsed, snd_midi_channel_set_t *chset) 865 int parsed, struct snd_midi_channel_set *chset)
866{ 866{
867 opl3_t *opl3; 867 struct snd_opl3 *opl3;
868 868
869 opl3 = p; 869 opl3 = p;
870#ifdef DEBUG_MIDI 870#ifdef DEBUG_MIDI
diff --git a/sound/drivers/opl3/opl3_oss.c b/sound/drivers/opl3/opl3_oss.c
index 21a2b409d6d3..31f1f2e25aa0 100644
--- a/sound/drivers/opl3/opl3_oss.c
+++ b/sound/drivers/opl3/opl3_oss.c
@@ -21,11 +21,11 @@
21#include "opl3_voice.h" 21#include "opl3_voice.h"
22#include <linux/slab.h> 22#include <linux/slab.h>
23 23
24static int snd_opl3_open_seq_oss(snd_seq_oss_arg_t *arg, void *closure); 24static int snd_opl3_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure);
25static int snd_opl3_close_seq_oss(snd_seq_oss_arg_t *arg); 25static int snd_opl3_close_seq_oss(struct snd_seq_oss_arg *arg);
26static int snd_opl3_ioctl_seq_oss(snd_seq_oss_arg_t *arg, unsigned int cmd, unsigned long ioarg); 26static int snd_opl3_ioctl_seq_oss(struct snd_seq_oss_arg *arg, unsigned int cmd, unsigned long ioarg);
27static int snd_opl3_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format, const char __user *buf, int offs, int count); 27static int snd_opl3_load_patch_seq_oss(struct snd_seq_oss_arg *arg, int format, const char __user *buf, int offs, int count);
28static int snd_opl3_reset_seq_oss(snd_seq_oss_arg_t *arg); 28static int snd_opl3_reset_seq_oss(struct snd_seq_oss_arg *arg);
29 29
30/* */ 30/* */
31 31
@@ -43,9 +43,9 @@ static inline void snd_leave_user(mm_segment_t fs)
43 43
44/* operators */ 44/* operators */
45 45
46extern snd_midi_op_t opl3_ops; 46extern struct snd_midi_op opl3_ops;
47 47
48static snd_seq_oss_callback_t oss_callback = { 48static struct snd_seq_oss_callback oss_callback = {
49 .owner = THIS_MODULE, 49 .owner = THIS_MODULE,
50 .open = snd_opl3_open_seq_oss, 50 .open = snd_opl3_open_seq_oss,
51 .close = snd_opl3_close_seq_oss, 51 .close = snd_opl3_close_seq_oss,
@@ -54,10 +54,10 @@ static snd_seq_oss_callback_t oss_callback = {
54 .reset = snd_opl3_reset_seq_oss, 54 .reset = snd_opl3_reset_seq_oss,
55}; 55};
56 56
57static int snd_opl3_oss_event_input(snd_seq_event_t *ev, int direct, 57static int snd_opl3_oss_event_input(struct snd_seq_event *ev, int direct,
58 void *private_data, int atomic, int hop) 58 void *private_data, int atomic, int hop)
59{ 59{
60 opl3_t *opl3 = private_data; 60 struct snd_opl3 *opl3 = private_data;
61 61
62 if (ev->type != SNDRV_SEQ_EVENT_OSS) 62 if (ev->type != SNDRV_SEQ_EVENT_OSS)
63 snd_midi_process_event(&opl3_ops, ev, opl3->oss_chset); 63 snd_midi_process_event(&opl3_ops, ev, opl3->oss_chset);
@@ -68,14 +68,14 @@ static int snd_opl3_oss_event_input(snd_seq_event_t *ev, int direct,
68 68
69static void snd_opl3_oss_free_port(void *private_data) 69static void snd_opl3_oss_free_port(void *private_data)
70{ 70{
71 opl3_t *opl3 = private_data; 71 struct snd_opl3 *opl3 = private_data;
72 72
73 snd_midi_channel_free_set(opl3->oss_chset); 73 snd_midi_channel_free_set(opl3->oss_chset);
74} 74}
75 75
76static int snd_opl3_oss_create_port(opl3_t * opl3) 76static int snd_opl3_oss_create_port(struct snd_opl3 * opl3)
77{ 77{
78 snd_seq_port_callback_t callbacks; 78 struct snd_seq_port_callback callbacks;
79 char name[32]; 79 char name[32];
80 int voices, opl_ver; 80 int voices, opl_ver;
81 81
@@ -113,13 +113,13 @@ static int snd_opl3_oss_create_port(opl3_t * opl3)
113/* ------------------------------ */ 113/* ------------------------------ */
114 114
115/* register OSS synth */ 115/* register OSS synth */
116void snd_opl3_init_seq_oss(opl3_t *opl3, char *name) 116void snd_opl3_init_seq_oss(struct snd_opl3 *opl3, char *name)
117{ 117{
118 snd_seq_oss_reg_t *arg; 118 struct snd_seq_oss_reg *arg;
119 snd_seq_device_t *dev; 119 struct snd_seq_device *dev;
120 120
121 if (snd_seq_device_new(opl3->card, 0, SNDRV_SEQ_DEV_ID_OSS, 121 if (snd_seq_device_new(opl3->card, 0, SNDRV_SEQ_DEV_ID_OSS,
122 sizeof(snd_seq_oss_reg_t), &dev) < 0) 122 sizeof(struct snd_seq_oss_reg), &dev) < 0)
123 return; 123 return;
124 124
125 opl3->oss_seq_dev = dev; 125 opl3->oss_seq_dev = dev;
@@ -143,7 +143,7 @@ void snd_opl3_init_seq_oss(opl3_t *opl3, char *name)
143} 143}
144 144
145/* unregister */ 145/* unregister */
146void snd_opl3_free_seq_oss(opl3_t *opl3) 146void snd_opl3_free_seq_oss(struct snd_opl3 *opl3)
147{ 147{
148 if (opl3->oss_seq_dev) { 148 if (opl3->oss_seq_dev) {
149 snd_device_free(opl3->card, opl3->oss_seq_dev); 149 snd_device_free(opl3->card, opl3->oss_seq_dev);
@@ -154,9 +154,9 @@ void snd_opl3_free_seq_oss(opl3_t *opl3)
154/* ------------------------------ */ 154/* ------------------------------ */
155 155
156/* open OSS sequencer */ 156/* open OSS sequencer */
157static int snd_opl3_open_seq_oss(snd_seq_oss_arg_t *arg, void *closure) 157static int snd_opl3_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure)
158{ 158{
159 opl3_t *opl3 = closure; 159 struct snd_opl3 *opl3 = closure;
160 int err; 160 int err;
161 161
162 snd_assert(arg != NULL, return -ENXIO); 162 snd_assert(arg != NULL, return -ENXIO);
@@ -177,9 +177,9 @@ static int snd_opl3_open_seq_oss(snd_seq_oss_arg_t *arg, void *closure)
177} 177}
178 178
179/* close OSS sequencer */ 179/* close OSS sequencer */
180static int snd_opl3_close_seq_oss(snd_seq_oss_arg_t *arg) 180static int snd_opl3_close_seq_oss(struct snd_seq_oss_arg *arg)
181{ 181{
182 opl3_t *opl3; 182 struct snd_opl3 *opl3;
183 183
184 snd_assert(arg != NULL, return -ENXIO); 184 snd_assert(arg != NULL, return -ENXIO);
185 opl3 = arg->private_data; 185 opl3 = arg->private_data;
@@ -206,10 +206,10 @@ static int snd_opl3_close_seq_oss(snd_seq_oss_arg_t *arg)
206/* from sound_config.h */ 206/* from sound_config.h */
207#define SBFM_MAXINSTR 256 207#define SBFM_MAXINSTR 256
208 208
209static int snd_opl3_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format, 209static int snd_opl3_load_patch_seq_oss(struct snd_seq_oss_arg *arg, int format,
210 const char __user *buf, int offs, int count) 210 const char __user *buf, int offs, int count)
211{ 211{
212 opl3_t *opl3; 212 struct snd_opl3 *opl3;
213 int err = -EINVAL; 213 int err = -EINVAL;
214 214
215 snd_assert(arg != NULL, return -ENXIO); 215 snd_assert(arg != NULL, return -ENXIO);
@@ -219,11 +219,11 @@ static int snd_opl3_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format,
219 struct sbi_instrument sbi; 219 struct sbi_instrument sbi;
220 220
221 size_t size; 221 size_t size;
222 snd_seq_instr_header_t *put; 222 struct snd_seq_instr_header *put;
223 snd_seq_instr_data_t *data; 223 struct snd_seq_instr_data *data;
224 fm_xinstrument_t *xinstr; 224 struct fm_xinstrument *xinstr;
225 225
226 snd_seq_event_t ev; 226 struct snd_seq_event ev;
227 int i; 227 int i;
228 228
229 mm_segment_t fs; 229 mm_segment_t fs;
@@ -240,7 +240,7 @@ static int snd_opl3_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format,
240 return -EINVAL; 240 return -EINVAL;
241 } 241 }
242 242
243 size = sizeof(*put) + sizeof(fm_xinstrument_t); 243 size = sizeof(*put) + sizeof(struct fm_xinstrument);
244 put = kzalloc(size, GFP_KERNEL); 244 put = kzalloc(size, GFP_KERNEL);
245 if (put == NULL) 245 if (put == NULL)
246 return -ENOMEM; 246 return -ENOMEM;
@@ -249,7 +249,7 @@ static int snd_opl3_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format,
249 data->type = SNDRV_SEQ_INSTR_ATYPE_DATA; 249 data->type = SNDRV_SEQ_INSTR_ATYPE_DATA;
250 strcpy(data->data.format, SNDRV_SEQ_INSTR_ID_OPL2_3); 250 strcpy(data->data.format, SNDRV_SEQ_INSTR_ID_OPL2_3);
251 /* build data section */ 251 /* build data section */
252 xinstr = (fm_xinstrument_t *)(data + 1); 252 xinstr = (struct fm_xinstrument *)(data + 1);
253 xinstr->stype = FM_STRU_INSTR; 253 xinstr->stype = FM_STRU_INSTR;
254 254
255 for (i = 0; i < 2; i++) { 255 for (i = 0; i < 2; i++) {
@@ -296,7 +296,7 @@ static int snd_opl3_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format,
296 err = snd_seq_instr_event(&opl3->fm_ops, opl3->ilist, &ev, 296 err = snd_seq_instr_event(&opl3->fm_ops, opl3->ilist, &ev,
297 opl3->seq_client, 0, 0); 297 opl3->seq_client, 0, 0);
298 if (err == -EBUSY) { 298 if (err == -EBUSY) {
299 snd_seq_instr_header_t remove; 299 struct snd_seq_instr_header remove;
300 300
301 memset (&remove, 0, sizeof(remove)); 301 memset (&remove, 0, sizeof(remove));
302 remove.cmd = SNDRV_SEQ_INSTR_FREE_CMD_SINGLE; 302 remove.cmd = SNDRV_SEQ_INSTR_FREE_CMD_SINGLE;
@@ -319,10 +319,10 @@ static int snd_opl3_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format,
319} 319}
320 320
321/* ioctl */ 321/* ioctl */
322static int snd_opl3_ioctl_seq_oss(snd_seq_oss_arg_t *arg, unsigned int cmd, 322static int snd_opl3_ioctl_seq_oss(struct snd_seq_oss_arg *arg, unsigned int cmd,
323 unsigned long ioarg) 323 unsigned long ioarg)
324{ 324{
325 opl3_t *opl3; 325 struct snd_opl3 *opl3;
326 326
327 snd_assert(arg != NULL, return -ENXIO); 327 snd_assert(arg != NULL, return -ENXIO);
328 opl3 = arg->private_data; 328 opl3 = arg->private_data;
@@ -345,9 +345,9 @@ static int snd_opl3_ioctl_seq_oss(snd_seq_oss_arg_t *arg, unsigned int cmd,
345} 345}
346 346
347/* reset device */ 347/* reset device */
348static int snd_opl3_reset_seq_oss(snd_seq_oss_arg_t *arg) 348static int snd_opl3_reset_seq_oss(struct snd_seq_oss_arg *arg)
349{ 349{
350 opl3_t *opl3; 350 struct snd_opl3 *opl3;
351 351
352 snd_assert(arg != NULL, return -ENXIO); 352 snd_assert(arg != NULL, return -ENXIO);
353 opl3 = arg->private_data; 353 opl3 = arg->private_data;
diff --git a/sound/drivers/opl3/opl3_seq.c b/sound/drivers/opl3/opl3_seq.c
index 136964b844de..1886b2958e77 100644
--- a/sound/drivers/opl3/opl3_seq.c
+++ b/sound/drivers/opl3/opl3_seq.c
@@ -35,7 +35,7 @@ int use_internal_drums = 0;
35module_param(use_internal_drums, bool, 0444); 35module_param(use_internal_drums, bool, 0444);
36MODULE_PARM_DESC(use_internal_drums, "Enable internal OPL2/3 drums."); 36MODULE_PARM_DESC(use_internal_drums, "Enable internal OPL2/3 drums.");
37 37
38int snd_opl3_synth_use_inc(opl3_t * opl3) 38int snd_opl3_synth_use_inc(struct snd_opl3 * opl3)
39{ 39{
40 if (!try_module_get(opl3->card->module)) 40 if (!try_module_get(opl3->card->module))
41 return -EFAULT; 41 return -EFAULT;
@@ -43,12 +43,12 @@ int snd_opl3_synth_use_inc(opl3_t * opl3)
43 43
44} 44}
45 45
46void snd_opl3_synth_use_dec(opl3_t * opl3) 46void snd_opl3_synth_use_dec(struct snd_opl3 * opl3)
47{ 47{
48 module_put(opl3->card->module); 48 module_put(opl3->card->module);
49} 49}
50 50
51int snd_opl3_synth_setup(opl3_t * opl3) 51int snd_opl3_synth_setup(struct snd_opl3 * opl3)
52{ 52{
53 int idx; 53 int idx;
54 54
@@ -78,7 +78,7 @@ int snd_opl3_synth_setup(opl3_t * opl3)
78 return 0; 78 return 0;
79} 79}
80 80
81void snd_opl3_synth_cleanup(opl3_t * opl3) 81void snd_opl3_synth_cleanup(struct snd_opl3 * opl3)
82{ 82{
83 unsigned long flags; 83 unsigned long flags;
84 84
@@ -96,9 +96,9 @@ void snd_opl3_synth_cleanup(opl3_t * opl3)
96 up(&opl3->access_mutex); 96 up(&opl3->access_mutex);
97} 97}
98 98
99static int snd_opl3_synth_use(void *private_data, snd_seq_port_subscribe_t * info) 99static int snd_opl3_synth_use(void *private_data, struct snd_seq_port_subscribe * info)
100{ 100{
101 opl3_t *opl3 = private_data; 101 struct snd_opl3 *opl3 = private_data;
102 int err; 102 int err;
103 103
104 if ((err = snd_opl3_synth_setup(opl3)) < 0) 104 if ((err = snd_opl3_synth_setup(opl3)) < 0)
@@ -123,9 +123,9 @@ static int snd_opl3_synth_use(void *private_data, snd_seq_port_subscribe_t * inf
123 return 0; 123 return 0;
124} 124}
125 125
126static int snd_opl3_synth_unuse(void *private_data, snd_seq_port_subscribe_t * info) 126static int snd_opl3_synth_unuse(void *private_data, struct snd_seq_port_subscribe * info)
127{ 127{
128 opl3_t *opl3 = private_data; 128 struct snd_opl3 *opl3 = private_data;
129 129
130 snd_opl3_synth_cleanup(opl3); 130 snd_opl3_synth_cleanup(opl3);
131 131
@@ -137,7 +137,7 @@ static int snd_opl3_synth_unuse(void *private_data, snd_seq_port_subscribe_t * i
137/* 137/*
138 * MIDI emulation operators 138 * MIDI emulation operators
139 */ 139 */
140snd_midi_op_t opl3_ops = { 140struct snd_midi_op opl3_ops = {
141 .note_on = snd_opl3_note_on, 141 .note_on = snd_opl3_note_on,
142 .note_off = snd_opl3_note_off, 142 .note_off = snd_opl3_note_off,
143 .key_press = snd_opl3_key_press, 143 .key_press = snd_opl3_key_press,
@@ -147,10 +147,10 @@ snd_midi_op_t opl3_ops = {
147 .sysex = snd_opl3_sysex, 147 .sysex = snd_opl3_sysex,
148}; 148};
149 149
150static int snd_opl3_synth_event_input(snd_seq_event_t * ev, int direct, 150static int snd_opl3_synth_event_input(struct snd_seq_event * ev, int direct,
151 void *private_data, int atomic, int hop) 151 void *private_data, int atomic, int hop)
152{ 152{
153 opl3_t *opl3 = private_data; 153 struct snd_opl3 *opl3 = private_data;
154 154
155 if (ev->type >= SNDRV_SEQ_EVENT_INSTR_BEGIN && 155 if (ev->type >= SNDRV_SEQ_EVENT_INSTR_BEGIN &&
156 ev->type <= SNDRV_SEQ_EVENT_INSTR_CHANGE) { 156 ev->type <= SNDRV_SEQ_EVENT_INSTR_CHANGE) {
@@ -168,14 +168,14 @@ static int snd_opl3_synth_event_input(snd_seq_event_t * ev, int direct,
168 168
169static void snd_opl3_synth_free_port(void *private_data) 169static void snd_opl3_synth_free_port(void *private_data)
170{ 170{
171 opl3_t *opl3 = private_data; 171 struct snd_opl3 *opl3 = private_data;
172 172
173 snd_midi_channel_free_set(opl3->chset); 173 snd_midi_channel_free_set(opl3->chset);
174} 174}
175 175
176static int snd_opl3_synth_create_port(opl3_t * opl3) 176static int snd_opl3_synth_create_port(struct snd_opl3 * opl3)
177{ 177{
178 snd_seq_port_callback_t callbacks; 178 struct snd_seq_port_callback callbacks;
179 char name[32]; 179 char name[32];
180 int voices, opl_ver; 180 int voices, opl_ver;
181 181
@@ -215,15 +215,15 @@ static int snd_opl3_synth_create_port(opl3_t * opl3)
215 215
216/* ------------------------------ */ 216/* ------------------------------ */
217 217
218static int snd_opl3_seq_new_device(snd_seq_device_t *dev) 218static int snd_opl3_seq_new_device(struct snd_seq_device *dev)
219{ 219{
220 opl3_t *opl3; 220 struct snd_opl3 *opl3;
221 int client; 221 int client;
222 snd_seq_client_callback_t callbacks; 222 struct snd_seq_client_callback callbacks;
223 snd_seq_client_info_t cinfo; 223 struct snd_seq_client_info cinfo;
224 int opl_ver; 224 int opl_ver;
225 225
226 opl3 = *(opl3_t **)SNDRV_SEQ_DEVICE_ARGPTR(dev); 226 opl3 = *(struct snd_opl3 **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
227 if (opl3 == NULL) 227 if (opl3 == NULL)
228 return -EINVAL; 228 return -EINVAL;
229 229
@@ -273,11 +273,11 @@ static int snd_opl3_seq_new_device(snd_seq_device_t *dev)
273 return 0; 273 return 0;
274} 274}
275 275
276static int snd_opl3_seq_delete_device(snd_seq_device_t *dev) 276static int snd_opl3_seq_delete_device(struct snd_seq_device *dev)
277{ 277{
278 opl3_t *opl3; 278 struct snd_opl3 *opl3;
279 279
280 opl3 = *(opl3_t **)SNDRV_SEQ_DEVICE_ARGPTR(dev); 280 opl3 = *(struct snd_opl3 **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
281 if (opl3 == NULL) 281 if (opl3 == NULL)
282 return -EINVAL; 282 return -EINVAL;
283 283
@@ -295,14 +295,14 @@ static int snd_opl3_seq_delete_device(snd_seq_device_t *dev)
295 295
296static int __init alsa_opl3_seq_init(void) 296static int __init alsa_opl3_seq_init(void)
297{ 297{
298 static snd_seq_dev_ops_t ops = 298 static struct snd_seq_dev_ops ops =
299 { 299 {
300 snd_opl3_seq_new_device, 300 snd_opl3_seq_new_device,
301 snd_opl3_seq_delete_device 301 snd_opl3_seq_delete_device
302 }; 302 };
303 303
304 return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_OPL3, &ops, 304 return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_OPL3, &ops,
305 sizeof(opl3_t*)); 305 sizeof(struct snd_opl3 *));
306} 306}
307 307
308static void __exit alsa_opl3_seq_exit(void) 308static void __exit alsa_opl3_seq_exit(void)
diff --git a/sound/drivers/opl3/opl3_synth.c b/sound/drivers/opl3/opl3_synth.c
index 04f9f955e5b7..3534a0e3342a 100644
--- a/sound/drivers/opl3/opl3_synth.c
+++ b/sound/drivers/opl3/opl3_synth.c
@@ -61,20 +61,20 @@ char snd_opl3_regmap[MAX_OPL2_VOICES][4] =
61/* 61/*
62 * prototypes 62 * prototypes
63 */ 63 */
64static int snd_opl3_play_note(opl3_t * opl3, snd_dm_fm_note_t * note); 64static int snd_opl3_play_note(struct snd_opl3 * opl3, struct snd_dm_fm_note * note);
65static int snd_opl3_set_voice(opl3_t * opl3, snd_dm_fm_voice_t * voice); 65static int snd_opl3_set_voice(struct snd_opl3 * opl3, struct snd_dm_fm_voice * voice);
66static int snd_opl3_set_params(opl3_t * opl3, snd_dm_fm_params_t * params); 66static int snd_opl3_set_params(struct snd_opl3 * opl3, struct snd_dm_fm_params * params);
67static int snd_opl3_set_mode(opl3_t * opl3, int mode); 67static int snd_opl3_set_mode(struct snd_opl3 * opl3, int mode);
68static int snd_opl3_set_connection(opl3_t * opl3, int connection); 68static int snd_opl3_set_connection(struct snd_opl3 * opl3, int connection);
69 69
70/* ------------------------------ */ 70/* ------------------------------ */
71 71
72/* 72/*
73 * open the device exclusively 73 * open the device exclusively
74 */ 74 */
75int snd_opl3_open(snd_hwdep_t * hw, struct file *file) 75int snd_opl3_open(struct snd_hwdep * hw, struct file *file)
76{ 76{
77 opl3_t *opl3 = hw->private_data; 77 struct snd_opl3 *opl3 = hw->private_data;
78 78
79 down(&opl3->access_mutex); 79 down(&opl3->access_mutex);
80 if (opl3->used) { 80 if (opl3->used) {
@@ -90,10 +90,10 @@ int snd_opl3_open(snd_hwdep_t * hw, struct file *file)
90/* 90/*
91 * ioctl for hwdep device: 91 * ioctl for hwdep device:
92 */ 92 */
93int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file, 93int snd_opl3_ioctl(struct snd_hwdep * hw, struct file *file,
94 unsigned int cmd, unsigned long arg) 94 unsigned int cmd, unsigned long arg)
95{ 95{
96 opl3_t *opl3 = hw->private_data; 96 struct snd_opl3 *opl3 = hw->private_data;
97 void __user *argp = (void __user *)arg; 97 void __user *argp = (void __user *)arg;
98 98
99 snd_assert(opl3 != NULL, return -EINVAL); 99 snd_assert(opl3 != NULL, return -EINVAL);
@@ -102,11 +102,11 @@ int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
102 /* get information */ 102 /* get information */
103 case SNDRV_DM_FM_IOCTL_INFO: 103 case SNDRV_DM_FM_IOCTL_INFO:
104 { 104 {
105 snd_dm_fm_info_t info; 105 struct snd_dm_fm_info info;
106 106
107 info.fm_mode = opl3->fm_mode; 107 info.fm_mode = opl3->fm_mode;
108 info.rhythm = opl3->rhythm; 108 info.rhythm = opl3->rhythm;
109 if (copy_to_user(argp, &info, sizeof(snd_dm_fm_info_t))) 109 if (copy_to_user(argp, &info, sizeof(struct snd_dm_fm_info)))
110 return -EFAULT; 110 return -EFAULT;
111 return 0; 111 return 0;
112 } 112 }
@@ -123,8 +123,8 @@ int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
123 case SNDRV_DM_FM_OSS_IOCTL_PLAY_NOTE: 123 case SNDRV_DM_FM_OSS_IOCTL_PLAY_NOTE:
124#endif 124#endif
125 { 125 {
126 snd_dm_fm_note_t note; 126 struct snd_dm_fm_note note;
127 if (copy_from_user(&note, argp, sizeof(snd_dm_fm_note_t))) 127 if (copy_from_user(&note, argp, sizeof(struct snd_dm_fm_note)))
128 return -EFAULT; 128 return -EFAULT;
129 return snd_opl3_play_note(opl3, &note); 129 return snd_opl3_play_note(opl3, &note);
130 } 130 }
@@ -134,8 +134,8 @@ int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
134 case SNDRV_DM_FM_OSS_IOCTL_SET_VOICE: 134 case SNDRV_DM_FM_OSS_IOCTL_SET_VOICE:
135#endif 135#endif
136 { 136 {
137 snd_dm_fm_voice_t voice; 137 struct snd_dm_fm_voice voice;
138 if (copy_from_user(&voice, argp, sizeof(snd_dm_fm_voice_t))) 138 if (copy_from_user(&voice, argp, sizeof(struct snd_dm_fm_voice)))
139 return -EFAULT; 139 return -EFAULT;
140 return snd_opl3_set_voice(opl3, &voice); 140 return snd_opl3_set_voice(opl3, &voice);
141 } 141 }
@@ -145,8 +145,8 @@ int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
145 case SNDRV_DM_FM_OSS_IOCTL_SET_PARAMS: 145 case SNDRV_DM_FM_OSS_IOCTL_SET_PARAMS:
146#endif 146#endif
147 { 147 {
148 snd_dm_fm_params_t params; 148 struct snd_dm_fm_params params;
149 if (copy_from_user(&params, argp, sizeof(snd_dm_fm_params_t))) 149 if (copy_from_user(&params, argp, sizeof(struct snd_dm_fm_params)))
150 return -EFAULT; 150 return -EFAULT;
151 return snd_opl3_set_params(opl3, &params); 151 return snd_opl3_set_params(opl3, &params);
152 } 152 }
@@ -174,9 +174,9 @@ int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
174/* 174/*
175 * close the device 175 * close the device
176 */ 176 */
177int snd_opl3_release(snd_hwdep_t * hw, struct file *file) 177int snd_opl3_release(struct snd_hwdep * hw, struct file *file)
178{ 178{
179 opl3_t *opl3 = hw->private_data; 179 struct snd_opl3 *opl3 = hw->private_data;
180 180
181 snd_opl3_reset(opl3); 181 snd_opl3_reset(opl3);
182 down(&opl3->access_mutex); 182 down(&opl3->access_mutex);
@@ -188,7 +188,7 @@ int snd_opl3_release(snd_hwdep_t * hw, struct file *file)
188 188
189/* ------------------------------ */ 189/* ------------------------------ */
190 190
191void snd_opl3_reset(opl3_t * opl3) 191void snd_opl3_reset(struct snd_opl3 * opl3)
192{ 192{
193 unsigned short opl3_reg; 193 unsigned short opl3_reg;
194 194
@@ -229,7 +229,7 @@ void snd_opl3_reset(opl3_t * opl3)
229} 229}
230 230
231 231
232static int snd_opl3_play_note(opl3_t * opl3, snd_dm_fm_note_t * note) 232static int snd_opl3_play_note(struct snd_opl3 * opl3, struct snd_dm_fm_note * note)
233{ 233{
234 unsigned short reg_side; 234 unsigned short reg_side;
235 unsigned char voice_offset; 235 unsigned char voice_offset;
@@ -276,7 +276,7 @@ static int snd_opl3_play_note(opl3_t * opl3, snd_dm_fm_note_t * note)
276} 276}
277 277
278 278
279static int snd_opl3_set_voice(opl3_t * opl3, snd_dm_fm_voice_t * voice) 279static int snd_opl3_set_voice(struct snd_opl3 * opl3, struct snd_dm_fm_voice * voice)
280{ 280{
281 unsigned short reg_side; 281 unsigned short reg_side;
282 unsigned char op_offset; 282 unsigned char op_offset;
@@ -378,7 +378,7 @@ static int snd_opl3_set_voice(opl3_t * opl3, snd_dm_fm_voice_t * voice)
378 return 0; 378 return 0;
379} 379}
380 380
381static int snd_opl3_set_params(opl3_t * opl3, snd_dm_fm_params_t * params) 381static int snd_opl3_set_params(struct snd_opl3 * opl3, struct snd_dm_fm_params * params)
382{ 382{
383 unsigned char reg_val; 383 unsigned char reg_val;
384 384
@@ -418,7 +418,7 @@ static int snd_opl3_set_params(opl3_t * opl3, snd_dm_fm_params_t * params)
418 return 0; 418 return 0;
419} 419}
420 420
421static int snd_opl3_set_mode(opl3_t * opl3, int mode) 421static int snd_opl3_set_mode(struct snd_opl3 * opl3, int mode)
422{ 422{
423 if ((mode == SNDRV_DM_FM_MODE_OPL3) && (opl3->hardware < OPL3_HW_OPL3)) 423 if ((mode == SNDRV_DM_FM_MODE_OPL3) && (opl3->hardware < OPL3_HW_OPL3))
424 return -EINVAL; 424 return -EINVAL;
@@ -430,7 +430,7 @@ static int snd_opl3_set_mode(opl3_t * opl3, int mode)
430 return 0; 430 return 0;
431} 431}
432 432
433static int snd_opl3_set_connection(opl3_t * opl3, int connection) 433static int snd_opl3_set_connection(struct snd_opl3 * opl3, int connection)
434{ 434{
435 unsigned char reg_val; 435 unsigned char reg_val;
436 436
diff --git a/sound/drivers/opl3/opl3_voice.h b/sound/drivers/opl3/opl3_voice.h
index 63346a5c3498..a371c075ac87 100644
--- a/sound/drivers/opl3/opl3_voice.h
+++ b/sound/drivers/opl3/opl3_voice.h
@@ -22,31 +22,31 @@
22#include <sound/opl3.h> 22#include <sound/opl3.h>
23 23
24/* Prototypes for opl3_seq.c */ 24/* Prototypes for opl3_seq.c */
25int snd_opl3_synth_use_inc(opl3_t * opl3); 25int snd_opl3_synth_use_inc(struct snd_opl3 * opl3);
26void snd_opl3_synth_use_dec(opl3_t * opl3); 26void snd_opl3_synth_use_dec(struct snd_opl3 * opl3);
27int snd_opl3_synth_setup(opl3_t * opl3); 27int snd_opl3_synth_setup(struct snd_opl3 * opl3);
28void snd_opl3_synth_cleanup(opl3_t * opl3); 28void snd_opl3_synth_cleanup(struct snd_opl3 * opl3);
29 29
30/* Prototypes for opl3_midi.c */ 30/* Prototypes for opl3_midi.c */
31void snd_opl3_note_on(void *p, int note, int vel, struct snd_midi_channel *chan); 31void snd_opl3_note_on(void *p, int note, int vel, struct snd_midi_channel *chan);
32void snd_opl3_note_off(void *p, int note, int vel, struct snd_midi_channel *chan); 32void snd_opl3_note_off(void *p, int note, int vel, struct snd_midi_channel *chan);
33void snd_opl3_key_press(void *p, int note, int vel, struct snd_midi_channel *chan); 33void snd_opl3_key_press(void *p, int note, int vel, struct snd_midi_channel *chan);
34void snd_opl3_terminate_note(void *p, int note, snd_midi_channel_t *chan); 34void snd_opl3_terminate_note(void *p, int note, struct snd_midi_channel *chan);
35void snd_opl3_control(void *p, int type, struct snd_midi_channel *chan); 35void snd_opl3_control(void *p, int type, struct snd_midi_channel *chan);
36void snd_opl3_nrpn(void *p, snd_midi_channel_t *chan, snd_midi_channel_set_t *chset); 36void snd_opl3_nrpn(void *p, struct snd_midi_channel *chan, struct snd_midi_channel_set *chset);
37void snd_opl3_sysex(void *p, unsigned char *buf, int len, int parsed, snd_midi_channel_set_t *chset); 37void snd_opl3_sysex(void *p, unsigned char *buf, int len, int parsed, struct snd_midi_channel_set *chset);
38 38
39void snd_opl3_calc_volume(unsigned char *reg, int vel, snd_midi_channel_t *chan); 39void snd_opl3_calc_volume(unsigned char *reg, int vel, struct snd_midi_channel *chan);
40void snd_opl3_timer_func(unsigned long data); 40void snd_opl3_timer_func(unsigned long data);
41 41
42/* Prototypes for opl3_drums.c */ 42/* Prototypes for opl3_drums.c */
43void snd_opl3_load_drums(opl3_t *opl3); 43void snd_opl3_load_drums(struct snd_opl3 *opl3);
44void snd_opl3_drum_switch(opl3_t *opl3, int note, int on_off, int vel, snd_midi_channel_t *chan); 44void snd_opl3_drum_switch(struct snd_opl3 *opl3, int note, int on_off, int vel, struct snd_midi_channel *chan);
45 45
46/* Prototypes for opl3_oss.c */ 46/* Prototypes for opl3_oss.c */
47#ifdef CONFIG_SND_SEQUENCER_OSS 47#ifdef CONFIG_SND_SEQUENCER_OSS
48void snd_opl3_init_seq_oss(opl3_t *opl3, char *name); 48void snd_opl3_init_seq_oss(struct snd_opl3 *opl3, char *name);
49void snd_opl3_free_seq_oss(opl3_t *opl3); 49void snd_opl3_free_seq_oss(struct snd_opl3 *opl3);
50#endif 50#endif
51 51
52#endif 52#endif