]> git.alsa-project.org Git - alsa-lib.git/commitdiff
mixer: fix enum check
authorClemens Ladisch <clemens@ladisch.de>
Mon, 23 Nov 2009 09:56:46 +0000 (10:56 +0100)
committerClemens Ladisch <clemens@ladisch.de>
Mon, 23 Nov 2009 09:56:46 +0000 (10:56 +0100)
The recent CHECK_ENUM fix uncovered a bug in snd_mixer_selem_is_enumerated()
which would now return -EINVAL for any non-enum control, which would be
interpreted as 'true' by callers like amixer or alsamixer.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
src/mixer/simple.c

index 606fc3d8c72c652ed97ae2b43e02d8e18c072e7e..8079fe7a275c88e304893f8884070bcf047dc565 100644 (file)
@@ -878,7 +878,6 @@ int snd_mixer_selem_set_capture_switch_all(snd_mixer_elem_t *elem, int value)
 int snd_mixer_selem_is_enumerated(snd_mixer_elem_t *elem)
 {
        CHECK_BASIC(elem);
-       CHECK_ENUM(elem);
        return sm_selem_ops(elem)->is(elem, SM_PLAY, SM_OPS_IS_ENUMERATED, 0);
 }