From patchwork Sun Nov 23 09:16:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 5360291 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 57D29C11AC for ; Sun, 23 Nov 2014 09:16:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9546620253 for ; Sun, 23 Nov 2014 09:16:47 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 9A1AD20251 for ; Sun, 23 Nov 2014 09:16:46 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 9B504261684; Sun, 23 Nov 2014 10:16:45 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 4FEDF26153A; Sun, 23 Nov 2014 10:16:16 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 71BD22605F8; Sun, 23 Nov 2014 10:16:13 +0100 (CET) Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 40B0A2605A6 for ; Sun, 23 Nov 2014 10:16:04 +0100 (CET) Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 00F42AB07 for ; Sun, 23 Nov 2014 09:16:03 +0000 (UTC) From: Takashi Iwai To: alsa-devel@alsa-project.org Date: Sun, 23 Nov 2014 10:16:01 +0100 Message-Id: <1416734162-24748-1-git-send-email-tiwai@suse.de> X-Mailer: git-send-email 2.1.3 Subject: [alsa-devel] [PATCH 1/2] amixer: Make "dB" case-insensitive in set commands X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP We don't have to be necessarily too strict about case-sensitivity of "dB" suffix used in set commands. Signed-off-by: Takashi Iwai --- amixer/amixer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/amixer/amixer.c b/amixer/amixer.c index cf82892bfa2f..6a2fdb96c62f 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;