From: Takashi Iwai Date: Sun, 23 Nov 2014 08:40:07 +0000 (+0100) Subject: amixer: Make "dB" case-insensitive in set commands X-Git-Tag: v1.0.29~7 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=45a334e71ca9b4402fb731a934f7455cec5b0121;p=alsa-utils.git 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 --- diff --git a/amixer/amixer.c b/amixer/amixer.c index cf82892..6a2fdb9 100644 --- a/amixer/amixer.c +++ b/amixer/amixer.c @@ -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;