]> git.alsa-project.org Git - alsa-lib.git/commitdiff
fixed the event handling of enum elements.
authorTakashi Iwai <tiwai@suse.de>
Sun, 2 May 2004 11:59:08 +0000 (11:59 +0000)
committerTakashi Iwai <tiwai@suse.de>
Sun, 2 May 2004 11:59:08 +0000 (11:59 +0000)
src/mixer/simple.c

index 42620b496eabe78be36237367540de6161ee7f9b..2e99e74ce722d86397da88d7f24e774d63d0e671 100644 (file)
@@ -329,8 +329,12 @@ static int selem_read(snd_mixer_elem_t *elem)
        csw = s->str[CAPT].sw;
        s->str[CAPT].sw = ~0U;
 
-       if (s->ctls[CTL_ENUMLIST].elem)
-               return elem_read_enum(s);
+       if (s->ctls[CTL_ENUMLIST].elem) {
+               err = elem_read_enum(s);
+               if (err < 0)
+                       return err;
+               goto __skip_cswitch;
+       }
 
        if (s->ctls[CTL_PLAYBACK_VOLUME].elem)
                err = elem_read_volume(s, PLAY, CTL_PLAYBACK_VOLUME);