From 3b6ee2ad9748dddc7c848836ac75f37022da32fd Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 20 Sep 2002 09:44:25 +0000 Subject: [PATCH] accept enum items for other volumes and switches. --- src/mixer/simple.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mixer/simple.c b/src/mixer/simple.c index 6babc608..78176873 100644 --- a/src/mixer/simple.c +++ b/src/mixer/simple.c @@ -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; -- 2.47.1