From patchwork Mon Mar 8 22:05:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 12123469 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=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 73C79C433E0 for ; Mon, 8 Mar 2021 22:07:53 +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 B681C65257 for ; Mon, 8 Mar 2021 22:07:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B681C65257 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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 19C5618B8; Mon, 8 Mar 2021 23:07:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 19C5618B8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1615241271; bh=HA3P4xrS0JfNmmEZ39L+clx5ppNcAH9l8RmdOgvCWAA=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=CkRO9o5QjsyDegqCzHKubtF0Xu1CvcRvCBmw4K3YHhLN8J9Ykqwb3hOa/SwIQgL7J NgPJCVoalyq1J+JLOmYdEsCpZyTkH/Yr+6lJnM1j2CL7KRoUd+8R0l80qNKJeqDiv+ x9GK5eO7K/Gvzyp2m6QSl+QesBHAzINzvwzNs7jU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7055AF801D8; Mon, 8 Mar 2021 23:06:13 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 86ECEF80279; Mon, 8 Mar 2021 23:06:09 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 04B66F8016C for ; Mon, 8 Mar 2021 23:06:02 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 04B66F8016C Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="DCVRdkau" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615241161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jxY8B4qTKDcHaRcAhEwhGpo5FXKEPrhaW4WxzNJwna0=; b=DCVRdkauQCwVz/KooWDgi/a+1SPEk9xkzNh9aaQ+H2IT42r6RorEBWuUxlouxSd8flFEQ6 OXPrHOcGV0n0bJfYdZzB+gBLVGxFHY2Q4wbeH3QH6e2oMTlJWifD/cIOVp70Jis1OSUC0I MmJgegC5GisfrgHGV/ZI9uJJo13LaEg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-579-54bax_jpMRWtDbNIX-kNmw-1; Mon, 08 Mar 2021 17:06:00 -0500 X-MC-Unique: 54bax_jpMRWtDbNIX-kNmw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9BD68814313; Mon, 8 Mar 2021 22:05:58 +0000 (UTC) Received: from x1.localdomain.com (ovpn-114-220.ams2.redhat.com [10.36.114.220]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7C81261F55; Mon, 8 Mar 2021 22:05:57 +0000 (UTC) From: Hans de Goede To: Jaroslav Kysela Subject: [PATCH alsa-ucm-conf v2 1/7] codecs/rt5640: Cleanup: unify Stereo / Mono ADC handling Date: Mon, 8 Mar 2021 23:05:48 +0100 Message-Id: <20210308220554.76111-2-hdegoede@redhat.com> In-Reply-To: <20210308220554.76111-1-hdegoede@redhat.com> References: <20210308220554.76111-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=hdegoede@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: Hans de Goede , alsa-devel@alsa-project.org, Pierre-Louis Bossart , 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" Cleanup: no functional changes intended. The rt5640 codec is sometimes used with AIF1 connected to the SoC and sometimes with AIF2 connected to the SoC. The rt5640 UCM configuration deals with this by accepting input from and sending output to both AIFs, relying on the kernels DAPM framework to disable parts of the graph which are connected to the unconnected AIF. On the output side we solve this by enabling both the IF1_DAC and IF2_DAC data inputs to the digital 'Stereo DAC MIX' mixer. On the input side handling this is somewhat more complicated, the "Digital Mixer Path" leading to the IF1_ADC and IF2_ADC outputs are entirely separate paths. To solve this we enable the active input (DMIC or ADC) in both the Stereo ADC (connected to IF1_ADC) and the Mono ADC (IF2_ADC) paths. So far we've not been entirely consistent in our handling of the Stereo ADC vs Mono ADC paths, this commit cleans this up: 1. Set the 'Mono ADC Capture Switch' to on once from EnableSeq.conf, like we do for the 'ADC Capture Switch' instead of toggling it on/off from the individual input Enable/Disable sequences. 2. Group all the 'Mono ADC ...' mixer cset calls together with their stereo ADC counterparts. 3. Explicitly select DMIC L/R 1 for the Mono ADC L/R 2 Mux input, instead of relying on this being the default. Signed-off-by: Hans de Goede --- ucm2/codecs/rt5640/DigitalMics.conf | 2 -- ucm2/codecs/rt5640/EnableSeq.conf | 10 +++++++--- ucm2/codecs/rt5640/HeadsetMic.conf | 10 ++-------- ucm2/codecs/rt5640/IN1-InternalMic.conf | 11 ++--------- ucm2/codecs/rt5640/IN3-InternalMic.conf | 11 ++--------- 5 files changed, 13 insertions(+), 31 deletions(-) diff --git a/ucm2/codecs/rt5640/DigitalMics.conf b/ucm2/codecs/rt5640/DigitalMics.conf index fdd412f..157c544 100644 --- a/ucm2/codecs/rt5640/DigitalMics.conf +++ b/ucm2/codecs/rt5640/DigitalMics.conf @@ -8,7 +8,6 @@ SectionDevice."Mic" { EnableSequence [ cset "name='Mono ADC MIXL ADC2 Switch' on" cset "name='Mono ADC MIXR ADC2 Switch' on" - cset "name='Mono ADC Capture Switch' on" cset "name='Stereo ADC MIXL ADC2 Switch' on" cset "name='Stereo ADC MIXR ADC2 Switch' on" cset "name='Internal Mic Switch' on" @@ -18,7 +17,6 @@ SectionDevice."Mic" { DisableSequence [ cset "name='Mono ADC MIXL ADC2 Switch' off" cset "name='Mono ADC MIXR ADC2 Switch' off" - cset "name='Mono ADC Capture Switch' off" cset "name='Stereo ADC MIXL ADC2 Switch' off" cset "name='Stereo ADC MIXR ADC2 Switch' off" cset "name='Internal Mic Switch' off" diff --git a/ucm2/codecs/rt5640/EnableSeq.conf b/ucm2/codecs/rt5640/EnableSeq.conf index 145a23b..4754df7 100644 --- a/ucm2/codecs/rt5640/EnableSeq.conf +++ b/ucm2/codecs/rt5640/EnableSeq.conf @@ -30,8 +30,13 @@ EnableSequence [ # Input Configuration cset "name='Stereo ADC1 Mux' ADC" cset "name='Stereo ADC2 Mux' DMIC1" - cset "name='Mono ADC L1 Mux' 1" - cset "name='Mono ADC R1 Mux' 1" + cset "name='ADC Capture Switch' on" + + cset "name='Mono ADC L1 Mux' ADCL" + cset "name='Mono ADC R1 Mux' ADCR" + cset "name='Mono ADC L2 Mux' DMIC L1" + cset "name='Mono ADC R2 Mux' DMIC R1" + cset "name='Mono ADC Capture Switch' on" # 47=0dB, 0.375 dB/step, set it to 6 dB to help with soft mics cset "name='ADC Capture Volume' 63" @@ -45,5 +50,4 @@ EnableSequence [ cset "name='Internal Mic Switch' off" cset "name='Headset Mic Switch' off" - cset "name='ADC Capture Switch' on" ] diff --git a/ucm2/codecs/rt5640/HeadsetMic.conf b/ucm2/codecs/rt5640/HeadsetMic.conf index f88b611..829e4e6 100644 --- a/ucm2/codecs/rt5640/HeadsetMic.conf +++ b/ucm2/codecs/rt5640/HeadsetMic.conf @@ -21,26 +21,20 @@ SectionDevice."Headset" { cset "name='Stereo ADC MIXL ADC1 Switch' on" cset "name='Stereo ADC MIXR ADC1 Switch' on" - cset "name='Mono ADC MIXL ADC1 Switch' on" cset "name='Mono ADC MIXR ADC1 Switch' on" - - cset "name='Mono ADC Capture Switch' on" ] DisableSequence [ cset "name='Stereo ADC MIXL ADC1 Switch' off" cset "name='Stereo ADC MIXR ADC1 Switch' off" + cset "name='Mono ADC MIXL ADC1 Switch' off" + cset "name='Mono ADC MIXR ADC1 Switch' off" cset "name='RECMIXL BST2 Switch' off" cset "name='RECMIXR BST2 Switch' off" cset "name='Headset Mic Switch' off" - - cset "name='Mono ADC MIXL ADC1 Switch' off" - cset "name='Mono ADC MIXR ADC1 Switch' off" - - cset "name='Mono ADC Capture Switch' off" ] Value { diff --git a/ucm2/codecs/rt5640/IN1-InternalMic.conf b/ucm2/codecs/rt5640/IN1-InternalMic.conf index ebb5b6d..260df90 100644 --- a/ucm2/codecs/rt5640/IN1-InternalMic.conf +++ b/ucm2/codecs/rt5640/IN1-InternalMic.conf @@ -15,27 +15,20 @@ SectionDevice."Mic" { cset "name='Stereo ADC MIXL ADC1 Switch' on" cset "name='Stereo ADC MIXR ADC1 Switch' on" - cset "name='Mono ADC MIXL ADC1 Switch' on" cset "name='Mono ADC MIXR ADC1 Switch' on" - - cset "name='Mono ADC Capture Switch' on" ] DisableSequence [ cset "name='Stereo ADC MIXL ADC1 Switch' off" cset "name='Stereo ADC MIXR ADC1 Switch' off" + cset "name='Mono ADC MIXL ADC1 Switch' off" + cset "name='Mono ADC MIXR ADC1 Switch' off" cset "name='RECMIXL BST1 Switch' off" cset "name='RECMIXR BST1 Switch' off" cset "name='Internal Mic Switch' off" - - cset "name='Mono ADC MIXL ADC1 Switch' off" - cset "name='Mono ADC MIXR ADC1 Switch' off" - - cset "name='Mono ADC Capture Switch' off" - ] Value { diff --git a/ucm2/codecs/rt5640/IN3-InternalMic.conf b/ucm2/codecs/rt5640/IN3-InternalMic.conf index 172d909..ebd2b9c 100644 --- a/ucm2/codecs/rt5640/IN3-InternalMic.conf +++ b/ucm2/codecs/rt5640/IN3-InternalMic.conf @@ -15,27 +15,20 @@ SectionDevice."Mic" { cset "name='Stereo ADC MIXL ADC1 Switch' on" cset "name='Stereo ADC MIXR ADC1 Switch' on" - cset "name='Mono ADC MIXL ADC1 Switch' on" cset "name='Mono ADC MIXR ADC1 Switch' on" - - cset "name='Mono ADC Capture Switch' on" - ] DisableSequence [ cset "name='Stereo ADC MIXL ADC1 Switch' off" cset "name='Stereo ADC MIXR ADC1 Switch' off" + cset "name='Mono ADC MIXL ADC1 Switch' off" + cset "name='Mono ADC MIXR ADC1 Switch' off" cset "name='RECMIXL BST3 Switch' off" cset "name='RECMIXR BST3 Switch' off" cset "name='Internal Mic Switch' off" - - cset "name='Mono ADC MIXL ADC1 Switch' off" - cset "name='Mono ADC MIXR ADC1 Switch' off" - - cset "name='Mono ADC Capture Switch' off" ] Value { From patchwork Mon Mar 8 22:05:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 12123471 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=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 A7AB9C433DB for ; Mon, 8 Mar 2021 22:07:56 +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 0CC0865105 for ; Mon, 8 Mar 2021 22:07:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0CC0865105 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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 87A3418B4; Mon, 8 Mar 2021 23:07:04 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 87A3418B4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1615241274; bh=t4GRXwpz+QsM5RIrjqipLQFfVIBgOxJgg3lCGEgsv3c=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=s2YHVqMy0CwrlY3pgvoIJ0p02kdy0PhEJYr48laeWZ2JUUdNTwttSFctuAL8QwDap MP1lmepBi2rF4I94UIabZLdaBFISQNtHJzwM5yEQgAbViI2lC9GzV82zX0BZnIHo6u mbTHFmnRMgEDQEVym19PIdrq4LI/Lh9fv06cWDQw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 76F1AF8032D; Mon, 8 Mar 2021 23:06:15 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id F3471F801D8; Mon, 8 Mar 2021 23:06:10 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E2032F80139 for ; Mon, 8 Mar 2021 23:06:05 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E2032F80139 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ThGYfPp7" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615241164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=461RKBm0rY9dqbC2WJLQm2UBN2yOxdhctKYoP7EIdUM=; b=ThGYfPp7O13p0Q5Tcw7pXxF/hqsdWcPy4V+txjpMecmQ87fTObb4fZlivDsHe1oCZbA0mX Bo3RlQuVvOJ3SaW7MsOt6QPHZxWAWUguCr0giWzqf7x0rRNIpfYscJOvYaPL04mXlmY6qL YH2X1lAmhTwSe2baOF9omoboOyJb25s= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-201-Di9gsoLVOaeTqk1ZAYtp3w-1; Mon, 08 Mar 2021 17:06:01 -0500 X-MC-Unique: Di9gsoLVOaeTqk1ZAYtp3w-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 142E51018F72; Mon, 8 Mar 2021 22:06:00 +0000 (UTC) Received: from x1.localdomain.com (ovpn-114-220.ams2.redhat.com [10.36.114.220]) by smtp.corp.redhat.com (Postfix) with ESMTP id E6DA35D6D7; Mon, 8 Mar 2021 22:05:58 +0000 (UTC) From: Hans de Goede To: Jaroslav Kysela Subject: [PATCH alsa-ucm-conf v2 2/7] codecs/rt5640: Cleanup: Initially disable all inputs and outputs Date: Mon, 8 Mar 2021 23:05:49 +0100 Message-Id: <20210308220554.76111-3-hdegoede@redhat.com> In-Reply-To: <20210308220554.76111-1-hdegoede@redhat.com> References: <20210308220554.76111-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=hdegoede@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: Hans de Goede , alsa-devel@alsa-project.org, Pierre-Louis Bossart , 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" Cleanup: no functional changes intended. Disable all inputs and outputs from the main EnableSequence. This allows removing some weirdness from the individual input/output EnableSequences where they were turning controls for other inputs/outputs then themselves off. Signed-off-by: Hans de Goede --- ucm2/codecs/rt5640/EnableSeq.conf | 21 +++++++++++++++++++++ ucm2/codecs/rt5640/HeadPhones.conf | 1 - ucm2/codecs/rt5640/IN1-InternalMic.conf | 2 -- ucm2/codecs/rt5640/IN3-InternalMic.conf | 2 -- ucm2/codecs/rt5640/MonoSpeaker.conf | 1 - ucm2/codecs/rt5640/Speaker.conf | 1 - 6 files changed, 21 insertions(+), 7 deletions(-) diff --git a/ucm2/codecs/rt5640/EnableSeq.conf b/ucm2/codecs/rt5640/EnableSeq.conf index 4754df7..5dc7092 100644 --- a/ucm2/codecs/rt5640/EnableSeq.conf +++ b/ucm2/codecs/rt5640/EnableSeq.conf @@ -48,6 +48,27 @@ EnableSequence [ cset "name='IN2 Boost' 1" cset "name='IN3 Boost' 8" + # Start with all controls which are used by the individual + # input/output Enable/DisableSequences off + + cset "name='RECMIXL BST1 Switch' off" + cset "name='RECMIXR BST1 Switch' off" + cset "name='RECMIXL BST2 Switch' off" + cset "name='RECMIXR BST2 Switch' off" + cset "name='RECMIXL BST3 Switch' off" + cset "name='RECMIXR BST3 Switch' off" + + cset "name='Stereo ADC MIXL ADC1 Switch' off" + cset "name='Stereo ADC MIXR ADC1 Switch' off" + cset "name='Stereo ADC MIXL ADC2 Switch' off" + cset "name='Stereo ADC MIXR ADC2 Switch' off" + cset "name='Mono ADC MIXL ADC1 Switch' off" + cset "name='Mono ADC MIXR ADC1 Switch' off" + cset "name='Mono ADC MIXL ADC2 Switch' off" + cset "name='Mono ADC MIXR ADC2 Switch' off" + + cset "name='Speaker Switch' off" + cset "name='Headphone Switch' off" cset "name='Internal Mic Switch' off" cset "name='Headset Mic Switch' off" ] diff --git a/ucm2/codecs/rt5640/HeadPhones.conf b/ucm2/codecs/rt5640/HeadPhones.conf index a9e4d20..1f4316d 100644 --- a/ucm2/codecs/rt5640/HeadPhones.conf +++ b/ucm2/codecs/rt5640/HeadPhones.conf @@ -17,7 +17,6 @@ SectionDevice."Headphones" { cset "name='HPO MIX HPVOL Switch' on" cset "name='Headphone Switch' on" cset "name='HP Channel Switch' on" - cset "name='Speaker Switch' off" cset "name='HP L Playback Switch' on" cset "name='HP R Playback Switch' on" cset "name='HP Playback Volume' 29" diff --git a/ucm2/codecs/rt5640/IN1-InternalMic.conf b/ucm2/codecs/rt5640/IN1-InternalMic.conf index 260df90..d7c419e 100644 --- a/ucm2/codecs/rt5640/IN1-InternalMic.conf +++ b/ucm2/codecs/rt5640/IN1-InternalMic.conf @@ -10,8 +10,6 @@ SectionDevice."Mic" { cset "name='RECMIXL BST1 Switch' on" cset "name='RECMIXR BST1 Switch' on" - cset "name='RECMIXL BST3 Switch' off" - cset "name='RECMIXR BST3 Switch' off" cset "name='Stereo ADC MIXL ADC1 Switch' on" cset "name='Stereo ADC MIXR ADC1 Switch' on" diff --git a/ucm2/codecs/rt5640/IN3-InternalMic.conf b/ucm2/codecs/rt5640/IN3-InternalMic.conf index ebd2b9c..3e330e6 100644 --- a/ucm2/codecs/rt5640/IN3-InternalMic.conf +++ b/ucm2/codecs/rt5640/IN3-InternalMic.conf @@ -8,8 +8,6 @@ SectionDevice."Mic" { EnableSequence [ cset "name='Internal Mic Switch' on" - cset "name='RECMIXL BST1 Switch' off" - cset "name='RECMIXR BST1 Switch' off" cset "name='RECMIXL BST3 Switch' on" cset "name='RECMIXR BST3 Switch' on" diff --git a/ucm2/codecs/rt5640/MonoSpeaker.conf b/ucm2/codecs/rt5640/MonoSpeaker.conf index 23cf34c..5035c8d 100644 --- a/ucm2/codecs/rt5640/MonoSpeaker.conf +++ b/ucm2/codecs/rt5640/MonoSpeaker.conf @@ -14,7 +14,6 @@ SectionDevice."Speaker" { cset "name='SPOL MIX SPKVOL R Switch' on" cset "name='Speaker Switch' on" cset "name='Speaker Channel Switch' on" - cset "name='Headphone Switch' off" cset "name='Speaker L Playback Switch' on" cset "name='Speaker R Playback Switch' on" cset "name='Speaker Playback Volume' 35" diff --git a/ucm2/codecs/rt5640/Speaker.conf b/ucm2/codecs/rt5640/Speaker.conf index 422cfdf..fd74994 100644 --- a/ucm2/codecs/rt5640/Speaker.conf +++ b/ucm2/codecs/rt5640/Speaker.conf @@ -14,7 +14,6 @@ SectionDevice."Speaker" { cset "name='SPOL MIX SPKVOL R Switch' off" cset "name='Speaker Switch' on" cset "name='Speaker Channel Switch' on" - cset "name='Headphone Switch' off" cset "name='Speaker L Playback Switch' on" cset "name='Speaker R Playback Switch' on" cset "name='Speaker Playback Volume' 35" From patchwork Mon Mar 8 22:05:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 12123473 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=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 822EBC433E0 for ; Mon, 8 Mar 2021 22:08:36 +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 01FB565257 for ; Mon, 8 Mar 2021 22:08:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 01FB565257 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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 32405189B; Mon, 8 Mar 2021 23:07:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 32405189B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1615241314; bh=TaKn+fr8LZrQI2znIDQkwH0pTdNa+gGuPIm3hOKrm+w=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=iov3/c5Xx4f73GpKFBVBFG0gOnxpa72yPIpJWYeZ1qOGNCOTzOXCE39mNUBehWrFK zsZTL+jtq/qJL8wkzcN9Q9K+us2aRM7Ksaakqzm33V9xiUhHqLg806m5W9EJRnSonx SpPZoPtwpmoBV5TmxNYBaWzlNx3hsithXHKSBr6g= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0E317F802E7; Mon, 8 Mar 2021 23:06:18 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7FF98F80217; Mon, 8 Mar 2021 23:06:13 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 9A140F80217 for ; Mon, 8 Mar 2021 23:06:06 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9A140F80217 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="jDj5bktn" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615241165; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=d0VBWxWJNsaIisKDtr+Dd11Z7wHg8abuGX0PO11D6Yk=; b=jDj5bktnqSMzAciqfw6xrpqla+MQYXCmkD+e45lvDPH/1/dprk6kY95zwMPAWubEXeommC qp0oEgZZ2R7EYxiyhG4JJmkqUhQXAPvRvT7lRgP9sOu2CC+61xWMtNgJzo2HGLARy6eD3c MSydtZazeyPY6Ep3dfES1G14urcyd4g= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-572-qIW1BevYMSW8YLVvozxfLw-1; Mon, 08 Mar 2021 17:06:02 -0500 X-MC-Unique: qIW1BevYMSW8YLVvozxfLw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7642D81431F; Mon, 8 Mar 2021 22:06:01 +0000 (UTC) Received: from x1.localdomain.com (ovpn-114-220.ams2.redhat.com [10.36.114.220]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5F53C5D756; Mon, 8 Mar 2021 22:06:00 +0000 (UTC) From: Hans de Goede To: Jaroslav Kysela Subject: [PATCH alsa-ucm-conf v2 3/7] codecs/rt5640: Cleanup: Move 'SPK MIX' setup to main EnableSequene Date: Mon, 8 Mar 2021 23:05:50 +0100 Message-Id: <20210308220554.76111-4-hdegoede@redhat.com> In-Reply-To: <20210308220554.76111-1-hdegoede@redhat.com> References: <20210308220554.76111-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=hdegoede@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: Hans de Goede , alsa-devel@alsa-project.org, Pierre-Louis Bossart , 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" Cleanup: no functional changes intended. Do the 'SPK MIXL' / 'SPK MIXR' setup only once from the main EnableSequene, like we do for the 'OUT MIXL' / 'OUT MIXR' setup used by the headphones already. Signed-off-by: Hans de Goede --- ucm2/codecs/rt5640/EnableSeq.conf | 6 ++++-- ucm2/codecs/rt5640/MonoSpeaker.conf | 2 -- ucm2/codecs/rt5640/Speaker.conf | 2 -- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ucm2/codecs/rt5640/EnableSeq.conf b/ucm2/codecs/rt5640/EnableSeq.conf index 5dc7092..4a355a5 100644 --- a/ucm2/codecs/rt5640/EnableSeq.conf +++ b/ucm2/codecs/rt5640/EnableSeq.conf @@ -6,8 +6,10 @@ EnableSequence [ cset "name='Stereo DAC MIXR DAC R1 Switch' on" cset "name='Stereo DAC MIXL DAC L2 Switch' on" cset "name='Stereo DAC MIXR DAC R2 Switch' on" - cset "name='OUT MIXL DAC L1 Switch' on" - cset "name='OUT MIXR DAC R1 Switch' on" + cset "name='OUT MIXL DAC L1 Switch' on" + cset "name='OUT MIXR DAC R1 Switch' on" + cset "name='SPK MIXL DAC L1 Switch' on" + cset "name='SPK MIXR DAC R1 Switch' on" # uncomment for loopback mic->speakers # cset "name='SPOL MIX BST1 Switch' on" diff --git a/ucm2/codecs/rt5640/MonoSpeaker.conf b/ucm2/codecs/rt5640/MonoSpeaker.conf index 5035c8d..654edc3 100644 --- a/ucm2/codecs/rt5640/MonoSpeaker.conf +++ b/ucm2/codecs/rt5640/MonoSpeaker.conf @@ -6,8 +6,6 @@ SectionDevice."Speaker" { ] EnableSequence [ - cset "name='SPK MIXL DAC L1 Switch' on" - cset "name='SPK MIXR DAC R1 Switch' on" cset "name='SPOL MIX SPKVOL L Switch' on" # for mono speaker we apply left on right # cset "name='SPOR MIX SPKVOL R Switch' on" diff --git a/ucm2/codecs/rt5640/Speaker.conf b/ucm2/codecs/rt5640/Speaker.conf index fd74994..3264cc3 100644 --- a/ucm2/codecs/rt5640/Speaker.conf +++ b/ucm2/codecs/rt5640/Speaker.conf @@ -6,8 +6,6 @@ SectionDevice."Speaker" { ] EnableSequence [ - cset "name='SPK MIXL DAC L1 Switch' on" - cset "name='SPK MIXR DAC R1 Switch' on" cset "name='SPOL MIX SPKVOL L Switch' on" cset "name='SPOR MIX SPKVOL R Switch' on" # undo MonoSpeaker mixing of right channel to left speaker From patchwork Mon Mar 8 22:05:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 12123475 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=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 9F63EC433DB for ; Mon, 8 Mar 2021 22:08:44 +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 1592965266 for ; Mon, 8 Mar 2021 22:08:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1592965266 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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 9A03618FE; Mon, 8 Mar 2021 23:07:52 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9A03618FE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1615241322; bh=mLMZkkMl2Bzfh4IVGtjwkAGHpxCWtgNzpg3OrBejrjY=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=I7HZ2TgZ1ace6kiMrR5twnOoATe10czspEegmtHkm/eH4atyEQk+eq8AvKE5lLsU4 BVeCz/PcBdPUXeB0QVuwIeE5j7iMsfLtcKj8KKeYCvncdMu7iKr2h1Fw4ts8kDwh5h 5emfP+ZpyuJP/ya7DgJKcderbDLtcKaA8ZQeZuOo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E22F5F8042F; Mon, 8 Mar 2021 23:06:18 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0F706F8032C; Mon, 8 Mar 2021 23:06:14 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C97F3F801ED for ; Mon, 8 Mar 2021 23:06:08 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C97F3F801ED Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="hizO1pAQ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615241167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Xd0cfAOXRgCMojRzB8m8hWwaqiVPwUv6bqCEhkbVMI4=; b=hizO1pAQFOi611jmpxZT+waMbtnmqXNWCTOY6j1piamNkG98WEJ5PndQ4tcF7zeydapCO/ PbWNpG8BBDf9wS7YNQh9n10AdcRiOj2eBO99/gTBs08J9SMXwynM0OvPCfUkIWUhqdRq6l 2XiMPti2687kUKAbxjJgUnQ3mzg8vcY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-307-3vbuoNKiMOORtOT1p_nlEQ-1; Mon, 08 Mar 2021 17:06:04 -0500 X-MC-Unique: 3vbuoNKiMOORtOT1p_nlEQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D21BA80432D; Mon, 8 Mar 2021 22:06:02 +0000 (UTC) Received: from x1.localdomain.com (ovpn-114-220.ams2.redhat.com [10.36.114.220]) by smtp.corp.redhat.com (Postfix) with ESMTP id BCFBD5D6D7; Mon, 8 Mar 2021 22:06:01 +0000 (UTC) From: Hans de Goede To: Jaroslav Kysela Subject: [PATCH alsa-ucm-conf v2 4/7] codecs/rt5640: Drop bogus 'DIG MIXL DAC L2 Switch' setting Date: Mon, 8 Mar 2021 23:05:51 +0100 Message-Id: <20210308220554.76111-5-hdegoede@redhat.com> In-Reply-To: <20210308220554.76111-1-hdegoede@redhat.com> References: <20210308220554.76111-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=hdegoede@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: Hans de Goede , alsa-devel@alsa-project.org, Pierre-Louis Bossart , 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" The 'DIG MIXL DAC L2 Switch' path is only used for Digital Mixer Path loopback, which we don't use. Drop it. Signed-off-by: Hans de Goede --- ucm2/codecs/rt5640/EnableSeq.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/ucm2/codecs/rt5640/EnableSeq.conf b/ucm2/codecs/rt5640/EnableSeq.conf index 4a355a5..223cceb 100644 --- a/ucm2/codecs/rt5640/EnableSeq.conf +++ b/ucm2/codecs/rt5640/EnableSeq.conf @@ -27,7 +27,6 @@ EnableSequence [ #cset "name='DAI select' 1" cset "name='DAC2 Playback Switch' on" - cset "name='DIG MIXL DAC L2 Switch' on" # Input Configuration cset "name='Stereo ADC1 Mux' ADC" From patchwork Mon Mar 8 22:05:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 12123477 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=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 BA49EC433E0 for ; Mon, 8 Mar 2021 22:09:27 +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 2DA5B6525A for ; Mon, 8 Mar 2021 22:09:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2DA5B6525A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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 B13301900; Mon, 8 Mar 2021 23:08:35 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B13301900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1615241365; bh=WwAL+TTzSVNa/9uYCybIZbpOA0g9tnerO+XakRdHXH0=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=rJnhsDd0jAPM6Z870M/kO9BNFnQIRV+u4OP+UFFmWpl1CeOBdbQm3IaJQa95NJ5Ur +d8eg+UgcNq0/R+PiXoiHlovGP19JroGCB5r44uvlnP6E7Q0OdsTLV1cV0j23+LYUO kZcM4N97c2Dx76+7MWNxUVxcCZAgLtyrAWUS2K8U= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 81F49F804AD; Mon, 8 Mar 2021 23:06:21 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 01FE0F8032C; Mon, 8 Mar 2021 23:06:16 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5499CF8016C for ; Mon, 8 Mar 2021 23:06:10 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5499CF8016C Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="UmOa9goZ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615241169; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QnWvyjFQqKM9ujEqfBOs1dQnNNhzC5LgHelymMCKBWM=; b=UmOa9goZBPUd3n/x935OCHFTqjFZOl/xaHgztr/07hLiGZsSaJBJKJdVxp225Ywg6rmmAW 5wafqkmssUKWctE7/yVaLVqD797zSoiH3PoFI8g3n0H4f2bhOVzOce++aG5uUwWv7B1Di3 jjZWQFmtuagRXjV8n8cYiDmMMfEjd3Q= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-407-Dms9DB9fOp-lDq31mFo0yw-1; Mon, 08 Mar 2021 17:06:05 -0500 X-MC-Unique: Dms9DB9fOp-lDq31mFo0yw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 34C0D80432E; Mon, 8 Mar 2021 22:06:04 +0000 (UTC) Received: from x1.localdomain.com (ovpn-114-220.ams2.redhat.com [10.36.114.220]) by smtp.corp.redhat.com (Postfix) with ESMTP id 23DD25D6D7; Mon, 8 Mar 2021 22:06:02 +0000 (UTC) From: Hans de Goede To: Jaroslav Kysela Subject: [PATCH alsa-ucm-conf v2 5/7] codecs/rt5640: Unify capture volume for AIF1 and AIF2 recording paths Date: Mon, 8 Mar 2021 23:05:52 +0100 Message-Id: <20210308220554.76111-6-hdegoede@redhat.com> In-Reply-To: <20210308220554.76111-1-hdegoede@redhat.com> References: <20210308220554.76111-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=hdegoede@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: Hans de Goede , alsa-devel@alsa-project.org, Pierre-Louis Bossart , 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" The rt5640 codec is sometimes used with AIF1 connected to the SoC and sometimes with AIF2 connected to the SoC. The rt5640 UCM configuration deals with this by accepting input from and sending output to both AIFs, relying on the kernels DAPM framework to disable parts of the graph which are connected to the unconnected AIF. Before this commit codecs/rt5640/EnableSeq.conf was adding a +9dB (digital) boost to recording going through the 'ADC' path to AIF1, while not touching the 'Mono ADC' path to AIF2. This was causing recordings on devices using AIF2 to be somewhat soft. This commit unifies the record volume control settings for both paths by only using the '[Mono ]ADC Capture Volume' control, which is present in both paths and setting it to +9dB on both paths. Signed-off-by: Hans de Goede --- ucm2/codecs/rt5640/EnableSeq.conf | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ucm2/codecs/rt5640/EnableSeq.conf b/ucm2/codecs/rt5640/EnableSeq.conf index 223cceb..49703ae 100644 --- a/ucm2/codecs/rt5640/EnableSeq.conf +++ b/ucm2/codecs/rt5640/EnableSeq.conf @@ -39,10 +39,14 @@ EnableSequence [ cset "name='Mono ADC R2 Mux' DMIC R1" cset "name='Mono ADC Capture Switch' on" - # 47=0dB, 0.375 dB/step, set it to 6 dB to help with soft mics - cset "name='ADC Capture Volume' 63" - # Set ADC Boost Gain to 3dB higher vals result in too much noise - cset "name='ADC Boost Gain' 1" + # 47=0dB, 0.375 dB/step, set it to 9 dB to help with soft mics + cset "name='ADC Capture Volume' 71" + cset "name='Mono ADC Capture Volume' 71" + + # The second 'Mono ADC' path does not have a 'Boost Gain', + # set this to 0dB so that the volume of the AIF1 and AIF2 paths is equal. + cset "name='ADC Boost Gain' 0" + # Set IN1/IN3 internal mic boost to 8 (max) # Set IN2 headset-mic boost to 1, headset mics are quite loud cset "name='IN1 Boost' 8" From patchwork Mon Mar 8 22:05:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 12123479 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=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 A8804C433E0 for ; Mon, 8 Mar 2021 22:09:37 +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 263F165256 for ; Mon, 8 Mar 2021 22:09:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 263F165256 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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 AB73B18DD; Mon, 8 Mar 2021 23:08:45 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AB73B18DD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1615241375; bh=AoCj2MfxvD/4rvE5UVuBwiQrDDmChsm6kaRt9+H2suI=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=b0GrtniSRM3A9EgVviLfNRYXbUmkEm9rf35XlG7Dj3R8bab7FBRgiAPjdm6KMGv+S XI1wx+H+kvcVKzgHqDv5ey6tgRevTKiQuIlFuUC+Jam1QypRYR3AdD2U+hjCpFpsse vN5qOm4Z0Z1d2s5L3QD7aV8l7DHcOvYhgsv2fomY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 5B0D0F804B1; Mon, 8 Mar 2021 23:06:22 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E0862F802E7; Mon, 8 Mar 2021 23:06:15 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 0BF8FF80139 for ; Mon, 8 Mar 2021 23:06:09 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0BF8FF80139 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="g5BW5Mdg" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615241168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GptrVlL/IvCa/3+g0IoS03y5KFkwAmZrLf7JXRBN3xQ=; b=g5BW5MdgRWhYfgs2f7I6Dz8obMZ/ooL/WQol7FDK/DsBAQ9e4WUvuXDQ7UWGSgyqNAyPuI DWlIs3RAtURTfcY2Ok17CxRG2o/MowJ3nSErXvB0pWrspZPcLBt7QNf7obp1VQWePqJuDT ujgBGU0/HF8Os3ya5v2jW9XRHdgbkKo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-317-NuQ8V8YaOtWCmVerCe8V5g-1; Mon, 08 Mar 2021 17:06:06 -0500 X-MC-Unique: NuQ8V8YaOtWCmVerCe8V5g-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8EBB71018F74; Mon, 8 Mar 2021 22:06:05 +0000 (UTC) Received: from x1.localdomain.com (ovpn-114-220.ams2.redhat.com [10.36.114.220]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7C0B25D6D7; Mon, 8 Mar 2021 22:06:04 +0000 (UTC) From: Hans de Goede To: Jaroslav Kysela Subject: [PATCH alsa-ucm-conf v2 6/7] codecs/rt5640: Add hardware volume-control support Date: Mon, 8 Mar 2021 23:05:53 +0100 Message-Id: <20210308220554.76111-7-hdegoede@redhat.com> In-Reply-To: <20210308220554.76111-1-hdegoede@redhat.com> References: <20210308220554.76111-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=hdegoede@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: Hans de Goede , alsa-devel@alsa-project.org, Pierre-Louis Bossart , 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" Add hardware volume-control support for the rt5640 codec. Note this commit does not add support for the (digital) master ADC/DAC Volume / Mute controls. There are 2 of each, and which one should be used depends on which AIF is being used. Signed-off-by: Hans de Goede --- ucm2/codecs/rt5640/HeadPhones.conf | 2 ++ ucm2/codecs/rt5640/HeadsetMic.conf | 2 ++ ucm2/codecs/rt5640/IN1-InternalMic.conf | 2 ++ ucm2/codecs/rt5640/IN3-InternalMic.conf | 2 ++ ucm2/codecs/rt5640/MonoSpeaker.conf | 2 ++ ucm2/codecs/rt5640/Speaker.conf | 2 ++ 6 files changed, 12 insertions(+) diff --git a/ucm2/codecs/rt5640/HeadPhones.conf b/ucm2/codecs/rt5640/HeadPhones.conf index 1f4316d..5535111 100644 --- a/ucm2/codecs/rt5640/HeadPhones.conf +++ b/ucm2/codecs/rt5640/HeadPhones.conf @@ -35,5 +35,7 @@ SectionDevice."Headphones" { PlaybackPriority 300 PlaybackPCM "hw:${CardId}" JackControl "Headphone Jack" + PlaybackMixerElem "HP" + PlaybackVolume "HP Playback Volume" } } diff --git a/ucm2/codecs/rt5640/HeadsetMic.conf b/ucm2/codecs/rt5640/HeadsetMic.conf index 829e4e6..8479672 100644 --- a/ucm2/codecs/rt5640/HeadsetMic.conf +++ b/ucm2/codecs/rt5640/HeadsetMic.conf @@ -41,5 +41,7 @@ SectionDevice."Headset" { CapturePriority 200 CapturePCM "hw:${CardId}" JackControl "Headset Mic Jack" + CaptureMixerElem "IN2 Boost" + CaptureVolume "IN2 Boost" } } diff --git a/ucm2/codecs/rt5640/IN1-InternalMic.conf b/ucm2/codecs/rt5640/IN1-InternalMic.conf index d7c419e..a317388 100644 --- a/ucm2/codecs/rt5640/IN1-InternalMic.conf +++ b/ucm2/codecs/rt5640/IN1-InternalMic.conf @@ -32,5 +32,7 @@ SectionDevice."Mic" { Value { CapturePriority 100 CapturePCM "hw:${CardId}" + CaptureMixerElem "IN1 Boost" + CaptureVolume "IN1 Boost" } } diff --git a/ucm2/codecs/rt5640/IN3-InternalMic.conf b/ucm2/codecs/rt5640/IN3-InternalMic.conf index 3e330e6..ef4eaba 100644 --- a/ucm2/codecs/rt5640/IN3-InternalMic.conf +++ b/ucm2/codecs/rt5640/IN3-InternalMic.conf @@ -32,5 +32,7 @@ SectionDevice."Mic" { Value { CapturePriority 100 CapturePCM "hw:${CardId}" + CaptureMixerElem "IN3 Boost" + CaptureVolume "IN3 Boost" } } diff --git a/ucm2/codecs/rt5640/MonoSpeaker.conf b/ucm2/codecs/rt5640/MonoSpeaker.conf index 654edc3..3cbeafd 100644 --- a/ucm2/codecs/rt5640/MonoSpeaker.conf +++ b/ucm2/codecs/rt5640/MonoSpeaker.conf @@ -29,5 +29,7 @@ SectionDevice."Speaker" { Value { PlaybackPriority 100 PlaybackPCM "hw:${CardId}" + PlaybackMixerElem "Speaker" + PlaybackVolume "Speaker Playback Volume" } } diff --git a/ucm2/codecs/rt5640/Speaker.conf b/ucm2/codecs/rt5640/Speaker.conf index 3264cc3..0924f9c 100644 --- a/ucm2/codecs/rt5640/Speaker.conf +++ b/ucm2/codecs/rt5640/Speaker.conf @@ -29,5 +29,7 @@ SectionDevice."Speaker" { Value { PlaybackPriority 100 PlaybackPCM "hw:${CardId}" + PlaybackMixerElem "Speaker" + PlaybackVolume "Speaker Playback Volume" } } From patchwork Mon Mar 8 22:05:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 12123481 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=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 3F90FC433E0 for ; Mon, 8 Mar 2021 22:10:11 +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 A98706525F for ; Mon, 8 Mar 2021 22:10:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A98706525F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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 34B8F18EF; Mon, 8 Mar 2021 23:09:19 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 34B8F18EF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1615241409; bh=x4+FgSssDE9BMSixTLrG+yhrTemcwYNtNGLNlESKGNI=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Js/dWKd+Qqy+dmlACkD1yQTSEUcTmSsFWjlWJnbXQubWn/U0BpiXNi1lzkiFAd/an FCVUH/896F+FblnHF7CZzuSSOnOWnMoqX3sBAQib5Ya31REy0c0m8KoEQm2DUFdg9z lFph8iay6+13eL+cqK3HfJGzUdbgemgCJI6c+VIA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 42F66F804B2; Mon, 8 Mar 2021 23:06:23 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A7863F8032C; Mon, 8 Mar 2021 23:06:17 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1D8DCF80217 for ; Mon, 8 Mar 2021 23:06:13 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1D8DCF80217 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Rm+aycLb" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615241172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Z0NdPACqB8ow7xOL5EC/vn8YKbEAliMiY/iewaHXPy4=; b=Rm+aycLbZRiUlIOkcPX2n4wAUXdT1SGrWJrsLQ9WjRgsX9kA+GBE1ihnBYPFkyag4IDmAx i0njPyhlNvvkf11BdFva+uzSWOuzRvym1Qlk5BhnzwaJZRXFyAVMNq6JilD1p3PWny+Ypx YBE/vXhmbZhQ0msxfqnbFSFIRg7rNeU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-427-Qfkis2H3NdyXDHDiKigvuA-1; Mon, 08 Mar 2021 17:06:08 -0500 X-MC-Unique: Qfkis2H3NdyXDHDiKigvuA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 04B631018F64; Mon, 8 Mar 2021 22:06:07 +0000 (UTC) Received: from x1.localdomain.com (ovpn-114-220.ams2.redhat.com [10.36.114.220]) by smtp.corp.redhat.com (Postfix) with ESMTP id D47485D756; Mon, 8 Mar 2021 22:06:05 +0000 (UTC) From: Hans de Goede To: Jaroslav Kysela Subject: [PATCH alsa-ucm-conf v2 7/7] codecs/rt5640: Specify Playback/CaptureMasterElem for HW volume-control Date: Mon, 8 Mar 2021 23:05:54 +0100 Message-Id: <20210308220554.76111-8-hdegoede@redhat.com> In-Reply-To: <20210308220554.76111-1-hdegoede@redhat.com> References: <20210308220554.76111-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=hdegoede@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: Hans de Goede , alsa-devel@alsa-project.org, Pierre-Louis Bossart , 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" Newer kernels add "aif:1" or "aif:2" to the components string to let us know which AIF is being used. Use this to specify the correct Playback/CaptureMasterElem for HW volume-control, based on which AIF is being used. On older kernels, where there is no "aif:%d" string in the components string, no Playback/CaptureMasterElem is specified. In DigitalMics.conf the master mixer is used as regular CaptureMixerElem instead of as CaptureMasterElem since the DMICs don't have any analog volume control. Signed-off-by: Hans de Goede --- ucm2/bytcr-rt5640/HiFi.conf | 21 +++++++++++++++++++++ ucm2/codecs/rt5640/DigitalMics.conf | 16 ++++++++++++++++ ucm2/codecs/rt5640/HeadPhones.conf | 12 ++++++++++++ ucm2/codecs/rt5640/HeadsetMic.conf | 12 ++++++++++++ ucm2/codecs/rt5640/IN1-InternalMic.conf | 12 ++++++++++++ ucm2/codecs/rt5640/IN3-InternalMic.conf | 12 ++++++++++++ ucm2/codecs/rt5640/MonoSpeaker.conf | 12 ++++++++++++ ucm2/codecs/rt5640/Speaker.conf | 12 ++++++++++++ 8 files changed, 109 insertions(+) diff --git a/ucm2/bytcr-rt5640/HiFi.conf b/ucm2/bytcr-rt5640/HiFi.conf index a5c05ba..7d504d1 100644 --- a/ucm2/bytcr-rt5640/HiFi.conf +++ b/ucm2/bytcr-rt5640/HiFi.conf @@ -1,5 +1,26 @@ # Use case Configuration for bytcr-rt5640 +Define.HaveAif1 "" +Define.HaveAif2 "" + +If.DefineAif1 { + Condition { + Type String + Haystack "${CardComponents}" + Needle "aif:1" + } + True.Define.HaveAif1 "yes" +} + +If.DefineAif2 { + Condition { + Type String + Haystack "${CardComponents}" + Needle "aif:2" + } + True.Define.HaveAif2 "yes" +} + SectionVerb { Include.e.File "/codecs/rt5640/EnableSeq.conf" diff --git a/ucm2/codecs/rt5640/DigitalMics.conf b/ucm2/codecs/rt5640/DigitalMics.conf index 157c544..032d954 100644 --- a/ucm2/codecs/rt5640/DigitalMics.conf +++ b/ucm2/codecs/rt5640/DigitalMics.conf @@ -26,5 +26,21 @@ SectionDevice."Mic" { Value { CapturePriority 100 CapturePCM "hw:${CardId}" + If.DmicAif1 { + Condition { Type String Empty "${var:HaveAif1}" } + False { + CaptureMixerElem "ADC" + CaptureVolume "ADC Capture Volume" + CaptureSwitch "ADC Capture Switch" + } + } + If.DmicAif2 { + Condition { Type String Empty "${var:HaveAif2}" } + False { + CaptureMixerElem "Mono ADC" + CaptureVolume "Mono ADC Capture Volume" + CaptureSwitch "Mono ADC Capture Switch" + } + } } } diff --git a/ucm2/codecs/rt5640/HeadPhones.conf b/ucm2/codecs/rt5640/HeadPhones.conf index 5535111..4fbe95d 100644 --- a/ucm2/codecs/rt5640/HeadPhones.conf +++ b/ucm2/codecs/rt5640/HeadPhones.conf @@ -37,5 +37,17 @@ SectionDevice."Headphones" { JackControl "Headphone Jack" PlaybackMixerElem "HP" PlaybackVolume "HP Playback Volume" + If.HpAif1 { + Condition { Type String Empty "${var:HaveAif1}" } + False { + PlaybackMasterElem "DAC1" + } + } + If.HpAif2 { + Condition { Type String Empty "${var:HaveAif2}" } + False { + PlaybackMasterElem "DAC2" + } + } } } diff --git a/ucm2/codecs/rt5640/HeadsetMic.conf b/ucm2/codecs/rt5640/HeadsetMic.conf index 8479672..b49dad4 100644 --- a/ucm2/codecs/rt5640/HeadsetMic.conf +++ b/ucm2/codecs/rt5640/HeadsetMic.conf @@ -43,5 +43,17 @@ SectionDevice."Headset" { JackControl "Headset Mic Jack" CaptureMixerElem "IN2 Boost" CaptureVolume "IN2 Boost" + If.HSmicAif1 { + Condition { Type String Empty "${var:HaveAif1}" } + False { + CaptureMasterElem "ADC" + } + } + If.HSmicAif2 { + Condition { Type String Empty "${var:HaveAif2}" } + False { + CaptureMasterElem "Mono ADC" + } + } } } diff --git a/ucm2/codecs/rt5640/IN1-InternalMic.conf b/ucm2/codecs/rt5640/IN1-InternalMic.conf index a317388..d670484 100644 --- a/ucm2/codecs/rt5640/IN1-InternalMic.conf +++ b/ucm2/codecs/rt5640/IN1-InternalMic.conf @@ -34,5 +34,17 @@ SectionDevice."Mic" { CapturePCM "hw:${CardId}" CaptureMixerElem "IN1 Boost" CaptureVolume "IN1 Boost" + If.In1Aif1 { + Condition { Type String Empty "${var:HaveAif1}" } + False { + CaptureMasterElem "ADC" + } + } + If.In1Aif2 { + Condition { Type String Empty "${var:HaveAif2}" } + False { + CaptureMasterElem "Mono ADC" + } + } } } diff --git a/ucm2/codecs/rt5640/IN3-InternalMic.conf b/ucm2/codecs/rt5640/IN3-InternalMic.conf index ef4eaba..345db1e 100644 --- a/ucm2/codecs/rt5640/IN3-InternalMic.conf +++ b/ucm2/codecs/rt5640/IN3-InternalMic.conf @@ -34,5 +34,17 @@ SectionDevice."Mic" { CapturePCM "hw:${CardId}" CaptureMixerElem "IN3 Boost" CaptureVolume "IN3 Boost" + If.In3Aif1 { + Condition { Type String Empty "${var:HaveAif1}" } + False { + CaptureMasterElem "ADC" + } + } + If.In3Aif2 { + Condition { Type String Empty "${var:HaveAif2}" } + False { + CaptureMasterElem "Mono ADC" + } + } } } diff --git a/ucm2/codecs/rt5640/MonoSpeaker.conf b/ucm2/codecs/rt5640/MonoSpeaker.conf index 3cbeafd..addaddd 100644 --- a/ucm2/codecs/rt5640/MonoSpeaker.conf +++ b/ucm2/codecs/rt5640/MonoSpeaker.conf @@ -31,5 +31,17 @@ SectionDevice."Speaker" { PlaybackPCM "hw:${CardId}" PlaybackMixerElem "Speaker" PlaybackVolume "Speaker Playback Volume" + If.MonoSpkAif1 { + Condition { Type String Empty "${var:HaveAif1}" } + False { + PlaybackMasterElem "DAC1" + } + } + If.MonoSpkAif2 { + Condition { Type String Empty "${var:HaveAif2}" } + False { + PlaybackMasterElem "DAC2" + } + } } } diff --git a/ucm2/codecs/rt5640/Speaker.conf b/ucm2/codecs/rt5640/Speaker.conf index 0924f9c..e7ff673 100644 --- a/ucm2/codecs/rt5640/Speaker.conf +++ b/ucm2/codecs/rt5640/Speaker.conf @@ -31,5 +31,17 @@ SectionDevice."Speaker" { PlaybackPCM "hw:${CardId}" PlaybackMixerElem "Speaker" PlaybackVolume "Speaker Playback Volume" + If.SpkAif1 { + Condition { Type String Empty "${var:HaveAif1}" } + False { + PlaybackMasterElem "DAC1" + } + } + If.SpkAif2 { + Condition { Type String Empty "${var:HaveAif2}" } + False { + PlaybackMasterElem "DAC2" + } + } } }