aboutsummaryrefslogtreecommitdiffstats
path: root/sound/synth/emux/emux_seq.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 08:24:47 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:18:14 -0500
commit03da312ac080b4f5c9359c233b8812cc93a035fe (patch)
tree1a6767ca18964b53442ecfd538141b12e81b23be /sound/synth/emux/emux_seq.c
parentee42381e71c56328db9e9d64d19a4de7a2f09a93 (diff)
[ALSA] Remove xxx_t typedefs: Emu-X synth
Modules: Common EMU synth,SoundFont,Synth Remove xxx_t typedefs from the Emu-X synth support. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/synth/emux/emux_seq.c')
-rw-r--r--sound/synth/emux/emux_seq.c74
1 files changed, 37 insertions, 37 deletions
diff --git a/sound/synth/emux/emux_seq.c b/sound/synth/emux/emux_seq.c
index 8ccd33f4aa57..f5a832ff362c 100644
--- a/sound/synth/emux/emux_seq.c
+++ b/sound/synth/emux/emux_seq.c
@@ -25,15 +25,15 @@
25 25
26/* Prototypes for static functions */ 26/* Prototypes for static functions */
27static void free_port(void *private); 27static void free_port(void *private);
28static void snd_emux_init_port(snd_emux_port_t *p); 28static void snd_emux_init_port(struct snd_emux_port *p);
29static int snd_emux_use(void *private_data, snd_seq_port_subscribe_t *info); 29static int snd_emux_use(void *private_data, struct snd_seq_port_subscribe *info);
30static int snd_emux_unuse(void *private_data, snd_seq_port_subscribe_t *info); 30static int snd_emux_unuse(void *private_data, struct snd_seq_port_subscribe *info);
31static int get_client(snd_card_t *card, int index, char *name); 31static int get_client(struct snd_card *card, int index, char *name);
32 32
33/* 33/*
34 * MIDI emulation operators 34 * MIDI emulation operators
35 */ 35 */
36static snd_midi_op_t emux_ops = { 36static struct snd_midi_op emux_ops = {
37 snd_emux_note_on, 37 snd_emux_note_on,
38 snd_emux_note_off, 38 snd_emux_note_off,
39 snd_emux_key_press, 39 snd_emux_key_press,
@@ -65,10 +65,10 @@ static snd_midi_op_t emux_ops = {
65 * can connect to these ports to play midi data. 65 * can connect to these ports to play midi data.
66 */ 66 */
67int 67int
68snd_emux_init_seq(snd_emux_t *emu, snd_card_t *card, int index) 68snd_emux_init_seq(struct snd_emux *emu, struct snd_card *card, int index)
69{ 69{
70 int i; 70 int i;
71 snd_seq_port_callback_t pinfo; 71 struct snd_seq_port_callback pinfo;
72 char tmpname[64]; 72 char tmpname[64];
73 73
74 sprintf(tmpname, "%s WaveTable", emu->name); 74 sprintf(tmpname, "%s WaveTable", emu->name);
@@ -94,7 +94,7 @@ snd_emux_init_seq(snd_emux_t *emu, snd_card_t *card, int index)
94 pinfo.event_input = snd_emux_event_input; 94 pinfo.event_input = snd_emux_event_input;
95 95
96 for (i = 0; i < emu->num_ports; i++) { 96 for (i = 0; i < emu->num_ports; i++) {
97 snd_emux_port_t *p; 97 struct snd_emux_port *p;
98 98
99 sprintf(tmpname, "%s Port %d", emu->name, i); 99 sprintf(tmpname, "%s Port %d", emu->name, i);
100 p = snd_emux_create_port(emu, tmpname, MIDI_CHANNELS, 100 p = snd_emux_create_port(emu, tmpname, MIDI_CHANNELS,
@@ -119,7 +119,7 @@ snd_emux_init_seq(snd_emux_t *emu, snd_card_t *card, int index)
119 * destroy the kernel client. 119 * destroy the kernel client.
120 */ 120 */
121void 121void
122snd_emux_detach_seq(snd_emux_t *emu) 122snd_emux_detach_seq(struct snd_emux *emu)
123{ 123{
124 if (emu->voices) 124 if (emu->voices)
125 snd_emux_terminate_all(emu); 125 snd_emux_terminate_all(emu);
@@ -137,12 +137,12 @@ snd_emux_detach_seq(snd_emux_t *emu)
137 * create a sequencer port and channel_set 137 * create a sequencer port and channel_set
138 */ 138 */
139 139
140snd_emux_port_t * 140struct snd_emux_port *
141snd_emux_create_port(snd_emux_t *emu, char *name, 141snd_emux_create_port(struct snd_emux *emu, char *name,
142 int max_channels, int oss_port, 142 int max_channels, int oss_port,
143 snd_seq_port_callback_t *callback) 143 struct snd_seq_port_callback *callback)
144{ 144{
145 snd_emux_port_t *p; 145 struct snd_emux_port *p;
146 int i, type, cap; 146 int i, type, cap;
147 147
148 /* Allocate structures for this channel */ 148 /* Allocate structures for this channel */
@@ -150,7 +150,7 @@ snd_emux_create_port(snd_emux_t *emu, char *name,
150 snd_printk("no memory\n"); 150 snd_printk("no memory\n");
151 return NULL; 151 return NULL;
152 } 152 }
153 p->chset.channels = kcalloc(max_channels, sizeof(snd_midi_channel_t), GFP_KERNEL); 153 p->chset.channels = kcalloc(max_channels, sizeof(struct snd_midi_channel), GFP_KERNEL);
154 if (p->chset.channels == NULL) { 154 if (p->chset.channels == NULL) {
155 snd_printk("no memory\n"); 155 snd_printk("no memory\n");
156 kfree(p); 156 kfree(p);
@@ -190,7 +190,7 @@ snd_emux_create_port(snd_emux_t *emu, char *name,
190static void 190static void
191free_port(void *private_data) 191free_port(void *private_data)
192{ 192{
193 snd_emux_port_t *p; 193 struct snd_emux_port *p;
194 194
195 p = private_data; 195 p = private_data;
196 if (p) { 196 if (p) {
@@ -209,7 +209,7 @@ free_port(void *private_data)
209 * initialize the port specific parameters 209 * initialize the port specific parameters
210 */ 210 */
211static void 211static void
212snd_emux_init_port(snd_emux_port_t *p) 212snd_emux_init_port(struct snd_emux_port *p)
213{ 213{
214 p->drum_flags = DEFAULT_DRUM_FLAGS; 214 p->drum_flags = DEFAULT_DRUM_FLAGS;
215 p->volume_atten = 0; 215 p->volume_atten = 0;
@@ -222,7 +222,7 @@ snd_emux_init_port(snd_emux_port_t *p)
222 * reset port 222 * reset port
223 */ 223 */
224void 224void
225snd_emux_reset_port(snd_emux_port_t *port) 225snd_emux_reset_port(struct snd_emux_port *port)
226{ 226{
227 int i; 227 int i;
228 228
@@ -241,7 +241,7 @@ snd_emux_reset_port(snd_emux_port_t *port)
241 port->ctrls[EMUX_MD_REALTIME_PAN] = 1; 241 port->ctrls[EMUX_MD_REALTIME_PAN] = 1;
242 242
243 for (i = 0; i < port->chset.max_channels; i++) { 243 for (i = 0; i < port->chset.max_channels; i++) {
244 snd_midi_channel_t *chan = port->chset.channels + i; 244 struct snd_midi_channel *chan = port->chset.channels + i;
245 chan->drum_channel = ((port->drum_flags >> i) & 1) ? 1 : 0; 245 chan->drum_channel = ((port->drum_flags >> i) & 1) ? 1 : 0;
246 } 246 }
247} 247}
@@ -251,10 +251,10 @@ snd_emux_reset_port(snd_emux_port_t *port)
251 * input sequencer event 251 * input sequencer event
252 */ 252 */
253int 253int
254snd_emux_event_input(snd_seq_event_t *ev, int direct, void *private_data, 254snd_emux_event_input(struct snd_seq_event *ev, int direct, void *private_data,
255 int atomic, int hop) 255 int atomic, int hop)
256{ 256{
257 snd_emux_port_t *port; 257 struct snd_emux_port *port;
258 258
259 port = private_data; 259 port = private_data;
260 snd_assert(port != NULL && ev != NULL, return -EINVAL); 260 snd_assert(port != NULL && ev != NULL, return -EINVAL);
@@ -269,7 +269,7 @@ snd_emux_event_input(snd_seq_event_t *ev, int direct, void *private_data,
269 * increment usage count 269 * increment usage count
270 */ 270 */
271int 271int
272snd_emux_inc_count(snd_emux_t *emu) 272snd_emux_inc_count(struct snd_emux *emu)
273{ 273{
274 emu->used++; 274 emu->used++;
275 if (!try_module_get(emu->ops.owner)) 275 if (!try_module_get(emu->ops.owner))
@@ -288,7 +288,7 @@ snd_emux_inc_count(snd_emux_t *emu)
288 * decrease usage count 288 * decrease usage count
289 */ 289 */
290void 290void
291snd_emux_dec_count(snd_emux_t *emu) 291snd_emux_dec_count(struct snd_emux *emu)
292{ 292{
293 module_put(emu->card->module); 293 module_put(emu->card->module);
294 emu->used--; 294 emu->used--;
@@ -302,10 +302,10 @@ snd_emux_dec_count(snd_emux_t *emu)
302 * Routine that is called upon a first use of a particular port 302 * Routine that is called upon a first use of a particular port
303 */ 303 */
304static int 304static int
305snd_emux_use(void *private_data, snd_seq_port_subscribe_t *info) 305snd_emux_use(void *private_data, struct snd_seq_port_subscribe *info)
306{ 306{
307 snd_emux_port_t *p; 307 struct snd_emux_port *p;
308 snd_emux_t *emu; 308 struct snd_emux *emu;
309 309
310 p = private_data; 310 p = private_data;
311 snd_assert(p != NULL, return -EINVAL); 311 snd_assert(p != NULL, return -EINVAL);
@@ -323,10 +323,10 @@ snd_emux_use(void *private_data, snd_seq_port_subscribe_t *info)
323 * Routine that is called upon the last unuse() of a particular port. 323 * Routine that is called upon the last unuse() of a particular port.
324 */ 324 */
325static int 325static int
326snd_emux_unuse(void *private_data, snd_seq_port_subscribe_t *info) 326snd_emux_unuse(void *private_data, struct snd_seq_port_subscribe *info)
327{ 327{
328 snd_emux_port_t *p; 328 struct snd_emux_port *p;
329 snd_emux_t *emu; 329 struct snd_emux *emu;
330 330
331 p = private_data; 331 p = private_data;
332 snd_assert(p != NULL, return -EINVAL); 332 snd_assert(p != NULL, return -EINVAL);
@@ -345,10 +345,10 @@ snd_emux_unuse(void *private_data, snd_seq_port_subscribe_t *info)
345 * Create a sequencer client 345 * Create a sequencer client
346 */ 346 */
347static int 347static int
348get_client(snd_card_t *card, int index, char *name) 348get_client(struct snd_card *card, int index, char *name)
349{ 349{
350 snd_seq_client_callback_t callbacks; 350 struct snd_seq_client_callback callbacks;
351 snd_seq_client_info_t cinfo; 351 struct snd_seq_client_info cinfo;
352 int client; 352 int client;
353 353
354 memset(&callbacks, 0, sizeof(callbacks)); 354 memset(&callbacks, 0, sizeof(callbacks));
@@ -374,7 +374,7 @@ get_client(snd_card_t *card, int index, char *name)
374/* 374/*
375 * attach virtual rawmidi devices 375 * attach virtual rawmidi devices
376 */ 376 */
377int snd_emux_init_virmidi(snd_emux_t *emu, snd_card_t *card) 377int snd_emux_init_virmidi(struct snd_emux *emu, struct snd_card *card)
378{ 378{
379 int i; 379 int i;
380 380
@@ -382,13 +382,13 @@ int snd_emux_init_virmidi(snd_emux_t *emu, snd_card_t *card)
382 if (emu->midi_ports <= 0) 382 if (emu->midi_ports <= 0)
383 return 0; 383 return 0;
384 384
385 emu->vmidi = kcalloc(emu->midi_ports, sizeof(snd_rawmidi_t*), GFP_KERNEL); 385 emu->vmidi = kcalloc(emu->midi_ports, sizeof(struct snd_rawmidi *), GFP_KERNEL);
386 if (emu->vmidi == NULL) 386 if (emu->vmidi == NULL)
387 return -ENOMEM; 387 return -ENOMEM;
388 388
389 for (i = 0; i < emu->midi_ports; i++) { 389 for (i = 0; i < emu->midi_ports; i++) {
390 snd_rawmidi_t *rmidi; 390 struct snd_rawmidi *rmidi;
391 snd_virmidi_dev_t *rdev; 391 struct snd_virmidi_dev *rdev;
392 if (snd_virmidi_new(card, emu->midi_devidx + i, &rmidi) < 0) 392 if (snd_virmidi_new(card, emu->midi_devidx + i, &rmidi) < 0)
393 goto __error; 393 goto __error;
394 rdev = rmidi->private_data; 394 rdev = rmidi->private_data;
@@ -411,7 +411,7 @@ __error:
411 return -ENOMEM; 411 return -ENOMEM;
412} 412}
413 413
414int snd_emux_delete_virmidi(snd_emux_t *emu) 414int snd_emux_delete_virmidi(struct snd_emux *emu)
415{ 415{
416 int i; 416 int i;
417 417