From patchwork Tue May 8 22:13:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Federico Cuello X-Patchwork-Id: 10387643 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3E6CF6037F for ; Tue, 8 May 2018 22:13:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 23BCA29024 for ; Tue, 8 May 2018 22:13:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 17B252906E; Tue, 8 May 2018 22:13:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C697829024 for ; Tue, 8 May 2018 22:13:52 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id DB58A2676BD; Wed, 9 May 2018 00:13:49 +0200 (CEST) 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 BBABF2676CC; Wed, 9 May 2018 00:13:47 +0200 (CEST) Received: from mail.fedux.com.ar (mail.fedux.com.ar [167.99.131.221]) by alsa0.perex.cz (Postfix) with ESMTP id A042D2676AA for ; Wed, 9 May 2018 00:13:44 +0200 (CEST) Received: from kaoz.fedux.com.ar (ip5f5bd6d4.dynamic.kabel-deutschland.de [95.91.214.212]) by mail.fedux.com.ar (Postfix) with ESMTPSA id CBBDE35C5C; Tue, 8 May 2018 22:13:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fedux.com.ar; s=default; t=1525817623; bh=L+9J0Chn7XlMRkqZMjf4RnQcHPoergfUEnXpBzR8EVU=; h=From:To:Cc:Subject:Date:From; b=NZfWl2NGN9hpsuGgMdlSHveQm+nz/w1e9R9M5VC3aS0uz1c5tqSF9JQGEMCX8JIJ7 dy/k3/89VcrpIrqaNNPuv5IREoquI4E7Dld0klni6Lf1z5V3sshkgM5kTYuqTNrMlq rY+fy/ucHPvlElnIaYLj8T63jI5Q04QLFPXQ3T3A= Received: by kaoz.fedux.com.ar (Postfix, from userid 1000) id 91A6F46F76; Wed, 9 May 2018 00:13:40 +0200 (CEST) From: Federico Cuello To: alsa-devel@alsa-project.org Date: Wed, 9 May 2018 00:13:38 +0200 Message-Id: <20180508221338.6229-1-fedux@fedux.com.ar> X-Mailer: git-send-email 2.17.0 Cc: Federico Cuello Subject: [alsa-devel] [PATCH] ALSA: usb: mixer: volume quirk for CM102-A+/102S+ 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 Currently it's not possible to set volume lower than 26% (it just mutes). Also fixes this warning: Warning! Unlikely big volume range (=9472), cval->res is probably wrong. [13] FU [PCM Playback Volume] ch = 2, val = -9473/-1/1 , and volume works fine for full range. Signed-off-by: Federico Cuello --- sound/usb/mixer.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 344d7b069d59..bb5ab7a7dfa5 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c @@ -967,6 +967,14 @@ static void volume_control_quirks(struct usb_mixer_elem_info *cval, } break; + case USB_ID(0x0d8c, 0x0103): + if (!strcmp(kctl->id.name, "PCM Playback Volume")) { + usb_audio_info(chip, + "set volume quirk for CM102-A+/102S+\n"); + cval->min = -256; + } + break; + case USB_ID(0x0471, 0x0101): case USB_ID(0x0471, 0x0104): case USB_ID(0x0471, 0x0105):