Commit 080dece3 authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela

[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: default avatarTakashi Iwai <tiwai@suse.de>
parent 19ac31e8
...@@ -24,23 +24,17 @@ ...@@ -24,23 +24,17 @@
#include "asequencer.h" #include "asequencer.h"
#include "seq_kernel.h" #include "seq_kernel.h"
/*
* type definitions
*/
typedef struct snd_seq_oss_arg_t snd_seq_oss_arg_t;
typedef struct snd_seq_oss_callback_t snd_seq_oss_callback_t;
/* /*
* argument structure for synthesizer operations * argument structure for synthesizer operations
*/ */
struct snd_seq_oss_arg_t { struct snd_seq_oss_arg {
/* given by OSS sequencer */ /* given by OSS sequencer */
int app_index; /* application unique index */ int app_index; /* application unique index */
int file_mode; /* file mode - see below */ int file_mode; /* file mode - see below */
int seq_mode; /* sequencer mode - see below */ int seq_mode; /* sequencer mode - see below */
/* following must be initialized in open callback */ /* following must be initialized in open callback */
snd_seq_addr_t addr; /* opened port address */ struct snd_seq_addr addr; /* opened port address */
void *private_data; /* private data for lowlevel drivers */ void *private_data; /* private data for lowlevel drivers */
/* note-on event passing mode: initially given by OSS seq, /* note-on event passing mode: initially given by OSS seq,
...@@ -53,14 +47,14 @@ struct snd_seq_oss_arg_t { ...@@ -53,14 +47,14 @@ struct snd_seq_oss_arg_t {
/* /*
* synthesizer operation callbacks * synthesizer operation callbacks
*/ */
struct snd_seq_oss_callback_t { struct snd_seq_oss_callback {
struct module *owner; struct module *owner;
int (*open)(snd_seq_oss_arg_t *p, void *closure); int (*open)(struct snd_seq_oss_arg *p, void *closure);
int (*close)(snd_seq_oss_arg_t *p); int (*close)(struct snd_seq_oss_arg *p);
int (*ioctl)(snd_seq_oss_arg_t *p, unsigned int cmd, unsigned long arg); int (*ioctl)(struct snd_seq_oss_arg *p, unsigned int cmd, unsigned long arg);
int (*load_patch)(snd_seq_oss_arg_t *p, int format, const char __user *buf, int offs, int count); int (*load_patch)(struct snd_seq_oss_arg *p, int format, const char __user *buf, int offs, int count);
int (*reset)(snd_seq_oss_arg_t *p); int (*reset)(struct snd_seq_oss_arg *p);
int (*raw_event)(snd_seq_oss_arg_t *p, unsigned char *data); int (*raw_event)(struct snd_seq_oss_arg *p, unsigned char *data);
}; };
/* flag: file_mode */ /* flag: file_mode */
...@@ -88,13 +82,13 @@ struct snd_seq_oss_callback_t { ...@@ -88,13 +82,13 @@ struct snd_seq_oss_callback_t {
/* /*
* data pointer to snd_seq_register_device * data pointer to snd_seq_register_device
*/ */
typedef struct snd_seq_oss_reg { struct snd_seq_oss_reg {
int type; int type;
int subtype; int subtype;
int nvoices; int nvoices;
snd_seq_oss_callback_t oper; struct snd_seq_oss_callback oper;
void *private_data; void *private_data;
} snd_seq_oss_reg_t; };
/* device id */ /* device id */
#define SNDRV_SEQ_DEV_ID_OSS "seq-oss" #define SNDRV_SEQ_DEV_ID_OSS "seq-oss"
......
...@@ -62,7 +62,7 @@ static ssize_t odev_write(struct file *file, const char __user *buf, size_t coun ...@@ -62,7 +62,7 @@ static ssize_t odev_write(struct file *file, const char __user *buf, size_t coun
static long odev_ioctl(struct file *file, unsigned int cmd, unsigned long arg); static long odev_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
static unsigned int odev_poll(struct file *file, poll_table * wait); static unsigned int odev_poll(struct file *file, poll_table * wait);
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
static void info_read(snd_info_entry_t *entry, snd_info_buffer_t *buf); static void info_read(struct snd_info_entry *entry, struct snd_info_buffer *buf);
#endif #endif
...@@ -73,7 +73,7 @@ static void info_read(snd_info_entry_t *entry, snd_info_buffer_t *buf); ...@@ -73,7 +73,7 @@ static void info_read(snd_info_entry_t *entry, snd_info_buffer_t *buf);
static int __init alsa_seq_oss_init(void) static int __init alsa_seq_oss_init(void)
{ {
int rc; int rc;
static snd_seq_dev_ops_t ops = { static struct snd_seq_dev_ops ops = {
snd_seq_oss_synth_register, snd_seq_oss_synth_register,
snd_seq_oss_synth_unregister, snd_seq_oss_synth_unregister,
}; };
...@@ -92,7 +92,7 @@ static int __init alsa_seq_oss_init(void) ...@@ -92,7 +92,7 @@ static int __init alsa_seq_oss_init(void)
} }
if ((rc = snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_OSS, &ops, if ((rc = snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_OSS, &ops,
sizeof(snd_seq_oss_reg_t))) < 0) { sizeof(struct snd_seq_oss_reg))) < 0) {
snd_seq_oss_delete_client(); snd_seq_oss_delete_client();
unregister_proc(); unregister_proc();
unregister_device(); unregister_device();
...@@ -144,7 +144,7 @@ odev_open(struct inode *inode, struct file *file) ...@@ -144,7 +144,7 @@ odev_open(struct inode *inode, struct file *file)
static int static int
odev_release(struct inode *inode, struct file *file) odev_release(struct inode *inode, struct file *file)
{ {
seq_oss_devinfo_t *dp; struct seq_oss_devinfo *dp;
if ((dp = file->private_data) == NULL) if ((dp = file->private_data) == NULL)
return 0; return 0;
...@@ -161,7 +161,7 @@ odev_release(struct inode *inode, struct file *file) ...@@ -161,7 +161,7 @@ odev_release(struct inode *inode, struct file *file)
static ssize_t static ssize_t
odev_read(struct file *file, char __user *buf, size_t count, loff_t *offset) odev_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
{ {
seq_oss_devinfo_t *dp; struct seq_oss_devinfo *dp;
dp = file->private_data; dp = file->private_data;
snd_assert(dp != NULL, return -EIO); snd_assert(dp != NULL, return -EIO);
return snd_seq_oss_read(dp, buf, count); 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,7 +171,7 @@ odev_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
static ssize_t static ssize_t
odev_write(struct file *file, const char __user *buf, size_t count, loff_t *offset) odev_write(struct file *file, const char __user *buf, size_t count, loff_t *offset)
{ {
seq_oss_devinfo_t *dp; struct seq_oss_devinfo *dp;
dp = file->private_data; dp = file->private_data;
snd_assert(dp != NULL, return -EIO); snd_assert(dp != NULL, return -EIO);
return snd_seq_oss_write(dp, buf, count, file); 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,7 +180,7 @@ odev_write(struct file *file, const char __user *buf, size_t count, loff_t *offs
static long static long
odev_ioctl(struct file *file, unsigned int cmd, unsigned long arg) odev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{ {
seq_oss_devinfo_t *dp; struct seq_oss_devinfo *dp;
dp = file->private_data; dp = file->private_data;
snd_assert(dp != NULL, return -EIO); snd_assert(dp != NULL, return -EIO);
return snd_seq_oss_ioctl(dp, cmd, arg); return snd_seq_oss_ioctl(dp, cmd, arg);
...@@ -195,7 +195,7 @@ odev_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -195,7 +195,7 @@ odev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
static unsigned int static unsigned int
odev_poll(struct file *file, poll_table * wait) odev_poll(struct file *file, poll_table * wait)
{ {
seq_oss_devinfo_t *dp; struct seq_oss_devinfo *dp;
dp = file->private_data; dp = file->private_data;
snd_assert(dp != NULL, return 0); snd_assert(dp != NULL, return 0);
return snd_seq_oss_poll(dp, file, wait); return snd_seq_oss_poll(dp, file, wait);
...@@ -217,7 +217,7 @@ static struct file_operations seq_oss_f_ops = ...@@ -217,7 +217,7 @@ static struct file_operations seq_oss_f_ops =
.compat_ioctl = odev_ioctl_compat, .compat_ioctl = odev_ioctl_compat,
}; };
static snd_minor_t seq_oss_reg = { static struct snd_minor seq_oss_reg = {
.comment = "sequencer", .comment = "sequencer",
.f_ops = &seq_oss_f_ops, .f_ops = &seq_oss_f_ops,
}; };
...@@ -268,10 +268,10 @@ unregister_device(void) ...@@ -268,10 +268,10 @@ unregister_device(void)
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
static snd_info_entry_t *info_entry; static struct snd_info_entry *info_entry;
static void static void
info_read(snd_info_entry_t *entry, snd_info_buffer_t *buf) info_read(struct snd_info_entry *entry, struct snd_info_buffer *buf)
{ {
down(&register_mutex); down(&register_mutex);
snd_iprintf(buf, "OSS sequencer emulation version %s\n", SNDRV_SEQ_OSS_VERSION_STR); snd_iprintf(buf, "OSS sequencer emulation version %s\n", SNDRV_SEQ_OSS_VERSION_STR);
...@@ -287,7 +287,7 @@ static int __init ...@@ -287,7 +287,7 @@ static int __init
register_proc(void) register_proc(void)
{ {
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
snd_info_entry_t *entry; struct snd_info_entry *entry;
entry = snd_info_create_module_entry(THIS_MODULE, SNDRV_SEQ_OSS_PROCNAME, snd_seq_root); entry = snd_info_create_module_entry(THIS_MODULE, SNDRV_SEQ_OSS_PROCNAME, snd_seq_root);
if (entry == NULL) if (entry == NULL)
......
...@@ -55,32 +55,24 @@ ...@@ -55,32 +55,24 @@
* type definitions * type definitions
*/ */
typedef struct seq_oss_devinfo_t seq_oss_devinfo_t;
typedef struct seq_oss_writeq_t seq_oss_writeq_t;
typedef struct seq_oss_readq_t seq_oss_readq_t;
typedef struct seq_oss_timer_t seq_oss_timer_t;
typedef struct seq_oss_synthinfo_t seq_oss_synthinfo_t;
typedef struct seq_oss_synth_sysex_t seq_oss_synth_sysex_t;
typedef struct seq_oss_chinfo_t seq_oss_chinfo_t;
typedef unsigned int reltime_t; typedef unsigned int reltime_t;
typedef unsigned int abstime_t; typedef unsigned int abstime_t;
typedef union evrec_t evrec_t;
/* /*
* synthesizer channel information * synthesizer channel information
*/ */
struct seq_oss_chinfo_t { struct seq_oss_chinfo {
int note, vel; int note, vel;
}; };
/* /*
* synthesizer information * synthesizer information
*/ */
struct seq_oss_synthinfo_t { struct seq_oss_synthinfo {
snd_seq_oss_arg_t arg; struct snd_seq_oss_arg arg;
seq_oss_chinfo_t *ch; struct seq_oss_chinfo *ch;
seq_oss_synth_sysex_t *sysex; struct seq_oss_synth_sysex *sysex;
int nr_voices; int nr_voices;
int opened; int opened;
int is_midi; int is_midi;
...@@ -92,14 +84,14 @@ struct seq_oss_synthinfo_t { ...@@ -92,14 +84,14 @@ struct seq_oss_synthinfo_t {
* sequencer client information * sequencer client information
*/ */
struct seq_oss_devinfo_t { struct seq_oss_devinfo {
int index; /* application index */ int index; /* application index */
int cseq; /* sequencer client number */ int cseq; /* sequencer client number */
int port; /* sequencer port number */ int port; /* sequencer port number */
int queue; /* sequencer queue number */ int queue; /* sequencer queue number */
snd_seq_addr_t addr; /* address of this device */ struct snd_seq_addr addr; /* address of this device */
int seq_mode; /* sequencer mode */ int seq_mode; /* sequencer mode */
int file_mode; /* file access */ int file_mode; /* file access */
...@@ -109,17 +101,17 @@ struct seq_oss_devinfo_t { ...@@ -109,17 +101,17 @@ struct seq_oss_devinfo_t {
/* synth device table */ /* synth device table */
int max_synthdev; int max_synthdev;
seq_oss_synthinfo_t synths[SNDRV_SEQ_OSS_MAX_SYNTH_DEVS]; struct seq_oss_synthinfo synths[SNDRV_SEQ_OSS_MAX_SYNTH_DEVS];
int synth_opened; int synth_opened;
/* output queue */ /* output queue */
seq_oss_writeq_t *writeq; struct seq_oss_writeq *writeq;
/* midi input queue */ /* midi input queue */
seq_oss_readq_t *readq; struct seq_oss_readq *readq;
/* timer */ /* timer */
seq_oss_timer_t *timer; struct seq_oss_timer *timer;
}; };
...@@ -133,24 +125,24 @@ int snd_seq_oss_delete_client(void); ...@@ -133,24 +125,24 @@ int snd_seq_oss_delete_client(void);
/* device file interface */ /* device file interface */
int snd_seq_oss_open(struct file *file, int level); int snd_seq_oss_open(struct file *file, int level);
void snd_seq_oss_release(seq_oss_devinfo_t *dp); void snd_seq_oss_release(struct seq_oss_devinfo *dp);
int snd_seq_oss_ioctl(seq_oss_devinfo_t *dp, unsigned int cmd, unsigned long arg); int snd_seq_oss_ioctl(struct seq_oss_devinfo *dp, unsigned int cmd, unsigned long arg);
int snd_seq_oss_read(seq_oss_devinfo_t *dev, char __user *buf, int count); int snd_seq_oss_read(struct seq_oss_devinfo *dev, char __user *buf, int count);
int snd_seq_oss_write(seq_oss_devinfo_t *dp, const char __user *buf, int count, struct file *opt); int snd_seq_oss_write(struct seq_oss_devinfo *dp, const char __user *buf, int count, struct file *opt);
unsigned int snd_seq_oss_poll(seq_oss_devinfo_t *dp, struct file *file, poll_table * wait); unsigned int snd_seq_oss_poll(struct seq_oss_devinfo *dp, struct file *file, poll_table * wait);
void snd_seq_oss_reset(seq_oss_devinfo_t *dp); void snd_seq_oss_reset(struct seq_oss_devinfo *dp);
void snd_seq_oss_drain_write(seq_oss_devinfo_t *dp); void snd_seq_oss_drain_write(struct seq_oss_devinfo *dp);
/* */ /* */
void snd_seq_oss_process_queue(seq_oss_devinfo_t *dp, abstime_t time); void snd_seq_oss_process_queue(struct seq_oss_devinfo *dp, abstime_t time);
/* proc interface */ /* proc interface */
void snd_seq_oss_system_info_read(snd_info_buffer_t *buf); void snd_seq_oss_system_info_read(struct snd_info_buffer *buf);
void snd_seq_oss_midi_info_read(snd_info_buffer_t *buf); void snd_seq_oss_midi_info_read(struct snd_info_buffer *buf);
void snd_seq_oss_synth_info_read(snd_info_buffer_t *buf); void snd_seq_oss_synth_info_read(struct snd_info_buffer *buf);
void snd_seq_oss_readq_info_read(seq_oss_readq_t *q, snd_info_buffer_t *buf); void snd_seq_oss_readq_info_read(struct seq_oss_readq *q, struct snd_info_buffer *buf);
/* file mode macros */ /* file mode macros */
#define is_read_mode(mode) ((mode) & SNDRV_SEQ_OSS_FILE_READ) #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,21 +151,21 @@ void snd_seq_oss_readq_info_read(seq_oss_readq_t *q, snd_info_buffer_t *buf);
/* dispatch event */ /* dispatch event */
static inline int static inline int
snd_seq_oss_dispatch(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, int atomic, int hop) snd_seq_oss_dispatch(struct seq_oss_devinfo *dp, struct snd_seq_event *ev, int atomic, int hop)
{ {
return snd_seq_kernel_client_dispatch(dp->cseq, ev, atomic, hop); return snd_seq_kernel_client_dispatch(dp->cseq, ev, atomic, hop);
} }
/* ioctl */ /* ioctl */
static inline int static inline int
snd_seq_oss_control(seq_oss_devinfo_t *dp, unsigned int type, void *arg) snd_seq_oss_control(struct seq_oss_devinfo *dp, unsigned int type, void *arg)
{ {
return snd_seq_kernel_client_ctl(dp->cseq, type, arg); return snd_seq_kernel_client_ctl(dp->cseq, type, arg);
} }
/* fill the addresses in header */ /* fill the addresses in header */
static inline void static inline void
snd_seq_oss_fill_addr(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, snd_seq_oss_fill_addr(struct seq_oss_devinfo *dp, struct snd_seq_event *ev,
int dest_client, int dest_port) int dest_client, int dest_port)
{ {
ev->queue = dp->queue; ev->queue = dp->queue;
......
...@@ -31,17 +31,17 @@ ...@@ -31,17 +31,17 @@
/* /*
* prototypes * prototypes
*/ */
static int extended_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev); static int extended_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev);
static int chn_voice_event(seq_oss_devinfo_t *dp, evrec_t *event_rec, snd_seq_event_t *ev); static int chn_voice_event(struct seq_oss_devinfo *dp, union evrec *event_rec, struct snd_seq_event *ev);
static int chn_common_event(seq_oss_devinfo_t *dp, evrec_t *event_rec, snd_seq_event_t *ev); static int chn_common_event(struct seq_oss_devinfo *dp, union evrec *event_rec, struct snd_seq_event *ev);
static int timing_event(seq_oss_devinfo_t *dp, evrec_t *event_rec, snd_seq_event_t *ev); static int timing_event(struct seq_oss_devinfo *dp, union evrec *event_rec, struct snd_seq_event *ev);
static int local_event(seq_oss_devinfo_t *dp, evrec_t *event_rec, snd_seq_event_t *ev); static int local_event(struct seq_oss_devinfo *dp, union evrec *event_rec, struct snd_seq_event *ev);
static int old_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev); static int old_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev);
static int note_on_event(seq_oss_devinfo_t *dp, int dev, int ch, int note, int vel, snd_seq_event_t *ev); static int note_on_event(struct seq_oss_devinfo *dp, int dev, int ch, int note, int vel, struct snd_seq_event *ev);
static int note_off_event(seq_oss_devinfo_t *dp, int dev, int ch, int note, int vel, snd_seq_event_t *ev); static int note_off_event(struct seq_oss_devinfo *dp, int dev, int ch, int note, int vel, struct snd_seq_event *ev);
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); 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);
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); 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);
static int set_echo_event(seq_oss_devinfo_t *dp, evrec_t *rec, snd_seq_event_t *ev); static int set_echo_event(struct seq_oss_devinfo *dp, union evrec *rec, struct snd_seq_event *ev);
/* /*
...@@ -51,7 +51,7 @@ static int set_echo_event(seq_oss_devinfo_t *dp, evrec_t *rec, snd_seq_event_t * ...@@ -51,7 +51,7 @@ static int set_echo_event(seq_oss_devinfo_t *dp, evrec_t *rec, snd_seq_event_t *
*/ */
int int
snd_seq_oss_process_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev) snd_seq_oss_process_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev)
{ {
switch (q->s.code) { switch (q->s.code) {
case SEQ_EXTENDED: 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,7 +104,7 @@ snd_seq_oss_process_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev
/* old type events: mode1 only */ /* old type events: mode1 only */
static int static int
old_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev) old_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev)
{ {
switch (q->s.code) { switch (q->s.code) {
case SEQ_NOTEOFF: case SEQ_NOTEOFF:
...@@ -130,7 +130,7 @@ old_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev) ...@@ -130,7 +130,7 @@ old_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev)
/* 8bytes extended event: mode1 only */ /* 8bytes extended event: mode1 only */
static int static int
extended_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev) extended_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev)
{ {
int val; int val;
...@@ -184,7 +184,7 @@ extended_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev) ...@@ -184,7 +184,7 @@ extended_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev)
/* channel voice events: mode1 and 2 */ /* channel voice events: mode1 and 2 */
static int static int
chn_voice_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev) chn_voice_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev)
{ {
if (q->v.chn >= 32) if (q->v.chn >= 32)
return -EINVAL; return -EINVAL;
...@@ -205,7 +205,7 @@ chn_voice_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev) ...@@ -205,7 +205,7 @@ chn_voice_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev)
/* channel common events: mode1 and 2 */ /* channel common events: mode1 and 2 */
static int static int
chn_common_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev) chn_common_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev)
{ {
if (q->l.chn >= 32) if (q->l.chn >= 32)
return -EINVAL; return -EINVAL;
...@@ -232,14 +232,14 @@ chn_common_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev) ...@@ -232,14 +232,14 @@ chn_common_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev)
/* timer events: mode1 and mode2 */ /* timer events: mode1 and mode2 */
static int static int
timing_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev) timing_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev)
{ {
switch (q->t.cmd) { switch (q->t.cmd) {
case TMR_ECHO: case TMR_ECHO:
if (dp->seq_mode == SNDRV_SEQ_OSS_MODE_MUSIC) if (dp->seq_mode == SNDRV_SEQ_OSS_MODE_MUSIC)
return set_echo_event(dp, q, ev); return set_echo_event(dp, q, ev);
else { else {
evrec_t tmp; union evrec tmp;
memset(&tmp, 0, sizeof(tmp)); memset(&tmp, 0, sizeof(tmp));
/* XXX: only for little-endian! */ /* XXX: only for little-endian! */
tmp.echo = (q->t.time << 8) | SEQ_ECHO; 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,7 +267,7 @@ timing_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev)
/* local events: mode1 and 2 */ /* local events: mode1 and 2 */
static int static int
local_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev) local_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev)
{ {
return -EINVAL; return -EINVAL;
} }
...@@ -283,9 +283,9 @@ local_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev) ...@@ -283,9 +283,9 @@ local_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev)
* Use key-pressure if note >= 128 * Use key-pressure if note >= 128
*/ */
static int static int
note_on_event(seq_oss_devinfo_t *dp, int dev, int ch, int note, int vel, snd_seq_event_t *ev) note_on_event(struct seq_oss_devinfo *dp, int dev, int ch, int note, int vel, struct snd_seq_event *ev)
{ {
seq_oss_synthinfo_t *info = &dp->synths[dev]; struct seq_oss_synthinfo *info = &dp->synths[dev];
switch (info->arg.event_passing) { switch (info->arg.event_passing) {
case SNDRV_SEQ_OSS_PROCESS_EVENTS: case SNDRV_SEQ_OSS_PROCESS_EVENTS:
if (! info->ch || ch < 0 || ch >= info->nr_voices) { 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,9 +338,9 @@ note_on_event(seq_oss_devinfo_t *dp, int dev, int ch, int note, int vel, snd_seq
* process note-off event for OSS synth * process note-off event for OSS synth
*/ */
static int static int
note_off_event(seq_oss_devinfo_t *dp, int dev, int ch, int note, int vel, snd_seq_event_t *ev) note_off_event(struct seq_oss_devinfo *dp, int dev, int ch, int note, int vel, struct snd_seq_event *ev)
{ {
seq_oss_synthinfo_t *info = &dp->synths[dev]; struct seq_oss_synthinfo *info = &dp->synths[dev];
switch (info->arg.event_passing) { switch (info->arg.event_passing) {
case SNDRV_SEQ_OSS_PROCESS_EVENTS: case SNDRV_SEQ_OSS_PROCESS_EVENTS:
if (! info->ch || ch < 0 || ch >= info->nr_voices) { 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,7 +369,7 @@ note_off_event(seq_oss_devinfo_t *dp, int dev, int ch, int note, int vel, snd_se
* create a note event * create a note event
*/ */
static int 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) set_note_event(struct seq_oss_devinfo *dp, int dev, int type, int ch, int note, int vel, struct snd_seq_event *ev)
{ {
if (! snd_seq_oss_synth_is_valid(dp, dev)) if (! snd_seq_oss_synth_is_valid(dp, dev))
return -ENXIO; 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,7 +387,7 @@ set_note_event(seq_oss_devinfo_t *dp, int dev, int type, int ch, int note, int v
* create a control event * create a control event
*/ */
static int 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) set_control_event(struct seq_oss_devinfo *dp, int dev, int type, int ch, int param, int val, struct snd_seq_event *ev)
{ {
if (! snd_seq_oss_synth_is_valid(dp, dev)) if (! snd_seq_oss_synth_is_valid(dp, dev))
return -ENXIO; return -ENXIO;
...@@ -405,7 +405,7 @@ set_control_event(seq_oss_devinfo_t *dp, int dev, int type, int ch, int param, i ...@@ -405,7 +405,7 @@ set_control_event(seq_oss_devinfo_t *dp, int dev, int type, int ch, int param, i
* create an echo event * create an echo event
*/ */
static int static int
set_echo_event(seq_oss_devinfo_t *dp, evrec_t *rec, snd_seq_event_t *ev) set_echo_event(struct seq_oss_devinfo *dp, union evrec *rec, struct snd_seq_event *ev)
{ {
ev->type = SNDRV_SEQ_EVENT_ECHO; ev->type = SNDRV_SEQ_EVENT_ECHO;
/* echo back to itself */ /* 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,11 +419,11 @@ set_echo_event(seq_oss_devinfo_t *dp, evrec_t *rec, snd_seq_event_t *ev)
* the echo event is processed here. * the echo event is processed here.
*/ */
int int
snd_seq_oss_event_input(snd_seq_event_t *ev, int direct, void *private_data, snd_seq_oss_event_input(struct snd_seq_event *ev, int direct, void *private_data,
int atomic, int hop) int atomic, int hop)
{ {
seq_oss_devinfo_t *dp = (seq_oss_devinfo_t *)private_data; struct seq_oss_devinfo *dp = (struct seq_oss_devinfo *)private_data;
evrec_t *rec; union evrec *rec;
if (ev->type != SNDRV_SEQ_EVENT_ECHO) if (ev->type != SNDRV_SEQ_EVENT_ECHO)
return snd_seq_oss_midi_input(ev, direct, private_data); 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,7 +431,7 @@ snd_seq_oss_event_input(snd_seq_event_t *ev, int direct, void *private_data,
if (ev->source.client != dp->cseq) if (ev->source.client != dp->cseq)
return 0; /* ignored */ return 0; /* ignored */
rec = (evrec_t*)&ev->data; rec = (union evrec*)&ev->data;
if (rec->s.code == SEQ_SYNCTIMER) { if (rec->s.code == SEQ_SYNCTIMER) {
/* sync echo back */ /* sync echo back */
snd_seq_oss_writeq_wakeup(dp->writeq, rec->t.time); snd_seq_oss_writeq_wakeup(dp->writeq, rec->t.time);
......
...@@ -29,74 +29,74 @@ ...@@ -29,74 +29,74 @@
#define LONG_EVENT_SIZE 8 #define LONG_EVENT_SIZE 8
/* short event (4bytes) */ /* short event (4bytes) */
typedef struct evrec_short_t { struct evrec_short {
unsigned char code; unsigned char code;
unsigned char parm1; unsigned char parm1;
unsigned char dev; unsigned char dev;
unsigned char parm2; unsigned char parm2;
} evrec_short_t; };
/* short note events (4bytes) */ /* short note events (4bytes) */
typedef struct evrec_note_t { struct evrec_note {
unsigned char code; unsigned char code;
unsigned char chn; unsigned char chn;
unsigned char note; unsigned char note;
unsigned char vel; unsigned char vel;
} evrec_note_t; };
/* long timer events (8bytes) */ /* long timer events (8bytes) */
typedef struct evrec_timer_t { struct evrec_timer {
unsigned char code; unsigned char code;
unsigned char cmd; unsigned char cmd;
unsigned char dummy1, dummy2; unsigned char dummy1, dummy2;
unsigned int time; unsigned int time;
} evrec_timer_t; };
/* long extended events (8bytes) */ /* long extended events (8bytes) */
typedef struct evrec_extended_t { struct evrec_extended {
unsigned char code; unsigned char code;
unsigned char cmd; unsigned char cmd;
unsigned char dev; unsigned char dev;
unsigned char chn; unsigned char chn;
unsigned char p1, p2, p3, p4; unsigned char p1, p2, p3, p4;
} evrec_extended_t; };
/* long channel events (8bytes) */ /* long channel events (8bytes) */
typedef struct evrec_long_t { struct evrec_long {
unsigned char code; unsigned char code;
unsigned char dev; unsigned char dev;
unsigned char cmd; unsigned char cmd;
unsigned char chn; unsigned char chn;
unsigned char p1, p2; unsigned char p1, p2;
unsigned short val; unsigned short val;
} evrec_long_t; };
/* channel voice events (8bytes) */ /* channel voice events (8bytes) */
typedef struct evrec_voice_t { struct evrec_voice {
unsigned char code; unsigned char code;
unsigned char dev; unsigned char dev;
unsigned char cmd; unsigned char cmd;
unsigned char chn; unsigned char chn;
unsigned char note, parm; unsigned char note, parm;
unsigned short dummy; unsigned short dummy;
} evrec_voice_t; };
/* sysex events (8bytes) */ /* sysex events (8bytes) */
typedef struct evrec_sysex_t { struct evrec_sysex {
unsigned char code; unsigned char code;
unsigned char dev; unsigned char dev;
unsigned char buf[6]; unsigned char buf[6];
} evrec_sysex_t; };
/* event record */ /* event record */
union evrec_t { union evrec {
evrec_short_t s; struct evrec_short s;
evrec_note_t n; struct evrec_note n;
evrec_long_t l; struct evrec_long l;
evrec_voice_t v; struct evrec_voice v;
evrec_timer_t t; struct evrec_timer t;
evrec_extended_t e; struct evrec_extended e;
evrec_sysex_t x; struct evrec_sysex x;
unsigned int echo; unsigned int echo;
unsigned char c[LONG_EVENT_SIZE]; unsigned char c[LONG_EVENT_SIZE];
}; };
...@@ -104,9 +104,9 @@ union evrec_t { ...@@ -104,9 +104,9 @@ union evrec_t {
#define ev_is_long(ev) ((ev)->s.code >= 128) #define ev_is_long(ev) ((ev)->s.code >= 128)
#define ev_length(ev) ((ev)->s.code >= 128 ? LONG_EVENT_SIZE : SHORT_EVENT_SIZE) #define ev_length(ev) ((ev)->s.code >= 128 ? LONG_EVENT_SIZE : SHORT_EVENT_SIZE)
int snd_seq_oss_process_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev); int snd_seq_oss_process_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev);
int snd_seq_oss_process_timer_event(seq_oss_timer_t *rec, evrec_t *q); int snd_seq_oss_process_timer_event(struct seq_oss_timer *rec, union evrec *q);
int snd_seq_oss_event_input(snd_seq_event_t *ev, int direct, void *private_data, int atomic, int hop); int snd_seq_oss_event_input(struct snd_seq_event *ev, int direct, void *private_data, int atomic, int hop);
#endif /* __SEQ_OSS_EVENT_H */ #endif /* __SEQ_OSS_EVENT_H */
...@@ -41,17 +41,17 @@ static int system_client = -1; /* ALSA sequencer client number */ ...@@ -41,17 +41,17 @@ static int system_client = -1; /* ALSA sequencer client number */
static int system_port = -1; static int system_port = -1;
static int num_clients; static int num_clients;
static seq_oss_devinfo_t *client_table[SNDRV_SEQ_OSS_MAX_CLIENTS]; static struct seq_oss_devinfo *client_table[SNDRV_SEQ_OSS_MAX_CLIENTS];
/* /*
* prototypes * prototypes
*/ */
static int receive_announce(snd_seq_event_t *ev, int direct, void *private, int atomic, int hop); static int receive_announce(struct snd_seq_event *ev, int direct, void *private, int atomic, int hop);
static int translate_mode(struct file *file); static int translate_mode(struct file *file);
static int create_port(seq_oss_devinfo_t *dp); static int create_port(struct seq_oss_devinfo *dp);
static int delete_port(seq_oss_devinfo_t *dp); static int delete_port(struct seq_oss_devinfo *dp);
static int alloc_seq_queue(seq_oss_devinfo_t *dp); static int alloc_seq_queue(struct seq_oss_devinfo *dp);
static int delete_seq_queue(int queue); static int delete_seq_queue(int queue);
static void free_devinfo(void *private); static void free_devinfo(void *private);
...@@ -65,10 +65,10 @@ int __init ...@@ -65,10 +65,10 @@ int __init
snd_seq_oss_create_client(void) snd_seq_oss_create_client(void)
{ {
int rc; int rc;
snd_seq_client_callback_t callback; struct snd_seq_client_callback callback;
snd_seq_client_info_t *info; struct snd_seq_client_info *info;
snd_seq_port_info_t *port; struct snd_seq_port_info *port;
snd_seq_port_callback_t port_callback; struct snd_seq_port_callback port_callback;
info = kmalloc(sizeof(*info), GFP_KERNEL); info = kmalloc(sizeof(*info), GFP_KERNEL);
port = kmalloc(sizeof(*port), GFP_KERNEL); port = kmalloc(sizeof(*port), GFP_KERNEL);
...@@ -118,7 +118,7 @@ snd_seq_oss_create_client(void) ...@@ -118,7 +118,7 @@ snd_seq_oss_create_client(void)
call_ctl(SNDRV_SEQ_IOCTL_CREATE_PORT, port); call_ctl(SNDRV_SEQ_IOCTL_CREATE_PORT, port);
if ((system_port = port->addr.port) >= 0) { if ((system_port = port->addr.port) >= 0) {
snd_seq_port_subscribe_t subs; struct snd_seq_port_subscribe subs;
memset(&subs, 0, sizeof(subs)); memset(&subs, 0, sizeof(subs));
subs.sender.client = SNDRV_SEQ_CLIENT_SYSTEM; subs.sender.client = SNDRV_SEQ_CLIENT_SYSTEM;
...@@ -140,9 +140,9 @@ snd_seq_oss_create_client(void) ...@@ -140,9 +140,9 @@ snd_seq_oss_create_client(void)
* receive annoucement from system port, and check the midi device * receive annoucement from system port, and check the midi device
*/ */
static int static int
receive_announce(snd_seq_event_t *ev, int direct, void *private, int atomic, int hop) receive_announce(struct snd_seq_event *ev, int direct, void *private, int atomic, int hop)
{ {
snd_seq_port_info_t pinfo; struct snd_seq_port_info pinfo;
if (atomic) if (atomic)
return 0; /* it must not happen */ return 0; /* it must not happen */
...@@ -191,7 +191,7 @@ int ...@@ -191,7 +191,7 @@ int
snd_seq_oss_open(struct file *file, int level) snd_seq_oss_open(struct file *file, int level)
{ {
int i, rc; int i, rc;
seq_oss_devinfo_t *dp; struct seq_oss_devinfo *dp;
if ((dp = kzalloc(sizeof(*dp), GFP_KERNEL)) == NULL) { if ((dp = kzalloc(sizeof(*dp), GFP_KERNEL)) == NULL) {
snd_printk(KERN_ERR "can't malloc device info\n"); snd_printk(KERN_ERR "can't malloc device info\n");
...@@ -323,11 +323,11 @@ translate_mode(struct file *file) ...@@ -323,11 +323,11 @@ translate_mode(struct file *file)
* create sequencer port * create sequencer port
*/ */
static int static int
create_port(seq_oss_devinfo_t *dp) create_port(struct seq_oss_devinfo *dp)
{ {
int rc; int rc;
snd_seq_port_info_t port; struct snd_seq_port_info port;
snd_seq_port_callback_t callback; struct snd_seq_port_callback callback;
memset(&port, 0, sizeof(port)); memset(&port, 0, sizeof(port));
port.addr.client = dp->cseq; port.addr.client = dp->cseq;
...@@ -358,7 +358,7 @@ create_port(seq_oss_devinfo_t *dp) ...@@ -358,7 +358,7 @@ create_port(seq_oss_devinfo_t *dp)
* delete ALSA port * delete ALSA port
*/ */
static int static int
delete_port(seq_oss_devinfo_t *dp) delete_port(struct seq_oss_devinfo *dp)
{ {
if (dp->port < 0) if (dp->port < 0)
return 0; return 0;
...@@ -371,9 +371,9 @@ delete_port(seq_oss_devinfo_t *dp) ...@@ -371,9 +371,9 @@ delete_port(seq_oss_devinfo_t *dp)
* allocate a queue * allocate a queue
*/ */
static int static int
alloc_seq_queue(seq_oss_devinfo_t *dp) alloc_seq_queue(struct seq_oss_devinfo *dp)
{ {
snd_seq_queue_info_t qinfo; struct snd_seq_queue_info qinfo;
int rc; int rc;
memset(&qinfo, 0, sizeof(qinfo)); memset(&qinfo, 0, sizeof(qinfo));
...@@ -392,7 +392,7 @@ alloc_seq_queue(seq_oss_devinfo_t *dp) ...@@ -392,7 +392,7 @@ alloc_seq_queue(seq_oss_devinfo_t *dp)
static int static int
delete_seq_queue(int queue) delete_seq_queue(int queue)
{ {
snd_seq_queue_info_t qinfo; struct snd_seq_queue_info qinfo;
int rc; int rc;
if (queue < 0) if (queue < 0)
...@@ -412,7 +412,7 @@ delete_seq_queue(int queue) ...@@ -412,7 +412,7 @@ delete_seq_queue(int queue)
static void static void
free_devinfo(void *private) free_devinfo(void *private)
{ {
seq_oss_devinfo_t *dp = (seq_oss_devinfo_t *)private; struct seq_oss_devinfo *dp = (struct seq_oss_devinfo *)private;
if (dp->timer) if (dp->timer)
snd_seq_oss_timer_delete(dp->timer); snd_seq_oss_timer_delete(dp->timer);
...@@ -431,7 +431,7 @@ free_devinfo(void *private) ...@@ -431,7 +431,7 @@ free_devinfo(void *private)
* close sequencer device * close sequencer device
*/ */
void void
snd_seq_oss_release(seq_oss_devinfo_t *dp) snd_seq_oss_release(struct seq_oss_devinfo *dp)
{ {
int queue; int queue;
...@@ -460,7 +460,7 @@ snd_seq_oss_release(seq_oss_devinfo_t *dp) ...@@ -460,7 +460,7 @@ snd_seq_oss_release(seq_oss_devinfo_t *dp)
* Wait until the queue is empty (if we don't have nonblock) * Wait until the queue is empty (if we don't have nonblock)
*/ */
void void
snd_seq_oss_drain_write(seq_oss_devinfo_t *dp) snd_seq_oss_drain_write(struct seq_oss_devinfo *dp)
{ {
if (! dp->timer->running) if (! dp->timer->running)
return; return;
...@@ -477,7 +477,7 @@ snd_seq_oss_drain_write(seq_oss_devinfo_t *dp) ...@@ -477,7 +477,7 @@ snd_seq_oss_drain_write(seq_oss_devinfo_t *dp)
* reset sequencer devices * reset sequencer devices
*/ */
void void
snd_seq_oss_reset(seq_oss_devinfo_t *dp) snd_seq_oss_reset(struct seq_oss_devinfo *dp)
{ {
int i; int i;
...@@ -525,10 +525,10 @@ filemode_str(int val) ...@@ -525,10 +525,10 @@ filemode_str(int val)
* proc interface * proc interface
*/ */
void void
snd_seq_oss_system_info_read(snd_info_buffer_t *buf) snd_seq_oss_system_info_read(struct snd_info_buffer *buf)
{ {
int i; int i;
seq_oss_devinfo_t *dp; struct seq_oss_devinfo *dp;
snd_iprintf(buf, "ALSA client number %d\n", system_client); snd_iprintf(buf, "ALSA client number %d\n", system_client);
snd_iprintf(buf, "ALSA receiver port %d\n", system_port); snd_iprintf(buf, "ALSA receiver port %d\n", system_port);
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include "seq_oss_midi.h" #include "seq_oss_midi.h"
#include "seq_oss_event.h" #include "seq_oss_event.h"
static int snd_seq_oss_synth_info_user(seq_oss_devinfo_t *dp, void __user *arg) static int snd_seq_oss_synth_info_user(struct seq_oss_devinfo *dp, void __user *arg)
{ {
struct synth_info info; struct synth_info info;
...@@ -41,7 +41,7 @@ static int snd_seq_oss_synth_info_user(seq_oss_devinfo_t *dp, void __user *arg) ...@@ -41,7 +41,7 @@ static int snd_seq_oss_synth_info_user(seq_oss_devinfo_t *dp, void __user *arg)
return 0; return 0;
} }
static int snd_seq_oss_midi_info_user(seq_oss_devinfo_t *dp, void __user *arg) static int snd_seq_oss_midi_info_user(struct seq_oss_devinfo *dp, void __user *arg)
{ {
struct midi_info info; struct midi_info info;
...@@ -54,24 +54,24 @@ static int snd_seq_oss_midi_info_user(seq_oss_devinfo_t *dp, void __user *arg) ...@@ -54,24 +54,24 @@ static int snd_seq_oss_midi_info_user(seq_oss_devinfo_t *dp, void __user *arg)
return 0; return 0;
} }
static int snd_seq_oss_oob_user(seq_oss_devinfo_t *dp, void __user *arg) static int snd_seq_oss_oob_user(struct seq_oss_devinfo *dp, void __user *arg)
{ {
unsigned char ev[8]; unsigned char ev[8];
snd_seq_event_t tmpev; struct snd_seq_event tmpev;
if (copy_from_user(ev, arg, 8)) if (copy_from_user(ev, arg, 8))
return -EFAULT; return -EFAULT;
memset(&tmpev, 0, sizeof(tmpev)); memset(&tmpev, 0, sizeof(tmpev));
snd_seq_oss_fill_addr(dp, &tmpev, dp->addr.port, dp->addr.client); snd_seq_oss_fill_addr(dp, &tmpev, dp->addr.port, dp->addr.client);
tmpev.time.tick = 0; tmpev.time.tick = 0;
if (! snd_seq_oss_process_event(dp, (evrec_t*)ev, &tmpev)) { if (! snd_seq_oss_process_event(dp, (union evrec *)ev, &tmpev)) {
snd_seq_oss_dispatch(dp, &tmpev, 0, 0); snd_seq_oss_dispatch(dp, &tmpev, 0, 0);
} }
return 0; return 0;
} }
int int
snd_seq_oss_ioctl(seq_oss_devinfo_t *dp, unsigned int cmd, unsigned long carg) snd_seq_oss_ioctl(struct seq_oss_devinfo *dp, unsigned int cmd, unsigned long carg)
{ {
int dev, val; int dev, val;
void __user *arg = (void __user *)carg; void __user *arg = (void __user *)carg;
......
...@@ -37,15 +37,15 @@ ...@@ -37,15 +37,15 @@
/* /*
* definition of midi device record * definition of midi device record
*/ */
struct seq_oss_midi_t { struct seq_oss_midi {
int seq_device; /* device number */ int seq_device; /* device number */
int client; /* sequencer client number */ int client; /* sequencer client number */
int port; /* sequencer port number */ int port; /* sequencer port number */
unsigned int flags; /* port capability */ unsigned int flags; /* port capability */
int opened; /* flag for opening */ int opened; /* flag for opening */
unsigned char name[SNDRV_SEQ_OSS_MAX_MIDI_NAME]; unsigned char name[SNDRV_SEQ_OSS_MAX_MIDI_NAME];
snd_midi_event_t *coder; /* MIDI event coder */ struct snd_midi_event *coder; /* MIDI event coder */
seq_oss_devinfo_t *devinfo; /* assigned OSSseq device */ struct seq_oss_devinfo *devinfo; /* assigned OSSseq device */
snd_use_lock_t use_lock; snd_use_lock_t use_lock;
}; };
...@@ -54,17 +54,17 @@ struct seq_oss_midi_t { ...@@ -54,17 +54,17 @@ struct seq_oss_midi_t {
* midi device table * midi device table
*/ */
static int max_midi_devs; static int max_midi_devs;
static seq_oss_midi_t *midi_devs[SNDRV_SEQ_OSS_MAX_MIDI_DEVS]; static struct seq_oss_midi *midi_devs[SNDRV_SEQ_OSS_MAX_MIDI_DEVS];
static DEFINE_SPINLOCK(register_lock); static DEFINE_SPINLOCK(register_lock);
/* /*
* prototypes * prototypes
*/ */
static seq_oss_midi_t *get_mdev(int dev); static struct seq_oss_midi *get_mdev(int dev);
static seq_oss_midi_t *get_mididev(seq_oss_devinfo_t *dp, int dev); static struct seq_oss_midi *get_mididev(struct seq_oss_devinfo *dp, int dev);
static int send_synth_event(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, int dev); static int send_synth_event(struct seq_oss_devinfo *dp, struct snd_seq_event *ev, int dev);
static int send_midi_event(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, seq_oss_midi_t *mdev); static int send_midi_event(struct seq_oss_devinfo *dp, struct snd_seq_event *ev, struct seq_oss_midi *mdev);
/* /*
* look up the existing ports * 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,8 +73,8 @@ static int send_midi_event(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, seq_oss_m
int __init int __init
snd_seq_oss_midi_lookup_ports(int client) snd_seq_oss_midi_lookup_ports(int client)
{ {
snd_seq_client_info_t *clinfo; struct snd_seq_client_info *clinfo;
snd_seq_port_info_t *pinfo; struct snd_seq_port_info *pinfo;
clinfo = kzalloc(sizeof(*clinfo), GFP_KERNEL); clinfo = kzalloc(sizeof(*clinfo), GFP_KERNEL);
pinfo = kzalloc(sizeof(*pinfo), GFP_KERNEL); pinfo = kzalloc(sizeof(*pinfo), GFP_KERNEL);
...@@ -100,10 +100,10 @@ snd_seq_oss_midi_lookup_ports(int client) ...@@ -100,10 +100,10 @@ snd_seq_oss_midi_lookup_ports(int client)
/* /*
*/ */
static seq_oss_midi_t * static struct seq_oss_midi *
get_mdev(int dev) get_mdev(int dev)
{ {
seq_oss_midi_t *mdev; struct seq_oss_midi *mdev;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&register_lock, flags); spin_lock_irqsave(&register_lock, flags);
...@@ -117,11 +117,11 @@ get_mdev(int dev) ...@@ -117,11 +117,11 @@ get_mdev(int dev)
/* /*
* look for the identical slot * look for the identical slot
*/ */
static seq_oss_midi_t * static struct seq_oss_midi *
find_slot(int client, int port) find_slot(int client, int port)
{ {
int i; int i;
seq_oss_midi_t *mdev; struct seq_oss_midi *mdev;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&register_lock, flags); spin_lock_irqsave(&register_lock, flags);
...@@ -145,10 +145,10 @@ find_slot(int client, int port) ...@@ -145,10 +145,10 @@ find_slot(int client, int port)
* register a new port if it doesn't exist yet * register a new port if it doesn't exist yet
*/ */
int int
snd_seq_oss_midi_check_new_port(snd_seq_port_info_t *pinfo) snd_seq_oss_midi_check_new_port(struct snd_seq_port_info *pinfo)
{ {
int i; int i;
seq_oss_midi_t *mdev; struct seq_oss_midi *mdev;
unsigned long flags; unsigned long flags;
debug_printk(("check for MIDI client %d port %d\n", pinfo->addr.client, pinfo->addr.port)); 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,7 +226,7 @@ snd_seq_oss_midi_check_new_port(snd_seq_port_info_t *pinfo)
int int
snd_seq_oss_midi_check_exit_port(int client, int port) snd_seq_oss_midi_check_exit_port(int client, int port)
{ {
seq_oss_midi_t *mdev; struct seq_oss_midi *mdev;
unsigned long flags; unsigned long flags;
int index; int index;
...@@ -258,7 +258,7 @@ void ...@@ -258,7 +258,7 @@ void
snd_seq_oss_midi_clear_all(void) snd_seq_oss_midi_clear_all(void)
{ {
int i; int i;
seq_oss_midi_t *mdev; struct seq_oss_midi *mdev;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&register_lock, flags); spin_lock_irqsave(&register_lock, flags);
...@@ -279,7 +279,7 @@ snd_seq_oss_midi_clear_all(void) ...@@ -279,7 +279,7 @@ snd_seq_oss_midi_clear_all(void)
* set up midi tables * set up midi tables
*/ */
void void
snd_seq_oss_midi_setup(seq_oss_devinfo_t *dp) snd_seq_oss_midi_setup(struct seq_oss_devinfo *dp)
{ {
dp->max_mididev = max_midi_devs; dp->max_mididev = max_midi_devs;
} }
...@@ -288,7 +288,7 @@ snd_seq_oss_midi_setup(seq_oss_devinfo_t *dp) ...@@ -288,7 +288,7 @@ snd_seq_oss_midi_setup(seq_oss_devinfo_t *dp)
* clean up midi tables * clean up midi tables
*/ */
void void
snd_seq_oss_midi_cleanup(seq_oss_devinfo_t *dp) snd_seq_oss_midi_cleanup(struct seq_oss_devinfo *dp)
{ {
int i; int i;
for (i = 0; i < dp->max_mididev; i++) for (i = 0; i < dp->max_mididev; i++)
...@@ -301,7 +301,7 @@ snd_seq_oss_midi_cleanup(seq_oss_devinfo_t *dp) ...@@ -301,7 +301,7 @@ snd_seq_oss_midi_cleanup(seq_oss_devinfo_t *dp)
* open all midi devices. ignore errors. * open all midi devices. ignore errors.
*/ */
void void
snd_seq_oss_midi_open_all(seq_oss_devinfo_t *dp, int file_mode) snd_seq_oss_midi_open_all(struct seq_oss_devinfo *dp, int file_mode)
{ {
int i; int i;
for (i = 0; i < dp->max_mididev; i++) 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,8 +312,8 @@ snd_seq_oss_midi_open_all(seq_oss_devinfo_t *dp, int file_mode)
/* /*
* get the midi device information * get the midi device information
*/ */
static seq_oss_midi_t * static struct seq_oss_midi *
get_mididev(seq_oss_devinfo_t *dp, int dev) get_mididev(struct seq_oss_devinfo *dp, int dev)
{ {
if (dev < 0 || dev >= dp->max_mididev) if (dev < 0 || dev >= dp->max_mididev)
return NULL; return NULL;
...@@ -325,11 +325,11 @@ get_mididev(seq_oss_devinfo_t *dp, int dev) ...@@ -325,11 +325,11 @@ get_mididev(seq_oss_devinfo_t *dp, int dev)
* open the midi device if not opened yet * open the midi device if not opened yet
*/ */
int int
snd_seq_oss_midi_open(seq_oss_devinfo_t *dp, int dev, int fmode) snd_seq_oss_midi_open(struct seq_oss_devinfo *dp, int dev, int fmode)
{ {
int perm; int perm;
seq_oss_midi_t *mdev; struct seq_oss_midi *mdev;
snd_seq_port_subscribe_t subs; struct snd_seq_port_subscribe subs;
if ((mdev = get_mididev(dp, dev)) == NULL) if ((mdev = get_mididev(dp, dev)) == NULL)
return -ENODEV; return -ENODEV;
...@@ -392,10 +392,10 @@ snd_seq_oss_midi_open(seq_oss_devinfo_t *dp, int dev, int fmode) ...@@ -392,10 +392,10 @@ snd_seq_oss_midi_open(seq_oss_devinfo_t *dp, int dev, int fmode)
* close the midi device if already opened * close the midi device if already opened
*/ */
int int
snd_seq_oss_midi_close(seq_oss_devinfo_t *dp, int dev) snd_seq_oss_midi_close(struct seq_oss_devinfo *dp, int dev)
{ {
seq_oss_midi_t *mdev; struct seq_oss_midi *mdev;
snd_seq_port_subscribe_t subs; struct snd_seq_port_subscribe subs;
if ((mdev = get_mididev(dp, dev)) == NULL) if ((mdev = get_mididev(dp, dev)) == NULL)
return -ENODEV; return -ENODEV;
...@@ -430,9 +430,9 @@ snd_seq_oss_midi_close(seq_oss_devinfo_t *dp, int dev) ...@@ -430,9 +430,9 @@ snd_seq_oss_midi_close(seq_oss_devinfo_t *dp, int dev)
* change seq capability flags to file mode flags * change seq capability flags to file mode flags
*/ */
int int
snd_seq_oss_midi_filemode(seq_oss_devinfo_t *dp, int dev) snd_seq_oss_midi_filemode(struct seq_oss_devinfo *dp, int dev)
{ {
seq_oss_midi_t *mdev; struct seq_oss_midi *mdev;
int mode; int mode;
if ((mdev = get_mididev(dp, dev)) == NULL) if ((mdev = get_mididev(dp, dev)) == NULL)
...@@ -453,9 +453,9 @@ snd_seq_oss_midi_filemode(seq_oss_devinfo_t *dp, int dev) ...@@ -453,9 +453,9 @@ snd_seq_oss_midi_filemode(seq_oss_devinfo_t *dp, int dev)
* so far, only close the device. * so far, only close the device.
*/ */
void void
snd_seq_oss_midi_reset(seq_oss_devinfo_t *dp, int dev) snd_seq_oss_midi_reset(struct seq_oss_devinfo *dp, int dev)
{ {
seq_oss_midi_t *mdev; struct seq_oss_midi *mdev;
if ((mdev = get_mididev(dp, dev)) == NULL) if ((mdev = get_mididev(dp, dev)) == NULL)
return; return;
...@@ -465,7 +465,7 @@ snd_seq_oss_midi_reset(seq_oss_devinfo_t *dp, int dev) ...@@ -465,7 +465,7 @@ snd_seq_oss_midi_reset(seq_oss_devinfo_t *dp, int dev)
} }
if (mdev->opened & PERM_WRITE) { if (mdev->opened & PERM_WRITE) {
snd_seq_event_t ev; struct snd_seq_event ev;
int c; int c;
debug_printk(("resetting client %d port %d\n", mdev->client, mdev->port)); 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,9 +501,9 @@ snd_seq_oss_midi_reset(seq_oss_devinfo_t *dp, int dev)
* get client/port of the specified MIDI device * get client/port of the specified MIDI device
*/ */
void void
snd_seq_oss_midi_get_addr(seq_oss_devinfo_t *dp, int dev, snd_seq_addr_t *addr) snd_seq_oss_midi_get_addr(struct seq_oss_devinfo *dp, int dev, struct snd_seq_addr *addr)
{ {
seq_oss_midi_t *mdev; struct seq_oss_midi *mdev;
if ((mdev = get_mididev(dp, dev)) == NULL) if ((mdev = get_mididev(dp, dev)) == NULL)
return; return;
...@@ -517,10 +517,10 @@ snd_seq_oss_midi_get_addr(seq_oss_devinfo_t *dp, int dev, snd_seq_addr_t *addr) ...@@ -517,10 +517,10 @@ snd_seq_oss_midi_get_addr(seq_oss_devinfo_t *dp, int dev, snd_seq_addr_t *addr)
* input callback - this can be atomic * input callback - this can be atomic
*/ */
int int
snd_seq_oss_midi_input(snd_seq_event_t *ev, int direct, void *private_data) snd_seq_oss_midi_input(struct snd_seq_event *ev, int direct, void *private_data)
{ {
seq_oss_devinfo_t *dp = (seq_oss_devinfo_t *)private_data; struct seq_oss_devinfo *dp = (struct seq_oss_devinfo *)private_data;
seq_oss_midi_t *mdev; struct seq_oss_midi *mdev;
int rc; int rc;
if (dp->readq == NULL) if (dp->readq == NULL)
...@@ -545,9 +545,9 @@ snd_seq_oss_midi_input(snd_seq_event_t *ev, int direct, void *private_data) ...@@ -545,9 +545,9 @@ snd_seq_oss_midi_input(snd_seq_event_t *ev, int direct, void *private_data)
* convert ALSA sequencer event to OSS synth event * convert ALSA sequencer event to OSS synth event
*/ */
static int static int
send_synth_event(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, int dev) send_synth_event(struct seq_oss_devinfo *dp, struct snd_seq_event *ev, int dev)
{ {
evrec_t ossev; union evrec ossev;
memset(&ossev, 0, sizeof(ossev)); memset(&ossev, 0, sizeof(ossev));
...@@ -606,7 +606,7 @@ send_synth_event(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, int dev) ...@@ -606,7 +606,7 @@ send_synth_event(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, int dev)
* decode event and send MIDI bytes to read queue * decode event and send MIDI bytes to read queue
*/ */
static int static int
send_midi_event(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, seq_oss_midi_t *mdev) send_midi_event(struct seq_oss_devinfo *dp, struct snd_seq_event *ev, struct seq_oss_midi *mdev)
{ {
char msg[32]; char msg[32];
int len; 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,9 +634,9 @@ send_midi_event(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, seq_oss_midi_t *mdev
* non-zero : invalid - ignored * non-zero : invalid - ignored
*/ */
int int
snd_seq_oss_midi_putc(seq_oss_devinfo_t *dp, int dev, unsigned char c, snd_seq_event_t *ev) snd_seq_oss_midi_putc(struct seq_oss_devinfo *dp, int dev, unsigned char c, struct snd_seq_event *ev)
{ {
seq_oss_midi_t *mdev; struct seq_oss_midi *mdev;
if ((mdev = get_mididev(dp, dev)) == NULL) if ((mdev = get_mididev(dp, dev)) == NULL)
return -ENODEV; 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,9 +653,9 @@ snd_seq_oss_midi_putc(seq_oss_devinfo_t *dp, int dev, unsigned char c, snd_seq_e
* create OSS compatible midi_info record * create OSS compatible midi_info record
*/ */
int int
snd_seq_oss_midi_make_info(seq_oss_devinfo_t *dp, int dev, struct midi_info *inf) snd_seq_oss_midi_make_info(struct seq_oss_devinfo *dp, int dev, struct midi_info *inf)
{ {
seq_oss_midi_t *mdev; struct seq_oss_midi *mdev;
if ((mdev = get_mididev(dp, dev)) == NULL) if ((mdev = get_mididev(dp, dev)) == NULL)
return -ENXIO; return -ENXIO;
...@@ -686,10 +686,10 @@ capmode_str(int val) ...@@ -686,10 +686,10 @@ capmode_str(int val)
} }
void void
snd_seq_oss_midi_info_read(snd_info_buffer_t *buf) snd_seq_oss_midi_info_read(struct snd_info_buffer *buf)
{ {
int i; int i;
seq_oss_midi_t *mdev; struct seq_oss_midi *mdev;
snd_iprintf(buf, "\nNumber of MIDI devices: %d\n", max_midi_devs); snd_iprintf(buf, "\nNumber of MIDI devices: %d\n", max_midi_devs);
for (i = 0; i < max_midi_devs; i++) { for (i = 0; i < max_midi_devs; i++) {
......
...@@ -26,24 +26,23 @@ ...@@ -26,24 +26,23 @@
#include "seq_oss_device.h" #include "seq_oss_device.h"
#include <sound/seq_oss_legacy.h> #include <sound/seq_oss_legacy.h>
typedef struct seq_oss_midi_t seq_oss_midi_t;
int snd_seq_oss_midi_lookup_ports(int client); int snd_seq_oss_midi_lookup_ports(int client);
int snd_seq_oss_midi_check_new_port(snd_seq_port_info_t *pinfo); int snd_seq_oss_midi_check_new_port(struct snd_seq_port_info *pinfo);
int snd_seq_oss_midi_check_exit_port(int client, int port); int snd_seq_oss_midi_check_exit_port(int client, int port);
void snd_seq_oss_midi_clear_all(void); void snd_seq_oss_midi_clear_all(void);
void snd_seq_oss_midi_setup(seq_oss_devinfo_t *dp); void snd_seq_oss_midi_setup(struct seq_oss_devinfo *dp);
void snd_seq_oss_midi_cleanup(seq_oss_devinfo_t *dp); void snd_seq_oss_midi_cleanup(struct seq_oss_devinfo *dp);
int snd_seq_oss_midi_open(seq_oss_devinfo_t *dp, int dev, int file_mode); int snd_seq_oss_midi_open(struct seq_oss_devinfo *dp, int dev, int file_mode);
void snd_seq_oss_midi_open_all(seq_oss_devinfo_t *dp, int file_mode); void snd_seq_oss_midi_open_all(struct seq_oss_devinfo *dp, int file_mode);
int snd_seq_oss_midi_close(seq_oss_devinfo_t *dp, int dev); int snd_seq_oss_midi_close(struct seq_oss_devinfo *dp, int dev);
void snd_seq_oss_midi_reset(seq_oss_devinfo_t *dp, int dev); void snd_seq_oss_midi_reset(struct seq_oss_devinfo *dp, int dev);
int snd_seq_oss_midi_putc(seq_oss_devinfo_t *dp, int dev, unsigned char c, snd_seq_event_t *ev); int snd_seq_oss_midi_putc(struct seq_oss_devinfo *dp, int dev, unsigned char c,
int snd_seq_oss_midi_input(snd_seq_event_t *ev, int direct, void *private); struct snd_seq_event *ev);
int snd_seq_oss_midi_filemode(seq_oss_devinfo_t *dp, int dev); int snd_seq_oss_midi_input(struct snd_seq_event *ev, int direct, void *private);
int snd_seq_oss_midi_make_info(seq_oss_devinfo_t *dp, int dev, struct midi_info *inf); int snd_seq_oss_midi_filemode(struct seq_oss_devinfo *dp, int dev);
void snd_seq_oss_midi_get_addr(seq_oss_devinfo_t *dp, int dev, snd_seq_addr_t *addr); int snd_seq_oss_midi_make_info(struct seq_oss_devinfo *dp, int dev, struct midi_info *inf);
void snd_seq_oss_midi_get_addr(struct seq_oss_devinfo *dp, int dev, struct snd_seq_addr *addr);
#endif #endif
...@@ -41,17 +41,17 @@ ...@@ -41,17 +41,17 @@
/* /*
* create a read queue * create a read queue
*/ */
seq_oss_readq_t * struct seq_oss_readq *
snd_seq_oss_readq_new(seq_oss_devinfo_t *dp, int maxlen) snd_seq_oss_readq_new(struct seq_oss_devinfo *dp, int maxlen)
{ {
seq_oss_readq_t *q; struct seq_oss_readq *q;
if ((q = kzalloc(sizeof(*q), GFP_KERNEL)) == NULL) { if ((q = kzalloc(sizeof(*q), GFP_KERNEL)) == NULL) {
snd_printk(KERN_ERR "can't malloc read queue\n"); snd_printk(KERN_ERR "can't malloc read queue\n");
return NULL; return NULL;
} }
if ((q->q = kcalloc(maxlen, sizeof(evrec_t), GFP_KERNEL)) == NULL) { if ((q->q = kcalloc(maxlen, sizeof(union evrec), GFP_KERNEL)) == NULL) {
snd_printk(KERN_ERR "can't malloc read queue buffer\n"); snd_printk(KERN_ERR "can't malloc read queue buffer\n");
kfree(q); kfree(q);
return NULL; return NULL;
...@@ -72,7 +72,7 @@ snd_seq_oss_readq_new(seq_oss_devinfo_t *dp, int maxlen) ...@@ -72,7 +72,7 @@ snd_seq_oss_readq_new(seq_oss_devinfo_t *dp, int maxlen)
* delete the read queue * delete the read queue
*/ */
void void
snd_seq_oss_readq_delete(seq_oss_readq_t *q) snd_seq_oss_readq_delete(struct seq_oss_readq *q)
{ {
if (q) { if (q) {
kfree(q->q); kfree(q->q);
...@@ -84,7 +84,7 @@ snd_seq_oss_readq_delete(seq_oss_readq_t *q) ...@@ -84,7 +84,7 @@ snd_seq_oss_readq_delete(seq_oss_readq_t *q)
* reset the read queue * reset the read queue
*/ */
void void
snd_seq_oss_readq_clear(seq_oss_readq_t *q) snd_seq_oss_readq_clear(struct seq_oss_readq *q)
{ {
if (q->qlen) { if (q->qlen) {
q->qlen = 0; q->qlen = 0;
...@@ -100,9 +100,9 @@ snd_seq_oss_readq_clear(seq_oss_readq_t *q) ...@@ -100,9 +100,9 @@ snd_seq_oss_readq_clear(seq_oss_readq_t *q)
* put a midi byte * put a midi byte
*/ */
int int
snd_seq_oss_readq_puts(seq_oss_readq_t *q, int dev, unsigned char *data, int len) snd_seq_oss_readq_puts(struct seq_oss_readq *q, int dev, unsigned char *data, int len)
{ {
evrec_t rec; union evrec rec;
int result; int result;
memset(&rec, 0, sizeof(rec)); 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,7 +123,7 @@ snd_seq_oss_readq_puts(seq_oss_readq_t *q, int dev, unsigned char *data, int len
* return zero if enqueued * return zero if enqueued
*/ */
int int
snd_seq_oss_readq_put_event(seq_oss_readq_t *q, evrec_t *ev) snd_seq_oss_readq_put_event(struct seq_oss_readq *q, union evrec *ev)
{ {
unsigned long flags; unsigned long flags;
...@@ -152,7 +152,7 @@ snd_seq_oss_readq_put_event(seq_oss_readq_t *q, evrec_t *ev) ...@@ -152,7 +152,7 @@ snd_seq_oss_readq_put_event(seq_oss_readq_t *q, evrec_t *ev)
* caller must hold lock * caller must hold lock
*/ */
int int
snd_seq_oss_readq_pick(seq_oss_readq_t *q, evrec_t *rec) snd_seq_oss_readq_pick(struct seq_oss_readq *q, union evrec *rec)
{ {
if (q->qlen == 0) if (q->qlen == 0)
return -EAGAIN; return -EAGAIN;
...@@ -164,7 +164,7 @@ snd_seq_oss_readq_pick(seq_oss_readq_t *q, evrec_t *rec) ...@@ -164,7 +164,7 @@ snd_seq_oss_readq_pick(seq_oss_readq_t *q, evrec_t *rec)
* sleep until ready * sleep until ready
*/ */
void void
snd_seq_oss_readq_wait(seq_oss_readq_t *q) snd_seq_oss_readq_wait(struct seq_oss_readq *q)
{ {
wait_event_interruptible_timeout(q->midi_sleep, wait_event_interruptible_timeout(q->midi_sleep,
(q->qlen > 0 || q->head == q->tail), (q->qlen > 0 || q->head == q->tail),
...@@ -176,7 +176,7 @@ snd_seq_oss_readq_wait(seq_oss_readq_t *q) ...@@ -176,7 +176,7 @@ snd_seq_oss_readq_wait(seq_oss_readq_t *q)
* caller must hold lock * caller must hold lock
*/ */
void void
snd_seq_oss_readq_free(seq_oss_readq_t *q) snd_seq_oss_readq_free(struct seq_oss_readq *q)
{ {
if (q->qlen > 0) { if (q->qlen > 0) {
q->head = (q->head + 1) % q->maxlen; q->head = (q->head + 1) % q->maxlen;
...@@ -189,7 +189,7 @@ snd_seq_oss_readq_free(seq_oss_readq_t *q) ...@@ -189,7 +189,7 @@ snd_seq_oss_readq_free(seq_oss_readq_t *q)
* return non-zero if readq is not empty. * return non-zero if readq is not empty.
*/ */
unsigned int unsigned int
snd_seq_oss_readq_poll(seq_oss_readq_t *q, struct file *file, poll_table *wait) snd_seq_oss_readq_poll(struct seq_oss_readq *q, struct file *file, poll_table *wait)
{ {
poll_wait(file, &q->midi_sleep, wait); poll_wait(file, &q->midi_sleep, wait);
return q->qlen; return q->qlen;
...@@ -199,10 +199,10 @@ snd_seq_oss_readq_poll(seq_oss_readq_t *q, struct file *file, poll_table *wait) ...@@ -199,10 +199,10 @@ snd_seq_oss_readq_poll(seq_oss_readq_t *q, struct file *file, poll_table *wait)
* put a timestamp * put a timestamp
*/ */
int int
snd_seq_oss_readq_put_timestamp(seq_oss_readq_t *q, unsigned long curt, int seq_mode) snd_seq_oss_readq_put_timestamp(struct seq_oss_readq *q, unsigned long curt, int seq_mode)
{ {
if (curt != q->input_time) { if (curt != q->input_time) {
evrec_t rec; union evrec rec;
memset(&rec, 0, sizeof(rec)); memset(&rec, 0, sizeof(rec));
switch (seq_mode) { switch (seq_mode) {
case SNDRV_SEQ_OSS_MODE_SYNTH: 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,7 +226,7 @@ snd_seq_oss_readq_put_timestamp(seq_oss_readq_t *q, unsigned long curt, int seq_
* proc interface * proc interface
*/ */
void void
snd_seq_oss_readq_info_read(seq_oss_readq_t *q, snd_info_buffer_t *buf) snd_seq_oss_readq_info_read(struct seq_oss_readq *q, struct snd_info_buffer *buf)
{ {
snd_iprintf(buf, " read queue [%s] length = %d : tick = %ld\n", snd_iprintf(buf, " read queue [%s] length = %d : tick = %ld\n",
(waitqueue_active(&q->midi_sleep) ? "sleeping":"running"), (waitqueue_active(&q->midi_sleep) ? "sleeping":"running"),
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
/* /*
* definition of read queue * definition of read queue
*/ */
struct seq_oss_readq_t { struct seq_oss_readq {
evrec_t *q; union evrec *q;
int qlen; int qlen;
int maxlen; int maxlen;
int head, tail; int head, tail;
...@@ -39,16 +39,16 @@ struct seq_oss_readq_t { ...@@ -39,16 +39,16 @@ struct seq_oss_readq_t {
spinlock_t lock; spinlock_t lock;
}; };
seq_oss_readq_t *snd_seq_oss_readq_new(seq_oss_devinfo_t *dp, int maxlen); struct seq_oss_readq *snd_seq_oss_readq_new(struct seq_oss_devinfo *dp, int maxlen);
void snd_seq_oss_readq_delete(seq_oss_readq_t *q); void snd_seq_oss_readq_delete(struct seq_oss_readq *q);
void snd_seq_oss_readq_clear(seq_oss_readq_t *readq); void snd_seq_oss_readq_clear(struct seq_oss_readq *readq);
unsigned int snd_seq_oss_readq_poll(seq_oss_readq_t *readq, struct file *file, poll_table *wait); unsigned int snd_seq_oss_readq_poll(struct seq_oss_readq *readq, struct file *file, poll_table *wait);
int snd_seq_oss_readq_puts(seq_oss_readq_t *readq, int dev, unsigned char *data, int len); int snd_seq_oss_readq_puts(struct seq_oss_readq *readq, int dev, unsigned char *data, int len);
int snd_seq_oss_readq_put_event(seq_oss_readq_t *readq, evrec_t *ev); int snd_seq_oss_readq_put_event(struct seq_oss_readq *readq, union evrec *ev);
int snd_seq_oss_readq_put_timestamp(seq_oss_readq_t *readq, unsigned long curt, int seq_mode); int snd_seq_oss_readq_put_timestamp(struct seq_oss_readq *readq, unsigned long curt, int seq_mode);
int snd_seq_oss_readq_pick(seq_oss_readq_t *q, evrec_t *rec); int snd_seq_oss_readq_pick(struct seq_oss_readq *q, union evrec *rec);
void snd_seq_oss_readq_wait(seq_oss_readq_t *q); void snd_seq_oss_readq_wait(struct seq_oss_readq *q);
void snd_seq_oss_readq_free(seq_oss_readq_t *q); void snd_seq_oss_readq_free(struct seq_oss_readq *q);
#define snd_seq_oss_readq_lock(q, flags) spin_lock_irqsave(&(q)->lock, flags) #define snd_seq_oss_readq_lock(q, flags) spin_lock_irqsave(&(q)->lock, flags)
#define snd_seq_oss_readq_unlock(q, flags) spin_unlock_irqrestore(&(q)->lock, flags) #define snd_seq_oss_readq_unlock(q, flags) spin_unlock_irqrestore(&(q)->lock, flags)
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
/* /*
* protoypes * protoypes
*/ */
static int insert_queue(seq_oss_devinfo_t *dp, evrec_t *rec, struct file *opt); static int insert_queue(struct seq_oss_devinfo *dp, union evrec *rec, struct file *opt);
/* /*
...@@ -41,12 +41,12 @@ static int insert_queue(seq_oss_devinfo_t *dp, evrec_t *rec, struct file *opt); ...@@ -41,12 +41,12 @@ static int insert_queue(seq_oss_devinfo_t *dp, evrec_t *rec, struct file *opt);
*/ */
int int
snd_seq_oss_read(seq_oss_devinfo_t *dp, char __user *buf, int count) snd_seq_oss_read(struct seq_oss_devinfo *dp, char __user *buf, int count)
{ {
seq_oss_readq_t *readq = dp->readq; struct seq_oss_readq *readq = dp->readq;
int result = 0, err = 0; int result = 0, err = 0;
int ev_len; int ev_len;
evrec_t rec; union evrec rec;
unsigned long flags; unsigned long flags;
if (readq == NULL || ! is_read_mode(dp->file_mode)) 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,11 +93,11 @@ snd_seq_oss_read(seq_oss_devinfo_t *dp, char __user *buf, int count)
*/ */
int int
snd_seq_oss_write(seq_oss_devinfo_t *dp, const char __user *buf, int count, struct file *opt) snd_seq_oss_write(struct seq_oss_devinfo *dp, const char __user *buf, int count, struct file *opt)
{ {
int result = 0, err = 0; int result = 0, err = 0;
int ev_size, fmt; int ev_size, fmt;
evrec_t rec; union evrec rec;
if (! is_write_mode(dp->file_mode) || dp->writeq == NULL) if (! is_write_mode(dp->file_mode) || dp->writeq == NULL)
return -ENXIO; return -ENXIO;
...@@ -161,10 +161,10 @@ snd_seq_oss_write(seq_oss_devinfo_t *dp, const char __user *buf, int count, stru ...@@ -161,10 +161,10 @@ snd_seq_oss_write(seq_oss_devinfo_t *dp, const char __user *buf, int count, stru
* return: 0 = OK, non-zero = NG * return: 0 = OK, non-zero = NG
*/ */
static int static int
insert_queue(seq_oss_devinfo_t *dp, evrec_t *rec, struct file *opt) insert_queue(struct seq_oss_devinfo *dp, union evrec *rec, struct file *opt)
{ {
int rc = 0; int rc = 0;
snd_seq_event_t event; struct snd_seq_event event;
/* if this is a timing event, process the current time */ /* if this is a timing event, process the current time */
if (snd_seq_oss_process_timer_event(dp->timer, rec)) 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,7 +197,7 @@ insert_queue(seq_oss_devinfo_t *dp, evrec_t *rec, struct file *opt)
*/ */
unsigned int unsigned int
snd_seq_oss_poll(seq_oss_devinfo_t *dp, struct file *file, poll_table * wait) snd_seq_oss_poll(struct seq_oss_devinfo *dp, struct file *file, poll_table * wait)
{ {
unsigned int mask = 0; unsigned int mask = 0;
......
...@@ -37,14 +37,14 @@ ...@@ -37,14 +37,14 @@
*/ */
/* sysex buffer */ /* sysex buffer */
struct seq_oss_synth_sysex_t { struct seq_oss_synth_sysex {
int len; int len;
int skip; int skip;
unsigned char buf[MAX_SYSEX_BUFLEN]; unsigned char buf[MAX_SYSEX_BUFLEN];
}; };
/* synth info */ /* synth info */
struct seq_oss_synth_t { struct seq_oss_synth {
int seq_device; int seq_device;
/* for synth_info */ /* for synth_info */
...@@ -53,7 +53,7 @@ struct seq_oss_synth_t { ...@@ -53,7 +53,7 @@ struct seq_oss_synth_t {
int nr_voices; int nr_voices;
char name[SNDRV_SEQ_OSS_MAX_SYNTH_NAME]; char name[SNDRV_SEQ_OSS_MAX_SYNTH_NAME];
snd_seq_oss_callback_t oper; struct snd_seq_oss_callback oper;
int opened; int opened;
...@@ -66,8 +66,8 @@ struct seq_oss_synth_t { ...@@ -66,8 +66,8 @@ struct seq_oss_synth_t {
* device table * device table
*/ */
static int max_synth_devs; static int max_synth_devs;
static seq_oss_synth_t *synth_devs[SNDRV_SEQ_OSS_MAX_SYNTH_DEVS]; static struct seq_oss_synth *synth_devs[SNDRV_SEQ_OSS_MAX_SYNTH_DEVS];
static seq_oss_synth_t midi_synth_dev = { static struct seq_oss_synth midi_synth_dev = {
-1, /* seq_device */ -1, /* seq_device */
SYNTH_TYPE_MIDI, /* synth_type */ SYNTH_TYPE_MIDI, /* synth_type */
0, /* synth_subtype */ 0, /* synth_subtype */
...@@ -80,8 +80,8 @@ static DEFINE_SPINLOCK(register_lock); ...@@ -80,8 +80,8 @@ static DEFINE_SPINLOCK(register_lock);
/* /*
* prototypes * prototypes
*/ */
static seq_oss_synth_t *get_synthdev(seq_oss_devinfo_t *dp, int dev); static struct seq_oss_synth *get_synthdev(struct seq_oss_devinfo *dp, int dev);
static void reset_channels(seq_oss_synthinfo_t *info); static void reset_channels(struct seq_oss_synthinfo *info);
/* /*
* global initialization * global initialization
...@@ -96,11 +96,11 @@ snd_seq_oss_synth_init(void) ...@@ -96,11 +96,11 @@ snd_seq_oss_synth_init(void)
* registration of the synth device * registration of the synth device
*/ */
int int
snd_seq_oss_synth_register(snd_seq_device_t *dev) snd_seq_oss_synth_register(struct snd_seq_device *dev)
{ {
int i; int i;
seq_oss_synth_t *rec; struct seq_oss_synth *rec;
snd_seq_oss_reg_t *reg = SNDRV_SEQ_DEVICE_ARGPTR(dev); struct snd_seq_oss_reg *reg = SNDRV_SEQ_DEVICE_ARGPTR(dev);
unsigned long flags; unsigned long flags;
if ((rec = kzalloc(sizeof(*rec), GFP_KERNEL)) == NULL) { if ((rec = kzalloc(sizeof(*rec), GFP_KERNEL)) == NULL) {
...@@ -148,10 +148,10 @@ snd_seq_oss_synth_register(snd_seq_device_t *dev) ...@@ -148,10 +148,10 @@ snd_seq_oss_synth_register(snd_seq_device_t *dev)
int int
snd_seq_oss_synth_unregister(snd_seq_device_t *dev) snd_seq_oss_synth_unregister(struct snd_seq_device *dev)
{ {
int index; int index;
seq_oss_synth_t *rec = dev->driver_data; struct seq_oss_synth *rec = dev->driver_data;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&register_lock, flags); spin_lock_irqsave(&register_lock, flags);
...@@ -187,10 +187,10 @@ snd_seq_oss_synth_unregister(snd_seq_device_t *dev) ...@@ -187,10 +187,10 @@ snd_seq_oss_synth_unregister(snd_seq_device_t *dev)
/* /*
*/ */
static seq_oss_synth_t * static struct seq_oss_synth *
get_sdev(int dev) get_sdev(int dev)
{ {
seq_oss_synth_t *rec; struct seq_oss_synth *rec;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&register_lock, flags); spin_lock_irqsave(&register_lock, flags);
...@@ -207,11 +207,11 @@ get_sdev(int dev) ...@@ -207,11 +207,11 @@ get_sdev(int dev)
*/ */
void void
snd_seq_oss_synth_setup(seq_oss_devinfo_t *dp) snd_seq_oss_synth_setup(struct seq_oss_devinfo *dp)
{ {
int i; int i;
seq_oss_synth_t *rec; struct seq_oss_synth *rec;
seq_oss_synthinfo_t *info; struct seq_oss_synthinfo *info;
dp->max_synthdev = max_synth_devs; dp->max_synthdev = max_synth_devs;
dp->synth_opened = 0; dp->synth_opened = 0;
...@@ -244,7 +244,7 @@ snd_seq_oss_synth_setup(seq_oss_devinfo_t *dp) ...@@ -244,7 +244,7 @@ snd_seq_oss_synth_setup(seq_oss_devinfo_t *dp)
} }
info->nr_voices = rec->nr_voices; info->nr_voices = rec->nr_voices;
if (info->nr_voices > 0) { if (info->nr_voices > 0) {
info->ch = kcalloc(info->nr_voices, sizeof(seq_oss_chinfo_t), GFP_KERNEL); info->ch = kcalloc(info->nr_voices, sizeof(struct seq_oss_chinfo), GFP_KERNEL);
if (!info->ch) if (!info->ch)
BUG(); BUG();
reset_channels(info); reset_channels(info);
...@@ -263,7 +263,7 @@ snd_seq_oss_synth_setup(seq_oss_devinfo_t *dp) ...@@ -263,7 +263,7 @@ snd_seq_oss_synth_setup(seq_oss_devinfo_t *dp)
*/ */
void void
snd_seq_oss_synth_setup_midi(seq_oss_devinfo_t *dp) snd_seq_oss_synth_setup_midi(struct seq_oss_devinfo *dp)
{ {
int i; int i;
...@@ -271,7 +271,7 @@ snd_seq_oss_synth_setup_midi(seq_oss_devinfo_t *dp) ...@@ -271,7 +271,7 @@ snd_seq_oss_synth_setup_midi(seq_oss_devinfo_t *dp)
return; return;
for (i = 0; i < dp->max_mididev; i++) { for (i = 0; i < dp->max_mididev; i++) {
seq_oss_synthinfo_t *info; struct seq_oss_synthinfo *info;
info = &dp->synths[dp->max_synthdev]; info = &dp->synths[dp->max_synthdev];
if (snd_seq_oss_midi_open(dp, i, dp->file_mode) < 0) if (snd_seq_oss_midi_open(dp, i, dp->file_mode) < 0)
continue; continue;
...@@ -297,11 +297,11 @@ snd_seq_oss_synth_setup_midi(seq_oss_devinfo_t *dp) ...@@ -297,11 +297,11 @@ snd_seq_oss_synth_setup_midi(seq_oss_devinfo_t *dp)
*/ */
void void
snd_seq_oss_synth_cleanup(seq_oss_devinfo_t *dp) snd_seq_oss_synth_cleanup(struct seq_oss_devinfo *dp)
{ {
int i; int i;
seq_oss_synth_t *rec; struct seq_oss_synth *rec;
seq_oss_synthinfo_t *info; struct seq_oss_synthinfo *info;
snd_assert(dp->max_synthdev <= SNDRV_SEQ_OSS_MAX_SYNTH_DEVS, return); snd_assert(dp->max_synthdev <= SNDRV_SEQ_OSS_MAX_SYNTH_DEVS, return);
for (i = 0; i < dp->max_synthdev; i++) { for (i = 0; i < dp->max_synthdev; i++) {
...@@ -338,7 +338,7 @@ snd_seq_oss_synth_cleanup(seq_oss_devinfo_t *dp) ...@@ -338,7 +338,7 @@ snd_seq_oss_synth_cleanup(seq_oss_devinfo_t *dp)
* check if the specified device is MIDI mapped device * check if the specified device is MIDI mapped device
*/ */
static int static int
is_midi_dev(seq_oss_devinfo_t *dp, int dev) is_midi_dev(struct seq_oss_devinfo *dp, int dev)
{ {
if (dev < 0 || dev >= dp->max_synthdev) if (dev < 0 || dev >= dp->max_synthdev)
return 0; return 0;
...@@ -350,10 +350,10 @@ is_midi_dev(seq_oss_devinfo_t *dp, int dev) ...@@ -350,10 +350,10 @@ is_midi_dev(seq_oss_devinfo_t *dp, int dev)
/* /*
* return synth device information pointer * return synth device information pointer
*/ */
static seq_oss_synth_t * static struct seq_oss_synth *
get_synthdev(seq_oss_devinfo_t *dp, int dev) get_synthdev(struct seq_oss_devinfo *dp, int dev)
{ {
seq_oss_synth_t *rec; struct seq_oss_synth *rec;
if (dev < 0 || dev >= dp->max_synthdev) if (dev < 0 || dev >= dp->max_synthdev)
return NULL; return NULL;
if (! dp->synths[dev].opened) if (! dp->synths[dev].opened)
...@@ -374,7 +374,7 @@ get_synthdev(seq_oss_devinfo_t *dp, int dev) ...@@ -374,7 +374,7 @@ get_synthdev(seq_oss_devinfo_t *dp, int dev)
* reset note and velocity on each channel. * reset note and velocity on each channel.
*/ */
static void static void
reset_channels(seq_oss_synthinfo_t *info) reset_channels(struct seq_oss_synthinfo *info)
{ {
int i; int i;
if (info->ch == NULL || ! info->nr_voices) if (info->ch == NULL || ! info->nr_voices)
...@@ -392,10 +392,10 @@ reset_channels(seq_oss_synthinfo_t *info) ...@@ -392,10 +392,10 @@ reset_channels(seq_oss_synthinfo_t *info)
* event to the corresponding port. * event to the corresponding port.
*/ */
void void
snd_seq_oss_synth_reset(seq_oss_devinfo_t *dp, int dev) snd_seq_oss_synth_reset(struct seq_oss_devinfo *dp, int dev)
{ {
seq_oss_synth_t *rec; struct seq_oss_synth *rec;
seq_oss_synthinfo_t *info; struct seq_oss_synthinfo *info;
snd_assert(dev >= 0 && dev < dp->max_synthdev, return); snd_assert(dev >= 0 && dev < dp->max_synthdev, return);
info = &dp->synths[dev]; info = &dp->synths[dev];
...@@ -428,7 +428,7 @@ snd_seq_oss_synth_reset(seq_oss_devinfo_t *dp, int dev) ...@@ -428,7 +428,7 @@ snd_seq_oss_synth_reset(seq_oss_devinfo_t *dp, int dev)
if (rec->oper.reset) { if (rec->oper.reset) {
rec->oper.reset(&info->arg); rec->oper.reset(&info->arg);
} else { } else {
snd_seq_event_t ev; struct snd_seq_event ev;
memset(&ev, 0, sizeof(ev)); memset(&ev, 0, sizeof(ev));
snd_seq_oss_fill_addr(dp, &ev, info->arg.addr.client, snd_seq_oss_fill_addr(dp, &ev, info->arg.addr.client,
info->arg.addr.port); info->arg.addr.port);
...@@ -444,10 +444,10 @@ snd_seq_oss_synth_reset(seq_oss_devinfo_t *dp, int dev) ...@@ -444,10 +444,10 @@ snd_seq_oss_synth_reset(seq_oss_devinfo_t *dp, int dev)
* call load_patch callback function * call load_patch callback function
*/ */
int int
snd_seq_oss_synth_load_patch(seq_oss_devinfo_t *dp, int dev, int fmt, snd_seq_oss_synth_load_patch(struct seq_oss_devinfo *dp, int dev, int fmt,
const char __user *buf, int p, int c) const char __user *buf, int p, int c)
{ {
seq_oss_synth_t *rec; struct seq_oss_synth *rec;
int rc; int rc;
if (dev < 0 || dev >= dp->max_synthdev) 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,9 +470,9 @@ snd_seq_oss_synth_load_patch(seq_oss_devinfo_t *dp, int dev, int fmt,
* check if the device is valid synth device * check if the device is valid synth device
*/ */
int int
snd_seq_oss_synth_is_valid(seq_oss_devinfo_t *dp, int dev) snd_seq_oss_synth_is_valid(struct seq_oss_devinfo *dp, int dev)
{ {
seq_oss_synth_t *rec; struct seq_oss_synth *rec;
rec = get_synthdev(dp, dev); rec = get_synthdev(dp, dev);
if (rec) { if (rec) {
snd_use_lock_free(&rec->use_lock); 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,11 +488,11 @@ snd_seq_oss_synth_is_valid(seq_oss_devinfo_t *dp, int dev)
* (0xff). * (0xff).
*/ */
int int
snd_seq_oss_synth_sysex(seq_oss_devinfo_t *dp, int dev, unsigned char *buf, snd_seq_event_t *ev) snd_seq_oss_synth_sysex(struct seq_oss_devinfo *dp, int dev, unsigned char *buf, struct snd_seq_event *ev)
{ {
int i, send; int i, send;
unsigned char *dest; unsigned char *dest;
seq_oss_synth_sysex_t *sysex; struct seq_oss_synth_sysex *sysex;
if (! snd_seq_oss_synth_is_valid(dp, dev)) if (! snd_seq_oss_synth_is_valid(dp, dev))
return -ENXIO; return -ENXIO;
...@@ -545,7 +545,7 @@ snd_seq_oss_synth_sysex(seq_oss_devinfo_t *dp, int dev, unsigned char *buf, snd_ ...@@ -545,7 +545,7 @@ snd_seq_oss_synth_sysex(seq_oss_devinfo_t *dp, int dev, unsigned char *buf, snd_
* fill the event source/destination addresses * fill the event source/destination addresses
*/ */
int int
snd_seq_oss_synth_addr(seq_oss_devinfo_t *dp, int dev, snd_seq_event_t *ev) snd_seq_oss_synth_addr(struct seq_oss_devinfo *dp, int dev, struct snd_seq_event *ev)
{ {
if (! snd_seq_oss_synth_is_valid(dp, dev)) if (! snd_seq_oss_synth_is_valid(dp, dev))
return -EINVAL; return -EINVAL;
...@@ -559,9 +559,9 @@ snd_seq_oss_synth_addr(seq_oss_devinfo_t *dp, int dev, snd_seq_event_t *ev) ...@@ -559,9 +559,9 @@ snd_seq_oss_synth_addr(seq_oss_devinfo_t *dp, int dev, snd_seq_event_t *ev)
* OSS compatible ioctl * OSS compatible ioctl
*/ */
int int
snd_seq_oss_synth_ioctl(seq_oss_devinfo_t *dp, int dev, unsigned int cmd, unsigned long addr) snd_seq_oss_synth_ioctl(struct seq_oss_devinfo *dp, int dev, unsigned int cmd, unsigned long addr)
{ {
seq_oss_synth_t *rec; struct seq_oss_synth *rec;
int rc; int rc;
if (is_midi_dev(dp, dev)) 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,7 +581,7 @@ snd_seq_oss_synth_ioctl(seq_oss_devinfo_t *dp, int dev, unsigned int cmd, unsign
* send OSS raw events - SEQ_PRIVATE and SEQ_VOLUME * send OSS raw events - SEQ_PRIVATE and SEQ_VOLUME
*/ */
int int
snd_seq_oss_synth_raw_event(seq_oss_devinfo_t *dp, int dev, unsigned char *data, snd_seq_event_t *ev) snd_seq_oss_synth_raw_event(struct seq_oss_devinfo *dp, int dev, unsigned char *data, struct snd_seq_event *ev)
{ {
if (! snd_seq_oss_synth_is_valid(dp, dev) || is_midi_dev(dp, dev)) if (! snd_seq_oss_synth_is_valid(dp, dev) || is_midi_dev(dp, dev))
return -ENXIO; return -ENXIO;
...@@ -595,9 +595,9 @@ snd_seq_oss_synth_raw_event(seq_oss_devinfo_t *dp, int dev, unsigned char *data, ...@@ -595,9 +595,9 @@ snd_seq_oss_synth_raw_event(seq_oss_devinfo_t *dp, int dev, unsigned char *data,
* create OSS compatible synth_info record * create OSS compatible synth_info record
*/ */
int int
snd_seq_oss_synth_make_info(seq_oss_devinfo_t *dp, int dev, struct synth_info *inf) snd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_info *inf)
{ {
seq_oss_synth_t *rec; struct seq_oss_synth *rec;
if (dp->synths[dev].is_midi) { if (dp->synths[dev].is_midi) {
struct midi_info minf; 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,10 +625,10 @@ snd_seq_oss_synth_make_info(seq_oss_devinfo_t *dp, int dev, struct synth_info *i
* proc interface * proc interface
*/ */
void void
snd_seq_oss_synth_info_read(snd_info_buffer_t *buf) snd_seq_oss_synth_info_read(struct snd_info_buffer *buf)
{ {
int i; int i;
seq_oss_synth_t *rec; struct seq_oss_synth *rec;
snd_iprintf(buf, "\nNumber of synth devices: %d\n", max_synth_devs); snd_iprintf(buf, "\nNumber of synth devices: %d\n", max_synth_devs);
for (i = 0; i < max_synth_devs; i++) { for (i = 0; i < max_synth_devs; i++) {
......
...@@ -27,23 +27,25 @@ ...@@ -27,23 +27,25 @@
#include <sound/seq_oss_legacy.h> #include <sound/seq_oss_legacy.h>
#include <sound/seq_device.h> #include <sound/seq_device.h>
typedef struct seq_oss_synth_t seq_oss_synth_t;
void snd_seq_oss_synth_init(void); void snd_seq_oss_synth_init(void);
int snd_seq_oss_synth_register(snd_seq_device_t *dev); int snd_seq_oss_synth_register(struct snd_seq_device *dev);
int snd_seq_oss_synth_unregister(snd_seq_device_t *dev); int snd_seq_oss_synth_unregister(struct snd_seq_device *dev);
void snd_seq_oss_synth_setup(seq_oss_devinfo_t *dp); void snd_seq_oss_synth_setup(struct seq_oss_devinfo *dp);
void snd_seq_oss_synth_setup_midi(seq_oss_devinfo_t *dp); void snd_seq_oss_synth_setup_midi(struct seq_oss_devinfo *dp);
void snd_seq_oss_synth_cleanup(seq_oss_devinfo_t *dp); void snd_seq_oss_synth_cleanup(struct seq_oss_devinfo *dp);
void snd_seq_oss_synth_reset(seq_oss_devinfo_t *dp, int dev); void snd_seq_oss_synth_reset(struct seq_oss_devinfo *dp, int dev);
int snd_seq_oss_synth_load_patch(seq_oss_devinfo_t *dp, int dev, int fmt, const char __user *buf, int p, int c); int snd_seq_oss_synth_load_patch(struct seq_oss_devinfo *dp, int dev, int fmt,
int snd_seq_oss_synth_is_valid(seq_oss_devinfo_t *dp, int dev); const char __user *buf, int p, int c);
int snd_seq_oss_synth_sysex(seq_oss_devinfo_t *dp, int dev, unsigned char *buf, snd_seq_event_t *ev); int snd_seq_oss_synth_is_valid(struct seq_oss_devinfo *dp, int dev);
int snd_seq_oss_synth_addr(seq_oss_devinfo_t *dp, int dev, snd_seq_event_t *ev); int snd_seq_oss_synth_sysex(struct seq_oss_devinfo *dp, int dev, unsigned char *buf,
int snd_seq_oss_synth_ioctl(seq_oss_devinfo_t *dp, int dev, unsigned int cmd, unsigned long addr); struct snd_seq_event *ev);
int snd_seq_oss_synth_raw_event(seq_oss_devinfo_t *dp, int dev, unsigned char *data, snd_seq_event_t *ev); int snd_seq_oss_synth_addr(struct seq_oss_devinfo *dp, int dev, struct snd_seq_event *ev);
int snd_seq_oss_synth_ioctl(struct seq_oss_devinfo *dp, int dev, unsigned int cmd,
unsigned long addr);
int snd_seq_oss_synth_raw_event(struct seq_oss_devinfo *dp, int dev,
unsigned char *data, struct snd_seq_event *ev);
int snd_seq_oss_synth_make_info(seq_oss_devinfo_t *dp, int dev, struct synth_info *inf); int snd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_info *inf);
#endif #endif
...@@ -33,18 +33,18 @@ ...@@ -33,18 +33,18 @@
/* /*
*/ */
static void calc_alsa_tempo(seq_oss_timer_t *timer); static void calc_alsa_tempo(struct seq_oss_timer *timer);
static int send_timer_event(seq_oss_devinfo_t *dp, int type, int value); static int send_timer_event(struct seq_oss_devinfo *dp, int type, int value);
/* /*
* create and register a new timer. * create and register a new timer.
* if queue is not started yet, start it. * if queue is not started yet, start it.
*/ */
seq_oss_timer_t * struct seq_oss_timer *
snd_seq_oss_timer_new(seq_oss_devinfo_t *dp) snd_seq_oss_timer_new(struct seq_oss_devinfo *dp)
{ {
seq_oss_timer_t *rec; struct seq_oss_timer *rec;
rec = kzalloc(sizeof(*rec), GFP_KERNEL); rec = kzalloc(sizeof(*rec), GFP_KERNEL);
if (rec == NULL) if (rec == NULL)
...@@ -67,7 +67,7 @@ snd_seq_oss_timer_new(seq_oss_devinfo_t *dp) ...@@ -67,7 +67,7 @@ snd_seq_oss_timer_new(seq_oss_devinfo_t *dp)
* if no more timer exists, stop the queue. * if no more timer exists, stop the queue.
*/ */
void void
snd_seq_oss_timer_delete(seq_oss_timer_t *rec) snd_seq_oss_timer_delete(struct seq_oss_timer *rec)
{ {
if (rec) { if (rec) {
snd_seq_oss_timer_stop(rec); snd_seq_oss_timer_stop(rec);
...@@ -82,7 +82,7 @@ snd_seq_oss_timer_delete(seq_oss_timer_t *rec) ...@@ -82,7 +82,7 @@ snd_seq_oss_timer_delete(seq_oss_timer_t *rec)
* 0 : not a timer event -- enqueue this event * 0 : not a timer event -- enqueue this event
*/ */
int int
snd_seq_oss_process_timer_event(seq_oss_timer_t *rec, evrec_t *ev) snd_seq_oss_process_timer_event(struct seq_oss_timer *rec, union evrec *ev)
{ {
abstime_t parm = ev->t.time; abstime_t parm = ev->t.time;
...@@ -125,7 +125,7 @@ snd_seq_oss_process_timer_event(seq_oss_timer_t *rec, evrec_t *ev) ...@@ -125,7 +125,7 @@ snd_seq_oss_process_timer_event(seq_oss_timer_t *rec, evrec_t *ev)
* convert tempo units * convert tempo units
*/ */
static void static void
calc_alsa_tempo(seq_oss_timer_t *timer) calc_alsa_tempo(struct seq_oss_timer *timer)
{ {
timer->tempo = (60 * 1000000) / timer->oss_tempo; timer->tempo = (60 * 1000000) / timer->oss_tempo;
timer->ppq = timer->oss_timebase; timer->ppq = timer->oss_timebase;
...@@ -136,9 +136,9 @@ calc_alsa_tempo(seq_oss_timer_t *timer) ...@@ -136,9 +136,9 @@ calc_alsa_tempo(seq_oss_timer_t *timer)
* dispatch a timer event * dispatch a timer event
*/ */
static int static int
send_timer_event(seq_oss_devinfo_t *dp, int type, int value) send_timer_event(struct seq_oss_devinfo *dp, int type, int value)
{ {
snd_seq_event_t ev; struct snd_seq_event ev;
memset(&ev, 0, sizeof(ev)); memset(&ev, 0, sizeof(ev));
ev.type = type; ev.type = type;
...@@ -156,10 +156,10 @@ send_timer_event(seq_oss_devinfo_t *dp, int type, int value) ...@@ -156,10 +156,10 @@ send_timer_event(seq_oss_devinfo_t *dp, int type, int value)
* set queue tempo and start queue * set queue tempo and start queue
*/ */
int int
snd_seq_oss_timer_start(seq_oss_timer_t *timer) snd_seq_oss_timer_start(struct seq_oss_timer *timer)
{ {
seq_oss_devinfo_t *dp = timer->dp; struct seq_oss_devinfo *dp = timer->dp;
snd_seq_queue_tempo_t tmprec; struct snd_seq_queue_tempo tmprec;
if (timer->running) if (timer->running)
snd_seq_oss_timer_stop(timer); snd_seq_oss_timer_stop(timer);
...@@ -181,7 +181,7 @@ snd_seq_oss_timer_start(seq_oss_timer_t *timer) ...@@ -181,7 +181,7 @@ snd_seq_oss_timer_start(seq_oss_timer_t *timer)
* stop queue * stop queue
*/ */
int int
snd_seq_oss_timer_stop(seq_oss_timer_t *timer) snd_seq_oss_timer_stop(struct seq_oss_timer *timer)
{ {
if (! timer->running) if (! timer->running)
return 0; return 0;
...@@ -195,7 +195,7 @@ snd_seq_oss_timer_stop(seq_oss_timer_t *timer) ...@@ -195,7 +195,7 @@ snd_seq_oss_timer_stop(seq_oss_timer_t *timer)
* continue queue * continue queue
*/ */
int int
snd_seq_oss_timer_continue(seq_oss_timer_t *timer) snd_seq_oss_timer_continue(struct seq_oss_timer *timer)
{ {
if (timer->running) if (timer->running)
return 0; return 0;
...@@ -209,7 +209,7 @@ snd_seq_oss_timer_continue(seq_oss_timer_t *timer) ...@@ -209,7 +209,7 @@ snd_seq_oss_timer_continue(seq_oss_timer_t *timer)
* change queue tempo * change queue tempo
*/ */
int int
snd_seq_oss_timer_tempo(seq_oss_timer_t *timer, int value) snd_seq_oss_timer_tempo(struct seq_oss_timer *timer, int value)
{ {
if (value < MIN_OSS_TEMPO) if (value < MIN_OSS_TEMPO)
value = MIN_OSS_TEMPO; value = MIN_OSS_TEMPO;
...@@ -227,7 +227,7 @@ snd_seq_oss_timer_tempo(seq_oss_timer_t *timer, int value) ...@@ -227,7 +227,7 @@ snd_seq_oss_timer_tempo(seq_oss_timer_t *timer, int value)
* ioctls * ioctls
*/ */
int int
snd_seq_oss_timer_ioctl(seq_oss_timer_t *timer, unsigned int cmd, int __user *arg) snd_seq_oss_timer_ioctl(struct seq_oss_timer *timer, unsigned int cmd, int __user *arg)
{ {
int value; int value;
......
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
/* /*
* timer information definition * timer information definition
*/ */
struct seq_oss_timer_t { struct seq_oss_timer {
seq_oss_devinfo_t *dp; struct seq_oss_devinfo *dp;
reltime_t cur_tick; reltime_t cur_tick;
int realtime; int realtime;
int running; int running;
...@@ -37,22 +37,22 @@ struct seq_oss_timer_t { ...@@ -37,22 +37,22 @@ struct seq_oss_timer_t {
}; };
seq_oss_timer_t *snd_seq_oss_timer_new(seq_oss_devinfo_t *dp); struct seq_oss_timer *snd_seq_oss_timer_new(struct seq_oss_devinfo *dp);
void snd_seq_oss_timer_delete(seq_oss_timer_t *dp); void snd_seq_oss_timer_delete(struct seq_oss_timer *dp);
int snd_seq_oss_timer_start(seq_oss_timer_t *timer); int snd_seq_oss_timer_start(struct seq_oss_timer *timer);
int snd_seq_oss_timer_stop(seq_oss_timer_t *timer); int snd_seq_oss_timer_stop(struct seq_oss_timer *timer);
int snd_seq_oss_timer_continue(seq_oss_timer_t *timer); int snd_seq_oss_timer_continue(struct seq_oss_timer *timer);
int snd_seq_oss_timer_tempo(seq_oss_timer_t *timer, int value); int snd_seq_oss_timer_tempo(struct seq_oss_timer *timer, int value);
#define snd_seq_oss_timer_reset snd_seq_oss_timer_start #define snd_seq_oss_timer_reset snd_seq_oss_timer_start
int snd_seq_oss_timer_ioctl(seq_oss_timer_t *timer, unsigned int cmd, int __user *arg); int snd_seq_oss_timer_ioctl(struct seq_oss_timer *timer, unsigned int cmd, int __user *arg);
/* /*
* get current processed time * get current processed time
*/ */
static inline abstime_t static inline abstime_t
snd_seq_oss_timer_cur_tick(seq_oss_timer_t *timer) snd_seq_oss_timer_cur_tick(struct seq_oss_timer *timer)
{ {
return timer->cur_tick; return timer->cur_tick;
} }
...@@ -62,7 +62,7 @@ snd_seq_oss_timer_cur_tick(seq_oss_timer_t *timer) ...@@ -62,7 +62,7 @@ snd_seq_oss_timer_cur_tick(seq_oss_timer_t *timer)
* is realtime event? * is realtime event?
*/ */
static inline int static inline int
snd_seq_oss_timer_is_realtime(seq_oss_timer_t *timer) snd_seq_oss_timer_is_realtime(struct seq_oss_timer *timer)
{ {
return timer->realtime; return timer->realtime;
} }
......
...@@ -32,11 +32,11 @@ ...@@ -32,11 +32,11 @@
/* /*
* create a write queue record * create a write queue record
*/ */
seq_oss_writeq_t * struct seq_oss_writeq *
snd_seq_oss_writeq_new(seq_oss_devinfo_t *dp, int maxlen) snd_seq_oss_writeq_new(struct seq_oss_devinfo *dp, int maxlen)
{ {
seq_oss_writeq_t *q; struct seq_oss_writeq *q;
snd_seq_client_pool_t pool; struct snd_seq_client_pool pool;
if ((q = kzalloc(sizeof(*q), GFP_KERNEL)) == NULL) if ((q = kzalloc(sizeof(*q), GFP_KERNEL)) == NULL)
return NULL; return NULL;
...@@ -61,7 +61,7 @@ snd_seq_oss_writeq_new(seq_oss_devinfo_t *dp, int maxlen) ...@@ -61,7 +61,7 @@ snd_seq_oss_writeq_new(seq_oss_devinfo_t *dp, int maxlen)
* delete the write queue * delete the write queue
*/ */
void void
snd_seq_oss_writeq_delete(seq_oss_writeq_t *q) snd_seq_oss_writeq_delete(struct seq_oss_writeq *q)
{ {
snd_seq_oss_writeq_clear(q); /* to be sure */ snd_seq_oss_writeq_clear(q); /* to be sure */
kfree(q); kfree(q);
...@@ -72,9 +72,9 @@ snd_seq_oss_writeq_delete(seq_oss_writeq_t *q) ...@@ -72,9 +72,9 @@ snd_seq_oss_writeq_delete(seq_oss_writeq_t *q)
* reset the write queue * reset the write queue
*/ */
void void
snd_seq_oss_writeq_clear(seq_oss_writeq_t *q) snd_seq_oss_writeq_clear(struct seq_oss_writeq *q)
{ {
snd_seq_remove_events_t reset; struct snd_seq_remove_events reset;
memset(&reset, 0, sizeof(reset)); memset(&reset, 0, sizeof(reset));
reset.remove_mode = SNDRV_SEQ_REMOVE_OUTPUT; /* remove all */ reset.remove_mode = SNDRV_SEQ_REMOVE_OUTPUT; /* remove all */
...@@ -88,9 +88,9 @@ snd_seq_oss_writeq_clear(seq_oss_writeq_t *q) ...@@ -88,9 +88,9 @@ snd_seq_oss_writeq_clear(seq_oss_writeq_t *q)
* wait until the write buffer has enough room * wait until the write buffer has enough room
*/ */
int int
snd_seq_oss_writeq_sync(seq_oss_writeq_t *q) snd_seq_oss_writeq_sync(struct seq_oss_writeq *q)
{ {
seq_oss_devinfo_t *dp = q->dp; struct seq_oss_devinfo *dp = q->dp;
abstime_t time; abstime_t time;
time = snd_seq_oss_timer_cur_tick(dp->timer); time = snd_seq_oss_timer_cur_tick(dp->timer);
...@@ -98,8 +98,8 @@ snd_seq_oss_writeq_sync(seq_oss_writeq_t *q) ...@@ -98,8 +98,8 @@ snd_seq_oss_writeq_sync(seq_oss_writeq_t *q)
return 0; /* already finished */ return 0; /* already finished */
if (! q->sync_event_put) { if (! q->sync_event_put) {
snd_seq_event_t ev; struct snd_seq_event ev;
evrec_t *rec; union evrec *rec;
/* put echoback event */ /* put echoback event */
memset(&ev, 0, sizeof(ev)); memset(&ev, 0, sizeof(ev));
...@@ -108,7 +108,7 @@ snd_seq_oss_writeq_sync(seq_oss_writeq_t *q) ...@@ -108,7 +108,7 @@ snd_seq_oss_writeq_sync(seq_oss_writeq_t *q)
ev.time.tick = time; ev.time.tick = time;
/* echo back to itself */ /* echo back to itself */
snd_seq_oss_fill_addr(dp, &ev, dp->addr.client, dp->addr.port); snd_seq_oss_fill_addr(dp, &ev, dp->addr.client, dp->addr.port);
rec = (evrec_t*)&ev.data; rec = (union evrec *)&ev.data;
rec->t.code = SEQ_SYNCTIMER; rec->t.code = SEQ_SYNCTIMER;
rec->t.time = time; rec->t.time = time;
q->sync_event_put = 1; q->sync_event_put = 1;
...@@ -128,7 +128,7 @@ snd_seq_oss_writeq_sync(seq_oss_writeq_t *q) ...@@ -128,7 +128,7 @@ snd_seq_oss_writeq_sync(seq_oss_writeq_t *q)
* wake up sync - echo event was catched * wake up sync - echo event was catched
*/ */
void void
snd_seq_oss_writeq_wakeup(seq_oss_writeq_t *q, abstime_t time) snd_seq_oss_writeq_wakeup(struct seq_oss_writeq *q, abstime_t time)
{ {
unsigned long flags; unsigned long flags;
...@@ -146,9 +146,9 @@ snd_seq_oss_writeq_wakeup(seq_oss_writeq_t *q, abstime_t time) ...@@ -146,9 +146,9 @@ snd_seq_oss_writeq_wakeup(seq_oss_writeq_t *q, abstime_t time)
* return the unused pool size * return the unused pool size
*/ */
int int
snd_seq_oss_writeq_get_free_size(seq_oss_writeq_t *q) snd_seq_oss_writeq_get_free_size(struct seq_oss_writeq *q)
{ {
snd_seq_client_pool_t pool; struct snd_seq_client_pool pool;
pool.client = q->dp->cseq; pool.client = q->dp->cseq;
snd_seq_oss_control(q->dp, SNDRV_SEQ_IOCTL_GET_CLIENT_POOL, &pool); snd_seq_oss_control(q->dp, SNDRV_SEQ_IOCTL_GET_CLIENT_POOL, &pool);
return pool.output_free; return pool.output_free;
...@@ -159,9 +159,9 @@ snd_seq_oss_writeq_get_free_size(seq_oss_writeq_t *q) ...@@ -159,9 +159,9 @@ snd_seq_oss_writeq_get_free_size(seq_oss_writeq_t *q)
* set output threshold size from ioctl * set output threshold size from ioctl
*/ */
void void
snd_seq_oss_writeq_set_output(seq_oss_writeq_t *q, int val) snd_seq_oss_writeq_set_output(struct seq_oss_writeq *q, int val)
{ {
snd_seq_client_pool_t pool; struct snd_seq_client_pool pool;
pool.client = q->dp->cseq; pool.client = q->dp->cseq;
snd_seq_oss_control(q->dp, SNDRV_SEQ_IOCTL_GET_CLIENT_POOL, &pool); snd_seq_oss_control(q->dp, SNDRV_SEQ_IOCTL_GET_CLIENT_POOL, &pool);
pool.output_room = val; pool.output_room = val;
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
#include "seq_oss_device.h" #include "seq_oss_device.h"
struct seq_oss_writeq_t { struct seq_oss_writeq {
seq_oss_devinfo_t *dp; struct seq_oss_devinfo *dp;
int maxlen; int maxlen;
abstime_t sync_time; abstime_t sync_time;
int sync_event_put; int sync_event_put;
...@@ -38,13 +38,13 @@ struct seq_oss_writeq_t { ...@@ -38,13 +38,13 @@ struct seq_oss_writeq_t {
/* /*
* seq_oss_writeq.c * seq_oss_writeq.c
*/ */
seq_oss_writeq_t *snd_seq_oss_writeq_new(seq_oss_devinfo_t *dp, int maxlen); struct seq_oss_writeq *snd_seq_oss_writeq_new(struct seq_oss_devinfo *dp, int maxlen);
void snd_seq_oss_writeq_delete(seq_oss_writeq_t *q); void snd_seq_oss_writeq_delete(struct seq_oss_writeq *q);
void snd_seq_oss_writeq_clear(seq_oss_writeq_t *q); void snd_seq_oss_writeq_clear(struct seq_oss_writeq *q);
int snd_seq_oss_writeq_sync(seq_oss_writeq_t *q); int snd_seq_oss_writeq_sync(struct seq_oss_writeq *q);
void snd_seq_oss_writeq_wakeup(seq_oss_writeq_t *q, abstime_t time); void snd_seq_oss_writeq_wakeup(struct seq_oss_writeq *q, abstime_t time);
int snd_seq_oss_writeq_get_free_size(seq_oss_writeq_t *q); int snd_seq_oss_writeq_get_free_size(struct seq_oss_writeq *q);
void snd_seq_oss_writeq_set_output(seq_oss_writeq_t *q, int size); void snd_seq_oss_writeq_set_output(struct seq_oss_writeq *q, int size);
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment