From 76fc8685059c8bd66686952d0e5cb8bba86bcdca Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 8 Sep 2013 00:36:35 +0000 Subject: [PATCH] alsa_mix: Allow non-positive mixer values. For the rpi the PCM range is from -10239 to 400. The math in ->set_mixer works fine for negative values. --- alsa_mix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alsa_mix.c b/alsa_mix.c index 01f1c512..0c2a1cf8 100644 --- a/alsa_mix.c +++ b/alsa_mix.c @@ -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; -- 2.39.2