aboutsummaryrefslogtreecommitdiffstats
path: root/sound/synth/emux/emux_oss.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_oss.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_oss.c')
-rw-r--r--sound/synth/emux/emux_oss.c90
1 files changed, 48 insertions, 42 deletions
diff --git a/sound/synth/emux/emux_oss.c b/sound/synth/emux/emux_oss.c
index 5272f4ac8afd..dfbfcfbe5dd2 100644
--- a/sound/synth/emux/emux_oss.c
+++ b/sound/synth/emux/emux_oss.c
@@ -31,19 +31,25 @@
31#include "emux_voice.h" 31#include "emux_voice.h"
32#include <sound/asoundef.h> 32#include <sound/asoundef.h>
33 33
34static int snd_emux_open_seq_oss(snd_seq_oss_arg_t *arg, void *closure); 34static int snd_emux_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure);
35static int snd_emux_close_seq_oss(snd_seq_oss_arg_t *arg); 35static int snd_emux_close_seq_oss(struct snd_seq_oss_arg *arg);
36static int snd_emux_ioctl_seq_oss(snd_seq_oss_arg_t *arg, unsigned int cmd, unsigned long ioarg); 36static int snd_emux_ioctl_seq_oss(struct snd_seq_oss_arg *arg, unsigned int cmd,
37static int snd_emux_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format, const char __user *buf, int offs, int count); 37 unsigned long ioarg);
38static int snd_emux_reset_seq_oss(snd_seq_oss_arg_t *arg); 38static int snd_emux_load_patch_seq_oss(struct snd_seq_oss_arg *arg, int format,
39static int snd_emux_event_oss_input(snd_seq_event_t *ev, int direct, void *private, int atomic, int hop); 39 const char __user *buf, int offs, int count);
40static void reset_port_mode(snd_emux_port_t *port, int midi_mode); 40static int snd_emux_reset_seq_oss(struct snd_seq_oss_arg *arg);
41static void emuspec_control(snd_emux_t *emu, snd_emux_port_t *port, int cmd, unsigned char *event, int atomic, int hop); 41static int snd_emux_event_oss_input(struct snd_seq_event *ev, int direct,
42static void gusspec_control(snd_emux_t *emu, snd_emux_port_t *port, int cmd, unsigned char *event, int atomic, int hop); 42 void *private, int atomic, int hop);
43static void fake_event(snd_emux_t *emu, snd_emux_port_t *port, int ch, int param, int val, int atomic, int hop); 43static void reset_port_mode(struct snd_emux_port *port, int midi_mode);
44static void emuspec_control(struct snd_emux *emu, struct snd_emux_port *port,
45 int cmd, unsigned char *event, int atomic, int hop);
46static void gusspec_control(struct snd_emux *emu, struct snd_emux_port *port,
47 int cmd, unsigned char *event, int atomic, int hop);
48static void fake_event(struct snd_emux *emu, struct snd_emux_port *port,
49 int ch, int param, int val, int atomic, int hop);
44 50
45/* operators */ 51/* operators */
46static snd_seq_oss_callback_t oss_callback = { 52static struct snd_seq_oss_callback oss_callback = {
47 .owner = THIS_MODULE, 53 .owner = THIS_MODULE,
48 .open = snd_emux_open_seq_oss, 54 .open = snd_emux_open_seq_oss,
49 .close = snd_emux_close_seq_oss, 55 .close = snd_emux_close_seq_oss,
@@ -58,13 +64,13 @@ static snd_seq_oss_callback_t oss_callback = {
58 */ 64 */
59 65
60void 66void
61snd_emux_init_seq_oss(snd_emux_t *emu) 67snd_emux_init_seq_oss(struct snd_emux *emu)
62{ 68{
63 snd_seq_oss_reg_t *arg; 69 struct snd_seq_oss_reg *arg;
64 snd_seq_device_t *dev; 70 struct snd_seq_device *dev;
65 71
66 if (snd_seq_device_new(emu->card, 0, SNDRV_SEQ_DEV_ID_OSS, 72 if (snd_seq_device_new(emu->card, 0, SNDRV_SEQ_DEV_ID_OSS,
67 sizeof(snd_seq_oss_reg_t), &dev) < 0) 73 sizeof(struct snd_seq_oss_reg), &dev) < 0)
68 return; 74 return;
69 75
70 emu->oss_synth = dev; 76 emu->oss_synth = dev;
@@ -85,7 +91,7 @@ snd_emux_init_seq_oss(snd_emux_t *emu)
85 * unregister 91 * unregister
86 */ 92 */
87void 93void
88snd_emux_detach_seq_oss(snd_emux_t *emu) 94snd_emux_detach_seq_oss(struct snd_emux *emu)
89{ 95{
90 if (emu->oss_synth) { 96 if (emu->oss_synth) {
91 snd_device_free(emu->card, emu->oss_synth); 97 snd_device_free(emu->card, emu->oss_synth);
@@ -101,11 +107,11 @@ snd_emux_detach_seq_oss(snd_emux_t *emu)
101 * open port for OSS sequencer 107 * open port for OSS sequencer
102 */ 108 */
103static int 109static int
104snd_emux_open_seq_oss(snd_seq_oss_arg_t *arg, void *closure) 110snd_emux_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure)
105{ 111{
106 snd_emux_t *emu; 112 struct snd_emux *emu;
107 snd_emux_port_t *p; 113 struct snd_emux_port *p;
108 snd_seq_port_callback_t callback; 114 struct snd_seq_port_callback callback;
109 char tmpname[64]; 115 char tmpname[64];
110 116
111 emu = closure; 117 emu = closure;
@@ -153,7 +159,7 @@ snd_emux_open_seq_oss(snd_seq_oss_arg_t *arg, void *closure)
153 * reset port mode 159 * reset port mode
154 */ 160 */
155static void 161static void
156reset_port_mode(snd_emux_port_t *port, int midi_mode) 162reset_port_mode(struct snd_emux_port *port, int midi_mode)
157{ 163{
158 if (midi_mode) { 164 if (midi_mode) {
159 port->port_mode = SNDRV_EMUX_PORT_MODE_OSS_MIDI; 165 port->port_mode = SNDRV_EMUX_PORT_MODE_OSS_MIDI;
@@ -173,10 +179,10 @@ reset_port_mode(snd_emux_port_t *port, int midi_mode)
173 * close port 179 * close port
174 */ 180 */
175static int 181static int
176snd_emux_close_seq_oss(snd_seq_oss_arg_t *arg) 182snd_emux_close_seq_oss(struct snd_seq_oss_arg *arg)
177{ 183{
178 snd_emux_t *emu; 184 struct snd_emux *emu;
179 snd_emux_port_t *p; 185 struct snd_emux_port *p;
180 186
181 snd_assert(arg != NULL, return -ENXIO); 187 snd_assert(arg != NULL, return -ENXIO);
182 p = arg->private_data; 188 p = arg->private_data;
@@ -200,11 +206,11 @@ snd_emux_close_seq_oss(snd_seq_oss_arg_t *arg)
200 * load patch 206 * load patch
201 */ 207 */
202static int 208static int
203snd_emux_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format, 209snd_emux_load_patch_seq_oss(struct snd_seq_oss_arg *arg, int format,
204 const char __user *buf, int offs, int count) 210 const char __user *buf, int offs, int count)
205{ 211{
206 snd_emux_t *emu; 212 struct snd_emux *emu;
207 snd_emux_port_t *p; 213 struct snd_emux_port *p;
208 int rc; 214 int rc;
209 215
210 snd_assert(arg != NULL, return -ENXIO); 216 snd_assert(arg != NULL, return -ENXIO);
@@ -218,7 +224,7 @@ snd_emux_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format,
218 rc = snd_soundfont_load_guspatch(emu->sflist, buf, count, 224 rc = snd_soundfont_load_guspatch(emu->sflist, buf, count,
219 SF_CLIENT_NO(p->chset.port)); 225 SF_CLIENT_NO(p->chset.port));
220 else if (format == SNDRV_OSS_SOUNDFONT_PATCH) { 226 else if (format == SNDRV_OSS_SOUNDFONT_PATCH) {
221 soundfont_patch_info_t patch; 227 struct soundfont_patch_info patch;
222 if (count < (int)sizeof(patch)) 228 if (count < (int)sizeof(patch))
223 rc = -EINVAL; 229 rc = -EINVAL;
224 if (copy_from_user(&patch, buf, sizeof(patch))) 230 if (copy_from_user(&patch, buf, sizeof(patch)))
@@ -242,10 +248,10 @@ snd_emux_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format,
242 * ioctl 248 * ioctl
243 */ 249 */
244static int 250static int
245snd_emux_ioctl_seq_oss(snd_seq_oss_arg_t *arg, unsigned int cmd, unsigned long ioarg) 251snd_emux_ioctl_seq_oss(struct snd_seq_oss_arg *arg, unsigned int cmd, unsigned long ioarg)
246{ 252{
247 snd_emux_port_t *p; 253 struct snd_emux_port *p;
248 snd_emux_t *emu; 254 struct snd_emux *emu;
249 255
250 snd_assert(arg != NULL, return -ENXIO); 256 snd_assert(arg != NULL, return -ENXIO);
251 p = arg->private_data; 257 p = arg->private_data;
@@ -273,9 +279,9 @@ snd_emux_ioctl_seq_oss(snd_seq_oss_arg_t *arg, unsigned int cmd, unsigned long i
273 * reset device 279 * reset device
274 */ 280 */
275static int 281static int
276snd_emux_reset_seq_oss(snd_seq_oss_arg_t *arg) 282snd_emux_reset_seq_oss(struct snd_seq_oss_arg *arg)
277{ 283{
278 snd_emux_port_t *p; 284 struct snd_emux_port *p;
279 285
280 snd_assert(arg != NULL, return -ENXIO); 286 snd_assert(arg != NULL, return -ENXIO);
281 p = arg->private_data; 287 p = arg->private_data;
@@ -289,11 +295,11 @@ snd_emux_reset_seq_oss(snd_seq_oss_arg_t *arg)
289 * receive raw events: only SEQ_PRIVATE is accepted. 295 * receive raw events: only SEQ_PRIVATE is accepted.
290 */ 296 */
291static int 297static int
292snd_emux_event_oss_input(snd_seq_event_t *ev, int direct, void *private_data, 298snd_emux_event_oss_input(struct snd_seq_event *ev, int direct, void *private_data,
293 int atomic, int hop) 299 int atomic, int hop)
294{ 300{
295 snd_emux_t *emu; 301 struct snd_emux *emu;
296 snd_emux_port_t *p; 302 struct snd_emux_port *p;
297 unsigned char cmd, *data; 303 unsigned char cmd, *data;
298 304
299 p = private_data; 305 p = private_data;
@@ -320,14 +326,14 @@ snd_emux_event_oss_input(snd_seq_event_t *ev, int direct, void *private_data,
320 * OSS/AWE driver specific h/w controls 326 * OSS/AWE driver specific h/w controls
321 */ 327 */
322static void 328static void
323emuspec_control(snd_emux_t *emu, snd_emux_port_t *port, int cmd, 329emuspec_control(struct snd_emux *emu, struct snd_emux_port *port, int cmd,
324 unsigned char *event, int atomic, int hop) 330 unsigned char *event, int atomic, int hop)
325{ 331{
326 int voice; 332 int voice;
327 unsigned short p1; 333 unsigned short p1;
328 short p2; 334 short p2;
329 int i; 335 int i;
330 snd_midi_channel_t *chan; 336 struct snd_midi_channel *chan;
331 337
332 voice = event[3]; 338 voice = event[3];
333 if (voice < 0 || voice >= port->chset.max_channels) 339 if (voice < 0 || voice >= port->chset.max_channels)
@@ -415,14 +421,14 @@ emuspec_control(snd_emux_t *emu, snd_emux_port_t *port, int cmd,
415#include <linux/ultrasound.h> 421#include <linux/ultrasound.h>
416 422
417static void 423static void
418gusspec_control(snd_emux_t *emu, snd_emux_port_t *port, int cmd, 424gusspec_control(struct snd_emux *emu, struct snd_emux_port *port, int cmd,
419 unsigned char *event, int atomic, int hop) 425 unsigned char *event, int atomic, int hop)
420{ 426{
421 int voice; 427 int voice;
422 unsigned short p1; 428 unsigned short p1;
423 short p2; 429 short p2;
424 int plong; 430 int plong;
425 snd_midi_channel_t *chan; 431 struct snd_midi_channel *chan;
426 432
427 if (port->port_mode != SNDRV_EMUX_PORT_MODE_OSS_SYNTH) 433 if (port->port_mode != SNDRV_EMUX_PORT_MODE_OSS_SYNTH)
428 return; 434 return;
@@ -483,9 +489,9 @@ gusspec_control(snd_emux_t *emu, snd_emux_port_t *port, int cmd,
483 * send an event to midi emulation 489 * send an event to midi emulation
484 */ 490 */
485static void 491static void
486fake_event(snd_emux_t *emu, snd_emux_port_t *port, int ch, int param, int val, int atomic, int hop) 492fake_event(struct snd_emux *emu, struct snd_emux_port *port, int ch, int param, int val, int atomic, int hop)
487{ 493{
488 snd_seq_event_t ev; 494 struct snd_seq_event ev;
489 memset(&ev, 0, sizeof(ev)); 495 memset(&ev, 0, sizeof(ev));
490 ev.type = SNDRV_SEQ_EVENT_CONTROLLER; 496 ev.type = SNDRV_SEQ_EVENT_CONTROLLER;
491 ev.data.control.channel = ch; 497 ev.data.control.channel = ch;