]> git.alsa-project.org Git - alsa-lib.git/commitdiff
accept enum items for other volumes and switches.
authorTakashi Iwai <tiwai@suse.de>
Fri, 20 Sep 2002 09:44:25 +0000 (09:44 +0000)
committerTakashi Iwai <tiwai@suse.de>
Fri, 20 Sep 2002 09:44:25 +0000 (09:44 +0000)
src/mixer/simple.c

index 6babc6088c2e09a35480c9fbc17ffee0c5c1b345..78176873220e03a4438a351edcf3f78d899bf198 100644 (file)
@@ -887,12 +887,20 @@ static int simple_add1(snd_mixer_class_t *class, const char *name,
        case CTL_GLOBAL_SWITCH:
        case CTL_PLAYBACK_SWITCH:
        case CTL_CAPTURE_SWITCH:
+               if (info.type == SND_CTL_ELEM_TYPE_ENUMERATED) {
+                       type = CTL_ENUMLIST;
+                       break;
+               }
                if (info.type != SND_CTL_ELEM_TYPE_BOOLEAN)
                        return 0;
                break;
        case CTL_GLOBAL_VOLUME:
        case CTL_PLAYBACK_VOLUME:
        case CTL_CAPTURE_VOLUME:
+               if (info.type == SND_CTL_ELEM_TYPE_ENUMERATED) {
+                       type = CTL_ENUMLIST;
+                       break;
+               }
                if (info.type != SND_CTL_ELEM_TYPE_INTEGER)
                        return 0;
                break;