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

[ALSA] Remove xxx_t typedefs: Sequencer OSS-emulation

Modules: ALSA<-OSS sequencer,ALSA sequencer

Remove xxx_t typedefs from the core sequencer OSS-emulation codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Takashi Iwai and committed by
Jaroslav Kysela
080dece3 19ac31e8

+352 -365
+12 -18
include/sound/seq_oss.h
··· 25 25 #include "seq_kernel.h" 26 26 27 27 /* 28 - * type definitions 29 - */ 30 - typedef struct snd_seq_oss_arg_t snd_seq_oss_arg_t; 31 - typedef struct snd_seq_oss_callback_t snd_seq_oss_callback_t; 32 - 33 - /* 34 28 * argument structure for synthesizer operations 35 29 */ 36 - struct snd_seq_oss_arg_t { 30 + struct snd_seq_oss_arg { 37 31 /* given by OSS sequencer */ 38 32 int app_index; /* application unique index */ 39 33 int file_mode; /* file mode - see below */ 40 34 int seq_mode; /* sequencer mode - see below */ 41 35 42 36 /* following must be initialized in open callback */ 43 - snd_seq_addr_t addr; /* opened port address */ 37 + struct snd_seq_addr addr; /* opened port address */ 44 38 void *private_data; /* private data for lowlevel drivers */ 45 39 46 40 /* note-on event passing mode: initially given by OSS seq, ··· 47 53 /* 48 54 * synthesizer operation callbacks 49 55 */ 50 - struct snd_seq_oss_callback_t { 56 + struct snd_seq_oss_callback { 51 57 struct module *owner; 52 - int (*open)(snd_seq_oss_arg_t *p, void *closure); 53 - int (*close)(snd_seq_oss_arg_t *p); 54 - int (*ioctl)(snd_seq_oss_arg_t *p, unsigned int cmd, unsigned long arg); 55 - int (*load_patch)(snd_seq_oss_arg_t *p, int format, const char __user *buf, int offs, int count); 56 - int (*reset)(snd_seq_oss_arg_t *p); 57 - int (*raw_event)(snd_seq_oss_arg_t *p, unsigned char *data); 58 + int (*open)(struct snd_seq_oss_arg *p, void *closure); 59 + int (*close)(struct snd_seq_oss_arg *p); 60 + int (*ioctl)(struct snd_seq_oss_arg *p, unsigned int cmd, unsigned long arg); 61 + int (*load_patch)(struct snd_seq_oss_arg *p, int format, const char __user *buf, int offs, int count); 62 + int (*reset)(struct snd_seq_oss_arg *p); 63 + int (*raw_event)(struct snd_seq_oss_arg *p, unsigned char *data); 58 64 }; 59 65 60 66 /* flag: file_mode */ ··· 82 88 /* 83 89 * data pointer to snd_seq_register_device 84 90 */ 85 - typedef struct snd_seq_oss_reg { 91 + struct snd_seq_oss_reg { 86 92 int type; 87 93 int subtype; 88 94 int nvoices; 89 - snd_seq_oss_callback_t oper; 95 + struct snd_seq_oss_callback oper; 90 96 void *private_data; 91 - } snd_seq_oss_reg_t; 97 + }; 92 98 93 99 /* device id */ 94 100 #define SNDRV_SEQ_DEV_ID_OSS "seq-oss"
+12 -12
sound/core/seq/oss/seq_oss.c
··· 62 62 static long odev_ioctl(struct file *file, unsigned int cmd, unsigned long arg); 63 63 static unsigned int odev_poll(struct file *file, poll_table * wait); 64 64 #ifdef CONFIG_PROC_FS 65 - static void info_read(snd_info_entry_t *entry, snd_info_buffer_t *buf); 65 + static void info_read(struct snd_info_entry *entry, struct snd_info_buffer *buf); 66 66 #endif 67 67 68 68 ··· 73 73 static int __init alsa_seq_oss_init(void) 74 74 { 75 75 int rc; 76 - static snd_seq_dev_ops_t ops = { 76 + static struct snd_seq_dev_ops ops = { 77 77 snd_seq_oss_synth_register, 78 78 snd_seq_oss_synth_unregister, 79 79 }; ··· 92 92 } 93 93 94 94 if ((rc = snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_OSS, &ops, 95 - sizeof(snd_seq_oss_reg_t))) < 0) { 95 + sizeof(struct snd_seq_oss_reg))) < 0) { 96 96 snd_seq_oss_delete_client(); 97 97 unregister_proc(); 98 98 unregister_device(); ··· 144 144 static int 145 145 odev_release(struct inode *inode, struct file *file) 146 146 { 147 - seq_oss_devinfo_t *dp; 147 + struct seq_oss_devinfo *dp; 148 148 149 149 if ((dp = file->private_data) == NULL) 150 150 return 0; ··· 161 161 static ssize_t 162 162 odev_read(struct file *file, char __user *buf, size_t count, loff_t *offset) 163 163 { 164 - seq_oss_devinfo_t *dp; 164 + struct seq_oss_devinfo *dp; 165 165 dp = file->private_data; 166 166 snd_assert(dp != NULL, return -EIO); 167 167 return snd_seq_oss_read(dp, buf, count); ··· 171 171 static ssize_t 172 172 odev_write(struct file *file, const char __user *buf, size_t count, loff_t *offset) 173 173 { 174 - seq_oss_devinfo_t *dp; 174 + struct seq_oss_devinfo *dp; 175 175 dp = file->private_data; 176 176 snd_assert(dp != NULL, return -EIO); 177 177 return snd_seq_oss_write(dp, buf, count, file); ··· 180 180 static long 181 181 odev_ioctl(struct file *file, unsigned int cmd, unsigned long arg) 182 182 { 183 - seq_oss_devinfo_t *dp; 183 + struct seq_oss_devinfo *dp; 184 184 dp = file->private_data; 185 185 snd_assert(dp != NULL, return -EIO); 186 186 return snd_seq_oss_ioctl(dp, cmd, arg); ··· 195 195 static unsigned int 196 196 odev_poll(struct file *file, poll_table * wait) 197 197 { 198 - seq_oss_devinfo_t *dp; 198 + struct seq_oss_devinfo *dp; 199 199 dp = file->private_data; 200 200 snd_assert(dp != NULL, return 0); 201 201 return snd_seq_oss_poll(dp, file, wait); ··· 217 217 .compat_ioctl = odev_ioctl_compat, 218 218 }; 219 219 220 - static snd_minor_t seq_oss_reg = { 220 + static struct snd_minor seq_oss_reg = { 221 221 .comment = "sequencer", 222 222 .f_ops = &seq_oss_f_ops, 223 223 }; ··· 268 268 269 269 #ifdef CONFIG_PROC_FS 270 270 271 - static snd_info_entry_t *info_entry; 271 + static struct snd_info_entry *info_entry; 272 272 273 273 static void 274 - info_read(snd_info_entry_t *entry, snd_info_buffer_t *buf) 274 + info_read(struct snd_info_entry *entry, struct snd_info_buffer *buf) 275 275 { 276 276 down(&register_mutex); 277 277 snd_iprintf(buf, "OSS sequencer emulation version %s\n", SNDRV_SEQ_OSS_VERSION_STR); ··· 287 287 register_proc(void) 288 288 { 289 289 #ifdef CONFIG_PROC_FS 290 - snd_info_entry_t *entry; 290 + struct snd_info_entry *entry; 291 291 292 292 entry = snd_info_create_module_entry(THIS_MODULE, SNDRV_SEQ_OSS_PROCNAME, snd_seq_root); 293 293 if (entry == NULL)
+26 -34
sound/core/seq/oss/seq_oss_device.h
··· 55 55 * type definitions 56 56 */ 57 57 58 - typedef struct seq_oss_devinfo_t seq_oss_devinfo_t; 59 - typedef struct seq_oss_writeq_t seq_oss_writeq_t; 60 - typedef struct seq_oss_readq_t seq_oss_readq_t; 61 - typedef struct seq_oss_timer_t seq_oss_timer_t; 62 - typedef struct seq_oss_synthinfo_t seq_oss_synthinfo_t; 63 - typedef struct seq_oss_synth_sysex_t seq_oss_synth_sysex_t; 64 - typedef struct seq_oss_chinfo_t seq_oss_chinfo_t; 65 58 typedef unsigned int reltime_t; 66 59 typedef unsigned int abstime_t; 67 - typedef union evrec_t evrec_t; 68 60 69 61 70 62 /* 71 63 * synthesizer channel information 72 64 */ 73 - struct seq_oss_chinfo_t { 65 + struct seq_oss_chinfo { 74 66 int note, vel; 75 67 }; 76 68 77 69 /* 78 70 * synthesizer information 79 71 */ 80 - struct seq_oss_synthinfo_t { 81 - snd_seq_oss_arg_t arg; 82 - seq_oss_chinfo_t *ch; 83 - seq_oss_synth_sysex_t *sysex; 72 + struct seq_oss_synthinfo { 73 + struct snd_seq_oss_arg arg; 74 + struct seq_oss_chinfo *ch; 75 + struct seq_oss_synth_sysex *sysex; 84 76 int nr_voices; 85 77 int opened; 86 78 int is_midi; ··· 84 92 * sequencer client information 85 93 */ 86 94 87 - struct seq_oss_devinfo_t { 95 + struct seq_oss_devinfo { 88 96 89 97 int index; /* application index */ 90 98 int cseq; /* sequencer client number */ 91 99 int port; /* sequencer port number */ 92 100 int queue; /* sequencer queue number */ 93 101 94 - snd_seq_addr_t addr; /* address of this device */ 102 + struct snd_seq_addr addr; /* address of this device */ 95 103 96 104 int seq_mode; /* sequencer mode */ 97 105 int file_mode; /* file access */ ··· 101 109 102 110 /* synth device table */ 103 111 int max_synthdev; 104 - seq_oss_synthinfo_t synths[SNDRV_SEQ_OSS_MAX_SYNTH_DEVS]; 112 + struct seq_oss_synthinfo synths[SNDRV_SEQ_OSS_MAX_SYNTH_DEVS]; 105 113 int synth_opened; 106 114 107 115 /* output queue */ 108 - seq_oss_writeq_t *writeq; 116 + struct seq_oss_writeq *writeq; 109 117 110 118 /* midi input queue */ 111 - seq_oss_readq_t *readq; 119 + struct seq_oss_readq *readq; 112 120 113 121 /* timer */ 114 - seq_oss_timer_t *timer; 122 + struct seq_oss_timer *timer; 115 123 }; 116 124 117 125 ··· 125 133 126 134 /* device file interface */ 127 135 int snd_seq_oss_open(struct file *file, int level); 128 - void snd_seq_oss_release(seq_oss_devinfo_t *dp); 129 - int snd_seq_oss_ioctl(seq_oss_devinfo_t *dp, unsigned int cmd, unsigned long arg); 130 - int snd_seq_oss_read(seq_oss_devinfo_t *dev, char __user *buf, int count); 131 - int snd_seq_oss_write(seq_oss_devinfo_t *dp, const char __user *buf, int count, struct file *opt); 132 - unsigned int snd_seq_oss_poll(seq_oss_devinfo_t *dp, struct file *file, poll_table * wait); 136 + void snd_seq_oss_release(struct seq_oss_devinfo *dp); 137 + int snd_seq_oss_ioctl(struct seq_oss_devinfo *dp, unsigned int cmd, unsigned long arg); 138 + int snd_seq_oss_read(struct seq_oss_devinfo *dev, char __user *buf, int count); 139 + int snd_seq_oss_write(struct seq_oss_devinfo *dp, const char __user *buf, int count, struct file *opt); 140 + unsigned int snd_seq_oss_poll(struct seq_oss_devinfo *dp, struct file *file, poll_table * wait); 133 141 134 - void snd_seq_oss_reset(seq_oss_devinfo_t *dp); 135 - void snd_seq_oss_drain_write(seq_oss_devinfo_t *dp); 142 + void snd_seq_oss_reset(struct seq_oss_devinfo *dp); 143 + void snd_seq_oss_drain_write(struct seq_oss_devinfo *dp); 136 144 137 145 /* */ 138 - void snd_seq_oss_process_queue(seq_oss_devinfo_t *dp, abstime_t time); 146 + void snd_seq_oss_process_queue(struct seq_oss_devinfo *dp, abstime_t time); 139 147 140 148 141 149 /* proc interface */ 142 - void snd_seq_oss_system_info_read(snd_info_buffer_t *buf); 143 - void snd_seq_oss_midi_info_read(snd_info_buffer_t *buf); 144 - void snd_seq_oss_synth_info_read(snd_info_buffer_t *buf); 145 - void snd_seq_oss_readq_info_read(seq_oss_readq_t *q, snd_info_buffer_t *buf); 150 + void snd_seq_oss_system_info_read(struct snd_info_buffer *buf); 151 + void snd_seq_oss_midi_info_read(struct snd_info_buffer *buf); 152 + void snd_seq_oss_synth_info_read(struct snd_info_buffer *buf); 153 + void snd_seq_oss_readq_info_read(struct seq_oss_readq *q, struct snd_info_buffer *buf); 146 154 147 155 /* file mode macros */ 148 156 #define is_read_mode(mode) ((mode) & SNDRV_SEQ_OSS_FILE_READ) ··· 151 159 152 160 /* dispatch event */ 153 161 static inline int 154 - snd_seq_oss_dispatch(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, int atomic, int hop) 162 + snd_seq_oss_dispatch(struct seq_oss_devinfo *dp, struct snd_seq_event *ev, int atomic, int hop) 155 163 { 156 164 return snd_seq_kernel_client_dispatch(dp->cseq, ev, atomic, hop); 157 165 } 158 166 159 167 /* ioctl */ 160 168 static inline int 161 - snd_seq_oss_control(seq_oss_devinfo_t *dp, unsigned int type, void *arg) 169 + snd_seq_oss_control(struct seq_oss_devinfo *dp, unsigned int type, void *arg) 162 170 { 163 171 return snd_seq_kernel_client_ctl(dp->cseq, type, arg); 164 172 } 165 173 166 174 /* fill the addresses in header */ 167 175 static inline void 168 - snd_seq_oss_fill_addr(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, 176 + snd_seq_oss_fill_addr(struct seq_oss_devinfo *dp, struct snd_seq_event *ev, 169 177 int dest_client, int dest_port) 170 178 { 171 179 ev->queue = dp->queue;
+30 -30
sound/core/seq/oss/seq_oss_event.c
··· 31 31 /* 32 32 * prototypes 33 33 */ 34 - static int extended_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev); 35 - static int chn_voice_event(seq_oss_devinfo_t *dp, evrec_t *event_rec, snd_seq_event_t *ev); 36 - static int chn_common_event(seq_oss_devinfo_t *dp, evrec_t *event_rec, snd_seq_event_t *ev); 37 - static int timing_event(seq_oss_devinfo_t *dp, evrec_t *event_rec, snd_seq_event_t *ev); 38 - static int local_event(seq_oss_devinfo_t *dp, evrec_t *event_rec, snd_seq_event_t *ev); 39 - static int old_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev); 40 - static int note_on_event(seq_oss_devinfo_t *dp, int dev, int ch, int note, int vel, snd_seq_event_t *ev); 41 - static int note_off_event(seq_oss_devinfo_t *dp, int dev, int ch, int note, int vel, snd_seq_event_t *ev); 42 - static int set_note_event(seq_oss_devinfo_t *dp, int dev, int type, int ch, int note, int vel, snd_seq_event_t *ev); 43 - static int set_control_event(seq_oss_devinfo_t *dp, int dev, int type, int ch, int param, int val, snd_seq_event_t *ev); 44 - static int set_echo_event(seq_oss_devinfo_t *dp, evrec_t *rec, snd_seq_event_t *ev); 34 + static int extended_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev); 35 + static int chn_voice_event(struct seq_oss_devinfo *dp, union evrec *event_rec, struct snd_seq_event *ev); 36 + static int chn_common_event(struct seq_oss_devinfo *dp, union evrec *event_rec, struct snd_seq_event *ev); 37 + static int timing_event(struct seq_oss_devinfo *dp, union evrec *event_rec, struct snd_seq_event *ev); 38 + static int local_event(struct seq_oss_devinfo *dp, union evrec *event_rec, struct snd_seq_event *ev); 39 + static int old_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev); 40 + static int note_on_event(struct seq_oss_devinfo *dp, int dev, int ch, int note, int vel, struct snd_seq_event *ev); 41 + static int note_off_event(struct seq_oss_devinfo *dp, int dev, int ch, int note, int vel, struct snd_seq_event *ev); 42 + static int set_note_event(struct seq_oss_devinfo *dp, int dev, int type, int ch, int note, int vel, struct snd_seq_event *ev); 43 + static int set_control_event(struct seq_oss_devinfo *dp, int dev, int type, int ch, int param, int val, struct snd_seq_event *ev); 44 + static int set_echo_event(struct seq_oss_devinfo *dp, union evrec *rec, struct snd_seq_event *ev); 45 45 46 46 47 47 /* ··· 51 51 */ 52 52 53 53 int 54 - snd_seq_oss_process_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev) 54 + snd_seq_oss_process_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev) 55 55 { 56 56 switch (q->s.code) { 57 57 case SEQ_EXTENDED: ··· 104 104 105 105 /* old type events: mode1 only */ 106 106 static int 107 - old_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev) 107 + old_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev) 108 108 { 109 109 switch (q->s.code) { 110 110 case SEQ_NOTEOFF: ··· 130 130 131 131 /* 8bytes extended event: mode1 only */ 132 132 static int 133 - extended_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev) 133 + extended_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev) 134 134 { 135 135 int val; 136 136 ··· 184 184 185 185 /* channel voice events: mode1 and 2 */ 186 186 static int 187 - chn_voice_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev) 187 + chn_voice_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev) 188 188 { 189 189 if (q->v.chn >= 32) 190 190 return -EINVAL; ··· 205 205 206 206 /* channel common events: mode1 and 2 */ 207 207 static int 208 - chn_common_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev) 208 + chn_common_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev) 209 209 { 210 210 if (q->l.chn >= 32) 211 211 return -EINVAL; ··· 232 232 233 233 /* timer events: mode1 and mode2 */ 234 234 static int 235 - timing_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev) 235 + timing_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev) 236 236 { 237 237 switch (q->t.cmd) { 238 238 case TMR_ECHO: 239 239 if (dp->seq_mode == SNDRV_SEQ_OSS_MODE_MUSIC) 240 240 return set_echo_event(dp, q, ev); 241 241 else { 242 - evrec_t tmp; 242 + union evrec tmp; 243 243 memset(&tmp, 0, sizeof(tmp)); 244 244 /* XXX: only for little-endian! */ 245 245 tmp.echo = (q->t.time << 8) | SEQ_ECHO; ··· 267 267 268 268 /* local events: mode1 and 2 */ 269 269 static int 270 - local_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev) 270 + local_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev) 271 271 { 272 272 return -EINVAL; 273 273 } ··· 283 283 * Use key-pressure if note >= 128 284 284 */ 285 285 static int 286 - note_on_event(seq_oss_devinfo_t *dp, int dev, int ch, int note, int vel, snd_seq_event_t *ev) 286 + note_on_event(struct seq_oss_devinfo *dp, int dev, int ch, int note, int vel, struct snd_seq_event *ev) 287 287 { 288 - seq_oss_synthinfo_t *info = &dp->synths[dev]; 288 + struct seq_oss_synthinfo *info = &dp->synths[dev]; 289 289 switch (info->arg.event_passing) { 290 290 case SNDRV_SEQ_OSS_PROCESS_EVENTS: 291 291 if (! info->ch || ch < 0 || ch >= info->nr_voices) { ··· 338 338 * process note-off event for OSS synth 339 339 */ 340 340 static int 341 - note_off_event(seq_oss_devinfo_t *dp, int dev, int ch, int note, int vel, snd_seq_event_t *ev) 341 + note_off_event(struct seq_oss_devinfo *dp, int dev, int ch, int note, int vel, struct snd_seq_event *ev) 342 342 { 343 - seq_oss_synthinfo_t *info = &dp->synths[dev]; 343 + struct seq_oss_synthinfo *info = &dp->synths[dev]; 344 344 switch (info->arg.event_passing) { 345 345 case SNDRV_SEQ_OSS_PROCESS_EVENTS: 346 346 if (! info->ch || ch < 0 || ch >= info->nr_voices) { ··· 369 369 * create a note event 370 370 */ 371 371 static int 372 - set_note_event(seq_oss_devinfo_t *dp, int dev, int type, int ch, int note, int vel, snd_seq_event_t *ev) 372 + set_note_event(struct seq_oss_devinfo *dp, int dev, int type, int ch, int note, int vel, struct snd_seq_event *ev) 373 373 { 374 374 if (! snd_seq_oss_synth_is_valid(dp, dev)) 375 375 return -ENXIO; ··· 387 387 * create a control event 388 388 */ 389 389 static int 390 - set_control_event(seq_oss_devinfo_t *dp, int dev, int type, int ch, int param, int val, snd_seq_event_t *ev) 390 + set_control_event(struct seq_oss_devinfo *dp, int dev, int type, int ch, int param, int val, struct snd_seq_event *ev) 391 391 { 392 392 if (! snd_seq_oss_synth_is_valid(dp, dev)) 393 393 return -ENXIO; ··· 405 405 * create an echo event 406 406 */ 407 407 static int 408 - set_echo_event(seq_oss_devinfo_t *dp, evrec_t *rec, snd_seq_event_t *ev) 408 + set_echo_event(struct seq_oss_devinfo *dp, union evrec *rec, struct snd_seq_event *ev) 409 409 { 410 410 ev->type = SNDRV_SEQ_EVENT_ECHO; 411 411 /* echo back to itself */ ··· 419 419 * the echo event is processed here. 420 420 */ 421 421 int 422 - snd_seq_oss_event_input(snd_seq_event_t *ev, int direct, void *private_data, 422 + snd_seq_oss_event_input(struct snd_seq_event *ev, int direct, void *private_data, 423 423 int atomic, int hop) 424 424 { 425 - seq_oss_devinfo_t *dp = (seq_oss_devinfo_t *)private_data; 426 - evrec_t *rec; 425 + struct seq_oss_devinfo *dp = (struct seq_oss_devinfo *)private_data; 426 + union evrec *rec; 427 427 428 428 if (ev->type != SNDRV_SEQ_EVENT_ECHO) 429 429 return snd_seq_oss_midi_input(ev, direct, private_data); ··· 431 431 if (ev->source.client != dp->cseq) 432 432 return 0; /* ignored */ 433 433 434 - rec = (evrec_t*)&ev->data; 434 + rec = (union evrec*)&ev->data; 435 435 if (rec->s.code == SEQ_SYNCTIMER) { 436 436 /* sync echo back */ 437 437 snd_seq_oss_writeq_wakeup(dp->writeq, rec->t.time);
+25 -25
sound/core/seq/oss/seq_oss_event.h
··· 29 29 #define LONG_EVENT_SIZE 8 30 30 31 31 /* short event (4bytes) */ 32 - typedef struct evrec_short_t { 32 + struct evrec_short { 33 33 unsigned char code; 34 34 unsigned char parm1; 35 35 unsigned char dev; 36 36 unsigned char parm2; 37 - } evrec_short_t; 37 + }; 38 38 39 39 /* short note events (4bytes) */ 40 - typedef struct evrec_note_t { 40 + struct evrec_note { 41 41 unsigned char code; 42 42 unsigned char chn; 43 43 unsigned char note; 44 44 unsigned char vel; 45 - } evrec_note_t; 45 + }; 46 46 47 47 /* long timer events (8bytes) */ 48 - typedef struct evrec_timer_t { 48 + struct evrec_timer { 49 49 unsigned char code; 50 50 unsigned char cmd; 51 51 unsigned char dummy1, dummy2; 52 52 unsigned int time; 53 - } evrec_timer_t; 53 + }; 54 54 55 55 /* long extended events (8bytes) */ 56 - typedef struct evrec_extended_t { 56 + struct evrec_extended { 57 57 unsigned char code; 58 58 unsigned char cmd; 59 59 unsigned char dev; 60 60 unsigned char chn; 61 61 unsigned char p1, p2, p3, p4; 62 - } evrec_extended_t; 62 + }; 63 63 64 64 /* long channel events (8bytes) */ 65 - typedef struct evrec_long_t { 65 + struct evrec_long { 66 66 unsigned char code; 67 67 unsigned char dev; 68 68 unsigned char cmd; 69 69 unsigned char chn; 70 70 unsigned char p1, p2; 71 71 unsigned short val; 72 - } evrec_long_t; 72 + }; 73 73 74 74 /* channel voice events (8bytes) */ 75 - typedef struct evrec_voice_t { 75 + struct evrec_voice { 76 76 unsigned char code; 77 77 unsigned char dev; 78 78 unsigned char cmd; 79 79 unsigned char chn; 80 80 unsigned char note, parm; 81 81 unsigned short dummy; 82 - } evrec_voice_t; 82 + }; 83 83 84 84 /* sysex events (8bytes) */ 85 - typedef struct evrec_sysex_t { 85 + struct evrec_sysex { 86 86 unsigned char code; 87 87 unsigned char dev; 88 88 unsigned char buf[6]; 89 - } evrec_sysex_t; 89 + }; 90 90 91 91 /* event record */ 92 - union evrec_t { 93 - evrec_short_t s; 94 - evrec_note_t n; 95 - evrec_long_t l; 96 - evrec_voice_t v; 97 - evrec_timer_t t; 98 - evrec_extended_t e; 99 - evrec_sysex_t x; 92 + union evrec { 93 + struct evrec_short s; 94 + struct evrec_note n; 95 + struct evrec_long l; 96 + struct evrec_voice v; 97 + struct evrec_timer t; 98 + struct evrec_extended e; 99 + struct evrec_sysex x; 100 100 unsigned int echo; 101 101 unsigned char c[LONG_EVENT_SIZE]; 102 102 }; ··· 104 104 #define ev_is_long(ev) ((ev)->s.code >= 128) 105 105 #define ev_length(ev) ((ev)->s.code >= 128 ? LONG_EVENT_SIZE : SHORT_EVENT_SIZE) 106 106 107 - int snd_seq_oss_process_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev); 108 - int snd_seq_oss_process_timer_event(seq_oss_timer_t *rec, evrec_t *q); 109 - int snd_seq_oss_event_input(snd_seq_event_t *ev, int direct, void *private_data, int atomic, int hop); 107 + int snd_seq_oss_process_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev); 108 + int snd_seq_oss_process_timer_event(struct seq_oss_timer *rec, union evrec *q); 109 + int snd_seq_oss_event_input(struct snd_seq_event *ev, int direct, void *private_data, int atomic, int hop); 110 110 111 111 112 112 #endif /* __SEQ_OSS_EVENT_H */
+26 -26
sound/core/seq/oss/seq_oss_init.c
··· 41 41 static int system_port = -1; 42 42 43 43 static int num_clients; 44 - static seq_oss_devinfo_t *client_table[SNDRV_SEQ_OSS_MAX_CLIENTS]; 44 + static struct seq_oss_devinfo *client_table[SNDRV_SEQ_OSS_MAX_CLIENTS]; 45 45 46 46 47 47 /* 48 48 * prototypes 49 49 */ 50 - static int receive_announce(snd_seq_event_t *ev, int direct, void *private, int atomic, int hop); 50 + static int receive_announce(struct snd_seq_event *ev, int direct, void *private, int atomic, int hop); 51 51 static int translate_mode(struct file *file); 52 - static int create_port(seq_oss_devinfo_t *dp); 53 - static int delete_port(seq_oss_devinfo_t *dp); 54 - static int alloc_seq_queue(seq_oss_devinfo_t *dp); 52 + static int create_port(struct seq_oss_devinfo *dp); 53 + static int delete_port(struct seq_oss_devinfo *dp); 54 + static int alloc_seq_queue(struct seq_oss_devinfo *dp); 55 55 static int delete_seq_queue(int queue); 56 56 static void free_devinfo(void *private); 57 57 ··· 65 65 snd_seq_oss_create_client(void) 66 66 { 67 67 int rc; 68 - snd_seq_client_callback_t callback; 69 - snd_seq_client_info_t *info; 70 - snd_seq_port_info_t *port; 71 - snd_seq_port_callback_t port_callback; 68 + struct snd_seq_client_callback callback; 69 + struct snd_seq_client_info *info; 70 + struct snd_seq_port_info *port; 71 + struct snd_seq_port_callback port_callback; 72 72 73 73 info = kmalloc(sizeof(*info), GFP_KERNEL); 74 74 port = kmalloc(sizeof(*port), GFP_KERNEL); ··· 118 118 119 119 call_ctl(SNDRV_SEQ_IOCTL_CREATE_PORT, port); 120 120 if ((system_port = port->addr.port) >= 0) { 121 - snd_seq_port_subscribe_t subs; 121 + struct snd_seq_port_subscribe subs; 122 122 123 123 memset(&subs, 0, sizeof(subs)); 124 124 subs.sender.client = SNDRV_SEQ_CLIENT_SYSTEM; ··· 140 140 * receive annoucement from system port, and check the midi device 141 141 */ 142 142 static int 143 - receive_announce(snd_seq_event_t *ev, int direct, void *private, int atomic, int hop) 143 + receive_announce(struct snd_seq_event *ev, int direct, void *private, int atomic, int hop) 144 144 { 145 - snd_seq_port_info_t pinfo; 145 + struct snd_seq_port_info pinfo; 146 146 147 147 if (atomic) 148 148 return 0; /* it must not happen */ ··· 191 191 snd_seq_oss_open(struct file *file, int level) 192 192 { 193 193 int i, rc; 194 - seq_oss_devinfo_t *dp; 194 + struct seq_oss_devinfo *dp; 195 195 196 196 if ((dp = kzalloc(sizeof(*dp), GFP_KERNEL)) == NULL) { 197 197 snd_printk(KERN_ERR "can't malloc device info\n"); ··· 323 323 * create sequencer port 324 324 */ 325 325 static int 326 - create_port(seq_oss_devinfo_t *dp) 326 + create_port(struct seq_oss_devinfo *dp) 327 327 { 328 328 int rc; 329 - snd_seq_port_info_t port; 330 - snd_seq_port_callback_t callback; 329 + struct snd_seq_port_info port; 330 + struct snd_seq_port_callback callback; 331 331 332 332 memset(&port, 0, sizeof(port)); 333 333 port.addr.client = dp->cseq; ··· 358 358 * delete ALSA port 359 359 */ 360 360 static int 361 - delete_port(seq_oss_devinfo_t *dp) 361 + delete_port(struct seq_oss_devinfo *dp) 362 362 { 363 363 if (dp->port < 0) 364 364 return 0; ··· 371 371 * allocate a queue 372 372 */ 373 373 static int 374 - alloc_seq_queue(seq_oss_devinfo_t *dp) 374 + alloc_seq_queue(struct seq_oss_devinfo *dp) 375 375 { 376 - snd_seq_queue_info_t qinfo; 376 + struct snd_seq_queue_info qinfo; 377 377 int rc; 378 378 379 379 memset(&qinfo, 0, sizeof(qinfo)); ··· 392 392 static int 393 393 delete_seq_queue(int queue) 394 394 { 395 - snd_seq_queue_info_t qinfo; 395 + struct snd_seq_queue_info qinfo; 396 396 int rc; 397 397 398 398 if (queue < 0) ··· 412 412 static void 413 413 free_devinfo(void *private) 414 414 { 415 - seq_oss_devinfo_t *dp = (seq_oss_devinfo_t *)private; 415 + struct seq_oss_devinfo *dp = (struct seq_oss_devinfo *)private; 416 416 417 417 if (dp->timer) 418 418 snd_seq_oss_timer_delete(dp->timer); ··· 431 431 * close sequencer device 432 432 */ 433 433 void 434 - snd_seq_oss_release(seq_oss_devinfo_t *dp) 434 + snd_seq_oss_release(struct seq_oss_devinfo *dp) 435 435 { 436 436 int queue; 437 437 ··· 460 460 * Wait until the queue is empty (if we don't have nonblock) 461 461 */ 462 462 void 463 - snd_seq_oss_drain_write(seq_oss_devinfo_t *dp) 463 + snd_seq_oss_drain_write(struct seq_oss_devinfo *dp) 464 464 { 465 465 if (! dp->timer->running) 466 466 return; ··· 477 477 * reset sequencer devices 478 478 */ 479 479 void 480 - snd_seq_oss_reset(seq_oss_devinfo_t *dp) 480 + snd_seq_oss_reset(struct seq_oss_devinfo *dp) 481 481 { 482 482 int i; 483 483 ··· 525 525 * proc interface 526 526 */ 527 527 void 528 - snd_seq_oss_system_info_read(snd_info_buffer_t *buf) 528 + snd_seq_oss_system_info_read(struct snd_info_buffer *buf) 529 529 { 530 530 int i; 531 - seq_oss_devinfo_t *dp; 531 + struct seq_oss_devinfo *dp; 532 532 533 533 snd_iprintf(buf, "ALSA client number %d\n", system_client); 534 534 snd_iprintf(buf, "ALSA receiver port %d\n", system_port);
+6 -6
sound/core/seq/oss/seq_oss_ioctl.c
··· 28 28 #include "seq_oss_midi.h" 29 29 #include "seq_oss_event.h" 30 30 31 - static int snd_seq_oss_synth_info_user(seq_oss_devinfo_t *dp, void __user *arg) 31 + static int snd_seq_oss_synth_info_user(struct seq_oss_devinfo *dp, void __user *arg) 32 32 { 33 33 struct synth_info info; 34 34 ··· 41 41 return 0; 42 42 } 43 43 44 - static int snd_seq_oss_midi_info_user(seq_oss_devinfo_t *dp, void __user *arg) 44 + static int snd_seq_oss_midi_info_user(struct seq_oss_devinfo *dp, void __user *arg) 45 45 { 46 46 struct midi_info info; 47 47 ··· 54 54 return 0; 55 55 } 56 56 57 - static int snd_seq_oss_oob_user(seq_oss_devinfo_t *dp, void __user *arg) 57 + static int snd_seq_oss_oob_user(struct seq_oss_devinfo *dp, void __user *arg) 58 58 { 59 59 unsigned char ev[8]; 60 - snd_seq_event_t tmpev; 60 + struct snd_seq_event tmpev; 61 61 62 62 if (copy_from_user(ev, arg, 8)) 63 63 return -EFAULT; 64 64 memset(&tmpev, 0, sizeof(tmpev)); 65 65 snd_seq_oss_fill_addr(dp, &tmpev, dp->addr.port, dp->addr.client); 66 66 tmpev.time.tick = 0; 67 - if (! snd_seq_oss_process_event(dp, (evrec_t*)ev, &tmpev)) { 67 + if (! snd_seq_oss_process_event(dp, (union evrec *)ev, &tmpev)) { 68 68 snd_seq_oss_dispatch(dp, &tmpev, 0, 0); 69 69 } 70 70 return 0; 71 71 } 72 72 73 73 int 74 - snd_seq_oss_ioctl(seq_oss_devinfo_t *dp, unsigned int cmd, unsigned long carg) 74 + snd_seq_oss_ioctl(struct seq_oss_devinfo *dp, unsigned int cmd, unsigned long carg) 75 75 { 76 76 int dev, val; 77 77 void __user *arg = (void __user *)carg;
+48 -48
sound/core/seq/oss/seq_oss_midi.c
··· 37 37 /* 38 38 * definition of midi device record 39 39 */ 40 - struct seq_oss_midi_t { 40 + struct seq_oss_midi { 41 41 int seq_device; /* device number */ 42 42 int client; /* sequencer client number */ 43 43 int port; /* sequencer port number */ 44 44 unsigned int flags; /* port capability */ 45 45 int opened; /* flag for opening */ 46 46 unsigned char name[SNDRV_SEQ_OSS_MAX_MIDI_NAME]; 47 - snd_midi_event_t *coder; /* MIDI event coder */ 48 - seq_oss_devinfo_t *devinfo; /* assigned OSSseq device */ 47 + struct snd_midi_event *coder; /* MIDI event coder */ 48 + struct seq_oss_devinfo *devinfo; /* assigned OSSseq device */ 49 49 snd_use_lock_t use_lock; 50 50 }; 51 51 ··· 54 54 * midi device table 55 55 */ 56 56 static int max_midi_devs; 57 - static seq_oss_midi_t *midi_devs[SNDRV_SEQ_OSS_MAX_MIDI_DEVS]; 57 + static struct seq_oss_midi *midi_devs[SNDRV_SEQ_OSS_MAX_MIDI_DEVS]; 58 58 59 59 static DEFINE_SPINLOCK(register_lock); 60 60 61 61 /* 62 62 * prototypes 63 63 */ 64 - static seq_oss_midi_t *get_mdev(int dev); 65 - static seq_oss_midi_t *get_mididev(seq_oss_devinfo_t *dp, int dev); 66 - static int send_synth_event(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, int dev); 67 - static int send_midi_event(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, seq_oss_midi_t *mdev); 64 + static struct seq_oss_midi *get_mdev(int dev); 65 + static struct seq_oss_midi *get_mididev(struct seq_oss_devinfo *dp, int dev); 66 + static int send_synth_event(struct seq_oss_devinfo *dp, struct snd_seq_event *ev, int dev); 67 + static int send_midi_event(struct seq_oss_devinfo *dp, struct snd_seq_event *ev, struct seq_oss_midi *mdev); 68 68 69 69 /* 70 70 * look up the existing ports ··· 73 73 int __init 74 74 snd_seq_oss_midi_lookup_ports(int client) 75 75 { 76 - snd_seq_client_info_t *clinfo; 77 - snd_seq_port_info_t *pinfo; 76 + struct snd_seq_client_info *clinfo; 77 + struct snd_seq_port_info *pinfo; 78 78 79 79 clinfo = kzalloc(sizeof(*clinfo), GFP_KERNEL); 80 80 pinfo = kzalloc(sizeof(*pinfo), GFP_KERNEL); ··· 100 100 101 101 /* 102 102 */ 103 - static seq_oss_midi_t * 103 + static struct seq_oss_midi * 104 104 get_mdev(int dev) 105 105 { 106 - seq_oss_midi_t *mdev; 106 + struct seq_oss_midi *mdev; 107 107 unsigned long flags; 108 108 109 109 spin_lock_irqsave(&register_lock, flags); ··· 117 117 /* 118 118 * look for the identical slot 119 119 */ 120 - static seq_oss_midi_t * 120 + static struct seq_oss_midi * 121 121 find_slot(int client, int port) 122 122 { 123 123 int i; 124 - seq_oss_midi_t *mdev; 124 + struct seq_oss_midi *mdev; 125 125 unsigned long flags; 126 126 127 127 spin_lock_irqsave(&register_lock, flags); ··· 145 145 * register a new port if it doesn't exist yet 146 146 */ 147 147 int 148 - snd_seq_oss_midi_check_new_port(snd_seq_port_info_t *pinfo) 148 + snd_seq_oss_midi_check_new_port(struct snd_seq_port_info *pinfo) 149 149 { 150 150 int i; 151 - seq_oss_midi_t *mdev; 151 + struct seq_oss_midi *mdev; 152 152 unsigned long flags; 153 153 154 154 debug_printk(("check for MIDI client %d port %d\n", pinfo->addr.client, pinfo->addr.port)); ··· 226 226 int 227 227 snd_seq_oss_midi_check_exit_port(int client, int port) 228 228 { 229 - seq_oss_midi_t *mdev; 229 + struct seq_oss_midi *mdev; 230 230 unsigned long flags; 231 231 int index; 232 232 ··· 258 258 snd_seq_oss_midi_clear_all(void) 259 259 { 260 260 int i; 261 - seq_oss_midi_t *mdev; 261 + struct seq_oss_midi *mdev; 262 262 unsigned long flags; 263 263 264 264 spin_lock_irqsave(&register_lock, flags); ··· 279 279 * set up midi tables 280 280 */ 281 281 void 282 - snd_seq_oss_midi_setup(seq_oss_devinfo_t *dp) 282 + snd_seq_oss_midi_setup(struct seq_oss_devinfo *dp) 283 283 { 284 284 dp->max_mididev = max_midi_devs; 285 285 } ··· 288 288 * clean up midi tables 289 289 */ 290 290 void 291 - snd_seq_oss_midi_cleanup(seq_oss_devinfo_t *dp) 291 + snd_seq_oss_midi_cleanup(struct seq_oss_devinfo *dp) 292 292 { 293 293 int i; 294 294 for (i = 0; i < dp->max_mididev; i++) ··· 301 301 * open all midi devices. ignore errors. 302 302 */ 303 303 void 304 - snd_seq_oss_midi_open_all(seq_oss_devinfo_t *dp, int file_mode) 304 + snd_seq_oss_midi_open_all(struct seq_oss_devinfo *dp, int file_mode) 305 305 { 306 306 int i; 307 307 for (i = 0; i < dp->max_mididev; i++) ··· 312 312 /* 313 313 * get the midi device information 314 314 */ 315 - static seq_oss_midi_t * 316 - get_mididev(seq_oss_devinfo_t *dp, int dev) 315 + static struct seq_oss_midi * 316 + get_mididev(struct seq_oss_devinfo *dp, int dev) 317 317 { 318 318 if (dev < 0 || dev >= dp->max_mididev) 319 319 return NULL; ··· 325 325 * open the midi device if not opened yet 326 326 */ 327 327 int 328 - snd_seq_oss_midi_open(seq_oss_devinfo_t *dp, int dev, int fmode) 328 + snd_seq_oss_midi_open(struct seq_oss_devinfo *dp, int dev, int fmode) 329 329 { 330 330 int perm; 331 - seq_oss_midi_t *mdev; 332 - snd_seq_port_subscribe_t subs; 331 + struct seq_oss_midi *mdev; 332 + struct snd_seq_port_subscribe subs; 333 333 334 334 if ((mdev = get_mididev(dp, dev)) == NULL) 335 335 return -ENODEV; ··· 392 392 * close the midi device if already opened 393 393 */ 394 394 int 395 - snd_seq_oss_midi_close(seq_oss_devinfo_t *dp, int dev) 395 + snd_seq_oss_midi_close(struct seq_oss_devinfo *dp, int dev) 396 396 { 397 - seq_oss_midi_t *mdev; 398 - snd_seq_port_subscribe_t subs; 397 + struct seq_oss_midi *mdev; 398 + struct snd_seq_port_subscribe subs; 399 399 400 400 if ((mdev = get_mididev(dp, dev)) == NULL) 401 401 return -ENODEV; ··· 430 430 * change seq capability flags to file mode flags 431 431 */ 432 432 int 433 - snd_seq_oss_midi_filemode(seq_oss_devinfo_t *dp, int dev) 433 + snd_seq_oss_midi_filemode(struct seq_oss_devinfo *dp, int dev) 434 434 { 435 - seq_oss_midi_t *mdev; 435 + struct seq_oss_midi *mdev; 436 436 int mode; 437 437 438 438 if ((mdev = get_mididev(dp, dev)) == NULL) ··· 453 453 * so far, only close the device. 454 454 */ 455 455 void 456 - snd_seq_oss_midi_reset(seq_oss_devinfo_t *dp, int dev) 456 + snd_seq_oss_midi_reset(struct seq_oss_devinfo *dp, int dev) 457 457 { 458 - seq_oss_midi_t *mdev; 458 + struct seq_oss_midi *mdev; 459 459 460 460 if ((mdev = get_mididev(dp, dev)) == NULL) 461 461 return; ··· 465 465 } 466 466 467 467 if (mdev->opened & PERM_WRITE) { 468 - snd_seq_event_t ev; 468 + struct snd_seq_event ev; 469 469 int c; 470 470 471 471 debug_printk(("resetting client %d port %d\n", mdev->client, mdev->port)); ··· 501 501 * get client/port of the specified MIDI device 502 502 */ 503 503 void 504 - snd_seq_oss_midi_get_addr(seq_oss_devinfo_t *dp, int dev, snd_seq_addr_t *addr) 504 + snd_seq_oss_midi_get_addr(struct seq_oss_devinfo *dp, int dev, struct snd_seq_addr *addr) 505 505 { 506 - seq_oss_midi_t *mdev; 506 + struct seq_oss_midi *mdev; 507 507 508 508 if ((mdev = get_mididev(dp, dev)) == NULL) 509 509 return; ··· 517 517 * input callback - this can be atomic 518 518 */ 519 519 int 520 - snd_seq_oss_midi_input(snd_seq_event_t *ev, int direct, void *private_data) 520 + snd_seq_oss_midi_input(struct snd_seq_event *ev, int direct, void *private_data) 521 521 { 522 - seq_oss_devinfo_t *dp = (seq_oss_devinfo_t *)private_data; 523 - seq_oss_midi_t *mdev; 522 + struct seq_oss_devinfo *dp = (struct seq_oss_devinfo *)private_data; 523 + struct seq_oss_midi *mdev; 524 524 int rc; 525 525 526 526 if (dp->readq == NULL) ··· 545 545 * convert ALSA sequencer event to OSS synth event 546 546 */ 547 547 static int 548 - send_synth_event(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, int dev) 548 + send_synth_event(struct seq_oss_devinfo *dp, struct snd_seq_event *ev, int dev) 549 549 { 550 - evrec_t ossev; 550 + union evrec ossev; 551 551 552 552 memset(&ossev, 0, sizeof(ossev)); 553 553 ··· 606 606 * decode event and send MIDI bytes to read queue 607 607 */ 608 608 static int 609 - send_midi_event(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, seq_oss_midi_t *mdev) 609 + send_midi_event(struct seq_oss_devinfo *dp, struct snd_seq_event *ev, struct seq_oss_midi *mdev) 610 610 { 611 611 char msg[32]; 612 612 int len; ··· 634 634 * non-zero : invalid - ignored 635 635 */ 636 636 int 637 - snd_seq_oss_midi_putc(seq_oss_devinfo_t *dp, int dev, unsigned char c, snd_seq_event_t *ev) 637 + snd_seq_oss_midi_putc(struct seq_oss_devinfo *dp, int dev, unsigned char c, struct snd_seq_event *ev) 638 638 { 639 - seq_oss_midi_t *mdev; 639 + struct seq_oss_midi *mdev; 640 640 641 641 if ((mdev = get_mididev(dp, dev)) == NULL) 642 642 return -ENODEV; ··· 653 653 * create OSS compatible midi_info record 654 654 */ 655 655 int 656 - snd_seq_oss_midi_make_info(seq_oss_devinfo_t *dp, int dev, struct midi_info *inf) 656 + snd_seq_oss_midi_make_info(struct seq_oss_devinfo *dp, int dev, struct midi_info *inf) 657 657 { 658 - seq_oss_midi_t *mdev; 658 + struct seq_oss_midi *mdev; 659 659 660 660 if ((mdev = get_mididev(dp, dev)) == NULL) 661 661 return -ENXIO; ··· 686 686 } 687 687 688 688 void 689 - snd_seq_oss_midi_info_read(snd_info_buffer_t *buf) 689 + snd_seq_oss_midi_info_read(struct snd_info_buffer *buf) 690 690 { 691 691 int i; 692 - seq_oss_midi_t *mdev; 692 + struct seq_oss_midi *mdev; 693 693 694 694 snd_iprintf(buf, "\nNumber of MIDI devices: %d\n", max_midi_devs); 695 695 for (i = 0; i < max_midi_devs; i++) {
+13 -14
sound/core/seq/oss/seq_oss_midi.h
··· 26 26 #include "seq_oss_device.h" 27 27 #include <sound/seq_oss_legacy.h> 28 28 29 - typedef struct seq_oss_midi_t seq_oss_midi_t; 30 - 31 29 int snd_seq_oss_midi_lookup_ports(int client); 32 - int snd_seq_oss_midi_check_new_port(snd_seq_port_info_t *pinfo); 30 + int snd_seq_oss_midi_check_new_port(struct snd_seq_port_info *pinfo); 33 31 int snd_seq_oss_midi_check_exit_port(int client, int port); 34 32 void snd_seq_oss_midi_clear_all(void); 35 33 36 - void snd_seq_oss_midi_setup(seq_oss_devinfo_t *dp); 37 - void snd_seq_oss_midi_cleanup(seq_oss_devinfo_t *dp); 34 + void snd_seq_oss_midi_setup(struct seq_oss_devinfo *dp); 35 + void snd_seq_oss_midi_cleanup(struct seq_oss_devinfo *dp); 38 36 39 - int snd_seq_oss_midi_open(seq_oss_devinfo_t *dp, int dev, int file_mode); 40 - void snd_seq_oss_midi_open_all(seq_oss_devinfo_t *dp, int file_mode); 41 - int snd_seq_oss_midi_close(seq_oss_devinfo_t *dp, int dev); 42 - void snd_seq_oss_midi_reset(seq_oss_devinfo_t *dp, int dev); 43 - int snd_seq_oss_midi_putc(seq_oss_devinfo_t *dp, int dev, unsigned char c, snd_seq_event_t *ev); 44 - int snd_seq_oss_midi_input(snd_seq_event_t *ev, int direct, void *private); 45 - int snd_seq_oss_midi_filemode(seq_oss_devinfo_t *dp, int dev); 46 - int snd_seq_oss_midi_make_info(seq_oss_devinfo_t *dp, int dev, struct midi_info *inf); 47 - void snd_seq_oss_midi_get_addr(seq_oss_devinfo_t *dp, int dev, snd_seq_addr_t *addr); 37 + int snd_seq_oss_midi_open(struct seq_oss_devinfo *dp, int dev, int file_mode); 38 + void snd_seq_oss_midi_open_all(struct seq_oss_devinfo *dp, int file_mode); 39 + int snd_seq_oss_midi_close(struct seq_oss_devinfo *dp, int dev); 40 + void snd_seq_oss_midi_reset(struct seq_oss_devinfo *dp, int dev); 41 + int snd_seq_oss_midi_putc(struct seq_oss_devinfo *dp, int dev, unsigned char c, 42 + struct snd_seq_event *ev); 43 + int snd_seq_oss_midi_input(struct snd_seq_event *ev, int direct, void *private); 44 + int snd_seq_oss_midi_filemode(struct seq_oss_devinfo *dp, int dev); 45 + int snd_seq_oss_midi_make_info(struct seq_oss_devinfo *dp, int dev, struct midi_info *inf); 46 + void snd_seq_oss_midi_get_addr(struct seq_oss_devinfo *dp, int dev, struct snd_seq_addr *addr); 48 47 49 48 #endif
+16 -16
sound/core/seq/oss/seq_oss_readq.c
··· 41 41 /* 42 42 * create a read queue 43 43 */ 44 - seq_oss_readq_t * 45 - snd_seq_oss_readq_new(seq_oss_devinfo_t *dp, int maxlen) 44 + struct seq_oss_readq * 45 + snd_seq_oss_readq_new(struct seq_oss_devinfo *dp, int maxlen) 46 46 { 47 - seq_oss_readq_t *q; 47 + struct seq_oss_readq *q; 48 48 49 49 if ((q = kzalloc(sizeof(*q), GFP_KERNEL)) == NULL) { 50 50 snd_printk(KERN_ERR "can't malloc read queue\n"); 51 51 return NULL; 52 52 } 53 53 54 - if ((q->q = kcalloc(maxlen, sizeof(evrec_t), GFP_KERNEL)) == NULL) { 54 + if ((q->q = kcalloc(maxlen, sizeof(union evrec), GFP_KERNEL)) == NULL) { 55 55 snd_printk(KERN_ERR "can't malloc read queue buffer\n"); 56 56 kfree(q); 57 57 return NULL; ··· 72 72 * delete the read queue 73 73 */ 74 74 void 75 - snd_seq_oss_readq_delete(seq_oss_readq_t *q) 75 + snd_seq_oss_readq_delete(struct seq_oss_readq *q) 76 76 { 77 77 if (q) { 78 78 kfree(q->q); ··· 84 84 * reset the read queue 85 85 */ 86 86 void 87 - snd_seq_oss_readq_clear(seq_oss_readq_t *q) 87 + snd_seq_oss_readq_clear(struct seq_oss_readq *q) 88 88 { 89 89 if (q->qlen) { 90 90 q->qlen = 0; ··· 100 100 * put a midi byte 101 101 */ 102 102 int 103 - snd_seq_oss_readq_puts(seq_oss_readq_t *q, int dev, unsigned char *data, int len) 103 + snd_seq_oss_readq_puts(struct seq_oss_readq *q, int dev, unsigned char *data, int len) 104 104 { 105 - evrec_t rec; 105 + union evrec rec; 106 106 int result; 107 107 108 108 memset(&rec, 0, sizeof(rec)); ··· 123 123 * return zero if enqueued 124 124 */ 125 125 int 126 - snd_seq_oss_readq_put_event(seq_oss_readq_t *q, evrec_t *ev) 126 + snd_seq_oss_readq_put_event(struct seq_oss_readq *q, union evrec *ev) 127 127 { 128 128 unsigned long flags; 129 129 ··· 152 152 * caller must hold lock 153 153 */ 154 154 int 155 - snd_seq_oss_readq_pick(seq_oss_readq_t *q, evrec_t *rec) 155 + snd_seq_oss_readq_pick(struct seq_oss_readq *q, union evrec *rec) 156 156 { 157 157 if (q->qlen == 0) 158 158 return -EAGAIN; ··· 164 164 * sleep until ready 165 165 */ 166 166 void 167 - snd_seq_oss_readq_wait(seq_oss_readq_t *q) 167 + snd_seq_oss_readq_wait(struct seq_oss_readq *q) 168 168 { 169 169 wait_event_interruptible_timeout(q->midi_sleep, 170 170 (q->qlen > 0 || q->head == q->tail), ··· 176 176 * caller must hold lock 177 177 */ 178 178 void 179 - snd_seq_oss_readq_free(seq_oss_readq_t *q) 179 + snd_seq_oss_readq_free(struct seq_oss_readq *q) 180 180 { 181 181 if (q->qlen > 0) { 182 182 q->head = (q->head + 1) % q->maxlen; ··· 189 189 * return non-zero if readq is not empty. 190 190 */ 191 191 unsigned int 192 - snd_seq_oss_readq_poll(seq_oss_readq_t *q, struct file *file, poll_table *wait) 192 + snd_seq_oss_readq_poll(struct seq_oss_readq *q, struct file *file, poll_table *wait) 193 193 { 194 194 poll_wait(file, &q->midi_sleep, wait); 195 195 return q->qlen; ··· 199 199 * put a timestamp 200 200 */ 201 201 int 202 - snd_seq_oss_readq_put_timestamp(seq_oss_readq_t *q, unsigned long curt, int seq_mode) 202 + snd_seq_oss_readq_put_timestamp(struct seq_oss_readq *q, unsigned long curt, int seq_mode) 203 203 { 204 204 if (curt != q->input_time) { 205 - evrec_t rec; 205 + union evrec rec; 206 206 memset(&rec, 0, sizeof(rec)); 207 207 switch (seq_mode) { 208 208 case SNDRV_SEQ_OSS_MODE_SYNTH: ··· 226 226 * proc interface 227 227 */ 228 228 void 229 - snd_seq_oss_readq_info_read(seq_oss_readq_t *q, snd_info_buffer_t *buf) 229 + snd_seq_oss_readq_info_read(struct seq_oss_readq *q, struct snd_info_buffer *buf) 230 230 { 231 231 snd_iprintf(buf, " read queue [%s] length = %d : tick = %ld\n", 232 232 (waitqueue_active(&q->midi_sleep) ? "sleeping":"running"),
+12 -12
sound/core/seq/oss/seq_oss_readq.h
··· 28 28 /* 29 29 * definition of read queue 30 30 */ 31 - struct seq_oss_readq_t { 32 - evrec_t *q; 31 + struct seq_oss_readq { 32 + union evrec *q; 33 33 int qlen; 34 34 int maxlen; 35 35 int head, tail; ··· 39 39 spinlock_t lock; 40 40 }; 41 41 42 - seq_oss_readq_t *snd_seq_oss_readq_new(seq_oss_devinfo_t *dp, int maxlen); 43 - void snd_seq_oss_readq_delete(seq_oss_readq_t *q); 44 - void snd_seq_oss_readq_clear(seq_oss_readq_t *readq); 45 - unsigned int snd_seq_oss_readq_poll(seq_oss_readq_t *readq, struct file *file, poll_table *wait); 46 - int snd_seq_oss_readq_puts(seq_oss_readq_t *readq, int dev, unsigned char *data, int len); 47 - int snd_seq_oss_readq_put_event(seq_oss_readq_t *readq, evrec_t *ev); 48 - int snd_seq_oss_readq_put_timestamp(seq_oss_readq_t *readq, unsigned long curt, int seq_mode); 49 - int snd_seq_oss_readq_pick(seq_oss_readq_t *q, evrec_t *rec); 50 - void snd_seq_oss_readq_wait(seq_oss_readq_t *q); 51 - void snd_seq_oss_readq_free(seq_oss_readq_t *q); 42 + struct seq_oss_readq *snd_seq_oss_readq_new(struct seq_oss_devinfo *dp, int maxlen); 43 + void snd_seq_oss_readq_delete(struct seq_oss_readq *q); 44 + void snd_seq_oss_readq_clear(struct seq_oss_readq *readq); 45 + unsigned int snd_seq_oss_readq_poll(struct seq_oss_readq *readq, struct file *file, poll_table *wait); 46 + int snd_seq_oss_readq_puts(struct seq_oss_readq *readq, int dev, unsigned char *data, int len); 47 + int snd_seq_oss_readq_put_event(struct seq_oss_readq *readq, union evrec *ev); 48 + int snd_seq_oss_readq_put_timestamp(struct seq_oss_readq *readq, unsigned long curt, int seq_mode); 49 + int snd_seq_oss_readq_pick(struct seq_oss_readq *q, union evrec *rec); 50 + void snd_seq_oss_readq_wait(struct seq_oss_readq *q); 51 + void snd_seq_oss_readq_free(struct seq_oss_readq *q); 52 52 53 53 #define snd_seq_oss_readq_lock(q, flags) spin_lock_irqsave(&(q)->lock, flags) 54 54 #define snd_seq_oss_readq_unlock(q, flags) spin_unlock_irqrestore(&(q)->lock, flags)
+9 -9
sound/core/seq/oss/seq_oss_rw.c
··· 33 33 /* 34 34 * protoypes 35 35 */ 36 - static int insert_queue(seq_oss_devinfo_t *dp, evrec_t *rec, struct file *opt); 36 + static int insert_queue(struct seq_oss_devinfo *dp, union evrec *rec, struct file *opt); 37 37 38 38 39 39 /* ··· 41 41 */ 42 42 43 43 int 44 - snd_seq_oss_read(seq_oss_devinfo_t *dp, char __user *buf, int count) 44 + snd_seq_oss_read(struct seq_oss_devinfo *dp, char __user *buf, int count) 45 45 { 46 - seq_oss_readq_t *readq = dp->readq; 46 + struct seq_oss_readq *readq = dp->readq; 47 47 int result = 0, err = 0; 48 48 int ev_len; 49 - evrec_t rec; 49 + union evrec rec; 50 50 unsigned long flags; 51 51 52 52 if (readq == NULL || ! is_read_mode(dp->file_mode)) ··· 93 93 */ 94 94 95 95 int 96 - snd_seq_oss_write(seq_oss_devinfo_t *dp, const char __user *buf, int count, struct file *opt) 96 + snd_seq_oss_write(struct seq_oss_devinfo *dp, const char __user *buf, int count, struct file *opt) 97 97 { 98 98 int result = 0, err = 0; 99 99 int ev_size, fmt; 100 - evrec_t rec; 100 + union evrec rec; 101 101 102 102 if (! is_write_mode(dp->file_mode) || dp->writeq == NULL) 103 103 return -ENXIO; ··· 161 161 * return: 0 = OK, non-zero = NG 162 162 */ 163 163 static int 164 - insert_queue(seq_oss_devinfo_t *dp, evrec_t *rec, struct file *opt) 164 + insert_queue(struct seq_oss_devinfo *dp, union evrec *rec, struct file *opt) 165 165 { 166 166 int rc = 0; 167 - snd_seq_event_t event; 167 + struct snd_seq_event event; 168 168 169 169 /* if this is a timing event, process the current time */ 170 170 if (snd_seq_oss_process_timer_event(dp->timer, rec)) ··· 197 197 */ 198 198 199 199 unsigned int 200 - snd_seq_oss_poll(seq_oss_devinfo_t *dp, struct file *file, poll_table * wait) 200 + snd_seq_oss_poll(struct seq_oss_devinfo *dp, struct file *file, poll_table * wait) 201 201 { 202 202 unsigned int mask = 0; 203 203
+46 -46
sound/core/seq/oss/seq_oss_synth.c
··· 37 37 */ 38 38 39 39 /* sysex buffer */ 40 - struct seq_oss_synth_sysex_t { 40 + struct seq_oss_synth_sysex { 41 41 int len; 42 42 int skip; 43 43 unsigned char buf[MAX_SYSEX_BUFLEN]; 44 44 }; 45 45 46 46 /* synth info */ 47 - struct seq_oss_synth_t { 47 + struct seq_oss_synth { 48 48 int seq_device; 49 49 50 50 /* for synth_info */ ··· 53 53 int nr_voices; 54 54 55 55 char name[SNDRV_SEQ_OSS_MAX_SYNTH_NAME]; 56 - snd_seq_oss_callback_t oper; 56 + struct snd_seq_oss_callback oper; 57 57 58 58 int opened; 59 59 ··· 66 66 * device table 67 67 */ 68 68 static int max_synth_devs; 69 - static seq_oss_synth_t *synth_devs[SNDRV_SEQ_OSS_MAX_SYNTH_DEVS]; 70 - static seq_oss_synth_t midi_synth_dev = { 69 + static struct seq_oss_synth *synth_devs[SNDRV_SEQ_OSS_MAX_SYNTH_DEVS]; 70 + static struct seq_oss_synth midi_synth_dev = { 71 71 -1, /* seq_device */ 72 72 SYNTH_TYPE_MIDI, /* synth_type */ 73 73 0, /* synth_subtype */ ··· 80 80 /* 81 81 * prototypes 82 82 */ 83 - static seq_oss_synth_t *get_synthdev(seq_oss_devinfo_t *dp, int dev); 84 - static void reset_channels(seq_oss_synthinfo_t *info); 83 + static struct seq_oss_synth *get_synthdev(struct seq_oss_devinfo *dp, int dev); 84 + static void reset_channels(struct seq_oss_synthinfo *info); 85 85 86 86 /* 87 87 * global initialization ··· 96 96 * registration of the synth device 97 97 */ 98 98 int 99 - snd_seq_oss_synth_register(snd_seq_device_t *dev) 99 + snd_seq_oss_synth_register(struct snd_seq_device *dev) 100 100 { 101 101 int i; 102 - seq_oss_synth_t *rec; 103 - snd_seq_oss_reg_t *reg = SNDRV_SEQ_DEVICE_ARGPTR(dev); 102 + struct seq_oss_synth *rec; 103 + struct snd_seq_oss_reg *reg = SNDRV_SEQ_DEVICE_ARGPTR(dev); 104 104 unsigned long flags; 105 105 106 106 if ((rec = kzalloc(sizeof(*rec), GFP_KERNEL)) == NULL) { ··· 148 148 149 149 150 150 int 151 - snd_seq_oss_synth_unregister(snd_seq_device_t *dev) 151 + snd_seq_oss_synth_unregister(struct snd_seq_device *dev) 152 152 { 153 153 int index; 154 - seq_oss_synth_t *rec = dev->driver_data; 154 + struct seq_oss_synth *rec = dev->driver_data; 155 155 unsigned long flags; 156 156 157 157 spin_lock_irqsave(&register_lock, flags); ··· 187 187 188 188 /* 189 189 */ 190 - static seq_oss_synth_t * 190 + static struct seq_oss_synth * 191 191 get_sdev(int dev) 192 192 { 193 - seq_oss_synth_t *rec; 193 + struct seq_oss_synth *rec; 194 194 unsigned long flags; 195 195 196 196 spin_lock_irqsave(&register_lock, flags); ··· 207 207 */ 208 208 209 209 void 210 - snd_seq_oss_synth_setup(seq_oss_devinfo_t *dp) 210 + snd_seq_oss_synth_setup(struct seq_oss_devinfo *dp) 211 211 { 212 212 int i; 213 - seq_oss_synth_t *rec; 214 - seq_oss_synthinfo_t *info; 213 + struct seq_oss_synth *rec; 214 + struct seq_oss_synthinfo *info; 215 215 216 216 dp->max_synthdev = max_synth_devs; 217 217 dp->synth_opened = 0; ··· 244 244 } 245 245 info->nr_voices = rec->nr_voices; 246 246 if (info->nr_voices > 0) { 247 - info->ch = kcalloc(info->nr_voices, sizeof(seq_oss_chinfo_t), GFP_KERNEL); 247 + info->ch = kcalloc(info->nr_voices, sizeof(struct seq_oss_chinfo), GFP_KERNEL); 248 248 if (!info->ch) 249 249 BUG(); 250 250 reset_channels(info); ··· 263 263 */ 264 264 265 265 void 266 - snd_seq_oss_synth_setup_midi(seq_oss_devinfo_t *dp) 266 + snd_seq_oss_synth_setup_midi(struct seq_oss_devinfo *dp) 267 267 { 268 268 int i; 269 269 ··· 271 271 return; 272 272 273 273 for (i = 0; i < dp->max_mididev; i++) { 274 - seq_oss_synthinfo_t *info; 274 + struct seq_oss_synthinfo *info; 275 275 info = &dp->synths[dp->max_synthdev]; 276 276 if (snd_seq_oss_midi_open(dp, i, dp->file_mode) < 0) 277 277 continue; ··· 297 297 */ 298 298 299 299 void 300 - snd_seq_oss_synth_cleanup(seq_oss_devinfo_t *dp) 300 + snd_seq_oss_synth_cleanup(struct seq_oss_devinfo *dp) 301 301 { 302 302 int i; 303 - seq_oss_synth_t *rec; 304 - seq_oss_synthinfo_t *info; 303 + struct seq_oss_synth *rec; 304 + struct seq_oss_synthinfo *info; 305 305 306 306 snd_assert(dp->max_synthdev <= SNDRV_SEQ_OSS_MAX_SYNTH_DEVS, return); 307 307 for (i = 0; i < dp->max_synthdev; i++) { ··· 338 338 * check if the specified device is MIDI mapped device 339 339 */ 340 340 static int 341 - is_midi_dev(seq_oss_devinfo_t *dp, int dev) 341 + is_midi_dev(struct seq_oss_devinfo *dp, int dev) 342 342 { 343 343 if (dev < 0 || dev >= dp->max_synthdev) 344 344 return 0; ··· 350 350 /* 351 351 * return synth device information pointer 352 352 */ 353 - static seq_oss_synth_t * 354 - get_synthdev(seq_oss_devinfo_t *dp, int dev) 353 + static struct seq_oss_synth * 354 + get_synthdev(struct seq_oss_devinfo *dp, int dev) 355 355 { 356 - seq_oss_synth_t *rec; 356 + struct seq_oss_synth *rec; 357 357 if (dev < 0 || dev >= dp->max_synthdev) 358 358 return NULL; 359 359 if (! dp->synths[dev].opened) ··· 374 374 * reset note and velocity on each channel. 375 375 */ 376 376 static void 377 - reset_channels(seq_oss_synthinfo_t *info) 377 + reset_channels(struct seq_oss_synthinfo *info) 378 378 { 379 379 int i; 380 380 if (info->ch == NULL || ! info->nr_voices) ··· 392 392 * event to the corresponding port. 393 393 */ 394 394 void 395 - snd_seq_oss_synth_reset(seq_oss_devinfo_t *dp, int dev) 395 + snd_seq_oss_synth_reset(struct seq_oss_devinfo *dp, int dev) 396 396 { 397 - seq_oss_synth_t *rec; 398 - seq_oss_synthinfo_t *info; 397 + struct seq_oss_synth *rec; 398 + struct seq_oss_synthinfo *info; 399 399 400 400 snd_assert(dev >= 0 && dev < dp->max_synthdev, return); 401 401 info = &dp->synths[dev]; ··· 428 428 if (rec->oper.reset) { 429 429 rec->oper.reset(&info->arg); 430 430 } else { 431 - snd_seq_event_t ev; 431 + struct snd_seq_event ev; 432 432 memset(&ev, 0, sizeof(ev)); 433 433 snd_seq_oss_fill_addr(dp, &ev, info->arg.addr.client, 434 434 info->arg.addr.port); ··· 444 444 * call load_patch callback function 445 445 */ 446 446 int 447 - snd_seq_oss_synth_load_patch(seq_oss_devinfo_t *dp, int dev, int fmt, 447 + snd_seq_oss_synth_load_patch(struct seq_oss_devinfo *dp, int dev, int fmt, 448 448 const char __user *buf, int p, int c) 449 449 { 450 - seq_oss_synth_t *rec; 450 + struct seq_oss_synth *rec; 451 451 int rc; 452 452 453 453 if (dev < 0 || dev >= dp->max_synthdev) ··· 470 470 * check if the device is valid synth device 471 471 */ 472 472 int 473 - snd_seq_oss_synth_is_valid(seq_oss_devinfo_t *dp, int dev) 473 + snd_seq_oss_synth_is_valid(struct seq_oss_devinfo *dp, int dev) 474 474 { 475 - seq_oss_synth_t *rec; 475 + struct seq_oss_synth *rec; 476 476 rec = get_synthdev(dp, dev); 477 477 if (rec) { 478 478 snd_use_lock_free(&rec->use_lock); ··· 488 488 * (0xff). 489 489 */ 490 490 int 491 - snd_seq_oss_synth_sysex(seq_oss_devinfo_t *dp, int dev, unsigned char *buf, snd_seq_event_t *ev) 491 + snd_seq_oss_synth_sysex(struct seq_oss_devinfo *dp, int dev, unsigned char *buf, struct snd_seq_event *ev) 492 492 { 493 493 int i, send; 494 494 unsigned char *dest; 495 - seq_oss_synth_sysex_t *sysex; 495 + struct seq_oss_synth_sysex *sysex; 496 496 497 497 if (! snd_seq_oss_synth_is_valid(dp, dev)) 498 498 return -ENXIO; ··· 545 545 * fill the event source/destination addresses 546 546 */ 547 547 int 548 - snd_seq_oss_synth_addr(seq_oss_devinfo_t *dp, int dev, snd_seq_event_t *ev) 548 + snd_seq_oss_synth_addr(struct seq_oss_devinfo *dp, int dev, struct snd_seq_event *ev) 549 549 { 550 550 if (! snd_seq_oss_synth_is_valid(dp, dev)) 551 551 return -EINVAL; ··· 559 559 * OSS compatible ioctl 560 560 */ 561 561 int 562 - snd_seq_oss_synth_ioctl(seq_oss_devinfo_t *dp, int dev, unsigned int cmd, unsigned long addr) 562 + snd_seq_oss_synth_ioctl(struct seq_oss_devinfo *dp, int dev, unsigned int cmd, unsigned long addr) 563 563 { 564 - seq_oss_synth_t *rec; 564 + struct seq_oss_synth *rec; 565 565 int rc; 566 566 567 567 if (is_midi_dev(dp, dev)) ··· 581 581 * send OSS raw events - SEQ_PRIVATE and SEQ_VOLUME 582 582 */ 583 583 int 584 - snd_seq_oss_synth_raw_event(seq_oss_devinfo_t *dp, int dev, unsigned char *data, snd_seq_event_t *ev) 584 + snd_seq_oss_synth_raw_event(struct seq_oss_devinfo *dp, int dev, unsigned char *data, struct snd_seq_event *ev) 585 585 { 586 586 if (! snd_seq_oss_synth_is_valid(dp, dev) || is_midi_dev(dp, dev)) 587 587 return -ENXIO; ··· 595 595 * create OSS compatible synth_info record 596 596 */ 597 597 int 598 - snd_seq_oss_synth_make_info(seq_oss_devinfo_t *dp, int dev, struct synth_info *inf) 598 + snd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_info *inf) 599 599 { 600 - seq_oss_synth_t *rec; 600 + struct seq_oss_synth *rec; 601 601 602 602 if (dp->synths[dev].is_midi) { 603 603 struct midi_info minf; ··· 625 625 * proc interface 626 626 */ 627 627 void 628 - snd_seq_oss_synth_info_read(snd_info_buffer_t *buf) 628 + snd_seq_oss_synth_info_read(struct snd_info_buffer *buf) 629 629 { 630 630 int i; 631 - seq_oss_synth_t *rec; 631 + struct seq_oss_synth *rec; 632 632 633 633 snd_iprintf(buf, "\nNumber of synth devices: %d\n", max_synth_devs); 634 634 for (i = 0; i < max_synth_devs; i++) {
+17 -15
sound/core/seq/oss/seq_oss_synth.h
··· 27 27 #include <sound/seq_oss_legacy.h> 28 28 #include <sound/seq_device.h> 29 29 30 - typedef struct seq_oss_synth_t seq_oss_synth_t; 31 - 32 30 void snd_seq_oss_synth_init(void); 33 - int snd_seq_oss_synth_register(snd_seq_device_t *dev); 34 - int snd_seq_oss_synth_unregister(snd_seq_device_t *dev); 35 - void snd_seq_oss_synth_setup(seq_oss_devinfo_t *dp); 36 - void snd_seq_oss_synth_setup_midi(seq_oss_devinfo_t *dp); 37 - void snd_seq_oss_synth_cleanup(seq_oss_devinfo_t *dp); 31 + int snd_seq_oss_synth_register(struct snd_seq_device *dev); 32 + int snd_seq_oss_synth_unregister(struct snd_seq_device *dev); 33 + void snd_seq_oss_synth_setup(struct seq_oss_devinfo *dp); 34 + void snd_seq_oss_synth_setup_midi(struct seq_oss_devinfo *dp); 35 + void snd_seq_oss_synth_cleanup(struct seq_oss_devinfo *dp); 38 36 39 - void snd_seq_oss_synth_reset(seq_oss_devinfo_t *dp, int dev); 40 - int snd_seq_oss_synth_load_patch(seq_oss_devinfo_t *dp, int dev, int fmt, const char __user *buf, int p, int c); 41 - int snd_seq_oss_synth_is_valid(seq_oss_devinfo_t *dp, int dev); 42 - int snd_seq_oss_synth_sysex(seq_oss_devinfo_t *dp, int dev, unsigned char *buf, snd_seq_event_t *ev); 43 - int snd_seq_oss_synth_addr(seq_oss_devinfo_t *dp, int dev, snd_seq_event_t *ev); 44 - int snd_seq_oss_synth_ioctl(seq_oss_devinfo_t *dp, int dev, unsigned int cmd, unsigned long addr); 45 - int snd_seq_oss_synth_raw_event(seq_oss_devinfo_t *dp, int dev, unsigned char *data, snd_seq_event_t *ev); 37 + void snd_seq_oss_synth_reset(struct seq_oss_devinfo *dp, int dev); 38 + int snd_seq_oss_synth_load_patch(struct seq_oss_devinfo *dp, int dev, int fmt, 39 + const char __user *buf, int p, int c); 40 + int snd_seq_oss_synth_is_valid(struct seq_oss_devinfo *dp, int dev); 41 + int snd_seq_oss_synth_sysex(struct seq_oss_devinfo *dp, int dev, unsigned char *buf, 42 + struct snd_seq_event *ev); 43 + int snd_seq_oss_synth_addr(struct seq_oss_devinfo *dp, int dev, struct snd_seq_event *ev); 44 + int snd_seq_oss_synth_ioctl(struct seq_oss_devinfo *dp, int dev, unsigned int cmd, 45 + unsigned long addr); 46 + int snd_seq_oss_synth_raw_event(struct seq_oss_devinfo *dp, int dev, 47 + unsigned char *data, struct snd_seq_event *ev); 46 48 47 - int snd_seq_oss_synth_make_info(seq_oss_devinfo_t *dp, int dev, struct synth_info *inf); 49 + int snd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_info *inf); 48 50 49 51 #endif
+17 -17
sound/core/seq/oss/seq_oss_timer.c
··· 33 33 34 34 /* 35 35 */ 36 - static void calc_alsa_tempo(seq_oss_timer_t *timer); 37 - static int send_timer_event(seq_oss_devinfo_t *dp, int type, int value); 36 + static void calc_alsa_tempo(struct seq_oss_timer *timer); 37 + static int send_timer_event(struct seq_oss_devinfo *dp, int type, int value); 38 38 39 39 40 40 /* 41 41 * create and register a new timer. 42 42 * if queue is not started yet, start it. 43 43 */ 44 - seq_oss_timer_t * 45 - snd_seq_oss_timer_new(seq_oss_devinfo_t *dp) 44 + struct seq_oss_timer * 45 + snd_seq_oss_timer_new(struct seq_oss_devinfo *dp) 46 46 { 47 - seq_oss_timer_t *rec; 47 + struct seq_oss_timer *rec; 48 48 49 49 rec = kzalloc(sizeof(*rec), GFP_KERNEL); 50 50 if (rec == NULL) ··· 67 67 * if no more timer exists, stop the queue. 68 68 */ 69 69 void 70 - snd_seq_oss_timer_delete(seq_oss_timer_t *rec) 70 + snd_seq_oss_timer_delete(struct seq_oss_timer *rec) 71 71 { 72 72 if (rec) { 73 73 snd_seq_oss_timer_stop(rec); ··· 82 82 * 0 : not a timer event -- enqueue this event 83 83 */ 84 84 int 85 - snd_seq_oss_process_timer_event(seq_oss_timer_t *rec, evrec_t *ev) 85 + snd_seq_oss_process_timer_event(struct seq_oss_timer *rec, union evrec *ev) 86 86 { 87 87 abstime_t parm = ev->t.time; 88 88 ··· 125 125 * convert tempo units 126 126 */ 127 127 static void 128 - calc_alsa_tempo(seq_oss_timer_t *timer) 128 + calc_alsa_tempo(struct seq_oss_timer *timer) 129 129 { 130 130 timer->tempo = (60 * 1000000) / timer->oss_tempo; 131 131 timer->ppq = timer->oss_timebase; ··· 136 136 * dispatch a timer event 137 137 */ 138 138 static int 139 - send_timer_event(seq_oss_devinfo_t *dp, int type, int value) 139 + send_timer_event(struct seq_oss_devinfo *dp, int type, int value) 140 140 { 141 - snd_seq_event_t ev; 141 + struct snd_seq_event ev; 142 142 143 143 memset(&ev, 0, sizeof(ev)); 144 144 ev.type = type; ··· 156 156 * set queue tempo and start queue 157 157 */ 158 158 int 159 - snd_seq_oss_timer_start(seq_oss_timer_t *timer) 159 + snd_seq_oss_timer_start(struct seq_oss_timer *timer) 160 160 { 161 - seq_oss_devinfo_t *dp = timer->dp; 162 - snd_seq_queue_tempo_t tmprec; 161 + struct seq_oss_devinfo *dp = timer->dp; 162 + struct snd_seq_queue_tempo tmprec; 163 163 164 164 if (timer->running) 165 165 snd_seq_oss_timer_stop(timer); ··· 181 181 * stop queue 182 182 */ 183 183 int 184 - snd_seq_oss_timer_stop(seq_oss_timer_t *timer) 184 + snd_seq_oss_timer_stop(struct seq_oss_timer *timer) 185 185 { 186 186 if (! timer->running) 187 187 return 0; ··· 195 195 * continue queue 196 196 */ 197 197 int 198 - snd_seq_oss_timer_continue(seq_oss_timer_t *timer) 198 + snd_seq_oss_timer_continue(struct seq_oss_timer *timer) 199 199 { 200 200 if (timer->running) 201 201 return 0; ··· 209 209 * change queue tempo 210 210 */ 211 211 int 212 - snd_seq_oss_timer_tempo(seq_oss_timer_t *timer, int value) 212 + snd_seq_oss_timer_tempo(struct seq_oss_timer *timer, int value) 213 213 { 214 214 if (value < MIN_OSS_TEMPO) 215 215 value = MIN_OSS_TEMPO; ··· 227 227 * ioctls 228 228 */ 229 229 int 230 - snd_seq_oss_timer_ioctl(seq_oss_timer_t *timer, unsigned int cmd, int __user *arg) 230 + snd_seq_oss_timer_ioctl(struct seq_oss_timer *timer, unsigned int cmd, int __user *arg) 231 231 { 232 232 int value; 233 233
+11 -11
sound/core/seq/oss/seq_oss_timer.h
··· 27 27 /* 28 28 * timer information definition 29 29 */ 30 - struct seq_oss_timer_t { 31 - seq_oss_devinfo_t *dp; 30 + struct seq_oss_timer { 31 + struct seq_oss_devinfo *dp; 32 32 reltime_t cur_tick; 33 33 int realtime; 34 34 int running; ··· 37 37 }; 38 38 39 39 40 - seq_oss_timer_t *snd_seq_oss_timer_new(seq_oss_devinfo_t *dp); 41 - void snd_seq_oss_timer_delete(seq_oss_timer_t *dp); 40 + struct seq_oss_timer *snd_seq_oss_timer_new(struct seq_oss_devinfo *dp); 41 + void snd_seq_oss_timer_delete(struct seq_oss_timer *dp); 42 42 43 - int snd_seq_oss_timer_start(seq_oss_timer_t *timer); 44 - int snd_seq_oss_timer_stop(seq_oss_timer_t *timer); 45 - int snd_seq_oss_timer_continue(seq_oss_timer_t *timer); 46 - int snd_seq_oss_timer_tempo(seq_oss_timer_t *timer, int value); 43 + int snd_seq_oss_timer_start(struct seq_oss_timer *timer); 44 + int snd_seq_oss_timer_stop(struct seq_oss_timer *timer); 45 + int snd_seq_oss_timer_continue(struct seq_oss_timer *timer); 46 + int snd_seq_oss_timer_tempo(struct seq_oss_timer *timer, int value); 47 47 #define snd_seq_oss_timer_reset snd_seq_oss_timer_start 48 48 49 - int snd_seq_oss_timer_ioctl(seq_oss_timer_t *timer, unsigned int cmd, int __user *arg); 49 + int snd_seq_oss_timer_ioctl(struct seq_oss_timer *timer, unsigned int cmd, int __user *arg); 50 50 51 51 /* 52 52 * get current processed time 53 53 */ 54 54 static inline abstime_t 55 - snd_seq_oss_timer_cur_tick(seq_oss_timer_t *timer) 55 + snd_seq_oss_timer_cur_tick(struct seq_oss_timer *timer) 56 56 { 57 57 return timer->cur_tick; 58 58 } ··· 62 62 * is realtime event? 63 63 */ 64 64 static inline int 65 - snd_seq_oss_timer_is_realtime(seq_oss_timer_t *timer) 65 + snd_seq_oss_timer_is_realtime(struct seq_oss_timer *timer) 66 66 { 67 67 return timer->realtime; 68 68 }
+17 -17
sound/core/seq/oss/seq_oss_writeq.c
··· 32 32 /* 33 33 * create a write queue record 34 34 */ 35 - seq_oss_writeq_t * 36 - snd_seq_oss_writeq_new(seq_oss_devinfo_t *dp, int maxlen) 35 + struct seq_oss_writeq * 36 + snd_seq_oss_writeq_new(struct seq_oss_devinfo *dp, int maxlen) 37 37 { 38 - seq_oss_writeq_t *q; 39 - snd_seq_client_pool_t pool; 38 + struct seq_oss_writeq *q; 39 + struct snd_seq_client_pool pool; 40 40 41 41 if ((q = kzalloc(sizeof(*q), GFP_KERNEL)) == NULL) 42 42 return NULL; ··· 61 61 * delete the write queue 62 62 */ 63 63 void 64 - snd_seq_oss_writeq_delete(seq_oss_writeq_t *q) 64 + snd_seq_oss_writeq_delete(struct seq_oss_writeq *q) 65 65 { 66 66 snd_seq_oss_writeq_clear(q); /* to be sure */ 67 67 kfree(q); ··· 72 72 * reset the write queue 73 73 */ 74 74 void 75 - snd_seq_oss_writeq_clear(seq_oss_writeq_t *q) 75 + snd_seq_oss_writeq_clear(struct seq_oss_writeq *q) 76 76 { 77 - snd_seq_remove_events_t reset; 77 + struct snd_seq_remove_events reset; 78 78 79 79 memset(&reset, 0, sizeof(reset)); 80 80 reset.remove_mode = SNDRV_SEQ_REMOVE_OUTPUT; /* remove all */ ··· 88 88 * wait until the write buffer has enough room 89 89 */ 90 90 int 91 - snd_seq_oss_writeq_sync(seq_oss_writeq_t *q) 91 + snd_seq_oss_writeq_sync(struct seq_oss_writeq *q) 92 92 { 93 - seq_oss_devinfo_t *dp = q->dp; 93 + struct seq_oss_devinfo *dp = q->dp; 94 94 abstime_t time; 95 95 96 96 time = snd_seq_oss_timer_cur_tick(dp->timer); ··· 98 98 return 0; /* already finished */ 99 99 100 100 if (! q->sync_event_put) { 101 - snd_seq_event_t ev; 102 - evrec_t *rec; 101 + struct snd_seq_event ev; 102 + union evrec *rec; 103 103 104 104 /* put echoback event */ 105 105 memset(&ev, 0, sizeof(ev)); ··· 108 108 ev.time.tick = time; 109 109 /* echo back to itself */ 110 110 snd_seq_oss_fill_addr(dp, &ev, dp->addr.client, dp->addr.port); 111 - rec = (evrec_t*)&ev.data; 111 + rec = (union evrec *)&ev.data; 112 112 rec->t.code = SEQ_SYNCTIMER; 113 113 rec->t.time = time; 114 114 q->sync_event_put = 1; ··· 128 128 * wake up sync - echo event was catched 129 129 */ 130 130 void 131 - snd_seq_oss_writeq_wakeup(seq_oss_writeq_t *q, abstime_t time) 131 + snd_seq_oss_writeq_wakeup(struct seq_oss_writeq *q, abstime_t time) 132 132 { 133 133 unsigned long flags; 134 134 ··· 146 146 * return the unused pool size 147 147 */ 148 148 int 149 - snd_seq_oss_writeq_get_free_size(seq_oss_writeq_t *q) 149 + snd_seq_oss_writeq_get_free_size(struct seq_oss_writeq *q) 150 150 { 151 - snd_seq_client_pool_t pool; 151 + struct snd_seq_client_pool pool; 152 152 pool.client = q->dp->cseq; 153 153 snd_seq_oss_control(q->dp, SNDRV_SEQ_IOCTL_GET_CLIENT_POOL, &pool); 154 154 return pool.output_free; ··· 159 159 * set output threshold size from ioctl 160 160 */ 161 161 void 162 - snd_seq_oss_writeq_set_output(seq_oss_writeq_t *q, int val) 162 + snd_seq_oss_writeq_set_output(struct seq_oss_writeq *q, int val) 163 163 { 164 - snd_seq_client_pool_t pool; 164 + struct snd_seq_client_pool pool; 165 165 pool.client = q->dp->cseq; 166 166 snd_seq_oss_control(q->dp, SNDRV_SEQ_IOCTL_GET_CLIENT_POOL, &pool); 167 167 pool.output_room = val;
+9 -9
sound/core/seq/oss/seq_oss_writeq.h
··· 25 25 #include "seq_oss_device.h" 26 26 27 27 28 - struct seq_oss_writeq_t { 29 - seq_oss_devinfo_t *dp; 28 + struct seq_oss_writeq { 29 + struct seq_oss_devinfo *dp; 30 30 int maxlen; 31 31 abstime_t sync_time; 32 32 int sync_event_put; ··· 38 38 /* 39 39 * seq_oss_writeq.c 40 40 */ 41 - seq_oss_writeq_t *snd_seq_oss_writeq_new(seq_oss_devinfo_t *dp, int maxlen); 42 - void snd_seq_oss_writeq_delete(seq_oss_writeq_t *q); 43 - void snd_seq_oss_writeq_clear(seq_oss_writeq_t *q); 44 - int snd_seq_oss_writeq_sync(seq_oss_writeq_t *q); 45 - void snd_seq_oss_writeq_wakeup(seq_oss_writeq_t *q, abstime_t time); 46 - int snd_seq_oss_writeq_get_free_size(seq_oss_writeq_t *q); 47 - void snd_seq_oss_writeq_set_output(seq_oss_writeq_t *q, int size); 41 + struct seq_oss_writeq *snd_seq_oss_writeq_new(struct seq_oss_devinfo *dp, int maxlen); 42 + void snd_seq_oss_writeq_delete(struct seq_oss_writeq *q); 43 + void snd_seq_oss_writeq_clear(struct seq_oss_writeq *q); 44 + int snd_seq_oss_writeq_sync(struct seq_oss_writeq *q); 45 + void snd_seq_oss_writeq_wakeup(struct seq_oss_writeq *q, abstime_t time); 46 + int snd_seq_oss_writeq_get_free_size(struct seq_oss_writeq *q); 47 + void snd_seq_oss_writeq_set_output(struct seq_oss_writeq *q, int size); 48 48 49 49 50 50 #endif