summaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 14:05:16 +0100
committerJaroslav Kysela <perex@suse.cz>2006-01-03 12:17:57 +0100
commit080dece3460b534bedc4ef4ba3abaa57e9486331 (patch)
tree7e35242b3d716cd29f62d96e0920230147cb5c03 /sound/core
parent19ac31e82cc7328c01bf26f824f33c7c38cb6075 (diff)
downloadop-kernel-dev-080dece3460b534bedc4ef4ba3abaa57e9486331.zip
op-kernel-dev-080dece3460b534bedc4ef4ba3abaa57e9486331.tar.gz
[ALSA] Remove xxx_t typedefs: Sequencer OSS-emulation
Modules: ALSA<-OSS sequencer,ALSA sequencer Remove xxx_t typedefs from the core sequencer OSS-emulation codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/seq/oss/seq_oss.c24
-rw-r--r--sound/core/seq/oss/seq_oss_device.h60
-rw-r--r--sound/core/seq/oss/seq_oss_event.c60
-rw-r--r--sound/core/seq/oss/seq_oss_event.h50
-rw-r--r--sound/core/seq/oss/seq_oss_init.c52
-rw-r--r--sound/core/seq/oss/seq_oss_ioctl.c12
-rw-r--r--sound/core/seq/oss/seq_oss_midi.c96
-rw-r--r--sound/core/seq/oss/seq_oss_midi.h27
-rw-r--r--sound/core/seq/oss/seq_oss_readq.c32
-rw-r--r--sound/core/seq/oss/seq_oss_readq.h24
-rw-r--r--sound/core/seq/oss/seq_oss_rw.c18
-rw-r--r--sound/core/seq/oss/seq_oss_synth.c92
-rw-r--r--sound/core/seq/oss/seq_oss_synth.h32
-rw-r--r--sound/core/seq/oss/seq_oss_timer.c34
-rw-r--r--sound/core/seq/oss/seq_oss_timer.h22
-rw-r--r--sound/core/seq/oss/seq_oss_writeq.c34
-rw-r--r--sound/core/seq/oss/seq_oss_writeq.h18
17 files changed, 340 insertions, 347 deletions
diff --git a/sound/core/seq/oss/seq_oss.c b/sound/core/seq/oss/seq_oss.c
index 4c0558c..2371e41 100644
--- a/sound/core/seq/oss/seq_oss.c
+++ b/sound/core/seq/oss/seq_oss.c
@@ -62,7 +62,7 @@ static ssize_t odev_write(struct file *file, const char __user *buf, size_t coun
static long odev_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
static unsigned int odev_poll(struct file *file, poll_table * wait);
#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
@@ -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)
{
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_unregister,
};
@@ -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,
- sizeof(snd_seq_oss_reg_t))) < 0) {
+ sizeof(struct snd_seq_oss_reg))) < 0) {
snd_seq_oss_delete_client();
unregister_proc();
unregister_device();
@@ -144,7 +144,7 @@ odev_open(struct inode *inode, struct file *file)
static int
odev_release(struct inode *inode, struct file *file)
{
- seq_oss_devinfo_t *dp;
+ struct seq_oss_devinfo *dp;
if ((dp = file->private_data) == NULL)
return 0;
@@ -161,7 +161,7 @@ odev_release(struct inode *inode, struct file *file)
static ssize_t
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;
snd_assert(dp != NULL, return -EIO);
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)
static ssize_t
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;
snd_assert(dp != NULL, return -EIO);
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
static long
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;
snd_assert(dp != NULL, return -EIO);
return snd_seq_oss_ioctl(dp, cmd, arg);
@@ -195,7 +195,7 @@ odev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
static unsigned int
odev_poll(struct file *file, poll_table * wait)
{
- seq_oss_devinfo_t *dp;
+ struct seq_oss_devinfo *dp;
dp = file->private_data;
snd_assert(dp != NULL, return 0);
return snd_seq_oss_poll(dp, file, wait);
@@ -217,7 +217,7 @@ static struct file_operations seq_oss_f_ops =
.compat_ioctl = odev_ioctl_compat,
};
-static snd_minor_t seq_oss_reg = {
+static struct snd_minor seq_oss_reg = {
.comment = "sequencer",
.f_ops = &seq_oss_f_ops,
};
@@ -268,10 +268,10 @@ unregister_device(void)
#ifdef CONFIG_PROC_FS
-static snd_info_entry_t *info_entry;
+static struct snd_info_entry *info_entry;
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);
snd_iprintf(buf, "OSS sequencer emulation version %s\n", SNDRV_SEQ_OSS_VERSION_STR);
@@ -287,7 +287,7 @@ static int __init
register_proc(void)
{
#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);
if (entry == NULL)
diff --git a/sound/core/seq/oss/seq_oss_device.h b/sound/core/seq/oss/seq_oss_device.h
index 9737867..9a8567c 100644
--- a/sound/core/seq/oss/seq_oss_device.h
+++ b/sound/core/seq/oss/seq_oss_device.h
@@ -55,32 +55,24 @@
* 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 abstime_t;
-typedef union evrec_t evrec_t;
/*
* synthesizer channel information
*/
-struct seq_oss_chinfo_t {
+struct seq_oss_chinfo {
int note, vel;
};
/*
* synthesizer information
*/
-struct seq_oss_synthinfo_t {
- snd_seq_oss_arg_t arg;
- seq_oss_chinfo_t *ch;
- seq_oss_synth_sysex_t *sysex;
+struct seq_oss_synthinfo {
+ struct snd_seq_oss_arg arg;
+ struct seq_oss_chinfo *ch;
+ struct seq_oss_synth_sysex *sysex;
int nr_voices;
int opened;
int is_midi;
@@ -92,14 +84,14 @@ struct seq_oss_synthinfo_t {
* sequencer client information
*/
-struct seq_oss_devinfo_t {
+struct seq_oss_devinfo {
int index; /* application index */
int cseq; /* sequencer client number */
int port; /* sequencer port 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 file_mode; /* file access */
@@ -109,17 +101,17 @@ struct seq_oss_devinfo_t {
/* synth device table */
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;
/* output queue */
- seq_oss_writeq_t *writeq;
+ struct seq_oss_writeq *writeq;
/* midi input queue */
- seq_oss_readq_t *readq;
+ struct seq_oss_readq *readq;
/* timer */
- seq_oss_timer_t *timer;
+ struct seq_oss_timer *timer;
};
@@ -133,24 +125,24 @@ int snd_seq_oss_delete_client(void);
/* device file interface */
int snd_seq_oss_open(struct file *file, int level);
-void snd_seq_oss_release(seq_oss_devinfo_t *dp);
-int snd_seq_oss_ioctl(seq_oss_devinfo_t *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_write(seq_oss_devinfo_t *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);
+void snd_seq_oss_release(struct seq_oss_devinfo *dp);
+int snd_seq_oss_ioctl(struct seq_oss_devinfo *dp, unsigned int cmd, unsigned long arg);
+int snd_seq_oss_read(struct seq_oss_devinfo *dev, char __user *buf, int count);
+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(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_drain_write(seq_oss_devinfo_t *dp);
+void snd_seq_oss_reset(struct seq_oss_devinfo *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 */
-void snd_seq_oss_system_info_read(snd_info_buffer_t *buf);
-void snd_seq_oss_midi_info_read(snd_info_buffer_t *buf);
-void snd_seq_oss_synth_info_read(snd_info_buffer_t *buf);
-void snd_seq_oss_readq_info_read(seq_oss_readq_t *q, snd_info_buffer_t *buf);
+void snd_seq_oss_system_info_read(struct snd_info_buffer *buf);
+void snd_seq_oss_midi_info_read(struct snd_info_buffer *buf);
+void snd_seq_oss_synth_info_read(struct snd_info_buffer *buf);
+void snd_seq_oss_readq_info_read(struct seq_oss_readq *q, struct snd_info_buffer *buf);
/* file mode macros */
#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);
/* dispatch event */
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);
}
/* ioctl */
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);
}
/* fill the addresses in header */
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)
{
ev->queue = dp->queue;
diff --git a/sound/core/seq/oss/seq_oss_event.c b/sound/core/seq/oss/seq_oss_event.c
index 58e52dd..066f5f3 100644
--- a/sound/core/seq/oss/seq_oss_event.c
+++ b/sound/core/seq/oss/seq_oss_event.c
@@ -31,17 +31,17 @@
/*
* prototypes
*/
-static int extended_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev);
-static int chn_voice_event(seq_oss_devinfo_t *dp, evrec_t *event_rec, snd_seq_event_t *ev);
-static int chn_common_event(seq_oss_devinfo_t *dp, evrec_t *event_rec, snd_seq_event_t *ev);
-static int timing_event(seq_oss_devinfo_t *dp, evrec_t *event_rec, snd_seq_event_t *ev);
-static int local_event(seq_oss_devinfo_t *dp, evrec_t *event_rec, snd_seq_event_t *ev);
-static int old_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *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_off_event(seq_oss_devinfo_t *dp, int dev, int ch, int note, int vel, snd_seq_event_t *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_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_echo_event(seq_oss_devinfo_t *dp, evrec_t *rec, 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(struct seq_oss_devinfo *dp, union evrec *event_rec, struct snd_seq_event *ev);
+static int chn_common_event(struct seq_oss_devinfo *dp, union evrec *event_rec, struct snd_seq_event *ev);
+static int timing_event(struct seq_oss_devinfo *dp, union evrec *event_rec, struct snd_seq_event *ev);
+static int local_event(struct seq_oss_devinfo *dp, union evrec *event_rec, struct snd_seq_event *ev);
+static int old_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *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(struct seq_oss_devinfo *dp, int dev, int ch, int note, int vel, struct snd_seq_event *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(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(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 *
*/
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) {
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
/* old type events: mode1 only */
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) {
case SEQ_NOTEOFF:
@@ -130,7 +130,7 @@ old_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev)
/* 8bytes extended event: mode1 only */
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;
@@ -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 */
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)
return -EINVAL;
@@ -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 */
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)
return -EINVAL;
@@ -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 */
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) {
case TMR_ECHO:
if (dp->seq_mode == SNDRV_SEQ_OSS_MODE_MUSIC)
return set_echo_event(dp, q, ev);
else {
- evrec_t tmp;
+ union evrec tmp;
memset(&tmp, 0, sizeof(tmp));
/* XXX: only for little-endian! */
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)
/* local events: mode1 and 2 */
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;
}
@@ -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
*/
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) {
case SNDRV_SEQ_OSS_PROCESS_EVENTS:
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
* process note-off event for OSS synth
*/
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) {
case SNDRV_SEQ_OSS_PROCESS_EVENTS:
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
* create a note event
*/
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))
return -ENXIO;
@@ -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
*/
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))
return -ENXIO;
@@ -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
*/
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;
/* echo back to itself */
@@ -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.
*/
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)
{
- seq_oss_devinfo_t *dp = (seq_oss_devinfo_t *)private_data;
- evrec_t *rec;
+ struct seq_oss_devinfo *dp = (struct seq_oss_devinfo *)private_data;
+ union evrec *rec;
if (ev->type != SNDRV_SEQ_EVENT_ECHO)
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,
if (ev->source.client != dp->cseq)
return 0; /* ignored */
- rec = (evrec_t*)&ev->data;
+ rec = (union evrec*)&ev->data;
if (rec->s.code == SEQ_SYNCTIMER) {
/* sync echo back */
snd_seq_oss_writeq_wakeup(dp->writeq, rec->t.time);
diff --git a/sound/core/seq/oss/seq_oss_event.h b/sound/core/seq/oss/seq_oss_event.h
index bf1d4d3..9a4d9ad 100644
--- a/sound/core/seq/oss/seq_oss_event.h
+++ b/sound/core/seq/oss/seq_oss_event.h
@@ -29,74 +29,74 @@
#define LONG_EVENT_SIZE 8
/* short event (4bytes) */
-typedef struct evrec_short_t {
+struct evrec_short {
unsigned char code;
unsigned char parm1;
unsigned char dev;
unsigned char parm2;
-} evrec_short_t;
+};
/* short note events (4bytes) */
-typedef struct evrec_note_t {
+struct evrec_note {
unsigned char code;
unsigned char chn;
unsigned char note;
unsigned char vel;
-} evrec_note_t;
+};
/* long timer events (8bytes) */
-typedef struct evrec_timer_t {
+struct evrec_timer {
unsigned char code;
unsigned char cmd;
unsigned char dummy1, dummy2;
unsigned int time;
-} evrec_timer_t;
+};
/* long extended events (8bytes) */
-typedef struct evrec_extended_t {
+struct evrec_extended {
unsigned char code;
unsigned char cmd;
unsigned char dev;
unsigned char chn;
unsigned char p1, p2, p3, p4;
-} evrec_extended_t;
+};
/* long channel events (8bytes) */
-typedef struct evrec_long_t {
+struct evrec_long {
unsigned char code;
unsigned char dev;
unsigned char cmd;
unsigned char chn;
unsigned char p1, p2;
unsigned short val;
-} evrec_long_t;
+};
/* channel voice events (8bytes) */
-typedef struct evrec_voice_t {
+struct evrec_voice {
unsigned char code;
unsigned char dev;
unsigned char cmd;
unsigned char chn;
unsigned char note, parm;
unsigned short dummy;
-} evrec_voice_t;
+};
/* sysex events (8bytes) */
-typedef struct evrec_sysex_t {
+struct evrec_sysex {
unsigned char code;
unsigned char dev;
unsigned char buf[6];
-} evrec_sysex_t;
+};
/* event record */
-union evrec_t {
- evrec_short_t s;
- evrec_note_t n;
- evrec_long_t l;
- evrec_voice_t v;
- evrec_timer_t t;
- evrec_extended_t e;
- evrec_sysex_t x;
+union evrec {
+ struct evrec_short s;
+ struct evrec_note n;
+ struct evrec_long l;
+ struct evrec_voice v;
+ struct evrec_timer t;
+ struct evrec_extended e;
+ struct evrec_sysex x;
unsigned int echo;
unsigned char c[LONG_EVENT_SIZE];
};
@@ -104,9 +104,9 @@ union evrec_t {
#define ev_is_long(ev) ((ev)->s.code >= 128)
#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_timer_event(seq_oss_timer_t *rec, evrec_t *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_process_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev);
+int snd_seq_oss_process_timer_event(struct seq_oss_timer *rec, union evrec *q);
+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 */
diff --git a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c
index 1ab1cf8..1d4473e 100644
--- a/sound/core/seq/oss/seq_oss_init.c
+++ b/sound/core/seq/oss/seq_oss_init.c
@@ -41,17 +41,17 @@ static int system_client = -1; /* ALSA sequencer client number */
static int system_port = -1;
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
*/
-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 create_port(seq_oss_devinfo_t *dp);
-static int delete_port(seq_oss_devinfo_t *dp);
-static int alloc_seq_queue(seq_oss_devinfo_t *dp);
+static int create_port(struct seq_oss_devinfo *dp);
+static int delete_port(struct seq_oss_devinfo *dp);
+static int alloc_seq_queue(struct seq_oss_devinfo *dp);
static int delete_seq_queue(int queue);
static void free_devinfo(void *private);
@@ -65,10 +65,10 @@ int __init
snd_seq_oss_create_client(void)
{
int rc;
- snd_seq_client_callback_t callback;
- snd_seq_client_info_t *info;
- snd_seq_port_info_t *port;
- snd_seq_port_callback_t port_callback;
+ struct snd_seq_client_callback callback;
+ struct snd_seq_client_info *info;
+ struct snd_seq_port_info *port;
+ struct snd_seq_port_callback port_callback;
info = kmalloc(sizeof(*info), GFP_KERNEL);
port = kmalloc(sizeof(*port), GFP_KERNEL);
@@ -118,7 +118,7 @@ snd_seq_oss_create_client(void)
call_ctl(SNDRV_SEQ_IOCTL_CREATE_PORT, port);
if ((system_port = port->addr.port) >= 0) {
- snd_seq_port_subscribe_t subs;
+ struct snd_seq_port_subscribe subs;
memset(&subs, 0, sizeof(subs));
subs.sender.client = SNDRV_SEQ_CLIENT_SYSTEM;
@@ -140,9 +140,9 @@ snd_seq_oss_create_client(void)
* receive annoucement from system port, and check the midi device
*/
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)
return 0; /* it must not happen */
@@ -191,7 +191,7 @@ int
snd_seq_oss_open(struct file *file, int level)
{
int i, rc;
- seq_oss_devinfo_t *dp;
+ struct seq_oss_devinfo *dp;
if ((dp = kzalloc(sizeof(*dp), GFP_KERNEL)) == NULL) {
snd_printk(KERN_ERR "can't malloc device info\n");
@@ -323,11 +323,11 @@ translate_mode(struct file *file)
* create sequencer port
*/
static int
-create_port(seq_oss_devinfo_t *dp)
+create_port(struct seq_oss_devinfo *dp)
{
int rc;
- snd_seq_port_info_t port;
- snd_seq_port_callback_t callback;
+ struct snd_seq_port_info port;
+ struct snd_seq_port_callback callback;
memset(&port, 0, sizeof(port));
port.addr.client = dp->cseq;
@@ -358,7 +358,7 @@ create_port(seq_oss_devinfo_t *dp)
* delete ALSA port
*/
static int
-delete_port(seq_oss_devinfo_t *dp)
+delete_port(struct seq_oss_devinfo *dp)
{
if (dp->port < 0)
return 0;
@@ -371,9 +371,9 @@ delete_port(seq_oss_devinfo_t *dp)
* allocate a queue
*/
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;
memset(&qinfo, 0, sizeof(qinfo));
@@ -392,7 +392,7 @@ alloc_seq_queue(seq_oss_devinfo_t *dp)
static int
delete_seq_queue(int queue)
{
- snd_seq_queue_info_t qinfo;
+ struct snd_seq_queue_info qinfo;
int rc;
if (queue < 0)
@@ -412,7 +412,7 @@ delete_seq_queue(int queue)
static void
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)
snd_seq_oss_timer_delete(dp->timer);
@@ -431,7 +431,7 @@ free_devinfo(void *private)
* close sequencer device
*/
void
-snd_seq_oss_release(seq_oss_devinfo_t *dp)
+snd_seq_oss_release(struct seq_oss_devinfo *dp)
{
int queue;
@@ -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)
*/
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)
return;
@@ -477,7 +477,7 @@ snd_seq_oss_drain_write(seq_oss_devinfo_t *dp)
* reset sequencer devices
*/
void
-snd_seq_oss_reset(seq_oss_devinfo_t *dp)
+snd_seq_oss_reset(struct seq_oss_devinfo *dp)
{
int i;
@@ -525,10 +525,10 @@ filemode_str(int val)
* proc interface
*/
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;
- seq_oss_devinfo_t *dp;
+ struct seq_oss_devinfo *dp;
snd_iprintf(buf, "ALSA client number %d\n", system_client);
snd_iprintf(buf, "ALSA receiver port %d\n", system_port);
diff --git a/sound/core/seq/oss/seq_oss_ioctl.c b/sound/core/seq/oss/seq_oss_ioctl.c
index e86f18d..5ac701c 100644
--- a/sound/core/seq/oss/seq_oss_ioctl.c
+++ b/sound/core/seq/oss/seq_oss_ioctl.c
@@ -28,7 +28,7 @@
#include "seq_oss_midi.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;
@@ -41,7 +41,7 @@ static int snd_seq_oss_synth_info_user(seq_oss_devinfo_t *dp, void __user *arg)
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;
@@ -54,24 +54,24 @@ static int snd_seq_oss_midi_info_user(seq_oss_devinfo_t *dp, void __user *arg)
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];
- snd_seq_event_t tmpev;
+ struct snd_seq_event tmpev;
if (copy_from_user(ev, arg, 8))
return -EFAULT;
memset(&tmpev, 0, sizeof(tmpev));
snd_seq_oss_fill_addr(dp, &tmpev, dp->addr.port, dp->addr.client);
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);
}
return 0;
}
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;
void __user *arg = (void __user *)carg;
diff --git a/sound/core/seq/oss/seq_oss_midi.c b/sound/core/seq/oss/seq_oss_midi.c
index f0e95c8..eb7ae99 100644
--- a/sound/core/seq/oss/seq_oss_midi.c
+++ b/sound/core/seq/oss/seq_oss_midi.c
@@ -37,15 +37,15 @@
/*
* definition of midi device record
*/
-struct seq_oss_midi_t {
+struct seq_oss_midi {
int seq_device; /* device number */
int client; /* sequencer client number */
int port; /* sequencer port number */
unsigned int flags; /* port capability */
int opened; /* flag for opening */
unsigned char name[SNDRV_SEQ_OSS_MAX_MIDI_NAME];
- snd_midi_event_t *coder; /* MIDI event coder */
- seq_oss_devinfo_t *devinfo; /* assigned OSSseq device */
+ struct snd_midi_event *coder; /* MIDI event coder */
+ struct seq_oss_devinfo *devinfo; /* assigned OSSseq device */
snd_use_lock_t use_lock;
};
@@ -54,17 +54,17 @@ struct seq_oss_midi_t {
* midi device table
*/
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);
/*
* prototypes
*/
-static seq_oss_midi_t *get_mdev(int dev);
-static seq_oss_midi_t *get_mididev(seq_oss_devinfo_t *dp, int dev);
-static int send_synth_event(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, int dev);
-static int send_midi_event(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, seq_oss_midi_t *mdev);
+static struct seq_oss_midi *get_mdev(int dev);
+static struct seq_oss_midi *get_mididev(struct seq_oss_devinfo *dp, int dev);
+static int send_synth_event(struct seq_oss_devinfo *dp, struct snd_seq_event *ev, int dev);
+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
@@ -73,8 +73,8 @@ static int send_midi_event(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, seq_oss_m
int __init
snd_seq_oss_midi_lookup_ports(int client)
{
- snd_seq_client_info_t *clinfo;
- snd_seq_port_info_t *pinfo;
+ struct snd_seq_client_info *clinfo;
+ struct snd_seq_port_info *pinfo;
clinfo = kzalloc(sizeof(*clinfo), GFP_KERNEL);
pinfo = kzalloc(sizeof(*pinfo), GFP_KERNEL);
@@ -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)
{
- seq_oss_midi_t *mdev;
+ struct seq_oss_midi *mdev;
unsigned long flags;
spin_lock_irqsave(&register_lock, flags);
@@ -117,11 +117,11 @@ get_mdev(int dev)
/*
* look for the identical slot
*/
-static seq_oss_midi_t *
+static struct seq_oss_midi *
find_slot(int client, int port)
{
int i;
- seq_oss_midi_t *mdev;
+ struct seq_oss_midi *mdev;
unsigned long flags;
spin_lock_irqsave(&register_lock, flags);
@@ -145,10 +145,10 @@ find_slot(int client, int port)
* register a new port if it doesn't exist yet
*/
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;
- seq_oss_midi_t *mdev;
+ struct seq_oss_midi *mdev;
unsigned long flags;
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)
int
snd_seq_oss_midi_check_exit_port(int client, int port)
{
- seq_oss_midi_t *mdev;
+ struct seq_oss_midi *mdev;
unsigned long flags;
int index;
@@ -258,7 +258,7 @@ void
snd_seq_oss_midi_clear_all(void)
{
int i;
- seq_oss_midi_t *mdev;
+ struct seq_oss_midi *mdev;
unsigned long flags;
spin_lock_irqsave(&register_lock, flags);
@@ -279,7 +279,7 @@ snd_seq_oss_midi_clear_all(void)
* set up midi tables
*/
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;
}
@@ -288,7 +288,7 @@ snd_seq_oss_midi_setup(seq_oss_devinfo_t *dp)
* clean up midi tables
*/
void
-snd_seq_oss_midi_cleanup(seq_oss_devinfo_t *dp)
+snd_seq_oss_midi_cleanup(struct seq_oss_devinfo *dp)
{
int i;
for (i = 0; i < dp->max_mididev; i++)
@@ -301,7 +301,7 @@ snd_seq_oss_midi_cleanup(seq_oss_devinfo_t *dp)
* open all midi devices. ignore errors.
*/
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;
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)
/*
* get the midi device information
*/
-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)
{
if (dev < 0 || dev >= dp->max_mididev)
return NULL;
@@ -325,11 +325,11 @@ get_mididev(seq_oss_devinfo_t *dp, int dev)
* open the midi device if not opened yet
*/
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;
- seq_oss_midi_t *mdev;
- snd_seq_port_subscribe_t subs;
+ struct seq_oss_midi *mdev;
+ struct snd_seq_port_subscribe subs;
if ((mdev = get_mididev(dp, dev)) == NULL)
return -ENODEV;
@@ -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
*/
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;
- snd_seq_port_subscribe_t subs;
+ struct seq_oss_midi *mdev;
+ struct snd_seq_port_subscribe subs;
if ((mdev = get_mididev(dp, dev)) == NULL)
return -ENODEV;
@@ -430,9 +430,9 @@ snd_seq_oss_midi_close(seq_oss_devinfo_t *dp, int dev)
* change seq capability flags to file mode flags
*/
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;
if ((mdev = get_mididev(dp, dev)) == NULL)
@@ -453,9 +453,9 @@ snd_seq_oss_midi_filemode(seq_oss_devinfo_t *dp, int dev)
* so far, only close the device.
*/
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)
return;
@@ -465,7 +465,7 @@ snd_seq_oss_midi_reset(seq_oss_devinfo_t *dp, int dev)
}
if (mdev->opened & PERM_WRITE) {
- snd_seq_event_t ev;
+ struct snd_seq_event ev;
int c;
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)
* get client/port of the specified MIDI device
*/
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)
return;
@@ -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
*/
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;
- seq_oss_midi_t *mdev;
+ struct seq_oss_devinfo *dp = (struct seq_oss_devinfo *)private_data;
+ struct seq_oss_midi *mdev;
int rc;
if (dp->readq == NULL)
@@ -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
*/
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));
@@ -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
*/
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];
int len;
@@ -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
*/
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)
return -ENODEV;
@@ -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
*/
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)
return -ENXIO;
@@ -686,10 +686,10 @@ capmode_str(int val)
}
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;
- seq_oss_midi_t *mdev;
+ struct seq_oss_midi *mdev;
snd_iprintf(buf, "\nNumber of MIDI devices: %d\n", max_midi_devs);
for (i = 0; i < max_midi_devs; i++) {
diff --git a/sound/core/seq/oss/seq_oss_midi.h b/sound/core/seq/oss/seq_oss_midi.h
index 462484b..84eb866 100644
--- a/sound/core/seq/oss/seq_oss_midi.h
+++ b/sound/core/seq/oss/seq_oss_midi.h
@@ -26,24 +26,23 @@
#include "seq_oss_device.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_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);
void snd_seq_oss_midi_clear_all(void);
-void snd_seq_oss_midi_setup(seq_oss_devinfo_t *dp);
-void snd_seq_oss_midi_cleanup(seq_oss_devinfo_t *dp);
+void snd_seq_oss_midi_setup(struct seq_oss_devinfo *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);
-void snd_seq_oss_midi_open_all(seq_oss_devinfo_t *dp, int file_mode);
-int snd_seq_oss_midi_close(seq_oss_devinfo_t *dp, int dev);
-void snd_seq_oss_midi_reset(seq_oss_devinfo_t *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_input(snd_seq_event_t *ev, int direct, void *private);
-int snd_seq_oss_midi_filemode(seq_oss_devinfo_t *dp, int dev);
-int snd_seq_oss_midi_make_info(seq_oss_devinfo_t *dp, int dev, struct midi_info *inf);
-void snd_seq_oss_midi_get_addr(seq_oss_devinfo_t *dp, int dev, snd_seq_addr_t *addr);
+int snd_seq_oss_midi_open(struct seq_oss_devinfo *dp, int dev, int file_mode);
+void snd_seq_oss_midi_open_all(struct seq_oss_devinfo *dp, int file_mode);
+int snd_seq_oss_midi_close(struct seq_oss_devinfo *dp, int dev);
+void snd_seq_oss_midi_reset(struct seq_oss_devinfo *dp, int dev);
+int snd_seq_oss_midi_putc(struct seq_oss_devinfo *dp, int dev, unsigned char c,
+ struct snd_seq_event *ev);
+int snd_seq_oss_midi_input(struct snd_seq_event *ev, int direct, void *private);
+int snd_seq_oss_midi_filemode(struct seq_oss_devinfo *dp, int dev);
+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
diff --git a/sound/core/seq/oss/seq_oss_readq.c b/sound/core/seq/oss/seq_oss_readq.c
index 55571e1..abc7007 100644
--- a/sound/core/seq/oss/seq_oss_readq.c
+++ b/sound/core/seq/oss/seq_oss_readq.c
@@ -41,17 +41,17 @@
/*
* create a read queue
*/
-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)
{
- seq_oss_readq_t *q;
+ struct seq_oss_readq *q;
if ((q = kzalloc(sizeof(*q), GFP_KERNEL)) == NULL) {
snd_printk(KERN_ERR "can't malloc read queue\n");
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");
kfree(q);
return NULL;
@@ -72,7 +72,7 @@ snd_seq_oss_readq_new(seq_oss_devinfo_t *dp, int maxlen)
* delete the read queue
*/
void
-snd_seq_oss_readq_delete(seq_oss_readq_t *q)
+snd_seq_oss_readq_delete(struct seq_oss_readq *q)
{
if (q) {
kfree(q->q);
@@ -84,7 +84,7 @@ snd_seq_oss_readq_delete(seq_oss_readq_t *q)
* reset the read queue
*/
void
-snd_seq_oss_readq_clear(seq_oss_readq_t *q)
+snd_seq_oss_readq_clear(struct seq_oss_readq *q)
{
if (q->qlen) {
q->qlen = 0;
@@ -100,9 +100,9 @@ snd_seq_oss_readq_clear(seq_oss_readq_t *q)
* put a midi byte
*/
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;
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
* return zero if enqueued
*/
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;
@@ -152,7 +152,7 @@ snd_seq_oss_readq_put_event(seq_oss_readq_t *q, evrec_t *ev)
* caller must hold lock
*/
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)
return -EAGAIN;
@@ -164,7 +164,7 @@ snd_seq_oss_readq_pick(seq_oss_readq_t *q, evrec_t *rec)
* sleep until ready
*/
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,
(q->qlen > 0 || q->head == q->tail),
@@ -176,7 +176,7 @@ snd_seq_oss_readq_wait(seq_oss_readq_t *q)
* caller must hold lock
*/
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) {
q->head = (q->head + 1) % q->maxlen;
@@ -189,7 +189,7 @@ snd_seq_oss_readq_free(seq_oss_readq_t *q)
* return non-zero if readq is not empty.
*/
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);
return q->qlen;
@@ -199,10 +199,10 @@ snd_seq_oss_readq_poll(seq_oss_readq_t *q, struct file *file, poll_table *wait)
* put a timestamp
*/
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) {
- evrec_t rec;
+ union evrec rec;
memset(&rec, 0, sizeof(rec));
switch (seq_mode) {
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_
* proc interface
*/
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",
(waitqueue_active(&q->midi_sleep) ? "sleeping":"running"),
diff --git a/sound/core/seq/oss/seq_oss_readq.h b/sound/core/seq/oss/seq_oss_readq.h
index 303b929..f1463f1 100644
--- a/sound/core/seq/oss/seq_oss_readq.h
+++ b/sound/core/seq/oss/seq_oss_readq.h
@@ -28,8 +28,8 @@
/*
* definition of read queue
*/
-struct seq_oss_readq_t {
- evrec_t *q;
+struct seq_oss_readq {
+ union evrec *q;
int qlen;
int maxlen;
int head, tail;
@@ -39,16 +39,16 @@ struct seq_oss_readq_t {
spinlock_t lock;
};
-seq_oss_readq_t *snd_seq_oss_readq_new(seq_oss_devinfo_t *dp, int maxlen);
-void snd_seq_oss_readq_delete(seq_oss_readq_t *q);
-void snd_seq_oss_readq_clear(seq_oss_readq_t *readq);
-unsigned int snd_seq_oss_readq_poll(seq_oss_readq_t *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_put_event(seq_oss_readq_t *readq, evrec_t *ev);
-int snd_seq_oss_readq_put_timestamp(seq_oss_readq_t *readq, unsigned long curt, int seq_mode);
-int snd_seq_oss_readq_pick(seq_oss_readq_t *q, evrec_t *rec);
-void snd_seq_oss_readq_wait(seq_oss_readq_t *q);
-void snd_seq_oss_readq_free(seq_oss_readq_t *q);
+struct seq_oss_readq *snd_seq_oss_readq_new(struct seq_oss_devinfo *dp, int maxlen);
+void snd_seq_oss_readq_delete(struct seq_oss_readq *q);
+void snd_seq_oss_readq_clear(struct seq_oss_readq *readq);
+unsigned int snd_seq_oss_readq_poll(struct seq_oss_readq *readq, struct file *file, poll_table *wait);
+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(struct seq_oss_readq *readq, union evrec *ev);
+int snd_seq_oss_readq_put_timestamp(struct seq_oss_readq *readq, unsigned long curt, int seq_mode);
+int snd_seq_oss_readq_pick(struct seq_oss_readq *q, union evrec *rec);
+void snd_seq_oss_readq_wait(struct seq_oss_readq *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_unlock(q, flags) spin_unlock_irqrestore(&(q)->lock, flags)
diff --git a/sound/core/seq/oss/seq_oss_rw.c b/sound/core/seq/oss/seq_oss_rw.c
index 1d8fbd2..6a7b6ac 100644
--- a/sound/core/seq/oss/seq_oss_rw.c
+++ b/sound/core/seq/oss/seq_oss_rw.c
@@ -33,7 +33,7 @@
/*
* 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);
*/
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 ev_len;
- evrec_t rec;
+ union evrec rec;
unsigned long flags;
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)
*/
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 ev_size, fmt;
- evrec_t rec;
+ union evrec rec;
if (! is_write_mode(dp->file_mode) || dp->writeq == NULL)
return -ENXIO;
@@ -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
*/
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;
- snd_seq_event_t event;
+ struct snd_seq_event event;
/* if this is a timing event, process the current time */
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)
*/
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;
diff --git a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_oss_synth.c
index 8257fce..0b6025c 100644
--- a/sound/core/seq/oss/seq_oss_synth.c
+++ b/sound/core/seq/oss/seq_oss_synth.c
@@ -37,14 +37,14 @@
*/
/* sysex buffer */
-struct seq_oss_synth_sysex_t {
+struct seq_oss_synth_sysex {
int len;
int skip;
unsigned char buf[MAX_SYSEX_BUFLEN];
};
/* synth info */
-struct seq_oss_synth_t {
+struct seq_oss_synth {
int seq_device;
/* for synth_info */
@@ -53,7 +53,7 @@ struct seq_oss_synth_t {
int nr_voices;
char name[SNDRV_SEQ_OSS_MAX_SYNTH_NAME];
- snd_seq_oss_callback_t oper;
+ struct snd_seq_oss_callback oper;
int opened;
@@ -66,8 +66,8 @@ struct seq_oss_synth_t {
* device table
*/
static int max_synth_devs;
-static seq_oss_synth_t *synth_devs[SNDRV_SEQ_OSS_MAX_SYNTH_DEVS];
-static seq_oss_synth_t midi_synth_dev = {
+static struct seq_oss_synth *synth_devs[SNDRV_SEQ_OSS_MAX_SYNTH_DEVS];
+static struct seq_oss_synth midi_synth_dev = {
-1, /* seq_device */
SYNTH_TYPE_MIDI, /* synth_type */
0, /* synth_subtype */
@@ -80,8 +80,8 @@ static DEFINE_SPINLOCK(register_lock);
/*
* prototypes
*/
-static seq_oss_synth_t *get_synthdev(seq_oss_devinfo_t *dp, int dev);
-static void reset_channels(seq_oss_synthinfo_t *info);
+static struct seq_oss_synth *get_synthdev(struct seq_oss_devinfo *dp, int dev);
+static void reset_channels(struct seq_oss_synthinfo *info);
/*
* global initialization
@@ -96,11 +96,11 @@ snd_seq_oss_synth_init(void)
* registration of the synth device
*/
int
-snd_seq_oss_synth_register(snd_seq_device_t *dev)
+snd_seq_oss_synth_register(struct snd_seq_device *dev)
{
int i;
- seq_oss_synth_t *rec;
- snd_seq_oss_reg_t *reg = SNDRV_SEQ_DEVICE_ARGPTR(dev);
+ struct seq_oss_synth *rec;
+ struct snd_seq_oss_reg *reg = SNDRV_SEQ_DEVICE_ARGPTR(dev);
unsigned long flags;
if ((rec = kzalloc(sizeof(*rec), GFP_KERNEL)) == NULL) {
@@ -148,10 +148,10 @@ snd_seq_oss_synth_register(snd_seq_device_t *dev)
int
-snd_seq_oss_synth_unregister(snd_seq_device_t *dev)
+snd_seq_oss_synth_unregister(struct snd_seq_device *dev)
{
int index;
- seq_oss_synth_t *rec = dev->driver_data;
+ struct seq_oss_synth *rec = dev->driver_data;
unsigned long flags;
spin_lock_irqsave(&register_lock, flags);
@@ -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)
{
- seq_oss_synth_t *rec;
+ struct seq_oss_synth *rec;
unsigned long flags;
spin_lock_irqsave(&register_lock, flags);
@@ -207,11 +207,11 @@ get_sdev(int dev)
*/
void
-snd_seq_oss_synth_setup(seq_oss_devinfo_t *dp)
+snd_seq_oss_synth_setup(struct seq_oss_devinfo *dp)
{
int i;
- seq_oss_synth_t *rec;
- seq_oss_synthinfo_t *info;
+ struct seq_oss_synth *rec;
+ struct seq_oss_synthinfo *info;
dp->max_synthdev = max_synth_devs;
dp->synth_opened = 0;
@@ -244,7 +244,7 @@ snd_seq_oss_synth_setup(seq_oss_devinfo_t *dp)
}
info->nr_voices = rec->nr_voices;
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)
BUG();
reset_channels(info);
@@ -263,7 +263,7 @@ snd_seq_oss_synth_setup(seq_oss_devinfo_t *dp)
*/
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;
@@ -271,7 +271,7 @@ snd_seq_oss_synth_setup_midi(seq_oss_devinfo_t *dp)
return;
for (i = 0; i < dp->max_mididev; i++) {
- seq_oss_synthinfo_t *info;
+ struct seq_oss_synthinfo *info;
info = &dp->synths[dp->max_synthdev];
if (snd_seq_oss_midi_open(dp, i, dp->file_mode) < 0)
continue;
@@ -297,11 +297,11 @@ snd_seq_oss_synth_setup_midi(seq_oss_devinfo_t *dp)
*/
void
-snd_seq_oss_synth_cleanup(seq_oss_devinfo_t *dp)
+snd_seq_oss_synth_cleanup(struct seq_oss_devinfo *dp)
{
int i;
- seq_oss_synth_t *rec;
- seq_oss_synthinfo_t *info;
+ struct seq_oss_synth *rec;
+ struct seq_oss_synthinfo *info;
snd_assert(dp->max_synthdev <= SNDRV_SEQ_OSS_MAX_SYNTH_DEVS, return);
for (i = 0; i < dp->max_synthdev; i++) {
@@ -338,7 +338,7 @@ snd_seq_oss_synth_cleanup(seq_oss_devinfo_t *dp)
* check if the specified device is MIDI mapped device
*/
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)
return 0;
@@ -350,10 +350,10 @@ is_midi_dev(seq_oss_devinfo_t *dp, int dev)
/*
* return synth device information pointer
*/
-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)
{
- seq_oss_synth_t *rec;
+ struct seq_oss_synth *rec;
if (dev < 0 || dev >= dp->max_synthdev)
return NULL;
if (! dp->synths[dev].opened)
@@ -374,7 +374,7 @@ get_synthdev(seq_oss_devinfo_t *dp, int dev)
* reset note and velocity on each channel.
*/
static void
-reset_channels(seq_oss_synthinfo_t *info)
+reset_channels(struct seq_oss_synthinfo *info)
{
int i;
if (info->ch == NULL || ! info->nr_voices)
@@ -392,10 +392,10 @@ reset_channels(seq_oss_synthinfo_t *info)
* event to the corresponding port.
*/
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;
- seq_oss_synthinfo_t *info;
+ struct seq_oss_synth *rec;
+ struct seq_oss_synthinfo *info;
snd_assert(dev >= 0 && dev < dp->max_synthdev, return);
info = &dp->synths[dev];
@@ -428,7 +428,7 @@ snd_seq_oss_synth_reset(seq_oss_devinfo_t *dp, int dev)
if (rec->oper.reset) {
rec->oper.reset(&info->arg);
} else {
- snd_seq_event_t ev;
+ struct snd_seq_event ev;
memset(&ev, 0, sizeof(ev));
snd_seq_oss_fill_addr(dp, &ev, info->arg.addr.client,
info->arg.addr.port);
@@ -444,10 +444,10 @@ snd_seq_oss_synth_reset(seq_oss_devinfo_t *dp, int dev)
* call load_patch callback function
*/
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)
{
- seq_oss_synth_t *rec;
+ struct seq_oss_synth *rec;
int rc;
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,
* check if the device is valid synth device
*/
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);
if (rec) {
snd_use_lock_free(&rec->use_lock);
@@ -488,11 +488,11 @@ snd_seq_oss_synth_is_valid(seq_oss_devinfo_t *dp, int dev)
* (0xff).
*/
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;
unsigned char *dest;
- seq_oss_synth_sysex_t *sysex;
+ struct seq_oss_synth_sysex *sysex;
if (! snd_seq_oss_synth_is_valid(dp, dev))
return -ENXIO;
@@ -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
*/
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))
return -EINVAL;
@@ -559,9 +559,9 @@ snd_seq_oss_synth_addr(seq_oss_devinfo_t *dp, int dev, snd_seq_event_t *ev)
* OSS compatible ioctl
*/
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;
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
* send OSS raw events - SEQ_PRIVATE and SEQ_VOLUME
*/
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))
return -ENXIO;
@@ -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
*/
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) {
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
* proc interface
*/
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;
- seq_oss_synth_t *rec;
+ struct seq_oss_synth *rec;
snd_iprintf(buf, "\nNumber of synth devices: %d\n", max_synth_devs);
for (i = 0; i < max_synth_devs; i++) {
diff --git a/sound/core/seq/oss/seq_oss_synth.h b/sound/core/seq/oss/seq_oss_synth.h
index 07bc0e2..dbdfcbb 100644
--- a/sound/core/seq/oss/seq_oss_synth.h
+++ b/sound/core/seq/oss/seq_oss_synth.h
@@ -27,23 +27,25 @@
#include <sound/seq_oss_legacy.h>
#include <sound/seq_device.h>
-typedef struct seq_oss_synth_t seq_oss_synth_t;
-
void snd_seq_oss_synth_init(void);
-int snd_seq_oss_synth_register(snd_seq_device_t *dev);
-int snd_seq_oss_synth_unregister(snd_seq_device_t *dev);
-void snd_seq_oss_synth_setup(seq_oss_devinfo_t *dp);
-void snd_seq_oss_synth_setup_midi(seq_oss_devinfo_t *dp);
-void snd_seq_oss_synth_cleanup(seq_oss_devinfo_t *dp);
+int snd_seq_oss_synth_register(struct snd_seq_device *dev);
+int snd_seq_oss_synth_unregister(struct snd_seq_device *dev);
+void snd_seq_oss_synth_setup(struct seq_oss_devinfo *dp);
+void snd_seq_oss_synth_setup_midi(struct seq_oss_devinfo *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);
-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_is_valid(seq_oss_devinfo_t *dp, int dev);
-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_addr(seq_oss_devinfo_t *dp, int dev, snd_seq_event_t *ev);
-int snd_seq_oss_synth_ioctl(seq_oss_devinfo_t *dp, int dev, unsigned int cmd, unsigned long addr);
-int snd_seq_oss_synth_raw_event(seq_oss_devinfo_t *dp, int dev, unsigned char *data, snd_seq_event_t *ev);
+void snd_seq_oss_synth_reset(struct seq_oss_devinfo *dp, int dev);
+int snd_seq_oss_synth_load_patch(struct seq_oss_devinfo *dp, int dev, int fmt,
+ const char __user *buf, int p, int c);
+int snd_seq_oss_synth_is_valid(struct seq_oss_devinfo *dp, int dev);
+int snd_seq_oss_synth_sysex(struct seq_oss_devinfo *dp, int dev, unsigned char *buf,
+ struct snd_seq_event *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
diff --git a/sound/core/seq/oss/seq_oss_timer.c b/sound/core/seq/oss/seq_oss_timer.c
index 64d594b..c440fda 100644
--- a/sound/core/seq/oss/seq_oss_timer.c
+++ b/sound/core/seq/oss/seq_oss_timer.c
@@ -33,18 +33,18 @@
/*
*/
-static void calc_alsa_tempo(seq_oss_timer_t *timer);
-static int send_timer_event(seq_oss_devinfo_t *dp, int type, int value);
+static void calc_alsa_tempo(struct seq_oss_timer *timer);
+static int send_timer_event(struct seq_oss_devinfo *dp, int type, int value);
/*
* create and register a new timer.
* if queue is not started yet, start it.
*/
-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)
{
- seq_oss_timer_t *rec;
+ struct seq_oss_timer *rec;
rec = kzalloc(sizeof(*rec), GFP_KERNEL);
if (rec == NULL)
@@ -67,7 +67,7 @@ snd_seq_oss_timer_new(seq_oss_devinfo_t *dp)
* if no more timer exists, stop the queue.
*/
void
-snd_seq_oss_timer_delete(seq_oss_timer_t *rec)
+snd_seq_oss_timer_delete(struct seq_oss_timer *rec)
{
if (rec) {
snd_seq_oss_timer_stop(rec);
@@ -82,7 +82,7 @@ snd_seq_oss_timer_delete(seq_oss_timer_t *rec)
* 0 : not a timer event -- enqueue this event
*/
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;
@@ -125,7 +125,7 @@ snd_seq_oss_process_timer_event(seq_oss_timer_t *rec, evrec_t *ev)
* convert tempo units
*/
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->ppq = timer->oss_timebase;
@@ -136,9 +136,9 @@ calc_alsa_tempo(seq_oss_timer_t *timer)
* dispatch a timer event
*/
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));
ev.type = type;
@@ -156,10 +156,10 @@ send_timer_event(seq_oss_devinfo_t *dp, int type, int value)
* set queue tempo and start queue
*/
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;
- snd_seq_queue_tempo_t tmprec;
+ struct seq_oss_devinfo *dp = timer->dp;
+ struct snd_seq_queue_tempo tmprec;
if (timer->running)
snd_seq_oss_timer_stop(timer);
@@ -181,7 +181,7 @@ snd_seq_oss_timer_start(seq_oss_timer_t *timer)
* stop queue
*/
int
-snd_seq_oss_timer_stop(seq_oss_timer_t *timer)
+snd_seq_oss_timer_stop(struct seq_oss_timer *timer)
{
if (! timer->running)
return 0;
@@ -195,7 +195,7 @@ snd_seq_oss_timer_stop(seq_oss_timer_t *timer)
* continue queue
*/
int
-snd_seq_oss_timer_continue(seq_oss_timer_t *timer)
+snd_seq_oss_timer_continue(struct seq_oss_timer *timer)
{
if (timer->running)
return 0;
@@ -209,7 +209,7 @@ snd_seq_oss_timer_continue(seq_oss_timer_t *timer)
* change queue tempo
*/
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)
value = MIN_OSS_TEMPO;
@@ -227,7 +227,7 @@ snd_seq_oss_timer_tempo(seq_oss_timer_t *timer, int value)
* ioctls
*/
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;
diff --git a/sound/core/seq/oss/seq_oss_timer.h b/sound/core/seq/oss/seq_oss_timer.h
index 6e4dbd8..b995bd6 100644
--- a/sound/core/seq/oss/seq_oss_timer.h
+++ b/sound/core/seq/oss/seq_oss_timer.h
@@ -27,8 +27,8 @@
/*
* timer information definition
*/
-struct seq_oss_timer_t {
- seq_oss_devinfo_t *dp;
+struct seq_oss_timer {
+ struct seq_oss_devinfo *dp;
reltime_t cur_tick;
int realtime;
int running;
@@ -37,22 +37,22 @@ struct seq_oss_timer_t {
};
-seq_oss_timer_t *snd_seq_oss_timer_new(seq_oss_devinfo_t *dp);
-void snd_seq_oss_timer_delete(seq_oss_timer_t *dp);
+struct seq_oss_timer *snd_seq_oss_timer_new(struct seq_oss_devinfo *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_stop(seq_oss_timer_t *timer);
-int snd_seq_oss_timer_continue(seq_oss_timer_t *timer);
-int snd_seq_oss_timer_tempo(seq_oss_timer_t *timer, int value);
+int snd_seq_oss_timer_start(struct seq_oss_timer *timer);
+int snd_seq_oss_timer_stop(struct seq_oss_timer *timer);
+int snd_seq_oss_timer_continue(struct seq_oss_timer *timer);
+int snd_seq_oss_timer_tempo(struct seq_oss_timer *timer, int value);
#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
*/
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;
}
@@ -62,7 +62,7 @@ snd_seq_oss_timer_cur_tick(seq_oss_timer_t *timer)
* is realtime event?
*/
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;
}
diff --git a/sound/core/seq/oss/seq_oss_writeq.c b/sound/core/seq/oss/seq_oss_writeq.c
index b203780..5c84956 100644
--- a/sound/core/seq/oss/seq_oss_writeq.c
+++ b/sound/core/seq/oss/seq_oss_writeq.c
@@ -32,11 +32,11 @@
/*
* create a write queue record
*/
-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)
{
- seq_oss_writeq_t *q;
- snd_seq_client_pool_t pool;
+ struct seq_oss_writeq *q;
+ struct snd_seq_client_pool pool;
if ((q = kzalloc(sizeof(*q), GFP_KERNEL)) == NULL)
return NULL;
@@ -61,7 +61,7 @@ snd_seq_oss_writeq_new(seq_oss_devinfo_t *dp, int maxlen)
* delete the write queue
*/
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 */
kfree(q);
@@ -72,9 +72,9 @@ snd_seq_oss_writeq_delete(seq_oss_writeq_t *q)
* reset the write queue
*/
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));
reset.remove_mode = SNDRV_SEQ_REMOVE_OUTPUT; /* remove all */
@@ -88,9 +88,9 @@ snd_seq_oss_writeq_clear(seq_oss_writeq_t *q)
* wait until the write buffer has enough room
*/
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;
time = snd_seq_oss_timer_cur_tick(dp->timer);
@@ -98,8 +98,8 @@ snd_seq_oss_writeq_sync(seq_oss_writeq_t *q)
return 0; /* already finished */
if (! q->sync_event_put) {
- snd_seq_event_t ev;
- evrec_t *rec;
+ struct snd_seq_event ev;
+ union evrec *rec;
/* put echoback event */
memset(&ev, 0, sizeof(ev));
@@ -108,7 +108,7 @@ snd_seq_oss_writeq_sync(seq_oss_writeq_t *q)
ev.time.tick = time;
/* echo back to itself */
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.time = time;
q->sync_event_put = 1;
@@ -128,7 +128,7 @@ snd_seq_oss_writeq_sync(seq_oss_writeq_t *q)
* wake up sync - echo event was catched
*/
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;
@@ -146,9 +146,9 @@ snd_seq_oss_writeq_wakeup(seq_oss_writeq_t *q, abstime_t time)
* return the unused pool size
*/
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;
snd_seq_oss_control(q->dp, SNDRV_SEQ_IOCTL_GET_CLIENT_POOL, &pool);
return pool.output_free;
@@ -159,9 +159,9 @@ snd_seq_oss_writeq_get_free_size(seq_oss_writeq_t *q)
* set output threshold size from ioctl
*/
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;
snd_seq_oss_control(q->dp, SNDRV_SEQ_IOCTL_GET_CLIENT_POOL, &pool);
pool.output_room = val;
diff --git a/sound/core/seq/oss/seq_oss_writeq.h b/sound/core/seq/oss/seq_oss_writeq.h
index 6a13c85..c469d29 100644
--- a/sound/core/seq/oss/seq_oss_writeq.h
+++ b/sound/core/seq/oss/seq_oss_writeq.h
@@ -25,8 +25,8 @@
#include "seq_oss_device.h"
-struct seq_oss_writeq_t {
- seq_oss_devinfo_t *dp;
+struct seq_oss_writeq {
+ struct seq_oss_devinfo *dp;
int maxlen;
abstime_t sync_time;
int sync_event_put;
@@ -38,13 +38,13 @@ struct seq_oss_writeq_t {
/*
* seq_oss_writeq.c
*/
-seq_oss_writeq_t *snd_seq_oss_writeq_new(seq_oss_devinfo_t *dp, int maxlen);
-void snd_seq_oss_writeq_delete(seq_oss_writeq_t *q);
-void snd_seq_oss_writeq_clear(seq_oss_writeq_t *q);
-int snd_seq_oss_writeq_sync(seq_oss_writeq_t *q);
-void snd_seq_oss_writeq_wakeup(seq_oss_writeq_t *q, abstime_t time);
-int snd_seq_oss_writeq_get_free_size(seq_oss_writeq_t *q);
-void snd_seq_oss_writeq_set_output(seq_oss_writeq_t *q, int size);
+struct seq_oss_writeq *snd_seq_oss_writeq_new(struct seq_oss_devinfo *dp, int maxlen);
+void snd_seq_oss_writeq_delete(struct seq_oss_writeq *q);
+void snd_seq_oss_writeq_clear(struct seq_oss_writeq *q);
+int snd_seq_oss_writeq_sync(struct seq_oss_writeq *q);
+void snd_seq_oss_writeq_wakeup(struct seq_oss_writeq *q, abstime_t time);
+int snd_seq_oss_writeq_get_free_size(struct seq_oss_writeq *q);
+void snd_seq_oss_writeq_set_output(struct seq_oss_writeq *q, int size);
#endif
OpenPOWER on IntegriCloud