From patchwork Mon Dec 24 15:05:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 10742313 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4D52091E for ; Mon, 24 Dec 2018 15:23:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 390BA28B78 for ; Mon, 24 Dec 2018 15:23:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2A2A728B7D; Mon, 24 Dec 2018 15:23:03 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE 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 5A38028B78 for ; Mon, 24 Dec 2018 15:23:02 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 9989A267AD4; Mon, 24 Dec 2018 16:05:12 +0100 (CET) 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 14D77267AD4; Mon, 24 Dec 2018 16:05:10 +0100 (CET) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by alsa0.perex.cz (Postfix) with ESMTP id E097C267A65 for ; Mon, 24 Dec 2018 16:05:07 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9D7432D7E0; Mon, 24 Dec 2018 15:05:06 +0000 (UTC) Received: from shalem.localdomain.com (ovpn-116-95.ams2.redhat.com [10.36.116.95]) by smtp.corp.redhat.com (Postfix) with ESMTP id A2BC4101962E; Mon, 24 Dec 2018 15:05:04 +0000 (UTC) From: Hans de Goede To: alsa-devel@alsa-project.org Date: Mon, 24 Dec 2018 16:05:01 +0100 Message-Id: <20181224150504.20845-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 24 Dec 2018 15:05:06 +0000 (UTC) Cc: Takashi Iwai , Hans de Goede , Pierre-Louis Bossart Subject: [alsa-devel] [PATCH 1/4] conf/ucm: bytcr-rt5651: Enable Stereo? ADC MIXL ADC? switches when enabling inputs 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 Explicitly enable the right 'Stereo? ADC MIXL ADC?' when selecting an input, rather then just enabling them all in ucm/codecs/rt5651/EnableSeq.conf . This is a preparation patch for adding digital mic support. Signed-off-by: Hans de Goede --- src/conf/ucm/codecs/rt5651/EnableSeq.conf | 16 ++++++++-------- src/conf/ucm/codecs/rt5651/IN1-InternalMic.conf | 4 ++++ src/conf/ucm/codecs/rt5651/IN12-InternalMic.conf | 4 ++++ src/conf/ucm/codecs/rt5651/IN2-InternalMic.conf | 4 ++++ src/conf/ucm/codecs/rt5651/IN3-HeadsetMic.conf | 4 ++++ 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/src/conf/ucm/codecs/rt5651/EnableSeq.conf b/src/conf/ucm/codecs/rt5651/EnableSeq.conf index 6fb3c1f2..db2fd328 100644 --- a/src/conf/ucm/codecs/rt5651/EnableSeq.conf +++ b/src/conf/ucm/codecs/rt5651/EnableSeq.conf @@ -14,12 +14,14 @@ cset "name='Stereo DAC MIXL DAC L1 Switch' on" cset "name='Stereo DAC MIXL DAC R1 Switch' off" cset "name='Stereo DAC MIXR DAC L1 Switch' off" cset "name='Stereo DAC MIXR DAC R1 Switch' on" -cset "name='Stereo1 ADC MIXR ADC1 Switch' on" -cset "name='Stereo1 ADC MIXR ADC2 Switch' on" -cset "name='Stereo2 ADC MIXL ADC1 Switch' on" -cset "name='Stereo2 ADC MIXL ADC2 Switch' on" -cset "name='Stereo2 ADC MIXR ADC1 Switch' on" -cset "name='Stereo2 ADC MIXR ADC2 Switch' on" +cset "name='Stereo1 ADC MIXL ADC1 Switch' off" +cset "name='Stereo1 ADC MIXR ADC1 Switch' off" +cset "name='Stereo1 ADC MIXL ADC2 Switch' off" +cset "name='Stereo1 ADC MIXR ADC2 Switch' off" +cset "name='Stereo2 ADC MIXL ADC1 Switch' off" +cset "name='Stereo2 ADC MIXR ADC1 Switch' off" +cset "name='Stereo2 ADC MIXL ADC2 Switch' off" +cset "name='Stereo2 ADC MIXR ADC2 Switch' off" cset "name='Headphone Switch' off" cset "name='Speaker Switch' off" @@ -41,8 +43,6 @@ cset "name='IN3 Boost' 1" # input cset "name='Stereo1 ADC L1 Mux' ADC" cset "name='Stereo1 ADC R1 Mux' ADC" -cset "name='Stereo1 ADC MIXL ADC1 Switch' on" -cset "name='Stereo1 ADC MIXR ADC1 Switch' on" cset "name='RECMIXL BST1 Switch' off" cset "name='RECMIXR BST1 Switch' off" cset "name='RECMIXL BST3 Switch' off" diff --git a/src/conf/ucm/codecs/rt5651/IN1-InternalMic.conf b/src/conf/ucm/codecs/rt5651/IN1-InternalMic.conf index 85e25a5c..b2ce17b6 100644 --- a/src/conf/ucm/codecs/rt5651/IN1-InternalMic.conf +++ b/src/conf/ucm/codecs/rt5651/IN1-InternalMic.conf @@ -12,10 +12,14 @@ SectionDevice."InternalMic-IN1" { cset "name='Internal Mic Switch' on" cset "name='RECMIXL BST1 Switch' on" cset "name='RECMIXR BST1 Switch' on" + cset "name='Stereo1 ADC MIXL ADC1 Switch' on" + cset "name='Stereo1 ADC MIXR ADC1 Switch' on" ] DisableSequence [ cdev "hw:bytcrrt5651" + cset "name='Stereo1 ADC MIXL ADC1 Switch' off" + cset "name='Stereo1 ADC MIXR ADC1 Switch' off" cset "name='Internal Mic Switch' off" cset "name='RECMIXL BST1 Switch' off" cset "name='RECMIXR BST1 Switch' off" diff --git a/src/conf/ucm/codecs/rt5651/IN12-InternalMic.conf b/src/conf/ucm/codecs/rt5651/IN12-InternalMic.conf index f1cc17fe..e8041912 100644 --- a/src/conf/ucm/codecs/rt5651/IN12-InternalMic.conf +++ b/src/conf/ucm/codecs/rt5651/IN12-InternalMic.conf @@ -14,10 +14,14 @@ SectionDevice."InternalMic-IN12" { cset "name='RECMIXR BST1 Switch' on" cset "name='RECMIXL BST2 Switch' on" cset "name='RECMIXR BST2 Switch' on" + cset "name='Stereo1 ADC MIXL ADC1 Switch' on" + cset "name='Stereo1 ADC MIXR ADC1 Switch' on" ] DisableSequence [ cdev "hw:bytcrrt5651" + cset "name='Stereo1 ADC MIXL ADC1 Switch' off" + cset "name='Stereo1 ADC MIXR ADC1 Switch' off" cset "name='Internal Mic Switch' off" cset "name='RECMIXL BST1 Switch' off" cset "name='RECMIXR BST1 Switch' off" diff --git a/src/conf/ucm/codecs/rt5651/IN2-InternalMic.conf b/src/conf/ucm/codecs/rt5651/IN2-InternalMic.conf index 18f74e1a..048fcc95 100644 --- a/src/conf/ucm/codecs/rt5651/IN2-InternalMic.conf +++ b/src/conf/ucm/codecs/rt5651/IN2-InternalMic.conf @@ -12,10 +12,14 @@ SectionDevice."InternalMic-IN2" { cset "name='Internal Mic Switch' on" cset "name='RECMIXL BST2 Switch' on" cset "name='RECMIXR BST2 Switch' on" + cset "name='Stereo1 ADC MIXL ADC1 Switch' on" + cset "name='Stereo1 ADC MIXR ADC1 Switch' on" ] DisableSequence [ cdev "hw:bytcrrt5651" + cset "name='Stereo1 ADC MIXL ADC1 Switch' off" + cset "name='Stereo1 ADC MIXR ADC1 Switch' off" cset "name='Internal Mic Switch' off" cset "name='RECMIXL BST2 Switch' off" cset "name='RECMIXR BST2 Switch' off" diff --git a/src/conf/ucm/codecs/rt5651/IN3-HeadsetMic.conf b/src/conf/ucm/codecs/rt5651/IN3-HeadsetMic.conf index bfd0b009..712d14bb 100644 --- a/src/conf/ucm/codecs/rt5651/IN3-HeadsetMic.conf +++ b/src/conf/ucm/codecs/rt5651/IN3-HeadsetMic.conf @@ -12,10 +12,14 @@ SectionDevice."HeadsetMic-IN3" { cset "name='Headset Mic Switch' on" cset "name='RECMIXL BST3 Switch' on" cset "name='RECMIXR BST3 Switch' on" + cset "name='Stereo1 ADC MIXL ADC1 Switch' on" + cset "name='Stereo1 ADC MIXR ADC1 Switch' on" ] DisableSequence [ cdev "hw:bytcrrt5651" + cset "name='Stereo1 ADC MIXL ADC1 Switch' off" + cset "name='Stereo1 ADC MIXR ADC1 Switch' off" cset "name='Headset Mic Switch' off" cset "name='RECMIXL BST3 Switch' off" cset "name='RECMIXR BST3 Switch' off" From patchwork Mon Dec 24 15:05:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 10742317 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1180E6C5 for ; Mon, 24 Dec 2018 15:23:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F329A28B78 for ; Mon, 24 Dec 2018 15:23:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E747328B7A; Mon, 24 Dec 2018 15:23:04 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE 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 78BC928B7B for ; Mon, 24 Dec 2018 15:23:02 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 24750267AF4; Mon, 24 Dec 2018 16:05:14 +0100 (CET) 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 4703E267AED; Mon, 24 Dec 2018 16:05:12 +0100 (CET) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by alsa0.perex.cz (Postfix) with ESMTP id 70A5F267A65 for ; Mon, 24 Dec 2018 16:05:09 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E059D58E51; Mon, 24 Dec 2018 15:05:07 +0000 (UTC) Received: from shalem.localdomain.com (ovpn-116-95.ams2.redhat.com [10.36.116.95]) by smtp.corp.redhat.com (Postfix) with ESMTP id E0788100190E; Mon, 24 Dec 2018 15:05:06 +0000 (UTC) From: Hans de Goede To: alsa-devel@alsa-project.org Date: Mon, 24 Dec 2018 16:05:02 +0100 Message-Id: <20181224150504.20845-2-hdegoede@redhat.com> In-Reply-To: <20181224150504.20845-1-hdegoede@redhat.com> References: <20181224150504.20845-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 24 Dec 2018 15:05:08 +0000 (UTC) Cc: Takashi Iwai , Hans de Goede , Pierre-Louis Bossart Subject: [alsa-devel] [PATCH 2/4] conf/ucm: bytcr-rt5651: Add support for a headset-mic on IN2 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 The first design with the headset-mic on IN2 rather then the default / reference-design IN3 has shown up. Add a new ucm/codecs/rt5651/IN2-HeadsetMic.conf snippet to deal with this and include this in the default non board-specific bytcr-rt5651.conf. Signed-off-by: Hans de Goede --- src/conf/ucm/bytcr-rt5651/HiFi.conf | 1 + src/conf/ucm/codecs/rt5651/IN1-InternalMic.conf | 1 + src/conf/ucm/codecs/rt5651/IN12-InternalMic.conf | 1 + .../{IN2-InternalMic.conf => IN2-HeadsetMic.conf} | 10 ++++++---- src/conf/ucm/codecs/rt5651/IN2-InternalMic.conf | 1 + src/conf/ucm/codecs/rt5651/IN3-HeadsetMic.conf | 3 ++- src/conf/ucm/codecs/rt5651/Makefile.am | 2 +- 7 files changed, 13 insertions(+), 6 deletions(-) copy src/conf/ucm/codecs/rt5651/{IN2-InternalMic.conf => IN2-HeadsetMic.conf} (73%) diff --git a/src/conf/ucm/bytcr-rt5651/HiFi.conf b/src/conf/ucm/bytcr-rt5651/HiFi.conf index fddd8a3c..37bb1d40 100644 --- a/src/conf/ucm/bytcr-rt5651/HiFi.conf +++ b/src/conf/ucm/bytcr-rt5651/HiFi.conf @@ -26,4 +26,5 @@ SectionVerb { + diff --git a/src/conf/ucm/codecs/rt5651/IN1-InternalMic.conf b/src/conf/ucm/codecs/rt5651/IN1-InternalMic.conf index b2ce17b6..5092809f 100644 --- a/src/conf/ucm/codecs/rt5651/IN1-InternalMic.conf +++ b/src/conf/ucm/codecs/rt5651/IN1-InternalMic.conf @@ -4,6 +4,7 @@ SectionDevice."InternalMic-IN1" { ConflictingDevice [ "InternalMic-IN2" "InternalMic-IN12" + "HeadsetMic-IN2" "HeadsetMic-IN3" ] diff --git a/src/conf/ucm/codecs/rt5651/IN12-InternalMic.conf b/src/conf/ucm/codecs/rt5651/IN12-InternalMic.conf index e8041912..c917e85e 100644 --- a/src/conf/ucm/codecs/rt5651/IN12-InternalMic.conf +++ b/src/conf/ucm/codecs/rt5651/IN12-InternalMic.conf @@ -4,6 +4,7 @@ SectionDevice."InternalMic-IN12" { ConflictingDevice [ "InternalMic-IN1" "InternalMic-IN2" + "HeadsetMic-IN2" "HeadsetMic-IN3" ] diff --git a/src/conf/ucm/codecs/rt5651/IN2-InternalMic.conf b/src/conf/ucm/codecs/rt5651/IN2-HeadsetMic.conf similarity index 73% copy from src/conf/ucm/codecs/rt5651/IN2-InternalMic.conf copy to src/conf/ucm/codecs/rt5651/IN2-HeadsetMic.conf index 048fcc95..b6dc0814 100644 --- a/src/conf/ucm/codecs/rt5651/IN2-InternalMic.conf +++ b/src/conf/ucm/codecs/rt5651/IN2-HeadsetMic.conf @@ -1,15 +1,16 @@ -SectionDevice."InternalMic-IN2" { - Comment "Internal Microphone on IN2" +SectionDevice."HeadsetMic-IN2" { + Comment "Headset Microphone on IN2" ConflictingDevice [ "InternalMic-IN1" + "InternalMic-IN2" "InternalMic-IN12" "HeadsetMic-IN3" ] EnableSequence [ cdev "hw:bytcrrt5651" - cset "name='Internal Mic Switch' on" + cset "name='Headset Mic Switch' on" cset "name='RECMIXL BST2 Switch' on" cset "name='RECMIXR BST2 Switch' on" cset "name='Stereo1 ADC MIXL ADC1 Switch' on" @@ -20,12 +21,13 @@ SectionDevice."InternalMic-IN2" { cdev "hw:bytcrrt5651" cset "name='Stereo1 ADC MIXL ADC1 Switch' off" cset "name='Stereo1 ADC MIXR ADC1 Switch' off" - cset "name='Internal Mic Switch' off" + cset "name='Headset Mic Switch' off" cset "name='RECMIXL BST2 Switch' off" cset "name='RECMIXR BST2 Switch' off" ] Value { CaptureChannels "2" + JackControl "Headset Mic Jack" } } diff --git a/src/conf/ucm/codecs/rt5651/IN2-InternalMic.conf b/src/conf/ucm/codecs/rt5651/IN2-InternalMic.conf index 048fcc95..bbb713c0 100644 --- a/src/conf/ucm/codecs/rt5651/IN2-InternalMic.conf +++ b/src/conf/ucm/codecs/rt5651/IN2-InternalMic.conf @@ -4,6 +4,7 @@ SectionDevice."InternalMic-IN2" { ConflictingDevice [ "InternalMic-IN1" "InternalMic-IN12" + "HeadsetMic-IN2" "HeadsetMic-IN3" ] diff --git a/src/conf/ucm/codecs/rt5651/IN3-HeadsetMic.conf b/src/conf/ucm/codecs/rt5651/IN3-HeadsetMic.conf index 712d14bb..48f3e463 100644 --- a/src/conf/ucm/codecs/rt5651/IN3-HeadsetMic.conf +++ b/src/conf/ucm/codecs/rt5651/IN3-HeadsetMic.conf @@ -1,10 +1,11 @@ SectionDevice."HeadsetMic-IN3" { - Comment "Headset Microphone" + Comment "Headset Microphone on IN3" ConflictingDevice [ "InternalMic-IN1" "InternalMic-IN2" "InternalMic-IN12" + "HeadsetMic-IN2" ] EnableSequence [ diff --git a/src/conf/ucm/codecs/rt5651/Makefile.am b/src/conf/ucm/codecs/rt5651/Makefile.am index a68bd7bb..889b4fd4 100644 --- a/src/conf/ucm/codecs/rt5651/Makefile.am +++ b/src/conf/ucm/codecs/rt5651/Makefile.am @@ -2,5 +2,5 @@ alsaconfigdir = @ALSA_CONFIG_DIR@ ucmdir = $(alsaconfigdir)/ucm/codecs/rt5651 ucm_DATA = EnableSeq.conf HeadPhones.conf HeadPhones-swapped.conf \ IN1-InternalMic.conf IN2-InternalMic.conf IN12-InternalMic.conf \ - IN3-HeadsetMic.conf Speaker.conf MonoSpeaker.conf + IN2-HeadsetMic.conf IN3-HeadsetMic.conf Speaker.conf MonoSpeaker.conf EXTRA_DIST = $(ucm_DATA) From patchwork Mon Dec 24 15:05:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 10742315 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B8CCD6C5 for ; Mon, 24 Dec 2018 15:23:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A785628B78 for ; Mon, 24 Dec 2018 15:23:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9BCB828B7D; Mon, 24 Dec 2018 15:23:03 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE 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 7504A28B7A for ; Mon, 24 Dec 2018 15:23:02 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id D5A04267A65; Mon, 24 Dec 2018 16:05:15 +0100 (CET) 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 490C4267A65; Mon, 24 Dec 2018 16:05:12 +0100 (CET) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by alsa0.perex.cz (Postfix) with ESMTP id CBA48267ABE for ; Mon, 24 Dec 2018 16:05:09 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1A0A7CAA8C; Mon, 24 Dec 2018 15:05:09 +0000 (UTC) Received: from shalem.localdomain.com (ovpn-116-95.ams2.redhat.com [10.36.116.95]) by smtp.corp.redhat.com (Postfix) with ESMTP id 24C3A101962E; Mon, 24 Dec 2018 15:05:07 +0000 (UTC) From: Hans de Goede To: alsa-devel@alsa-project.org Date: Mon, 24 Dec 2018 16:05:03 +0100 Message-Id: <20181224150504.20845-3-hdegoede@redhat.com> In-Reply-To: <20181224150504.20845-1-hdegoede@redhat.com> References: <20181224150504.20845-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 24 Dec 2018 15:05:09 +0000 (UTC) Cc: Takashi Iwai , Hans de Goede , Pierre-Louis Bossart Subject: [alsa-devel] [PATCH 3/4] conf/ucm: bytcr-rt5651: Add digital mic support 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 Add a new ucm/codecs/rt5651/DigitalMic.conf snippet for digital mic support and include this in the default non board-specific bytcr-rt5651.conf. Signed-off-by: Hans de Goede --- src/conf/ucm/bytcr-rt5651/HiFi.conf | 1 + src/conf/ucm/codecs/rt5651/DigitalMic.conf | 29 +++++++++++++++++++ src/conf/ucm/codecs/rt5651/EnableSeq.conf | 2 ++ .../ucm/codecs/rt5651/IN1-InternalMic.conf | 1 + .../ucm/codecs/rt5651/IN12-InternalMic.conf | 1 + .../ucm/codecs/rt5651/IN2-HeadsetMic.conf | 1 + .../ucm/codecs/rt5651/IN2-InternalMic.conf | 1 + .../ucm/codecs/rt5651/IN3-HeadsetMic.conf | 1 + src/conf/ucm/codecs/rt5651/Makefile.am | 3 +- 9 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 src/conf/ucm/codecs/rt5651/DigitalMic.conf diff --git a/src/conf/ucm/bytcr-rt5651/HiFi.conf b/src/conf/ucm/bytcr-rt5651/HiFi.conf index 37bb1d40..8fcc5a8c 100644 --- a/src/conf/ucm/bytcr-rt5651/HiFi.conf +++ b/src/conf/ucm/bytcr-rt5651/HiFi.conf @@ -23,6 +23,7 @@ SectionVerb { + diff --git a/src/conf/ucm/codecs/rt5651/DigitalMic.conf b/src/conf/ucm/codecs/rt5651/DigitalMic.conf new file mode 100644 index 00000000..63ffa9d5 --- /dev/null +++ b/src/conf/ucm/codecs/rt5651/DigitalMic.conf @@ -0,0 +1,29 @@ +SectionDevice."DigitalMic" { + Comment "Internal Digital Microphone" + + ConflictingDevice [ + "InternalMic-IN1" + "InternalMic-IN2" + "InternalMic-IN12" + "HeadsetMic-IN2" + "HeadsetMic-IN3" + ] + + EnableSequence [ + cdev "hw:bytcrrt5651" + cset "name='Stereo1 ADC MIXL ADC2 Switch' on" + cset "name='Stereo1 ADC MIXR ADC2 Switch' on" + cset "name='Internal Mic Switch' on" + ] + + DisableSequence [ + cdev "hw:bytcrrt5651" + cset "name='Stereo1 ADC MIXL ADC2 Switch' off" + cset "name='Stereo1 ADC MIXR ADC2 Switch' off" + cset "name='Internal Mic Switch' off" + ] + + Value { + CaptureChannels 2 + } +} diff --git a/src/conf/ucm/codecs/rt5651/EnableSeq.conf b/src/conf/ucm/codecs/rt5651/EnableSeq.conf index db2fd328..9c1386fa 100644 --- a/src/conf/ucm/codecs/rt5651/EnableSeq.conf +++ b/src/conf/ucm/codecs/rt5651/EnableSeq.conf @@ -43,6 +43,8 @@ cset "name='IN3 Boost' 1" # input cset "name='Stereo1 ADC L1 Mux' ADC" cset "name='Stereo1 ADC R1 Mux' ADC" +cset "name='Stereo1 ADC L2 Mux' DMIC" +cset "name='Stereo1 ADC R2 Mux' DMIC" cset "name='RECMIXL BST1 Switch' off" cset "name='RECMIXR BST1 Switch' off" cset "name='RECMIXL BST3 Switch' off" diff --git a/src/conf/ucm/codecs/rt5651/IN1-InternalMic.conf b/src/conf/ucm/codecs/rt5651/IN1-InternalMic.conf index 5092809f..12ab5cbc 100644 --- a/src/conf/ucm/codecs/rt5651/IN1-InternalMic.conf +++ b/src/conf/ucm/codecs/rt5651/IN1-InternalMic.conf @@ -2,6 +2,7 @@ SectionDevice."InternalMic-IN1" { Comment "Internal Microphone on IN1" ConflictingDevice [ + "DigitalMic" "InternalMic-IN2" "InternalMic-IN12" "HeadsetMic-IN2" diff --git a/src/conf/ucm/codecs/rt5651/IN12-InternalMic.conf b/src/conf/ucm/codecs/rt5651/IN12-InternalMic.conf index c917e85e..c4290b75 100644 --- a/src/conf/ucm/codecs/rt5651/IN12-InternalMic.conf +++ b/src/conf/ucm/codecs/rt5651/IN12-InternalMic.conf @@ -2,6 +2,7 @@ SectionDevice."InternalMic-IN12" { Comment "Internal Microphones on IN1 and IN2" ConflictingDevice [ + "DigitalMic" "InternalMic-IN1" "InternalMic-IN2" "HeadsetMic-IN2" diff --git a/src/conf/ucm/codecs/rt5651/IN2-HeadsetMic.conf b/src/conf/ucm/codecs/rt5651/IN2-HeadsetMic.conf index b6dc0814..8759c274 100644 --- a/src/conf/ucm/codecs/rt5651/IN2-HeadsetMic.conf +++ b/src/conf/ucm/codecs/rt5651/IN2-HeadsetMic.conf @@ -2,6 +2,7 @@ SectionDevice."HeadsetMic-IN2" { Comment "Headset Microphone on IN2" ConflictingDevice [ + "DigitalMic" "InternalMic-IN1" "InternalMic-IN2" "InternalMic-IN12" diff --git a/src/conf/ucm/codecs/rt5651/IN2-InternalMic.conf b/src/conf/ucm/codecs/rt5651/IN2-InternalMic.conf index bbb713c0..c9c11c28 100644 --- a/src/conf/ucm/codecs/rt5651/IN2-InternalMic.conf +++ b/src/conf/ucm/codecs/rt5651/IN2-InternalMic.conf @@ -2,6 +2,7 @@ SectionDevice."InternalMic-IN2" { Comment "Internal Microphone on IN2" ConflictingDevice [ + "DigitalMic" "InternalMic-IN1" "InternalMic-IN12" "HeadsetMic-IN2" diff --git a/src/conf/ucm/codecs/rt5651/IN3-HeadsetMic.conf b/src/conf/ucm/codecs/rt5651/IN3-HeadsetMic.conf index 48f3e463..66af6b9b 100644 --- a/src/conf/ucm/codecs/rt5651/IN3-HeadsetMic.conf +++ b/src/conf/ucm/codecs/rt5651/IN3-HeadsetMic.conf @@ -2,6 +2,7 @@ SectionDevice."HeadsetMic-IN3" { Comment "Headset Microphone on IN3" ConflictingDevice [ + "DigitalMic" "InternalMic-IN1" "InternalMic-IN2" "InternalMic-IN12" diff --git a/src/conf/ucm/codecs/rt5651/Makefile.am b/src/conf/ucm/codecs/rt5651/Makefile.am index 889b4fd4..29b68437 100644 --- a/src/conf/ucm/codecs/rt5651/Makefile.am +++ b/src/conf/ucm/codecs/rt5651/Makefile.am @@ -1,6 +1,7 @@ alsaconfigdir = @ALSA_CONFIG_DIR@ ucmdir = $(alsaconfigdir)/ucm/codecs/rt5651 -ucm_DATA = EnableSeq.conf HeadPhones.conf HeadPhones-swapped.conf \ +ucm_DATA = DigitalMic.conf EnableSeq.conf \ + HeadPhones.conf HeadPhones-swapped.conf \ IN1-InternalMic.conf IN2-InternalMic.conf IN12-InternalMic.conf \ IN2-HeadsetMic.conf IN3-HeadsetMic.conf Speaker.conf MonoSpeaker.conf EXTRA_DIST = $(ucm_DATA) From patchwork Mon Dec 24 15:05:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 10742319 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 647D514E2 for ; Mon, 24 Dec 2018 15:23:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5349028B78 for ; Mon, 24 Dec 2018 15:23:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 47B1328B7A; Mon, 24 Dec 2018 15:23:05 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE 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 5AD3D28B79 for ; Mon, 24 Dec 2018 15:23:02 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 51EDB267AF3; Mon, 24 Dec 2018 16:05:18 +0100 (CET) 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 C73DB267B02; Mon, 24 Dec 2018 16:05:15 +0100 (CET) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by alsa0.perex.cz (Postfix) with ESMTP id 6273C267ABE for ; Mon, 24 Dec 2018 16:05:11 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 52B1D8046C; Mon, 24 Dec 2018 15:05:10 +0000 (UTC) Received: from shalem.localdomain.com (ovpn-116-95.ams2.redhat.com [10.36.116.95]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5D433100190E; Mon, 24 Dec 2018 15:05:09 +0000 (UTC) From: Hans de Goede To: alsa-devel@alsa-project.org Date: Mon, 24 Dec 2018 16:05:04 +0100 Message-Id: <20181224150504.20845-4-hdegoede@redhat.com> In-Reply-To: <20181224150504.20845-1-hdegoede@redhat.com> References: <20181224150504.20845-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 24 Dec 2018 15:05:10 +0000 (UTC) Cc: Takashi Iwai , Hans de Goede , Pierre-Louis Bossart Subject: [alsa-devel] [PATCH 4/4] conf/ucm: bytcr-rt5651: Add bytcr-rt5651-stereo-spk-dmic-mic config 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 Add a config for boards which use a digital mic as internal mic, combined with having the headset mic on in2. An example of such a board is the Point of View TAB-P1006W-232 (v1.0) tablet. Signed-off-by: Hans de Goede --- configure.ac | 1 + src/conf/ucm/Makefile.am | 1 + .../HiFi.conf | 26 +++++++++++++++++++ .../Makefile.am | 4 +++ .../bytcr-rt5651-stereo-spk-dmic-mic.conf | 10 +++++++ 5 files changed, 42 insertions(+) create mode 100644 src/conf/ucm/bytcr-rt5651-stereo-spk-dmic-mic/HiFi.conf create mode 100644 src/conf/ucm/bytcr-rt5651-stereo-spk-dmic-mic/Makefile.am create mode 100644 src/conf/ucm/bytcr-rt5651-stereo-spk-dmic-mic/bytcr-rt5651-stereo-spk-dmic-mic.conf diff --git a/configure.ac b/configure.ac index d0cab2d6..5d7a5b3c 100644 --- a/configure.ac +++ b/configure.ac @@ -731,6 +731,7 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \ src/conf/ucm/bytcr-rt5651-mono-spk-in1-mic/Makefile \ src/conf/ucm/bytcr-rt5651-mono-spk-in2-mic/Makefile \ src/conf/ucm/bytcr-rt5651-mono-spk-in2-mic-hp-swapped/Makefile \ + src/conf/ucm/bytcr-rt5651-stereo-spk-dmic-mic/Makefile \ src/conf/ucm/bytcr-rt5651-stereo-spk-in1-mic/Makefile \ src/conf/ucm/bytcr-rt5651-stereo-spk-in2-mic/Makefile \ src/conf/ucm/bytcr-rt5651-stereo-spk-in12-mic/Makefile \ diff --git a/src/conf/ucm/Makefile.am b/src/conf/ucm/Makefile.am index 85c15090..00f88425 100644 --- a/src/conf/ucm/Makefile.am +++ b/src/conf/ucm/Makefile.am @@ -15,6 +15,7 @@ bytcr-rt5651 \ bytcr-rt5651-mono-spk-in1-mic \ bytcr-rt5651-mono-spk-in2-mic \ bytcr-rt5651-mono-spk-in2-mic-hp-swapped \ +bytcr-rt5651-stereo-spk-dmic-mic \ bytcr-rt5651-stereo-spk-in1-mic \ bytcr-rt5651-stereo-spk-in2-mic \ bytcr-rt5651-stereo-spk-in12-mic \ diff --git a/src/conf/ucm/bytcr-rt5651-stereo-spk-dmic-mic/HiFi.conf b/src/conf/ucm/bytcr-rt5651-stereo-spk-dmic-mic/HiFi.conf new file mode 100644 index 00000000..abf5fc75 --- /dev/null +++ b/src/conf/ucm/bytcr-rt5651-stereo-spk-dmic-mic/HiFi.conf @@ -0,0 +1,26 @@ +# Adapted from https://github.com/plbossart/UCM/tree/master/bytcr-rt5651 + + +SectionVerb { + EnableSequence [ + cdev "hw:bytcrrt5651" + + + ] + + DisableSequence [ + cdev "hw:bytcrrt5651" + + ] + + Value { + PlaybackPCM "hw:bytcrrt5651" + CapturePCM "hw:bytcrrt5651" + } +} + + + + + + diff --git a/src/conf/ucm/bytcr-rt5651-stereo-spk-dmic-mic/Makefile.am b/src/conf/ucm/bytcr-rt5651-stereo-spk-dmic-mic/Makefile.am new file mode 100644 index 00000000..07054501 --- /dev/null +++ b/src/conf/ucm/bytcr-rt5651-stereo-spk-dmic-mic/Makefile.am @@ -0,0 +1,4 @@ +alsaconfigdir = @ALSA_CONFIG_DIR@ +ucmdir = $(alsaconfigdir)/ucm/bytcr-rt5651-stereo-spk-dmic-mic +ucm_DATA = bytcr-rt5651-stereo-spk-dmic-mic.conf HiFi.conf +EXTRA_DIST = $(ucm_DATA) diff --git a/src/conf/ucm/bytcr-rt5651-stereo-spk-dmic-mic/bytcr-rt5651-stereo-spk-dmic-mic.conf b/src/conf/ucm/bytcr-rt5651-stereo-spk-dmic-mic/bytcr-rt5651-stereo-spk-dmic-mic.conf new file mode 100644 index 00000000..de8d954a --- /dev/null +++ b/src/conf/ucm/bytcr-rt5651-stereo-spk-dmic-mic/bytcr-rt5651-stereo-spk-dmic-mic.conf @@ -0,0 +1,10 @@ +# Adapted from https://github.com/plbossart/UCM/tree/master/bytcr-rt5651 + +SectionUseCase."HiFi" { + File "../bytcr-rt5651-stereo-spk-dmic-mic/HiFi.conf" + Comment "Play HiFi quality Music" +} + +SectionDefaults [ + cdev "hw:bytcrrt5651" +]