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