From patchwork Sun May 6 11:37:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Federico Cuello X-Patchwork-Id: 10388239 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 64DAD602C2 for ; Wed, 9 May 2018 07:08:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 51A5228817 for ; Wed, 9 May 2018 07:08:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4604128AEB; Wed, 9 May 2018 07:08:18 +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 7F2FC28817 for ; Wed, 9 May 2018 07:08:17 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 202972676FC; Wed, 9 May 2018 09:07:44 +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 15269267344; Sun, 6 May 2018 13:37:25 +0200 (CEST) Received: from mail.fedux.com.ar (mail.fedux.com.ar [167.99.131.221]) by alsa0.perex.cz (Postfix) with ESMTP id A479B266F46 for ; Sun, 6 May 2018 13:37:22 +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 159AA342E7; Sun, 6 May 2018 11:37:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fedux.com.ar; s=default; t=1525606642; bh=iUkHKQMImGPtyJB+uZB3GWHjW/HGIJE2a94LRTbzXSs=; h=From:To:Cc:Subject:Date:From; b=bPEUf9ujBg+UcrqkOxt1J70srNMGKNgR6lxFlz2o8rIW0DldjjtUhHlJMyELIGLj9 td3uH1z1z1PWkZTeMNVmleguZOqOXK+1QciJol7cJDtpimjO79yyGbmNkiutTD0c2P pC7F0uYObxu0D82MXOoqhMPfZXJ86b0F2hyge8C0= Received: by kaoz.fedux.com.ar (Postfix, from userid 1000) id 5715640E70; Sun, 6 May 2018 13:37:20 +0200 (CEST) From: Federico Cuello To: alsa-devel@alsa-project.org Date: Sun, 6 May 2018 13:37:18 +0200 Message-Id: <20180506113718.4007-1-fedux@fedux.com.ar> X-Mailer: git-send-email 2.17.0 X-Mailman-Approved-At: Wed, 09 May 2018 09:07:34 +0200 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. --- 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):