amixer: Make "dB" case-insensitive in set commands

We don't have to be necessarily too strict about case-sensitivity of
"dB" suffix used in set commands.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai 2014-11-23 09:40:07 +01:00
parent 8f361d83cf
commit 45a334e71c

View file

@ -346,7 +346,7 @@ static int set_volume_simple(snd_mixer_elem_t *elem,
if (*p == '%') {
percent = 1;
p++;
} else if (p[0] == 'd' && p[1] == 'B') {
} else if (toupper(p[0]) == 'D' && toupper(p[1]) == 'B') {
vol_type = VOL_DB;
p += 2;
scale = 100;