aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/gus/gus_synth.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/isa/gus/gus_synth.c')
-rw-r--r--sound/isa/gus/gus_synth.c70
1 files changed, 35 insertions, 35 deletions
diff --git a/sound/isa/gus/gus_synth.c b/sound/isa/gus/gus_synth.c
index f51c386ee19..9c7d6986f62 100644
--- a/sound/isa/gus/gus_synth.c
+++ b/sound/isa/gus/gus_synth.c
@@ -34,10 +34,10 @@ MODULE_LICENSE("GPL");
34 * 34 *
35 */ 35 */
36 36
37static void snd_gus_synth_free_voices(snd_gus_card_t * gus, int client, int port) 37static void snd_gus_synth_free_voices(struct snd_gus_card * gus, int client, int port)
38{ 38{
39 int idx; 39 int idx;
40 snd_gus_voice_t * voice; 40 struct snd_gus_voice * voice;
41 41
42 for (idx = 0; idx < 32; idx++) { 42 for (idx = 0; idx < 32; idx++) {
43 voice = &gus->gf1.voices[idx]; 43 voice = &gus->gf1.voices[idx];
@@ -46,11 +46,11 @@ static void snd_gus_synth_free_voices(snd_gus_card_t * gus, int client, int port
46 } 46 }
47} 47}
48 48
49static int snd_gus_synth_use(void *private_data, snd_seq_port_subscribe_t *info) 49static int snd_gus_synth_use(void *private_data, struct snd_seq_port_subscribe *info)
50{ 50{
51 snd_gus_port_t * port = (snd_gus_port_t *)private_data; 51 struct snd_gus_port * port = private_data;
52 snd_gus_card_t * gus = port->gus; 52 struct snd_gus_card * gus = port->gus;
53 snd_gus_voice_t * voice; 53 struct snd_gus_voice * voice;
54 unsigned int idx; 54 unsigned int idx;
55 55
56 if (info->voices > 32) 56 if (info->voices > 32)
@@ -74,10 +74,10 @@ static int snd_gus_synth_use(void *private_data, snd_seq_port_subscribe_t *info)
74 return 0; 74 return 0;
75} 75}
76 76
77static int snd_gus_synth_unuse(void *private_data, snd_seq_port_subscribe_t *info) 77static int snd_gus_synth_unuse(void *private_data, struct snd_seq_port_subscribe *info)
78{ 78{
79 snd_gus_port_t * port = (snd_gus_port_t *)private_data; 79 struct snd_gus_port * port = private_data;
80 snd_gus_card_t * gus = port->gus; 80 struct snd_gus_card * gus = port->gus;
81 81
82 down(&gus->register_mutex); 82 down(&gus->register_mutex);
83 snd_gus_synth_free_voices(gus, info->sender.client, info->sender.port); 83 snd_gus_synth_free_voices(gus, info->sender.client, info->sender.port);
@@ -90,19 +90,19 @@ static int snd_gus_synth_unuse(void *private_data, snd_seq_port_subscribe_t *inf
90 * 90 *
91 */ 91 */
92 92
93static void snd_gus_synth_free_private_instruments(snd_gus_port_t *p, int client) 93static void snd_gus_synth_free_private_instruments(struct snd_gus_port *p, int client)
94{ 94{
95 snd_seq_instr_header_t ifree; 95 struct snd_seq_instr_header ifree;
96 96
97 memset(&ifree, 0, sizeof(ifree)); 97 memset(&ifree, 0, sizeof(ifree));
98 ifree.cmd = SNDRV_SEQ_INSTR_FREE_CMD_PRIVATE; 98 ifree.cmd = SNDRV_SEQ_INSTR_FREE_CMD_PRIVATE;
99 snd_seq_instr_list_free_cond(p->gus->gf1.ilist, &ifree, client, 0); 99 snd_seq_instr_list_free_cond(p->gus->gf1.ilist, &ifree, client, 0);
100} 100}
101 101
102static int snd_gus_synth_event_input(snd_seq_event_t *ev, int direct, 102static int snd_gus_synth_event_input(struct snd_seq_event *ev, int direct,
103 void *private_data, int atomic, int hop) 103 void *private_data, int atomic, int hop)
104{ 104{
105 snd_gus_port_t * p = (snd_gus_port_t *) private_data; 105 struct snd_gus_port * p = private_data;
106 106
107 snd_assert(p != NULL, return -EINVAL); 107 snd_assert(p != NULL, return -EINVAL);
108 if (ev->type >= SNDRV_SEQ_EVENT_SAMPLE && 108 if (ev->type >= SNDRV_SEQ_EVENT_SAMPLE &&
@@ -131,12 +131,12 @@ static int snd_gus_synth_event_input(snd_seq_event_t *ev, int direct,
131} 131}
132 132
133static void snd_gus_synth_instr_notify(void *private_data, 133static void snd_gus_synth_instr_notify(void *private_data,
134 snd_seq_kinstr_t *instr, 134 struct snd_seq_kinstr *instr,
135 int what) 135 int what)
136{ 136{
137 unsigned int idx; 137 unsigned int idx;
138 snd_gus_card_t *gus = private_data; 138 struct snd_gus_card *gus = private_data;
139 snd_gus_voice_t *pvoice; 139 struct snd_gus_voice *pvoice;
140 unsigned long flags; 140 unsigned long flags;
141 141
142 spin_lock_irqsave(&gus->event_lock, flags); 142 spin_lock_irqsave(&gus->event_lock, flags);
@@ -160,16 +160,16 @@ static void snd_gus_synth_instr_notify(void *private_data,
160 160
161static void snd_gus_synth_free_port(void *private_data) 161static void snd_gus_synth_free_port(void *private_data)
162{ 162{
163 snd_gus_port_t * p = (snd_gus_port_t *)private_data; 163 struct snd_gus_port * p = private_data;
164 164
165 if (p) 165 if (p)
166 snd_midi_channel_free_set(p->chset); 166 snd_midi_channel_free_set(p->chset);
167} 167}
168 168
169static int snd_gus_synth_create_port(snd_gus_card_t * gus, int idx) 169static int snd_gus_synth_create_port(struct snd_gus_card * gus, int idx)
170{ 170{
171 snd_gus_port_t * p; 171 struct snd_gus_port * p;
172 snd_seq_port_callback_t callbacks; 172 struct snd_seq_port_callback callbacks;
173 char name[32]; 173 char name[32];
174 int result; 174 int result;
175 175
@@ -210,18 +210,18 @@ static int snd_gus_synth_create_port(snd_gus_card_t * gus, int idx)
210 * 210 *
211 */ 211 */
212 212
213static int snd_gus_synth_new_device(snd_seq_device_t *dev) 213static int snd_gus_synth_new_device(struct snd_seq_device *dev)
214{ 214{
215 snd_gus_card_t *gus; 215 struct snd_gus_card *gus;
216 int client, i; 216 int client, i;
217 snd_seq_client_callback_t callbacks; 217 struct snd_seq_client_callback callbacks;
218 snd_seq_client_info_t *cinfo; 218 struct snd_seq_client_info *cinfo;
219 snd_seq_port_subscribe_t sub; 219 struct snd_seq_port_subscribe sub;
220 snd_iwffff_ops_t *iwops; 220 struct snd_iwffff_ops *iwops;
221 snd_gf1_ops_t *gf1ops; 221 struct snd_gf1_ops *gf1ops;
222 snd_simple_ops_t *simpleops; 222 struct snd_simple_ops *simpleops;
223 223
224 gus = *(snd_gus_card_t**)SNDRV_SEQ_DEVICE_ARGPTR(dev); 224 gus = *(struct snd_gus_card **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
225 if (gus == NULL) 225 if (gus == NULL)
226 return -EINVAL; 226 return -EINVAL;
227 227
@@ -293,11 +293,11 @@ static int snd_gus_synth_new_device(snd_seq_device_t *dev)
293 return 0; 293 return 0;
294} 294}
295 295
296static int snd_gus_synth_delete_device(snd_seq_device_t *dev) 296static int snd_gus_synth_delete_device(struct snd_seq_device *dev)
297{ 297{
298 snd_gus_card_t *gus; 298 struct snd_gus_card *gus;
299 299
300 gus = *(snd_gus_card_t**)SNDRV_SEQ_DEVICE_ARGPTR(dev); 300 gus = *(struct snd_gus_card **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
301 if (gus == NULL) 301 if (gus == NULL)
302 return -EINVAL; 302 return -EINVAL;
303 303
@@ -312,13 +312,13 @@ static int snd_gus_synth_delete_device(snd_seq_device_t *dev)
312 312
313static int __init alsa_gus_synth_init(void) 313static int __init alsa_gus_synth_init(void)
314{ 314{
315 static snd_seq_dev_ops_t ops = { 315 static struct snd_seq_dev_ops ops = {
316 snd_gus_synth_new_device, 316 snd_gus_synth_new_device,
317 snd_gus_synth_delete_device 317 snd_gus_synth_delete_device
318 }; 318 };
319 319
320 return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_GUS, &ops, 320 return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_GUS, &ops,
321 sizeof(snd_gus_card_t*)); 321 sizeof(struct snd_gus_card *));
322} 322}
323 323
324static void __exit alsa_gus_synth_exit(void) 324static void __exit alsa_gus_synth_exit(void)