From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8EFD1C433DB for ; Tue, 16 Feb 2021 16:36:49 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E3AF664E09 for ; Tue, 16 Feb 2021 16:36:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E3AF664E09 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=perex.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 97329850; Tue, 16 Feb 2021 17:35:55 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 97329850 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1613493405; bh=gss2BANqMBgAgasEbeb8A5u3pmWoGb/tqo4svkXDX5o=; h=Subject:To:References:From:Date:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=iHuMlpwZaGKO/FvqcR8IwOSVtQlgRlDg7be9f+XbKlMPV1Q6Q1RK5qUoi/SmKJjLT Jjv8Wwa5RNDIWUrIlhv4iubP5Giw8gY3XzLFNy76N/TMZZs35/EHT2aEFtkyB6VHCk zHA5X3fcub41OXI6MOoWz0EdO5qM5WgVi/KLw3xU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 1C167F8014D; Tue, 16 Feb 2021 17:35:55 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B35E4F8015A; Tue, 16 Feb 2021 17:35:52 +0100 (CET) Received: from mail1.perex.cz (mail1.perex.cz [77.48.224.245]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2BCE1F8014D for ; Tue, 16 Feb 2021 17:35:45 +0100 (CET) Received: from mail1.perex.cz (localhost [127.0.0.1]) by smtp1.perex.cz (Perex's E-mail Delivery System) with ESMTP id 7BD04A003F; Tue, 16 Feb 2021 17:35:39 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.perex.cz 7BD04A003F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=perex.cz; s=default; t=1613493339; bh=5kZN+fC/iZuw+K0QJOiRSrsqWGpaODMMwM4izOsTRJQ=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=0hSBuMFqOCGzX3yXQHB+Om/bn8Aej3io5iF+q0T8P/jiI3muEjbkcAAra265OilHh MUUL6AX6G59Q6I24jwzwmQPlkFmsaTdMGU8i5EA2xb2OtXk3OGdW8Oz/fos2yJt88q HL4z7JCRNgDZ2UZRFxItqBpmuMk9sx3n5Njkl7zw= Received: from p1gen2.localdomain (unknown [192.168.100.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: perex) by mail1.perex.cz (Perex's E-mail Delivery System) with ESMTPSA; Tue, 16 Feb 2021 17:35:32 +0100 (CET) Subject: Re: [PATCH 2/4] ASoC: rt5670: Remove 'HP Playback Switch' control To: Hans de Goede , Liam Girdwood , Mark Brown , Oder Chiou References: <20210215142118.308516-1-hdegoede@redhat.com> <20210215142118.308516-3-hdegoede@redhat.com> <294813c9-b417-a632-997d-0b81bad94dbe@redhat.com> From: Jaroslav Kysela Message-ID: <871855cd-8e42-f28e-d15c-01fb8fe3444b@perex.cz> Date: Tue, 16 Feb 2021 17:35:32 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <294813c9-b417-a632-997d-0b81bad94dbe@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Cc: alsa-devel@alsa-project.org, Takashi Iwai , Bard Liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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" Dne 16. 02. 21 v 16:15 Hans de Goede napsal(a): > Hi, > > On 2/15/21 7:09 PM, Jaroslav Kysela wrote: >> Dne 15. 02. 21 v 15:21 Hans de Goede napsal(a): >>> The RT5670_L_MUTE_SFT and RT5670_R_MUTE_SFT bits (bits 15 and 7) of the >>> RT5670_HP_VOL register are set / unset by the headphones deplop code >>> run by rt5670_hp_event() on SND_SOC_DAPM_POST_PMU / SND_SOC_DAPM_PRE_PMD. >>> >>> So we should not also export a control to userspace which toggles these >>> same bits. >> >> I think that it may be worth to preserve the full-mute functionality. >> According the datasheet, the register 0x02 has volume range -46.5dB..12dB. >> Even the lowest volume may produce an audible output. >> >> I would cache the mute switch value in rt5670_priv and update the >> POST_PMU/PRE_PMD code to use this settings. > > Yes that should work. > > Note though that patch 4/4 adds a mute for the master volume control, even > though I call it an "emulated" mute it is a full mute, it is just that > we now have 2 switches, 1 mixer switch and 1 mute switch, which must > both be true before we enable the path from the DAC through the mixer > which sits directly behind the "DAC1 Playback Volume" control. > > And we need that mute anyways because the speaker output does not > have any volume control other then the master "DAC1 Playback Volume" > which has the same issue of only going very soft and not going to > a full mute. > > So since we have a working mute in the master volume control, we don't > really need one for the "HP Playback Volume" control. with that all said, > your suggestion should work fine. > > So the question is do we want to do as you suggest, or are we happy > with just having the master mute ? One hw mute per one hw output should be sufficient. Thank you for the explanation. Jaroslav -- Jaroslav Kysela Linux Sound Maintainer; ALSA Project; Red Hat, Inc.