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)