]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Bugfix:
authorTakashi Iwai <tiwai@suse.de>
Thu, 8 Jun 2000 10:55:34 +0000 (10:55 +0000)
committerTakashi Iwai <tiwai@suse.de>
Thu, 8 Jun 2000 10:55:34 +0000 (10:55 +0000)
 - dead SMP lock in es1968 (maestro2) driver.

Bugfix & enhances of sequencer stuff
    by Scott McNab <sdm@fractalgraphics.com.au>:
 - fix for the insrument list locking in SND_SEQ_EVENT_INSTR_BEGIN
   and SND_SEQ_EVENT_INSTR_END events.
   Note that nothing seems to really take notice of the list locking.
   This is more an issue when we add support for editing instruments
   anyway.

 - added new alsa-lib utility function snd_seq_ev_set_varusr() which
   is similar to snd_seq_ev_set_variable(), but specifies userspace
   extended event data.
   This is required in order to use the SND_SEQ_EVENT_INSTR_PUT
   command (took me bloody ages to work this out btw)

 - minor correction for gus & trident synth drivers

include/seqmid.h
src/seq/seqmid.c

index 6caddf27ffef977d0e457e69435487b74dfc60f0..d47d364647b4ae1a060e6afd7414a7db1710570c 100644 (file)
@@ -35,11 +35,13 @@ void snd_seq_ev_schedule_real(snd_seq_event_t *ev, int q, int relative,
 /* set event priority (optional) */
 void snd_seq_ev_set_priority(snd_seq_event_t *ev, int high_prior);
 
-/* set event data type - following two macros are exclusive */
+/* set event data type - following three macros are exclusive */
   /* fixed size event */
 void snd_seq_ev_set_fixed(snd_seq_event_t *ev);
   /* variable size event */
 void snd_seq_ev_set_variable(snd_seq_event_t *ev, int len, void *ptr);
+  /* variable size event - user memory space */
+void snd_seq_ev_set_varusr(snd_seq_event_t *ev, int len, void *ptr);
 
 /* set queue control event data */
 /* destination is overwritten to Timer port (0:0) */
index 2d0c68ac6317842e84c9862e3d9a93d51344a30a..dcef22238a3b1909de28b77ab995981e7961c13f 100644 (file)
@@ -81,6 +81,15 @@ void snd_seq_ev_set_variable(snd_seq_event_t *ev, int len, void *ptr)
        ev->data.ext.ptr = ptr;
 }
 
+/* set varusr data */
+void snd_seq_ev_set_varusr(snd_seq_event_t *ev, int len, void *ptr)
+{
+       ev->flags &= ~SND_SEQ_EVENT_LENGTH_MASK;
+       ev->flags |= SND_SEQ_EVENT_LENGTH_VARUSR;
+       ev->data.ext.len = len;
+       ev->data.ext.ptr = ptr;
+}
+
 
 /* use or unuse a queue */
 int snd_seq_use_queue(snd_seq_t *seq, int q, int use)