Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Takashi Iwai and committed by
Jaroslav Kysela
5b1646a8 e1fad17b

+235 -231
+12 -12
include/sound/asound_fm.h
··· 29 29 #define SNDRV_DM_FM_MODE_OPL2 0x00 30 30 #define SNDRV_DM_FM_MODE_OPL3 0x01 31 31 32 - typedef struct snd_dm_fm_info { 32 + struct snd_dm_fm_info { 33 33 unsigned char fm_mode; /* OPL mode, see SNDRV_DM_FM_MODE_XXX */ 34 34 unsigned char rhythm; /* percussion mode flag */ 35 - } snd_dm_fm_info_t; 35 + }; 36 36 37 37 /* 38 38 * Data structure composing an FM "note" or sound event. 39 39 */ 40 40 41 - typedef struct snd_dm_fm_voice { 41 + struct snd_dm_fm_voice { 42 42 unsigned char op; /* operator cell (0 or 1) */ 43 43 unsigned char voice; /* FM voice (0 to 17) */ 44 44 ··· 60 60 unsigned char left; /* stereo left */ 61 61 unsigned char right; /* stereo right */ 62 62 unsigned char waveform; /* 3 bits: waveform shape */ 63 - } snd_dm_fm_voice_t; 63 + }; 64 64 65 65 /* 66 66 * This describes an FM note by its voice, octave, frequency number (10bit) 67 67 * and key on/off. 68 68 */ 69 69 70 - typedef struct snd_dm_fm_note { 70 + struct snd_dm_fm_note { 71 71 unsigned char voice; /* 0-17 voice channel */ 72 72 unsigned char octave; /* 3 bits: what octave to play */ 73 73 unsigned int fnum; /* 10 bits: frequency number */ 74 74 unsigned char key_on; /* set for active, clear for silent */ 75 - } snd_dm_fm_note_t; 75 + }; 76 76 77 77 /* 78 78 * FM parameters that apply globally to all voices, and thus are not "notes" 79 79 */ 80 80 81 - typedef struct snd_dm_fm_params { 81 + struct snd_dm_fm_params { 82 82 unsigned char am_depth; /* amplitude modulation depth (1=hi) */ 83 83 unsigned char vib_depth; /* vibrato depth (1=hi) */ 84 84 unsigned char kbd_split; /* keyboard split */ ··· 90 90 unsigned char tomtom; 91 91 unsigned char cymbal; 92 92 unsigned char hihat; 93 - } snd_dm_fm_params_t; 93 + }; 94 94 95 95 /* 96 96 * FM mode ioctl settings 97 97 */ 98 98 99 - #define SNDRV_DM_FM_IOCTL_INFO _IOR('H', 0x20, snd_dm_fm_info_t) 99 + #define SNDRV_DM_FM_IOCTL_INFO _IOR('H', 0x20, struct snd_dm_fm_info) 100 100 #define SNDRV_DM_FM_IOCTL_RESET _IO ('H', 0x21) 101 - #define SNDRV_DM_FM_IOCTL_PLAY_NOTE _IOW('H', 0x22, snd_dm_fm_note_t) 102 - #define SNDRV_DM_FM_IOCTL_SET_VOICE _IOW('H', 0x23, snd_dm_fm_voice_t) 103 - #define SNDRV_DM_FM_IOCTL_SET_PARAMS _IOW('H', 0x24, snd_dm_fm_params_t) 101 + #define SNDRV_DM_FM_IOCTL_PLAY_NOTE _IOW('H', 0x22, struct snd_dm_fm_note) 102 + #define SNDRV_DM_FM_IOCTL_SET_VOICE _IOW('H', 0x23, struct snd_dm_fm_voice) 103 + #define SNDRV_DM_FM_IOCTL_SET_PARAMS _IOW('H', 0x24, struct snd_dm_fm_params) 104 104 #define SNDRV_DM_FM_IOCTL_SET_MODE _IOW('H', 0x25, int) 105 105 /* for OPL3 only */ 106 106 #define SNDRV_DM_FM_IOCTL_SET_CONNECTION _IOW('H', 0x26, int)
+29 -28
include/sound/opl3.h
··· 237 237 #define MAX_OPL2_VOICES 9 238 238 #define MAX_OPL3_VOICES 18 239 239 240 - typedef struct snd_opl3 opl3_t; 240 + struct snd_opl3; 241 241 242 242 /* 243 243 * A structure to keep track of each hardware voice 244 244 */ 245 - typedef struct snd_opl3_voice { 245 + struct snd_opl3_voice { 246 246 int state; /* status */ 247 247 #define SNDRV_OPL3_ST_OFF 0 /* Not playing */ 248 248 #define SNDRV_OPL3_ST_ON_2OP 1 /* 2op voice is allocated */ ··· 257 257 258 258 unsigned char keyon_reg; /* KON register shadow */ 259 259 260 - snd_midi_channel_t *chan; /* Midi channel for this note */ 261 - } snd_opl3_voice_t; 260 + struct snd_midi_channel *chan; /* Midi channel for this note */ 261 + }; 262 262 263 263 struct snd_opl3 { 264 264 unsigned long l_port; ··· 267 267 struct resource *res_r_port; 268 268 unsigned short hardware; 269 269 /* hardware access */ 270 - void (*command) (opl3_t * opl3, unsigned short cmd, unsigned char val); 270 + void (*command) (struct snd_opl3 * opl3, unsigned short cmd, unsigned char val); 271 271 unsigned short timer_enable; 272 272 int seq_dev_num; /* sequencer device number */ 273 - snd_timer_t *timer1; 274 - snd_timer_t *timer2; 273 + struct snd_timer *timer1; 274 + struct snd_timer *timer2; 275 275 spinlock_t timer_lock; 276 276 277 277 void *private_data; 278 - void (*private_free)(opl3_t *); 278 + void (*private_free)(struct snd_opl3 *); 279 279 280 280 spinlock_t reg_lock; 281 - snd_card_t *card; /* The card that this belongs to */ 281 + struct snd_card *card; /* The card that this belongs to */ 282 282 int used; /* usage flag - exclusive */ 283 283 unsigned char fm_mode; /* OPL mode, see SNDRV_DM_FM_MODE_XXX */ 284 284 unsigned char rhythm; /* percussion mode flag */ ··· 289 289 int synth_mode; /* synth mode */ 290 290 int seq_client; 291 291 292 - snd_seq_device_t *seq_dev; /* sequencer device */ 293 - snd_midi_channel_set_t * chset; 292 + struct snd_seq_device *seq_dev; /* sequencer device */ 293 + struct snd_midi_channel_set * chset; 294 294 295 295 #ifdef CONFIG_SND_SEQUENCER_OSS 296 - snd_seq_device_t *oss_seq_dev; /* OSS sequencer device */ 297 - snd_midi_channel_set_t * oss_chset; 296 + struct snd_seq_device *oss_seq_dev; /* OSS sequencer device */ 297 + struct snd_midi_channel_set * oss_chset; 298 298 #endif 299 299 300 - snd_seq_kinstr_ops_t fm_ops; 301 - snd_seq_kinstr_list_t *ilist; 300 + struct snd_seq_kinstr_ops fm_ops; 301 + struct snd_seq_kinstr_list *ilist; 302 302 303 - snd_opl3_voice_t voices[MAX_OPL3_VOICES]; /* Voices (OPL3 'channel') */ 303 + struct snd_opl3_voice voices[MAX_OPL3_VOICES]; /* Voices (OPL3 'channel') */ 304 304 int use_time; /* allocation counter */ 305 305 306 306 unsigned short connection_reg; /* connection reg shadow */ ··· 316 316 }; 317 317 318 318 /* opl3.c */ 319 - void snd_opl3_interrupt(snd_hwdep_t * hw); 320 - int snd_opl3_new(snd_card_t *card, unsigned short hardware, opl3_t **ropl3); 321 - int snd_opl3_init(opl3_t *opl3); 322 - int snd_opl3_create(snd_card_t * card, 319 + void snd_opl3_interrupt(struct snd_hwdep * hw); 320 + int snd_opl3_new(struct snd_card *card, unsigned short hardware, 321 + struct snd_opl3 **ropl3); 322 + int snd_opl3_init(struct snd_opl3 *opl3); 323 + int snd_opl3_create(struct snd_card *card, 323 324 unsigned long l_port, unsigned long r_port, 324 325 unsigned short hardware, 325 326 int integrated, 326 - opl3_t ** opl3); 327 - int snd_opl3_timer_new(opl3_t * opl3, int timer1_dev, int timer2_dev); 328 - int snd_opl3_hwdep_new(opl3_t * opl3, int device, int seq_device, 329 - snd_hwdep_t ** rhwdep); 327 + struct snd_opl3 ** opl3); 328 + int snd_opl3_timer_new(struct snd_opl3 * opl3, int timer1_dev, int timer2_dev); 329 + int snd_opl3_hwdep_new(struct snd_opl3 * opl3, int device, int seq_device, 330 + struct snd_hwdep ** rhwdep); 330 331 331 332 /* opl3_synth */ 332 - int snd_opl3_open(snd_hwdep_t * hw, struct file *file); 333 - int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file, 333 + int snd_opl3_open(struct snd_hwdep * hw, struct file *file); 334 + int snd_opl3_ioctl(struct snd_hwdep * hw, struct file *file, 334 335 unsigned int cmd, unsigned long arg); 335 - int snd_opl3_release(snd_hwdep_t * hw, struct file *file); 336 + int snd_opl3_release(struct snd_hwdep * hw, struct file *file); 336 337 337 - void snd_opl3_reset(opl3_t * opl3); 338 + void snd_opl3_reset(struct snd_opl3 * opl3); 338 339 339 340 #endif /* __SOUND_OPL3_H */
+24 -21
sound/drivers/opl3/opl3_drums.c
··· 45 45 OPL3_CYMBAL_ON, OPL3_CYMBAL_ON /* 80 - 81 */ 46 46 }; 47 47 48 - typedef struct snd_opl3_drum_voice { 48 + struct snd_opl3_drum_voice { 49 49 int voice; 50 50 int op; 51 51 unsigned char am_vib; ··· 54 54 unsigned char sustain_release; 55 55 unsigned char feedback_connection; 56 56 unsigned char wave_select; 57 - } snd_opl3_drum_voice_t; 57 + }; 58 58 59 - typedef struct snd_opl3_drum_note { 59 + struct snd_opl3_drum_note { 60 60 int voice; 61 61 unsigned char fnum; 62 62 unsigned char octave_f; 63 63 unsigned char feedback_connection; 64 - } snd_opl3_drum_note_t; 64 + }; 65 65 66 - static snd_opl3_drum_voice_t bass_op0 = {6, 0, 0x00, 0x32, 0xf8, 0x66, 0x30, 0x00}; 67 - static snd_opl3_drum_voice_t bass_op1 = {6, 1, 0x00, 0x03, 0xf6, 0x57, 0x30, 0x00}; 68 - static snd_opl3_drum_note_t bass_note = {6, 0x90, 0x09}; 66 + static struct snd_opl3_drum_voice bass_op0 = {6, 0, 0x00, 0x32, 0xf8, 0x66, 0x30, 0x00}; 67 + static struct snd_opl3_drum_voice bass_op1 = {6, 1, 0x00, 0x03, 0xf6, 0x57, 0x30, 0x00}; 68 + static struct snd_opl3_drum_note bass_note = {6, 0x90, 0x09}; 69 69 70 - static snd_opl3_drum_voice_t hihat = {7, 0, 0x00, 0x03, 0xf0, 0x06, 0x20, 0x00}; 70 + static struct snd_opl3_drum_voice hihat = {7, 0, 0x00, 0x03, 0xf0, 0x06, 0x20, 0x00}; 71 71 72 - static snd_opl3_drum_voice_t snare = {7, 1, 0x00, 0x03, 0xf0, 0x07, 0x20, 0x02}; 73 - static snd_opl3_drum_note_t snare_note = {7, 0xf4, 0x0d}; 72 + static struct snd_opl3_drum_voice snare = {7, 1, 0x00, 0x03, 0xf0, 0x07, 0x20, 0x02}; 73 + static struct snd_opl3_drum_note snare_note = {7, 0xf4, 0x0d}; 74 74 75 - static snd_opl3_drum_voice_t tomtom = {8, 0, 0x02, 0x03, 0xf0, 0x06, 0x10, 0x00}; 76 - static snd_opl3_drum_note_t tomtom_note = {8, 0xf4, 0x09}; 75 + static struct snd_opl3_drum_voice tomtom = {8, 0, 0x02, 0x03, 0xf0, 0x06, 0x10, 0x00}; 76 + static struct snd_opl3_drum_note tomtom_note = {8, 0xf4, 0x09}; 77 77 78 - static snd_opl3_drum_voice_t cymbal = {8, 1, 0x04, 0x03, 0xf0, 0x06, 0x10, 0x00}; 78 + static struct snd_opl3_drum_voice cymbal = {8, 1, 0x04, 0x03, 0xf0, 0x06, 0x10, 0x00}; 79 79 80 80 /* 81 81 * set drum voice characteristics 82 82 */ 83 - static void snd_opl3_drum_voice_set(opl3_t *opl3, snd_opl3_drum_voice_t *data) 83 + static void snd_opl3_drum_voice_set(struct snd_opl3 *opl3, 84 + struct snd_opl3_drum_voice *data) 84 85 { 85 86 unsigned char op_offset = snd_opl3_regmap[data->voice][data->op]; 86 87 unsigned char voice_offset = data->voice; ··· 115 114 /* 116 115 * Set drum voice pitch 117 116 */ 118 - static void snd_opl3_drum_note_set(opl3_t *opl3, snd_opl3_drum_note_t *data) 117 + static void snd_opl3_drum_note_set(struct snd_opl3 *opl3, 118 + struct snd_opl3_drum_note *data) 119 119 { 120 120 unsigned char voice_offset = data->voice; 121 121 unsigned short opl3_reg; ··· 133 131 /* 134 132 * Set drum voice volume and position 135 133 */ 136 - static void snd_opl3_drum_vol_set(opl3_t *opl3, snd_opl3_drum_voice_t *data, 137 - int vel, snd_midi_channel_t *chan) 134 + static void snd_opl3_drum_vol_set(struct snd_opl3 *opl3, 135 + struct snd_opl3_drum_voice *data, 136 + int vel, struct snd_midi_channel *chan) 138 137 { 139 138 unsigned char op_offset = snd_opl3_regmap[data->voice][data->op]; 140 139 unsigned char voice_offset = data->voice; ··· 162 159 /* 163 160 * Loads drum voices at init time 164 161 */ 165 - void snd_opl3_load_drums(opl3_t *opl3) 162 + void snd_opl3_load_drums(struct snd_opl3 *opl3) 166 163 { 167 164 snd_opl3_drum_voice_set(opl3, &bass_op0); 168 165 snd_opl3_drum_voice_set(opl3, &bass_op1); ··· 182 179 /* 183 180 * Switch drum voice on or off 184 181 */ 185 - void snd_opl3_drum_switch(opl3_t *opl3, int note, int vel, int on_off, 186 - snd_midi_channel_t *chan) 182 + void snd_opl3_drum_switch(struct snd_opl3 *opl3, int note, int vel, int on_off, 183 + struct snd_midi_channel *chan) 187 184 { 188 185 unsigned char drum_mask; 189 - snd_opl3_drum_voice_t *drum_voice; 186 + struct snd_opl3_drum_voice *drum_voice; 190 187 191 188 if (!(opl3->drum_reg & OPL3_PERCUSSION_ENABLE)) 192 189 return;
+40 -40
sound/drivers/opl3/opl3_lib.c
··· 37 37 38 38 extern char snd_opl3_regmap[MAX_OPL2_VOICES][4]; 39 39 40 - static void snd_opl2_command(opl3_t * opl3, unsigned short cmd, unsigned char val) 40 + static void snd_opl2_command(struct snd_opl3 * opl3, unsigned short cmd, unsigned char val) 41 41 { 42 42 unsigned long flags; 43 43 unsigned long port; ··· 60 60 spin_unlock_irqrestore(&opl3->reg_lock, flags); 61 61 } 62 62 63 - static void snd_opl3_command(opl3_t * opl3, unsigned short cmd, unsigned char val) 63 + static void snd_opl3_command(struct snd_opl3 * opl3, unsigned short cmd, unsigned char val) 64 64 { 65 65 unsigned long flags; 66 66 unsigned long port; ··· 85 85 spin_unlock_irqrestore(&opl3->reg_lock, flags); 86 86 } 87 87 88 - static int snd_opl3_detect(opl3_t * opl3) 88 + static int snd_opl3_detect(struct snd_opl3 * opl3) 89 89 { 90 90 /* 91 91 * This function returns 1 if the FM chip is present at the given I/O port ··· 153 153 * Timer 1 - 80us 154 154 */ 155 155 156 - static int snd_opl3_timer1_start(snd_timer_t * timer) 156 + static int snd_opl3_timer1_start(struct snd_timer * timer) 157 157 { 158 158 unsigned long flags; 159 159 unsigned char tmp; 160 160 unsigned int ticks; 161 - opl3_t *opl3; 161 + struct snd_opl3 *opl3; 162 162 163 163 opl3 = snd_timer_chip(timer); 164 164 spin_lock_irqsave(&opl3->timer_lock, flags); ··· 171 171 return 0; 172 172 } 173 173 174 - static int snd_opl3_timer1_stop(snd_timer_t * timer) 174 + static int snd_opl3_timer1_stop(struct snd_timer * timer) 175 175 { 176 176 unsigned long flags; 177 177 unsigned char tmp; 178 - opl3_t *opl3; 178 + struct snd_opl3 *opl3; 179 179 180 180 opl3 = snd_timer_chip(timer); 181 181 spin_lock_irqsave(&opl3->timer_lock, flags); ··· 190 190 * Timer 2 - 320us 191 191 */ 192 192 193 - static int snd_opl3_timer2_start(snd_timer_t * timer) 193 + static int snd_opl3_timer2_start(struct snd_timer * timer) 194 194 { 195 195 unsigned long flags; 196 196 unsigned char tmp; 197 197 unsigned int ticks; 198 - opl3_t *opl3; 198 + struct snd_opl3 *opl3; 199 199 200 200 opl3 = snd_timer_chip(timer); 201 201 spin_lock_irqsave(&opl3->timer_lock, flags); ··· 208 208 return 0; 209 209 } 210 210 211 - static int snd_opl3_timer2_stop(snd_timer_t * timer) 211 + static int snd_opl3_timer2_stop(struct snd_timer * timer) 212 212 { 213 213 unsigned long flags; 214 214 unsigned char tmp; 215 - opl3_t *opl3; 215 + struct snd_opl3 *opl3; 216 216 217 217 opl3 = snd_timer_chip(timer); 218 218 spin_lock_irqsave(&opl3->timer_lock, flags); ··· 227 227 228 228 */ 229 229 230 - static struct _snd_timer_hardware snd_opl3_timer1 = 230 + static struct snd_timer_hardware snd_opl3_timer1 = 231 231 { 232 232 .flags = SNDRV_TIMER_HW_STOP, 233 233 .resolution = 80000, ··· 236 236 .stop = snd_opl3_timer1_stop, 237 237 }; 238 238 239 - static struct _snd_timer_hardware snd_opl3_timer2 = 239 + static struct snd_timer_hardware snd_opl3_timer2 = 240 240 { 241 241 .flags = SNDRV_TIMER_HW_STOP, 242 242 .resolution = 320000, ··· 245 245 .stop = snd_opl3_timer2_stop, 246 246 }; 247 247 248 - static int snd_opl3_timer1_init(opl3_t * opl3, int timer_no) 248 + static int snd_opl3_timer1_init(struct snd_opl3 * opl3, int timer_no) 249 249 { 250 - snd_timer_t *timer = NULL; 251 - snd_timer_id_t tid; 250 + struct snd_timer *timer = NULL; 251 + struct snd_timer_id tid; 252 252 int err; 253 253 254 254 tid.dev_class = SNDRV_TIMER_CLASS_CARD; ··· 265 265 return err; 266 266 } 267 267 268 - static int snd_opl3_timer2_init(opl3_t * opl3, int timer_no) 268 + static int snd_opl3_timer2_init(struct snd_opl3 * opl3, int timer_no) 269 269 { 270 - snd_timer_t *timer = NULL; 271 - snd_timer_id_t tid; 270 + struct snd_timer *timer = NULL; 271 + struct snd_timer_id tid; 272 272 int err; 273 273 274 274 tid.dev_class = SNDRV_TIMER_CLASS_CARD; ··· 289 289 290 290 */ 291 291 292 - void snd_opl3_interrupt(snd_hwdep_t * hw) 292 + void snd_opl3_interrupt(struct snd_hwdep * hw) 293 293 { 294 294 unsigned char status; 295 - opl3_t *opl3; 296 - snd_timer_t *timer; 295 + struct snd_opl3 *opl3; 296 + struct snd_timer *timer; 297 297 298 298 if (hw == NULL) 299 299 return; ··· 320 320 321 321 */ 322 322 323 - static int snd_opl3_free(opl3_t *opl3) 323 + static int snd_opl3_free(struct snd_opl3 *opl3) 324 324 { 325 325 snd_assert(opl3 != NULL, return -ENXIO); 326 326 if (opl3->private_free) ··· 331 331 return 0; 332 332 } 333 333 334 - static int snd_opl3_dev_free(snd_device_t *device) 334 + static 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 337 return snd_opl3_free(opl3); 338 338 } 339 339 340 - int snd_opl3_new(snd_card_t *card, 340 + int snd_opl3_new(struct snd_card *card, 341 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 345 .dev_free = snd_opl3_dev_free, 346 346 }; 347 - opl3_t *opl3; 347 + struct snd_opl3 *opl3; 348 348 int err; 349 349 350 350 *ropl3 = NULL; ··· 367 367 return 0; 368 368 } 369 369 370 - int snd_opl3_init(opl3_t *opl3) 370 + int snd_opl3_init(struct snd_opl3 *opl3) 371 371 { 372 372 if (! opl3->command) { 373 373 printk(KERN_ERR "snd_opl3_init: command not defined!\n"); ··· 391 391 return 0; 392 392 } 393 393 394 - int snd_opl3_create(snd_card_t * card, 394 + int snd_opl3_create(struct snd_card *card, 395 395 unsigned long l_port, 396 396 unsigned long r_port, 397 397 unsigned short hardware, 398 398 int integrated, 399 - opl3_t ** ropl3) 399 + struct snd_opl3 ** ropl3) 400 400 { 401 - opl3_t *opl3; 401 + struct snd_opl3 *opl3; 402 402 int err; 403 403 404 404 *ropl3 = NULL; ··· 449 449 return 0; 450 450 } 451 451 452 - int snd_opl3_timer_new(opl3_t * opl3, int timer1_dev, int timer2_dev) 452 + int snd_opl3_timer_new(struct snd_opl3 * opl3, int timer1_dev, int timer2_dev) 453 453 { 454 454 int err; 455 455 ··· 466 466 return 0; 467 467 } 468 468 469 - int snd_opl3_hwdep_new(opl3_t * opl3, 469 + int snd_opl3_hwdep_new(struct snd_opl3 * opl3, 470 470 int device, int seq_device, 471 - snd_hwdep_t ** rhwdep) 471 + struct snd_hwdep ** rhwdep) 472 472 { 473 - snd_hwdep_t *hw; 474 - snd_card_t *card = opl3->card; 473 + struct snd_hwdep *hw; 474 + struct snd_card *card = opl3->card; 475 475 int err; 476 476 477 477 if (rhwdep) ··· 514 514 opl3->seq_dev_num = seq_device; 515 515 #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE)) 516 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 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 521 #endif 522 522 if (rhwdep)
+35 -35
sound/drivers/opl3/opl3_midi.c
··· 60 60 }; 61 61 62 62 void snd_opl3_calc_volume(unsigned char *volbyte, int vel, 63 - snd_midi_channel_t *chan) 63 + struct snd_midi_channel *chan) 64 64 { 65 65 int oldvol, newvol, n; 66 66 int volume; ··· 93 93 }; 94 94 95 95 static 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 98 int block = ((note / 12) & 0x07) - 1; 99 99 int idx = (note % 12) + 2; ··· 121 121 122 122 123 123 #ifdef DEBUG_ALLOC 124 - static void debug_alloc(opl3_t *opl3, char *s, int voice) { 124 + static void debug_alloc(struct snd_opl3 *opl3, char *s, int voice) { 125 125 int i; 126 126 char *str = "x.24"; 127 127 ··· 135 135 /* 136 136 * Get a FM voice (channel) to play a note on. 137 137 */ 138 - static int opl3_get_voice(opl3_t *opl3, int instr_4op, 139 - snd_midi_channel_t *chan) { 138 + static int opl3_get_voice(struct snd_opl3 *opl3, int instr_4op, 139 + struct snd_midi_channel *chan) { 140 140 int chan_4op_1; /* first voice for 4op instrument */ 141 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 144 unsigned int voice_time; 145 145 int i; 146 146 ··· 237 237 void 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 241 int again = 0; 242 242 int i; 243 243 244 244 spin_lock(&opl3->sys_timer_lock); 245 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 247 if (vp->state > 0 && vp->note_off_check) { 248 248 if (vp->note_off == jiffies) 249 249 snd_opl3_note_off(opl3, vp->note, 0, vp->chan); ··· 263 263 /* 264 264 * Start system timer 265 265 */ 266 - static void snd_opl3_start_timer(opl3_t *opl3) 266 + static void snd_opl3_start_timer(struct snd_opl3 *opl3) 267 267 { 268 268 unsigned long flags; 269 269 spin_lock_irqsave(&opl3->sys_timer_lock, flags); ··· 285 285 /* 286 286 * Start a note. 287 287 */ 288 - void snd_opl3_note_on(void *p, int note, int vel, snd_midi_channel_t *chan) 288 + void snd_opl3_note_on(void *p, int note, int vel, struct snd_midi_channel *chan) 289 289 { 290 - opl3_t *opl3; 291 - snd_seq_instr_t wanted; 292 - snd_seq_kinstr_t *kinstr; 290 + struct snd_opl3 *opl3; 291 + struct snd_seq_instr wanted; 292 + struct snd_seq_kinstr *kinstr; 293 293 int instr_4op; 294 294 295 295 int voice; 296 - snd_opl3_voice_t *vp, *vp2; 296 + struct snd_opl3_voice *vp, *vp2; 297 297 unsigned short connect_mask; 298 298 unsigned char connection; 299 299 unsigned char vol_op[4]; ··· 310 310 unsigned char fnum, blocknum; 311 311 int i; 312 312 313 - fm_instrument_t *fm; 313 + struct fm_instrument *fm; 314 314 unsigned long flags; 315 315 316 316 opl3 = p; ··· 615 615 spin_unlock_irqrestore(&opl3->voice_lock, flags); 616 616 } 617 617 618 - static void snd_opl3_kill_voice(opl3_t *opl3, int voice) 618 + static void snd_opl3_kill_voice(struct snd_opl3 *opl3, int voice) 619 619 { 620 620 unsigned short reg_side; 621 621 unsigned char voice_offset; 622 622 unsigned short opl3_reg; 623 623 624 - snd_opl3_voice_t *vp, *vp2; 624 + struct snd_opl3_voice *vp, *vp2; 625 625 626 626 snd_assert(voice < MAX_OPL3_VOICES, return); 627 627 ··· 663 663 /* 664 664 * Release a note in response to a midi note off. 665 665 */ 666 - void snd_opl3_note_off(void *p, int note, int vel, snd_midi_channel_t *chan) 666 + void 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 670 int voice; 671 - snd_opl3_voice_t *vp; 671 + struct snd_opl3_voice *vp; 672 672 673 673 unsigned long flags; 674 674 ··· 708 708 /* 709 709 * key pressure change 710 710 */ 711 - void snd_opl3_key_press(void *p, int note, int vel, snd_midi_channel_t *chan) 711 + void 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 715 opl3 = p; 716 716 #ifdef DEBUG_MIDI ··· 722 722 /* 723 723 * terminate note 724 724 */ 725 - void snd_opl3_terminate_note(void *p, int note, snd_midi_channel_t *chan) 725 + void 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 729 opl3 = p; 730 730 #ifdef DEBUG_MIDI ··· 733 733 #endif 734 734 } 735 735 736 - static void snd_opl3_update_pitch(opl3_t *opl3, int voice) 736 + static void snd_opl3_update_pitch(struct snd_opl3 *opl3, int voice) 737 737 { 738 738 unsigned short reg_side; 739 739 unsigned char voice_offset; ··· 741 741 742 742 unsigned char fnum, blocknum; 743 743 744 - snd_opl3_voice_t *vp; 744 + struct snd_opl3_voice *vp; 745 745 746 746 snd_assert(voice < MAX_OPL3_VOICES, return); 747 747 ··· 780 780 /* 781 781 * Update voice pitch controller 782 782 */ 783 - static void snd_opl3_pitch_ctrl(opl3_t *opl3, snd_midi_channel_t *chan) 783 + static void snd_opl3_pitch_ctrl(struct snd_opl3 *opl3, struct snd_midi_channel *chan) 784 784 { 785 785 int voice; 786 - snd_opl3_voice_t *vp; 786 + struct snd_opl3_voice *vp; 787 787 788 788 unsigned long flags; 789 789 ··· 810 810 * Deal with a controler type event. This includes all types of 811 811 * control events, not just the midi controllers 812 812 */ 813 - void snd_opl3_control(void *p, int type, snd_midi_channel_t *chan) 813 + void 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 817 opl3 = p; 818 818 #ifdef DEBUG_MIDI ··· 846 846 /* 847 847 * NRPN events 848 848 */ 849 - void snd_opl3_nrpn(void *p, snd_midi_channel_t *chan, 850 - snd_midi_channel_set_t *chset) 849 + void snd_opl3_nrpn(void *p, struct snd_midi_channel *chan, 850 + struct snd_midi_channel_set *chset) 851 851 { 852 - opl3_t *opl3; 852 + struct snd_opl3 *opl3; 853 853 854 854 opl3 = p; 855 855 #ifdef DEBUG_MIDI ··· 862 862 * receive sysex 863 863 */ 864 864 void 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 869 opl3 = p; 870 870 #ifdef DEBUG_MIDI
+34 -34
sound/drivers/opl3/opl3_oss.c
··· 21 21 #include "opl3_voice.h" 22 22 #include <linux/slab.h> 23 23 24 - static int snd_opl3_open_seq_oss(snd_seq_oss_arg_t *arg, void *closure); 25 - static int snd_opl3_close_seq_oss(snd_seq_oss_arg_t *arg); 26 - static int snd_opl3_ioctl_seq_oss(snd_seq_oss_arg_t *arg, unsigned int cmd, unsigned long ioarg); 27 - static int snd_opl3_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format, const char __user *buf, int offs, int count); 28 - static int snd_opl3_reset_seq_oss(snd_seq_oss_arg_t *arg); 24 + static int snd_opl3_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure); 25 + static int snd_opl3_close_seq_oss(struct snd_seq_oss_arg *arg); 26 + static int snd_opl3_ioctl_seq_oss(struct snd_seq_oss_arg *arg, unsigned int cmd, unsigned long ioarg); 27 + static int snd_opl3_load_patch_seq_oss(struct snd_seq_oss_arg *arg, int format, const char __user *buf, int offs, int count); 28 + static int snd_opl3_reset_seq_oss(struct snd_seq_oss_arg *arg); 29 29 30 30 /* */ 31 31 ··· 43 43 44 44 /* operators */ 45 45 46 - extern snd_midi_op_t opl3_ops; 46 + extern struct snd_midi_op opl3_ops; 47 47 48 - static snd_seq_oss_callback_t oss_callback = { 48 + static struct snd_seq_oss_callback oss_callback = { 49 49 .owner = THIS_MODULE, 50 50 .open = snd_opl3_open_seq_oss, 51 51 .close = snd_opl3_close_seq_oss, ··· 54 54 .reset = snd_opl3_reset_seq_oss, 55 55 }; 56 56 57 - static int snd_opl3_oss_event_input(snd_seq_event_t *ev, int direct, 57 + static int snd_opl3_oss_event_input(struct snd_seq_event *ev, int direct, 58 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 62 if (ev->type != SNDRV_SEQ_EVENT_OSS) 63 63 snd_midi_process_event(&opl3_ops, ev, opl3->oss_chset); ··· 68 68 69 69 static 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 73 snd_midi_channel_free_set(opl3->oss_chset); 74 74 } 75 75 76 - static int snd_opl3_oss_create_port(opl3_t * opl3) 76 + static 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 79 char name[32]; 80 80 int voices, opl_ver; 81 81 ··· 113 113 /* ------------------------------ */ 114 114 115 115 /* register OSS synth */ 116 - void snd_opl3_init_seq_oss(opl3_t *opl3, char *name) 116 + void snd_opl3_init_seq_oss(struct snd_opl3 *opl3, char *name) 117 117 { 118 - snd_seq_oss_reg_t *arg; 119 - snd_seq_device_t *dev; 118 + struct snd_seq_oss_reg *arg; 119 + struct snd_seq_device *dev; 120 120 121 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 123 return; 124 124 125 125 opl3->oss_seq_dev = dev; ··· 143 143 } 144 144 145 145 /* unregister */ 146 - void snd_opl3_free_seq_oss(opl3_t *opl3) 146 + void snd_opl3_free_seq_oss(struct snd_opl3 *opl3) 147 147 { 148 148 if (opl3->oss_seq_dev) { 149 149 snd_device_free(opl3->card, opl3->oss_seq_dev); ··· 154 154 /* ------------------------------ */ 155 155 156 156 /* open OSS sequencer */ 157 - static int snd_opl3_open_seq_oss(snd_seq_oss_arg_t *arg, void *closure) 157 + static 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 160 int err; 161 161 162 162 snd_assert(arg != NULL, return -ENXIO); ··· 177 177 } 178 178 179 179 /* close OSS sequencer */ 180 - static int snd_opl3_close_seq_oss(snd_seq_oss_arg_t *arg) 180 + static 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 184 snd_assert(arg != NULL, return -ENXIO); 185 185 opl3 = arg->private_data; ··· 206 206 /* from sound_config.h */ 207 207 #define SBFM_MAXINSTR 256 208 208 209 - static int snd_opl3_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format, 209 + static int snd_opl3_load_patch_seq_oss(struct snd_seq_oss_arg *arg, int format, 210 210 const char __user *buf, int offs, int count) 211 211 { 212 - opl3_t *opl3; 212 + struct snd_opl3 *opl3; 213 213 int err = -EINVAL; 214 214 215 215 snd_assert(arg != NULL, return -ENXIO); ··· 219 219 struct sbi_instrument sbi; 220 220 221 221 size_t size; 222 - snd_seq_instr_header_t *put; 223 - snd_seq_instr_data_t *data; 224 - fm_xinstrument_t *xinstr; 222 + struct snd_seq_instr_header *put; 223 + struct snd_seq_instr_data *data; 224 + struct fm_xinstrument *xinstr; 225 225 226 - snd_seq_event_t ev; 226 + struct snd_seq_event ev; 227 227 int i; 228 228 229 229 mm_segment_t fs; ··· 240 240 return -EINVAL; 241 241 } 242 242 243 - size = sizeof(*put) + sizeof(fm_xinstrument_t); 243 + size = sizeof(*put) + sizeof(struct fm_xinstrument); 244 244 put = kzalloc(size, GFP_KERNEL); 245 245 if (put == NULL) 246 246 return -ENOMEM; ··· 249 249 data->type = SNDRV_SEQ_INSTR_ATYPE_DATA; 250 250 strcpy(data->data.format, SNDRV_SEQ_INSTR_ID_OPL2_3); 251 251 /* build data section */ 252 - xinstr = (fm_xinstrument_t *)(data + 1); 252 + xinstr = (struct fm_xinstrument *)(data + 1); 253 253 xinstr->stype = FM_STRU_INSTR; 254 254 255 255 for (i = 0; i < 2; i++) { ··· 296 296 err = snd_seq_instr_event(&opl3->fm_ops, opl3->ilist, &ev, 297 297 opl3->seq_client, 0, 0); 298 298 if (err == -EBUSY) { 299 - snd_seq_instr_header_t remove; 299 + struct snd_seq_instr_header remove; 300 300 301 301 memset (&remove, 0, sizeof(remove)); 302 302 remove.cmd = SNDRV_SEQ_INSTR_FREE_CMD_SINGLE; ··· 319 319 } 320 320 321 321 /* ioctl */ 322 - static int snd_opl3_ioctl_seq_oss(snd_seq_oss_arg_t *arg, unsigned int cmd, 322 + static int snd_opl3_ioctl_seq_oss(struct snd_seq_oss_arg *arg, unsigned int cmd, 323 323 unsigned long ioarg) 324 324 { 325 - opl3_t *opl3; 325 + struct snd_opl3 *opl3; 326 326 327 327 snd_assert(arg != NULL, return -ENXIO); 328 328 opl3 = arg->private_data; ··· 345 345 } 346 346 347 347 /* reset device */ 348 - static int snd_opl3_reset_seq_oss(snd_seq_oss_arg_t *arg) 348 + static 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 352 snd_assert(arg != NULL, return -ENXIO); 353 353 opl3 = arg->private_data;
+24 -24
sound/drivers/opl3/opl3_seq.c
··· 35 35 module_param(use_internal_drums, bool, 0444); 36 36 MODULE_PARM_DESC(use_internal_drums, "Enable internal OPL2/3 drums."); 37 37 38 - int snd_opl3_synth_use_inc(opl3_t * opl3) 38 + int snd_opl3_synth_use_inc(struct snd_opl3 * opl3) 39 39 { 40 40 if (!try_module_get(opl3->card->module)) 41 41 return -EFAULT; ··· 43 43 44 44 } 45 45 46 - void snd_opl3_synth_use_dec(opl3_t * opl3) 46 + void snd_opl3_synth_use_dec(struct snd_opl3 * opl3) 47 47 { 48 48 module_put(opl3->card->module); 49 49 } 50 50 51 - int snd_opl3_synth_setup(opl3_t * opl3) 51 + int snd_opl3_synth_setup(struct snd_opl3 * opl3) 52 52 { 53 53 int idx; 54 54 ··· 78 78 return 0; 79 79 } 80 80 81 - void snd_opl3_synth_cleanup(opl3_t * opl3) 81 + void snd_opl3_synth_cleanup(struct snd_opl3 * opl3) 82 82 { 83 83 unsigned long flags; 84 84 ··· 96 96 up(&opl3->access_mutex); 97 97 } 98 98 99 - static int snd_opl3_synth_use(void *private_data, snd_seq_port_subscribe_t * info) 99 + static 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 102 int err; 103 103 104 104 if ((err = snd_opl3_synth_setup(opl3)) < 0) ··· 123 123 return 0; 124 124 } 125 125 126 - static int snd_opl3_synth_unuse(void *private_data, snd_seq_port_subscribe_t * info) 126 + static 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 130 snd_opl3_synth_cleanup(opl3); 131 131 ··· 137 137 /* 138 138 * MIDI emulation operators 139 139 */ 140 - snd_midi_op_t opl3_ops = { 140 + struct snd_midi_op opl3_ops = { 141 141 .note_on = snd_opl3_note_on, 142 142 .note_off = snd_opl3_note_off, 143 143 .key_press = snd_opl3_key_press, ··· 147 147 .sysex = snd_opl3_sysex, 148 148 }; 149 149 150 - static int snd_opl3_synth_event_input(snd_seq_event_t * ev, int direct, 150 + static int snd_opl3_synth_event_input(struct snd_seq_event * ev, int direct, 151 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 155 if (ev->type >= SNDRV_SEQ_EVENT_INSTR_BEGIN && 156 156 ev->type <= SNDRV_SEQ_EVENT_INSTR_CHANGE) { ··· 168 168 169 169 static 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 173 snd_midi_channel_free_set(opl3->chset); 174 174 } 175 175 176 - static int snd_opl3_synth_create_port(opl3_t * opl3) 176 + static 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 179 char name[32]; 180 180 int voices, opl_ver; 181 181 ··· 215 215 216 216 /* ------------------------------ */ 217 217 218 - static int snd_opl3_seq_new_device(snd_seq_device_t *dev) 218 + static int snd_opl3_seq_new_device(struct snd_seq_device *dev) 219 219 { 220 - opl3_t *opl3; 220 + struct snd_opl3 *opl3; 221 221 int client; 222 - snd_seq_client_callback_t callbacks; 223 - snd_seq_client_info_t cinfo; 222 + struct snd_seq_client_callback callbacks; 223 + struct snd_seq_client_info cinfo; 224 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 227 if (opl3 == NULL) 228 228 return -EINVAL; 229 229 ··· 273 273 return 0; 274 274 } 275 275 276 - static int snd_opl3_seq_delete_device(snd_seq_device_t *dev) 276 + static 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 281 if (opl3 == NULL) 282 282 return -EINVAL; 283 283 ··· 295 295 296 296 static 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 300 snd_opl3_seq_new_device, 301 301 snd_opl3_seq_delete_device 302 302 }; 303 303 304 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 308 308 static void __exit alsa_opl3_seq_exit(void)
+25 -25
sound/drivers/opl3/opl3_synth.c
··· 61 61 /* 62 62 * prototypes 63 63 */ 64 - static int snd_opl3_play_note(opl3_t * opl3, snd_dm_fm_note_t * note); 65 - static int snd_opl3_set_voice(opl3_t * opl3, snd_dm_fm_voice_t * voice); 66 - static int snd_opl3_set_params(opl3_t * opl3, snd_dm_fm_params_t * params); 67 - static int snd_opl3_set_mode(opl3_t * opl3, int mode); 68 - static int snd_opl3_set_connection(opl3_t * opl3, int connection); 64 + static int snd_opl3_play_note(struct snd_opl3 * opl3, struct snd_dm_fm_note * note); 65 + static int snd_opl3_set_voice(struct snd_opl3 * opl3, struct snd_dm_fm_voice * voice); 66 + static int snd_opl3_set_params(struct snd_opl3 * opl3, struct snd_dm_fm_params * params); 67 + static int snd_opl3_set_mode(struct snd_opl3 * opl3, int mode); 68 + static int snd_opl3_set_connection(struct snd_opl3 * opl3, int connection); 69 69 70 70 /* ------------------------------ */ 71 71 72 72 /* 73 73 * open the device exclusively 74 74 */ 75 - int snd_opl3_open(snd_hwdep_t * hw, struct file *file) 75 + int 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 79 down(&opl3->access_mutex); 80 80 if (opl3->used) { ··· 90 90 /* 91 91 * ioctl for hwdep device: 92 92 */ 93 - int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file, 93 + int snd_opl3_ioctl(struct snd_hwdep * hw, struct file *file, 94 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 97 void __user *argp = (void __user *)arg; 98 98 99 99 snd_assert(opl3 != NULL, return -EINVAL); ··· 102 102 /* get information */ 103 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 107 info.fm_mode = opl3->fm_mode; 108 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 110 return -EFAULT; 111 111 return 0; 112 112 } ··· 123 123 case SNDRV_DM_FM_OSS_IOCTL_PLAY_NOTE: 124 124 #endif 125 125 { 126 - snd_dm_fm_note_t note; 127 - if (copy_from_user(&note, argp, sizeof(snd_dm_fm_note_t))) 126 + struct snd_dm_fm_note note; 127 + if (copy_from_user(&note, argp, sizeof(struct snd_dm_fm_note))) 128 128 return -EFAULT; 129 129 return snd_opl3_play_note(opl3, &note); 130 130 } ··· 134 134 case SNDRV_DM_FM_OSS_IOCTL_SET_VOICE: 135 135 #endif 136 136 { 137 - snd_dm_fm_voice_t voice; 138 - if (copy_from_user(&voice, argp, sizeof(snd_dm_fm_voice_t))) 137 + struct snd_dm_fm_voice voice; 138 + if (copy_from_user(&voice, argp, sizeof(struct snd_dm_fm_voice))) 139 139 return -EFAULT; 140 140 return snd_opl3_set_voice(opl3, &voice); 141 141 } ··· 145 145 case SNDRV_DM_FM_OSS_IOCTL_SET_PARAMS: 146 146 #endif 147 147 { 148 - snd_dm_fm_params_t params; 149 - if (copy_from_user(&params, argp, sizeof(snd_dm_fm_params_t))) 148 + struct snd_dm_fm_params params; 149 + if (copy_from_user(&params, argp, sizeof(struct snd_dm_fm_params))) 150 150 return -EFAULT; 151 151 return snd_opl3_set_params(opl3, &params); 152 152 } ··· 174 174 /* 175 175 * close the device 176 176 */ 177 - int snd_opl3_release(snd_hwdep_t * hw, struct file *file) 177 + int 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 181 snd_opl3_reset(opl3); 182 182 down(&opl3->access_mutex); ··· 188 188 189 189 /* ------------------------------ */ 190 190 191 - void snd_opl3_reset(opl3_t * opl3) 191 + void snd_opl3_reset(struct snd_opl3 * opl3) 192 192 { 193 193 unsigned short opl3_reg; 194 194 ··· 229 229 } 230 230 231 231 232 - static int snd_opl3_play_note(opl3_t * opl3, snd_dm_fm_note_t * note) 232 + static int snd_opl3_play_note(struct snd_opl3 * opl3, struct snd_dm_fm_note * note) 233 233 { 234 234 unsigned short reg_side; 235 235 unsigned char voice_offset; ··· 276 276 } 277 277 278 278 279 - static int snd_opl3_set_voice(opl3_t * opl3, snd_dm_fm_voice_t * voice) 279 + static int snd_opl3_set_voice(struct snd_opl3 * opl3, struct snd_dm_fm_voice * voice) 280 280 { 281 281 unsigned short reg_side; 282 282 unsigned char op_offset; ··· 378 378 return 0; 379 379 } 380 380 381 - static int snd_opl3_set_params(opl3_t * opl3, snd_dm_fm_params_t * params) 381 + static int snd_opl3_set_params(struct snd_opl3 * opl3, struct snd_dm_fm_params * params) 382 382 { 383 383 unsigned char reg_val; 384 384 ··· 418 418 return 0; 419 419 } 420 420 421 - static int snd_opl3_set_mode(opl3_t * opl3, int mode) 421 + static int snd_opl3_set_mode(struct snd_opl3 * opl3, int mode) 422 422 { 423 423 if ((mode == SNDRV_DM_FM_MODE_OPL3) && (opl3->hardware < OPL3_HW_OPL3)) 424 424 return -EINVAL; ··· 430 430 return 0; 431 431 } 432 432 433 - static int snd_opl3_set_connection(opl3_t * opl3, int connection) 433 + static int snd_opl3_set_connection(struct snd_opl3 * opl3, int connection) 434 434 { 435 435 unsigned char reg_val; 436 436
+12 -12
sound/drivers/opl3/opl3_voice.h
··· 22 22 #include <sound/opl3.h> 23 23 24 24 /* Prototypes for opl3_seq.c */ 25 - int snd_opl3_synth_use_inc(opl3_t * opl3); 26 - void snd_opl3_synth_use_dec(opl3_t * opl3); 27 - int snd_opl3_synth_setup(opl3_t * opl3); 28 - void snd_opl3_synth_cleanup(opl3_t * opl3); 25 + int snd_opl3_synth_use_inc(struct snd_opl3 * opl3); 26 + void snd_opl3_synth_use_dec(struct snd_opl3 * opl3); 27 + int snd_opl3_synth_setup(struct snd_opl3 * opl3); 28 + void snd_opl3_synth_cleanup(struct snd_opl3 * opl3); 29 29 30 30 /* Prototypes for opl3_midi.c */ 31 31 void snd_opl3_note_on(void *p, int note, int vel, struct snd_midi_channel *chan); 32 32 void snd_opl3_note_off(void *p, int note, int vel, struct snd_midi_channel *chan); 33 33 void snd_opl3_key_press(void *p, int note, int vel, struct snd_midi_channel *chan); 34 - void snd_opl3_terminate_note(void *p, int note, snd_midi_channel_t *chan); 34 + void snd_opl3_terminate_note(void *p, int note, struct snd_midi_channel *chan); 35 35 void snd_opl3_control(void *p, int type, struct snd_midi_channel *chan); 36 - void snd_opl3_nrpn(void *p, snd_midi_channel_t *chan, snd_midi_channel_set_t *chset); 37 - void snd_opl3_sysex(void *p, unsigned char *buf, int len, int parsed, snd_midi_channel_set_t *chset); 36 + void snd_opl3_nrpn(void *p, struct snd_midi_channel *chan, struct snd_midi_channel_set *chset); 37 + void snd_opl3_sysex(void *p, unsigned char *buf, int len, int parsed, struct snd_midi_channel_set *chset); 38 38 39 - void snd_opl3_calc_volume(unsigned char *reg, int vel, snd_midi_channel_t *chan); 39 + void snd_opl3_calc_volume(unsigned char *reg, int vel, struct snd_midi_channel *chan); 40 40 void snd_opl3_timer_func(unsigned long data); 41 41 42 42 /* Prototypes for opl3_drums.c */ 43 - void snd_opl3_load_drums(opl3_t *opl3); 44 - void snd_opl3_drum_switch(opl3_t *opl3, int note, int on_off, int vel, snd_midi_channel_t *chan); 43 + void snd_opl3_load_drums(struct snd_opl3 *opl3); 44 + void snd_opl3_drum_switch(struct snd_opl3 *opl3, int note, int on_off, int vel, struct snd_midi_channel *chan); 45 45 46 46 /* Prototypes for opl3_oss.c */ 47 47 #ifdef CONFIG_SND_SEQUENCER_OSS 48 - void snd_opl3_init_seq_oss(opl3_t *opl3, char *name); 49 - void snd_opl3_free_seq_oss(opl3_t *opl3); 48 + void snd_opl3_init_seq_oss(struct snd_opl3 *opl3, char *name); 49 + void snd_opl3_free_seq_oss(struct snd_opl3 *opl3); 50 50 #endif 51 51 52 52 #endif