diff options
author | Len Brown <len.brown@intel.com> | 2006-01-07 03:50:18 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-01-07 03:50:18 -0500 |
commit | ed03f430cdc8c802652467e9097606fedc2c7abc (patch) | |
tree | 30941ec1e6f93e99358fefe18175e5dd800a4379 /sound/core/seq/oss/seq_oss_synth.c | |
parent | ed349a8a0a780ed27e2a765f16cee54d9b63bfee (diff) | |
parent | 6f957eaf79356a32e838f5f262ee9a60544b1d5b (diff) | |
download | op-kernel-dev-ed03f430cdc8c802652467e9097606fedc2c7abc.zip op-kernel-dev-ed03f430cdc8c802652467e9097606fedc2c7abc.tar.gz |
Pull pnpacpi into acpica branch
Diffstat (limited to 'sound/core/seq/oss/seq_oss_synth.c')
-rw-r--r-- | sound/core/seq/oss/seq_oss_synth.c | 95 |
1 files changed, 48 insertions, 47 deletions
diff --git a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_oss_synth.c index 8257fce..ab570a0 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(®ister_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(®ister_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; @@ -621,14 +621,15 @@ snd_seq_oss_synth_make_info(seq_oss_devinfo_t *dp, int dev, struct synth_info *i } +#ifdef CONFIG_PROC_FS /* * 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++) { @@ -648,4 +649,4 @@ snd_seq_oss_synth_info_read(snd_info_buffer_t *buf) snd_use_lock_free(&rec->use_lock); } } - +#endif /* CONFIG_PROC_FS */ |