]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
alsa_mix: Allow non-positive mixer values.
authorAndre Noll <maan@systemlinux.org>
Sun, 8 Sep 2013 00:36:35 +0000 (00:36 +0000)
committerAndre Noll <maan@systemlinux.org>
Sat, 8 Mar 2014 13:45:20 +0000 (14:45 +0100)
For the rpi the PCM range is from -10239 to 400. The math in
->set_mixer works fine for negative values.

alsa_mix.c

index 01f1c51260a7b6753ba8b14aac0c255120b4b331..0c2a1cf80725937ce87beb73bf1e08f930d50d36 100644 (file)
@@ -150,7 +150,7 @@ static int alsa_mix_set_channel(struct mixer_handle *h,
                        mixer_channel, h->card, snd_strerror(ret));
                return -E_ALSA_MIX_BAD_ELEM;
        }
-       if (h->pmin < 0 || h->pmax < 0 || h->pmin >= h->pmax) {
+       if (h->pmin >= h->pmax) {
                PARA_NOTICE_LOG("alsa reported %s range %ld-%ld (%s)\n",
                        mixer_channel, h->pmin, h->pmax, h->card);
                return -E_ALSA_MIX_BAD_ELEM;