#include <sound/core.h>
#include <linux/major.h>
#include <linux/init.h>
+#include <linux/smp_lock.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/time.h>
#include <linux/wait.h>
#include <linux/moduleparam.h>
+#include <linux/delay.h>
+#include <linux/wait.h>
#include <sound/rawmidi.h>
#include <sound/info.h>
#include <sound/control.h>
#ifdef CONFIG_SND_OSSEMUL
static int midi_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 0};
static int amidi_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 1};
-static int boot_devs;
-module_param_array(midi_map, int, boot_devs, 0444);
+module_param_array(midi_map, int, NULL, 0444);
MODULE_PARM_DESC(midi_map, "Raw MIDI device number assigned to 1st OSS device.");
-MODULE_PARM_SYNTAX(midi_map, "default:0,skill:advanced");
-module_param_array(amidi_map, int, boot_devs, 0444);
+module_param_array(amidi_map, int, NULL, 0444);
MODULE_PARM_DESC(amidi_map, "Raw MIDI device number assigned to 2nd OSS device.");
-MODULE_PARM_SYNTAX(amidi_map, "default:1,skill:advanced");
#endif /* CONFIG_SND_OSSEMUL */
static int snd_rawmidi_free(snd_rawmidi_t *rawmidi);
static int snd_rawmidi_dev_disconnect(snd_device_t *device);
static int snd_rawmidi_dev_unregister(snd_device_t *device);
-snd_rawmidi_t *snd_rawmidi_devices[SNDRV_CARDS * SNDRV_RAWMIDI_DEVICES];
+static snd_rawmidi_t *snd_rawmidi_devices[SNDRV_CARDS * SNDRV_RAWMIDI_DEVICES];
static DECLARE_MUTEX(register_mutex);
(!substream->append || runtime->avail >= count);
}
-static int snd_rawmidi_init(snd_rawmidi_substream_t *substream)
+static void snd_rawmidi_input_event_tasklet(unsigned long data)
{
- snd_rawmidi_runtime_t *runtime = substream->runtime;
+ snd_rawmidi_substream_t *substream = (snd_rawmidi_substream_t *)data;
+ substream->runtime->event(substream);
+}
+
+static void snd_rawmidi_output_trigger_tasklet(unsigned long data)
+{
+ snd_rawmidi_substream_t *substream = (snd_rawmidi_substream_t *)data;
+ substream->ops->trigger(substream, 1);
+}
+
+static int snd_rawmidi_runtime_create(snd_rawmidi_substream_t * substream)
+{
+ snd_rawmidi_runtime_t *runtime;
+
+ if ((runtime = kcalloc(1, sizeof(*runtime), GFP_KERNEL)) == NULL)
+ return -ENOMEM;
spin_lock_init(&runtime->lock);
init_waitqueue_head(&runtime->sleep);
+ if (substream->stream == SNDRV_RAWMIDI_STREAM_INPUT)
+ tasklet_init(&runtime->tasklet,
+ snd_rawmidi_input_event_tasklet,
+ (unsigned long)substream);
+ else
+ tasklet_init(&runtime->tasklet,
+ snd_rawmidi_output_trigger_tasklet,
+ (unsigned long)substream);
runtime->event = NULL;
runtime->buffer_size = PAGE_SIZE;
runtime->avail_min = 1;
runtime->avail = 0;
else
runtime->avail = runtime->buffer_size;
- if ((runtime->buffer = kmalloc(runtime->buffer_size, GFP_KERNEL)) == NULL)
+ if ((runtime->buffer = kmalloc(runtime->buffer_size, GFP_KERNEL)) == NULL) {
+ kfree(runtime);
return -ENOMEM;
+ }
runtime->appl_ptr = runtime->hw_ptr = 0;
+ substream->runtime = runtime;
return 0;
}
-static int snd_rawmidi_done_buffer(snd_rawmidi_runtime_t *runtime)
+static int snd_rawmidi_runtime_free(snd_rawmidi_substream_t * substream)
{
- if (runtime->buffer) {
- kfree(runtime->buffer);
- runtime->buffer = NULL;
- }
+ snd_rawmidi_runtime_t *runtime = substream->runtime;
+
+ kfree(runtime->buffer);
+ kfree(runtime);
+ substream->runtime = NULL;
return 0;
}
+static inline void snd_rawmidi_output_trigger(snd_rawmidi_substream_t * substream, int up)
+{
+ if (up) {
+ tasklet_hi_schedule(&substream->runtime->tasklet);
+ } else {
+ tasklet_kill(&substream->runtime->tasklet);
+ substream->ops->trigger(substream, 0);
+ }
+}
+
+static void snd_rawmidi_input_trigger(snd_rawmidi_substream_t * substream, int up)
+{
+ substream->ops->trigger(substream, up);
+ if (!up && substream->runtime->event)
+ tasklet_kill(&substream->runtime->tasklet);
+}
+
int snd_rawmidi_drop_output(snd_rawmidi_substream_t * substream)
{
+ unsigned long flags;
snd_rawmidi_runtime_t *runtime = substream->runtime;
- substream->ops->trigger(substream, 0);
- runtime->trigger = 0;
+ snd_rawmidi_output_trigger(substream, 0);
runtime->drain = 0;
- /* interrupts are not enabled at this moment,
- so spinlock is not required */
+ spin_lock_irqsave(&runtime->lock, flags);
runtime->appl_ptr = runtime->hw_ptr = 0;
runtime->avail = runtime->buffer_size;
+ spin_unlock_irqrestore(&runtime->lock, flags);
return 0;
}
err = 0;
runtime->drain = 1;
- while (runtime->avail < runtime->buffer_size) {
- timeout = interruptible_sleep_on_timeout(&runtime->sleep, 10 * HZ);
- if (signal_pending(current)) {
- err = -ERESTARTSYS;
- break;
- }
- if (runtime->avail < runtime->buffer_size && !timeout) {
- snd_printk(KERN_WARNING "rawmidi drain error (avail = %li, buffer_size = %li)\n", (long)runtime->avail, (long)runtime->buffer_size);
- err = -EIO;
- break;
- }
+ timeout = wait_event_interruptible_timeout(runtime->sleep,
+ (runtime->avail >= runtime->buffer_size),
+ 10*HZ);
+ if (signal_pending(current))
+ err = -ERESTARTSYS;
+ if (runtime->avail < runtime->buffer_size && !timeout) {
+ snd_printk(KERN_WARNING "rawmidi drain error (avail = %li, buffer_size = %li)\n", (long)runtime->avail, (long)runtime->buffer_size);
+ err = -EIO;
}
runtime->drain = 0;
if (err != -ERESTARTSYS) {
/* we need wait a while to make sure that Tx FIFOs are empty */
if (substream->ops->drain)
substream->ops->drain(substream);
- else {
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(HZ / 20);
- }
+ else
+ msleep(50);
snd_rawmidi_drop_output(substream);
}
return err;
int snd_rawmidi_drain_input(snd_rawmidi_substream_t * substream)
{
+ unsigned long flags;
snd_rawmidi_runtime_t *runtime = substream->runtime;
- substream->ops->trigger(substream, 0);
- runtime->trigger = 0;
+ snd_rawmidi_input_trigger(substream, 0);
runtime->drain = 0;
- /* interrupts aren't enabled at this moment, so spinlock isn't needed */
+ spin_lock_irqsave(&runtime->lock, flags);
runtime->appl_ptr = runtime->hw_ptr = 0;
runtime->avail = 0;
+ spin_unlock_irqrestore(&runtime->lock, flags);
return 0;
}
{
snd_rawmidi_t *rmidi;
struct list_head *list1, *list2;
- snd_rawmidi_substream_t *sinput, *soutput;
+ snd_rawmidi_substream_t *sinput = NULL, *soutput = NULL;
snd_rawmidi_runtime_t *input = NULL, *output = NULL;
int err;
list2 = list2->next;
}
if (mode & SNDRV_RAWMIDI_LFLG_INPUT) {
- input = snd_kcalloc(sizeof(snd_rawmidi_runtime_t), GFP_KERNEL);
- if (input == NULL) {
- err = -ENOMEM;
+ if ((err = snd_rawmidi_runtime_create(sinput)) < 0)
goto __error;
- }
- sinput->runtime = input;
- if (snd_rawmidi_init(sinput) < 0) {
- err = -ENOMEM;
+ input = sinput->runtime;
+ if ((err = sinput->ops->open(sinput)) < 0)
goto __error;
- }
- if ((err = sinput->ops->open(sinput)) < 0) {
- sinput->runtime = NULL;
- goto __error;
- }
sinput->opened = 1;
rmidi->streams[SNDRV_RAWMIDI_STREAM_INPUT].substream_opened++;
} else {
if (mode & SNDRV_RAWMIDI_LFLG_OUTPUT) {
if (soutput->opened)
goto __skip_output;
- output = snd_kcalloc(sizeof(snd_rawmidi_runtime_t), GFP_KERNEL);
- if (output == NULL) {
- err = -ENOMEM;
- goto __error;
- }
- soutput->runtime = output;
- if (snd_rawmidi_init(soutput) < 0) {
- if (mode & SNDRV_RAWMIDI_LFLG_INPUT) {
+ if ((err = snd_rawmidi_runtime_create(soutput)) < 0) {
+ if (mode & SNDRV_RAWMIDI_LFLG_INPUT)
sinput->ops->close(sinput);
- sinput->runtime = NULL;
- }
- err = -ENOMEM;
goto __error;
}
+ output = soutput->runtime;
if ((err = soutput->ops->open(soutput)) < 0) {
- if (mode & SNDRV_RAWMIDI_LFLG_INPUT) {
+ if (mode & SNDRV_RAWMIDI_LFLG_INPUT)
sinput->ops->close(sinput);
- sinput->runtime = NULL;
- }
- soutput->runtime = NULL;
goto __error;
}
__skip_output:
return 0;
__error:
- if (input != NULL) {
- snd_rawmidi_done_buffer(input);
- kfree(input);
- }
- if (output != NULL) {
- snd_rawmidi_done_buffer(output);
- kfree(output);
- }
+ if (input != NULL)
+ snd_rawmidi_runtime_free(sinput);
+ if (output != NULL)
+ snd_rawmidi_runtime_free(soutput);
module_put(rmidi->card->module);
if (!(mode & SNDRV_RAWMIDI_LFLG_NOOPENLOCK))
up(&rmidi->open_mutex);
if ((file->f_flags & O_APPEND) || maj != CONFIG_SND_MAJOR) /* OSS emul? */
fflags |= SNDRV_RAWMIDI_LFLG_APPEND;
fflags |= SNDRV_RAWMIDI_LFLG_NOOPENLOCK;
- rawmidi_file = snd_magic_kmalloc(snd_rawmidi_file_t, 0, GFP_KERNEL);
+ rawmidi_file = kmalloc(sizeof(*rawmidi_file), GFP_KERNEL);
if (rawmidi_file == NULL) {
snd_card_file_remove(card, file);
return -ENOMEM;
file->private_data = rawmidi_file;
} else {
snd_card_file_remove(card, file);
- snd_magic_kfree(rawmidi_file);
+ kfree(rawmidi_file);
}
up(&rmidi->open_mutex);
return err;
substream = rfile->input;
rfile->input = NULL;
runtime = substream->runtime;
- runtime->trigger = 0;
- substream->ops->trigger(substream, 0);
+ snd_rawmidi_input_trigger(substream, 0);
substream->ops->close(substream);
- snd_rawmidi_done_buffer(runtime);
if (runtime->private_free != NULL)
runtime->private_free(substream);
- kfree(runtime);
- substream->runtime = NULL;
+ snd_rawmidi_runtime_free(substream);
substream->opened = 0;
rmidi->streams[SNDRV_RAWMIDI_STREAM_INPUT].substream_opened--;
}
snd_rawmidi_kernel_write(substream, &buf, 1);
}
if (snd_rawmidi_drain_output(substream) == -ERESTARTSYS)
- substream->ops->trigger(substream, 0);
+ snd_rawmidi_output_trigger(substream, 0);
substream->ops->close(substream);
- snd_rawmidi_done_buffer(runtime);
if (runtime->private_free != NULL)
runtime->private_free(substream);
- kfree(runtime);
- substream->runtime = NULL;
+ snd_rawmidi_runtime_free(substream);
substream->opened = 0;
substream->append = 0;
}
snd_rawmidi_t *rmidi;
int err;
- rfile = snd_magic_cast(snd_rawmidi_file_t, file->private_data, return -ENXIO);
+ rfile = file->private_data;
err = snd_rawmidi_kernel_release(rfile);
rmidi = rfile->rmidi;
wake_up(&rmidi->open_wait);
- snd_magic_kfree(rfile);
+ kfree(rfile);
snd_card_file_remove(rmidi->card, file);
return err;
}
return 0;
}
-static int snd_rawmidi_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, unsigned long arg)
+static long snd_rawmidi_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
snd_rawmidi_file_t *rfile;
void __user *argp = (void __user *)arg;
- rfile = snd_magic_cast(snd_rawmidi_file_t, file->private_data, return -ENXIO);
+ rfile = file->private_data;
if (((cmd >> 8) & 0xff) != 'W')
return -ENOTTY;
switch (cmd) {
case SNDRV_RAWMIDI_IOCTL_DROP:
{
int val;
- if (get_user(val, (long __user *) argp))
+ if (get_user(val, (int __user *) argp))
return -EFAULT;
switch (val) {
case SNDRV_RAWMIDI_STREAM_OUTPUT:
case SNDRV_RAWMIDI_IOCTL_DRAIN:
{
int val;
- if (get_user(val, (long __user *) argp))
+ if (get_user(val, (int __user *) argp))
return -EFAULT;
switch (val) {
case SNDRV_RAWMIDI_STREAM_OUTPUT:
return -ENOTTY;
}
-int snd_rawmidi_control_ioctl(snd_card_t * card, snd_ctl_file_t * control,
- unsigned int cmd, unsigned long arg)
+static int snd_rawmidi_control_ioctl(snd_card_t * card,
+ snd_ctl_file_t * control,
+ unsigned int cmd,
+ unsigned long arg)
{
void __user *argp = (void __user *)arg;
unsigned int tmp;
count1 = count;
if (count1 > (int)(runtime->buffer_size - runtime->avail)) {
count1 = runtime->buffer_size - runtime->avail;
- runtime->xruns = count - count1;
+ runtime->xruns += count - count1;
}
if (count1 > 0) {
memcpy(runtime->buffer, buffer, count1);
}
}
}
- if (result > 0 && runtime->event == NULL) {
- if (snd_rawmidi_ready(substream))
+ if (result > 0) {
+ if (runtime->event)
+ tasklet_hi_schedule(&runtime->tasklet);
+ else if (snd_rawmidi_ready(substream))
wake_up(&runtime->sleep);
}
spin_unlock_irqrestore(&runtime->lock, flags);
- if (result > 0 && runtime->event)
- runtime->event(substream);
return result;
}
memcpy(buf + result, runtime->buffer + runtime->appl_ptr, count1);
} else {
spin_unlock_irqrestore(&runtime->lock, flags);
- if (copy_to_user(buf + result, runtime->buffer + runtime->appl_ptr, count1)) {
+ if (copy_to_user((char __user *)buf + result,
+ runtime->buffer + runtime->appl_ptr, count1)) {
return result > 0 ? result : -EFAULT;
}
spin_lock_irqsave(&runtime->lock, flags);
long snd_rawmidi_kernel_read(snd_rawmidi_substream_t *substream, unsigned char *buf, long count)
{
- substream->runtime->trigger = 1;
- substream->ops->trigger(substream, 1);
+ snd_rawmidi_input_trigger(substream, 1);
return snd_rawmidi_kernel_read1(substream, buf, count, 1);
}
snd_rawmidi_substream_t *substream;
snd_rawmidi_runtime_t *runtime;
- rfile = snd_magic_cast(snd_rawmidi_file_t, file->private_data, return -ENXIO);
+ rfile = file->private_data;
substream = rfile->input;
if (substream == NULL)
return -EIO;
runtime = substream->runtime;
- runtime->trigger = 1;
- substream->ops->trigger(substream, 1);
+ snd_rawmidi_input_trigger(substream, 1);
result = 0;
while (count > 0) {
spin_lock_irq(&runtime->lock);
spin_lock_irq(&runtime->lock);
}
spin_unlock_irq(&runtime->lock);
- count1 = snd_rawmidi_kernel_read1(substream, buf, count, 0);
+ count1 = snd_rawmidi_kernel_read1(substream, (unsigned char *)buf, count, 0);
+ if (count1 < 0)
+ return result > 0 ? result : count1;
result += count1;
buf += count1;
count -= count1;
}
spin_lock_irqsave(&runtime->lock, flags);
result = runtime->avail >= runtime->buffer_size;
- if (result)
- runtime->trigger = 1;
spin_unlock_irqrestore(&runtime->lock, flags);
return result;
}
spin_lock_irqsave(&runtime->lock, flags);
if (runtime->avail >= runtime->buffer_size) {
/* warning: lowlevel layer MUST trigger down the hardware */
- runtime->trigger = 0;
goto __skip;
}
if (count == 1) { /* special case, faster code */
memcpy(buffer, runtime->buffer + runtime->hw_ptr, count1);
count -= count1;
result += count1;
- if (count > 0)
+ if (count > 0) {
+ if (count > (int)(runtime->buffer_size - runtime->avail - count1))
+ count = runtime->buffer_size - runtime->avail - count1;
memcpy(buffer + count1, runtime->buffer, count);
+ result += count;
+ }
}
__skip:
spin_unlock_irqrestore(&runtime->lock, flags);
runtime->hw_ptr %= runtime->buffer_size;
runtime->avail += count;
substream->bytes += count;
- if (runtime->drain)
- wake_up(&runtime->sleep);
- else
- if (count > 0 && runtime->event == NULL)
- if (snd_rawmidi_ready(substream))
- wake_up(&runtime->sleep);
+ if (count > 0) {
+ if (runtime->drain || snd_rawmidi_ready(substream))
+ wake_up(&runtime->sleep);
+ }
spin_unlock_irqrestore(&runtime->lock, flags);
- if (count > 0 && runtime->event)
- runtime->event(substream);
return count;
}
memcpy(runtime->buffer + runtime->appl_ptr, buf, count1);
} else {
spin_unlock_irqrestore(&runtime->lock, flags);
- if (copy_from_user(runtime->buffer + runtime->appl_ptr, buf, count1)) {
+ if (copy_from_user(runtime->buffer + runtime->appl_ptr,
+ (char __user *)buf, count1)) {
spin_lock_irqsave(&runtime->lock, flags);
result = result > 0 ? result : -EFAULT;
goto __end;
count -= count1;
}
__end:
- if (result > 0)
- runtime->trigger = 1;
count1 = runtime->avail < runtime->buffer_size;
spin_unlock_irqrestore(&runtime->lock, flags);
if (count1)
- substream->ops->trigger(substream, 1);
+ snd_rawmidi_output_trigger(substream, 1);
return result;
}
snd_rawmidi_runtime_t *runtime;
snd_rawmidi_substream_t *substream;
- rfile = snd_magic_cast(snd_rawmidi_file_t, file->private_data, return -ENXIO);
+ rfile = file->private_data;
substream = rfile->output;
runtime = substream->runtime;
/* we cannot put an atomic message to our buffer */
spin_lock_irq(&runtime->lock);
}
spin_unlock_irq(&runtime->lock);
- count1 = snd_rawmidi_kernel_write1(substream, buf, count, 0);
+ count1 = snd_rawmidi_kernel_write1(substream, (unsigned char *)buf, count, 0);
if (count1 < 0)
- continue;
+ return result > 0 ? result : count1;
result += count1;
buf += count1;
if ((size_t)count1 < count && (file->f_flags & O_NONBLOCK))
break;
count -= count1;
}
- while (file->f_flags & O_SYNC) {
+ if (file->f_flags & O_SYNC) {
spin_lock_irq(&runtime->lock);
while (runtime->avail != runtime->buffer_size) {
wait_queue_t wait;
snd_rawmidi_runtime_t *runtime;
unsigned int mask;
- rfile = snd_magic_cast(snd_rawmidi_file_t, file->private_data, return 0);
+ rfile = file->private_data;
if (rfile->input != NULL) {
runtime = rfile->input->runtime;
- runtime->trigger = 1;
- rfile->input->ops->trigger(rfile->input, 1);
+ snd_rawmidi_input_trigger(rfile->input, 1);
poll_wait(file, &runtime->sleep, wait);
}
if (rfile->output != NULL) {
return mask;
}
+/*
+ */
+#ifdef CONFIG_COMPAT
+#include "rawmidi_compat.c"
+#else
+#define snd_rawmidi_ioctl_compat NULL
+#endif
+
/*
*/
snd_rawmidi_runtime_t *runtime;
struct list_head *list;
- rmidi = snd_magic_cast(snd_rawmidi_t, entry->private_data, return);
+ rmidi = entry->private_data;
snd_iprintf(buffer, "%s\n\n", rmidi->name);
down(&rmidi->open_mutex);
if (rmidi->info_flags & SNDRV_RAWMIDI_INFO_OUTPUT) {
.open = snd_rawmidi_open,
.release = snd_rawmidi_release,
.poll = snd_rawmidi_poll,
- .ioctl = snd_rawmidi_ioctl,
+ .unlocked_ioctl = snd_rawmidi_ioctl,
+ .compat_ioctl = snd_rawmidi_ioctl_compat,
};
static snd_minor_t snd_rawmidi_reg =
INIT_LIST_HEAD(&stream->substreams);
for (idx = 0; idx < count; idx++) {
- substream = snd_kcalloc(sizeof(snd_rawmidi_substream_t), GFP_KERNEL);
+ substream = kcalloc(1, sizeof(*substream), GFP_KERNEL);
if (substream == NULL)
return -ENOMEM;
substream->stream = direction;
snd_assert(rrawmidi != NULL, return -EINVAL);
*rrawmidi = NULL;
snd_assert(card != NULL, return -ENXIO);
- rmidi = snd_magic_kcalloc(snd_rawmidi_t, 0, GFP_KERNEL);
+ rmidi = kcalloc(1, sizeof(*rmidi), GFP_KERNEL);
if (rmidi == NULL)
return -ENOMEM;
rmidi->card = card;
snd_rawmidi_free_substreams(&rmidi->streams[SNDRV_RAWMIDI_STREAM_OUTPUT]);
if (rmidi->private_free)
rmidi->private_free(rmidi);
- snd_magic_kfree(rmidi);
+ kfree(rmidi);
return 0;
}
static int snd_rawmidi_dev_free(snd_device_t *device)
{
- snd_rawmidi_t *rmidi = snd_magic_cast(snd_rawmidi_t, device->device_data, return -ENXIO);
+ snd_rawmidi_t *rmidi = device->device_data;
return snd_rawmidi_free(rmidi);
}
#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
static void snd_rawmidi_dev_seq_free(snd_seq_device_t *device)
{
- snd_rawmidi_t *rmidi = snd_magic_cast(snd_rawmidi_t, device->private_data, return);
+ snd_rawmidi_t *rmidi = device->private_data;
rmidi->seq_dev = NULL;
}
#endif
int idx, err;
snd_info_entry_t *entry;
char name[16];
- snd_rawmidi_t *rmidi = snd_magic_cast(snd_rawmidi_t, device->device_data, return -ENXIO);
+ snd_rawmidi_t *rmidi = device->device_data;
if (rmidi->device >= SNDRV_RAWMIDI_DEVICES)
return -ENOMEM;
static int snd_rawmidi_dev_disconnect(snd_device_t *device)
{
- snd_rawmidi_t *rmidi = snd_magic_cast(snd_rawmidi_t, device->device_data, return -ENXIO);
+ snd_rawmidi_t *rmidi = device->device_data;
int idx;
down(®ister_mutex);
static int snd_rawmidi_dev_unregister(snd_device_t *device)
{
int idx;
- snd_rawmidi_t *rmidi = snd_magic_cast(snd_rawmidi_t, device->device_data, return -ENXIO);
+ snd_rawmidi_t *rmidi = device->device_data;
snd_assert(rmidi != NULL, return -ENXIO);
down(®ister_mutex);
{
snd_ctl_register_ioctl(snd_rawmidi_control_ioctl);
+ snd_ctl_register_ioctl_compat(snd_rawmidi_control_ioctl);
#ifdef CONFIG_SND_OSSEMUL
{ int i;
/* check device map table */
static void __exit alsa_rawmidi_exit(void)
{
snd_ctl_unregister_ioctl(snd_rawmidi_control_ioctl);
+ snd_ctl_unregister_ioctl_compat(snd_rawmidi_control_ioctl);
}
module_init(alsa_rawmidi_init)