]> git.alsa-project.org Git - alsa-lib.git/commitdiff
fixed the detection of playback switch.
authorTakashi Iwai <tiwai@suse.de>
Thu, 2 May 2002 10:58:10 +0000 (10:58 +0000)
committerTakashi Iwai <tiwai@suse.de>
Thu, 2 May 2002 10:58:10 +0000 (10:58 +0000)
src/mixer/simple.c

index 469e1f63889be8f9d15828bf70cbe4de46f6c0e1..566ca68ecbe0b3a06c7a89d1cae6826683bda7d9 100644 (file)
@@ -730,7 +730,8 @@ static int simple_update(snd_mixer_elem_t *melem)
        }
 
        /* exceptions */
-       if ((caps & (CAP_GSWITCH|CAP_PSWITCH|CAP_CSWITCH)) == (caps & CAP_GSWITCH)) {
+       if ((caps & (CAP_GSWITCH|CAP_PSWITCH|CAP_CSWITCH)) &&
+           (caps & (CAP_GSWITCH|CAP_PSWITCH|CAP_CSWITCH)) == (caps & CAP_GSWITCH)) {
                caps &= ~(CAP_GSWITCH|CAP_CSWITCH_JOIN|CAP_CSWITCH_EXCL);
                caps |= CAP_PSWITCH;
        }