From patchwork Mon May 7 16:42:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Federico Cuello X-Patchwork-Id: 10384503 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 1E9DF60318 for ; Mon, 7 May 2018 16:45:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0451E28A1E for ; Mon, 7 May 2018 16:45:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 274C6294DB; Mon, 7 May 2018 16:44:25 +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 8D96B28CC1 for ; Mon, 7 May 2018 16:42:24 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 15D32267661; Mon, 7 May 2018 18:42:23 +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 89315267662; Mon, 7 May 2018 18:42:20 +0200 (CEST) Received: from mail.fedux.com.ar (mail.fedux.com.ar [167.99.131.221]) by alsa0.perex.cz (Postfix) with ESMTP id 5DA1F26765E for ; Mon, 7 May 2018 18:42:18 +0200 (CEST) Received: from mail.fedux.com.ar (kaoz-srv [IPv6:2a03:b0c0:3:d0::c88:3001]) by mail.fedux.com.ar (Postfix) with ESMTP id 3E37E34575; Mon, 7 May 2018 16:42:17 +0000 (UTC) Authentication-Results: mail.fedux.com.ar; dmarc=pass (p=none dis=none) header.from=fedux.com.ar Authentication-Results: mail.fedux.com.ar; spf=pass smtp.mailfrom=fedux@fedux.com.ar DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fedux.com.ar; s=default; t=1525711337; bh=gPIvXUDD7tvgPjSJDTdNNg1mLpHHsYkWp/i8Jwu33Ik=; h=Date:From:To:Cc:Subject:From; b=KZL7qYqqZDgqbDK/Fc/5ptR5HvrR/mvoEtuEkIsJQ1FsUc7BJ+tmMhaX8xYwwPdWN TPIYLWAo3DkNeVYqyVIfqa4n1Nrs63kGwMJcx4B4GXy+lnhNWOmOeejb/TYj1g2E9X vWE6oaps7v7idaj8U4hDu56z4/YVv9EMk69NvbQY= MIME-Version: 1.0 Date: Mon, 07 May 2018 18:42:17 +0200 From: Federico Cuello To: alsa-devel@alsa-project.org Message-ID: <2cb2aefe3a828eb137e9d336f95199e1@fedux.com.ar> X-Sender: fedux@fedux.com.ar User-Agent: Roundcube Webmail/1.3.6 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: , 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(+) case USB_ID(0x0471, 0x0105): 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):