]> git.neil.brown.name Git - history.git/commitdiff
ALSA CVS update - Clemens Ladisch <clemens@ladisch.de>
authorJaroslav Kysela <perex@suse.cz>
Sat, 13 Mar 2004 19:14:09 +0000 (20:14 +0100)
committerJaroslav Kysela <perex@suse.cz>
Sat, 13 Mar 2004 19:14:09 +0000 (20:14 +0100)
ALSA sequencer,ALSA<-OSS sequencer
use wrapper function for DELETE_PORT ioctl calls

sound/core/seq/oss/seq_oss_init.c
sound/core/seq/seq_midi.c

index 04a7fc1aa0b25491a97a515b6ec4fe47dc923783..7bb54d2760f2d16095a6297e1dc7b061084cf27e 100644 (file)
@@ -349,18 +349,11 @@ create_port(seq_oss_devinfo_t *dp)
 static int
 delete_port(seq_oss_devinfo_t *dp)
 {
-       snd_seq_port_info_t port_info;
-
        if (dp->port < 0)
                return 0;
 
        debug_printk(("delete_port %i\n", dp->port));
-       memset(&port_info, 0, sizeof(port_info));
-       port_info.addr.client = dp->cseq;
-       port_info.addr.port = dp->port;
-       return snd_seq_kernel_client_ctl(dp->cseq,
-                                        SNDRV_SEQ_IOCTL_DELETE_PORT,
-                                        &port_info);
+       return snd_seq_event_port_detach(dp->cseq, dp->port);
 }
 
 /*
index d4abd21b98b28afdf4fed0f88311f79eb0354f72..ebfb232ebb94c642376fe7bc6d6d2455f359d188 100644 (file)
@@ -257,17 +257,12 @@ static int midisynth_unuse(void *private_data, snd_seq_port_subscribe_t *info)
 /* delete given midi synth port */
 static void snd_seq_midisynth_delete(seq_midisynth_t *msynth)
 {
-       snd_seq_port_info_t port;
-       
        if (msynth == NULL)
                return;
 
        if (msynth->seq_client > 0) {
                /* delete port */
-               memset(&port, 0, sizeof(port));
-               port.addr.client = msynth->seq_client;
-               port.addr.port = msynth->seq_port;
-               snd_seq_kernel_client_ctl(port.addr.client, SNDRV_SEQ_IOCTL_DELETE_PORT, &port);
+               snd_seq_event_port_detach(msynth->seq_client, msynth->seq_port);
        }
 
        if (msynth->parser)