From patchwork Thu May 5 06:32:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Enric Balletbo i Serra X-Patchwork-Id: 9021181 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E18EF9F30C for ; Thu, 5 May 2016 06:32:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F09ED203EB for ; Thu, 5 May 2016 06:32:41 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id A585D203EC for ; Thu, 5 May 2016 06:32:40 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 0780D265CFA; Thu, 5 May 2016 08:32:33 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 20BFD261AFF; Thu, 5 May 2016 08:32:24 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 594E92652EE; Thu, 5 May 2016 08:32:23 +0200 (CEST) Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by alsa0.perex.cz (Postfix) with ESMTP id E05A3261600 for ; Thu, 5 May 2016 08:32:17 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 2AC912664BF From: Enric Balletbo i Serra To: alsa-devel@alsa-project.org Date: Thu, 5 May 2016 08:32:06 +0200 Message-Id: <1462429926-9464-1-git-send-email-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.1.0 Subject: [alsa-devel] [PATCH alsa-lib] conf/ucm: ROCKCHIP-I2S: add Rockchip I2S UCM 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Taken from the ChromeOS sources, this configuration was tested on Veyron Jerry based Chromebook from Google. Signed-off-by: Enric Balletbo i Serra --- src/conf/ucm/Makefile.am | 2 +- src/conf/ucm/ROCKCHIP-I2S/HiFi.conf | 94 +++++++++++++++++++++++++++++ src/conf/ucm/ROCKCHIP-I2S/ROCKCHIP-I2S.conf | 6 ++ 3 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 src/conf/ucm/ROCKCHIP-I2S/HiFi.conf create mode 100644 src/conf/ucm/ROCKCHIP-I2S/ROCKCHIP-I2S.conf diff --git a/src/conf/ucm/Makefile.am b/src/conf/ucm/Makefile.am index e6a6325..d1d51e5 100644 --- a/src/conf/ucm/Makefile.am +++ b/src/conf/ucm/Makefile.am @@ -1 +1 @@ -SUBDIRS=DAISY-I2S PandaBoard PandaBoardES SDP4430 tegraalc5632 PAZ00 GoogleNyan broadwell-rt286 +SUBDIRS=DAISY-I2S PandaBoard PandaBoardES SDP4430 tegraalc5632 PAZ00 GoogleNyan broadwell-rt286 ROCKCHIP-I2S diff --git a/src/conf/ucm/ROCKCHIP-I2S/HiFi.conf b/src/conf/ucm/ROCKCHIP-I2S/HiFi.conf new file mode 100644 index 0000000..7bfe995 --- /dev/null +++ b/src/conf/ucm/ROCKCHIP-I2S/HiFi.conf @@ -0,0 +1,94 @@ +SectionVerb { + Value { + OutputDspName "speaker_eq" + MinBufferLevel "512" + } + + EnableSequence [ + cdev "hw:ROCKCHIPI2S" + + cset "name='Left Speaker Mixer Left DAC Switch' on" + cset "name='Right Speaker Mixer Right DAC Switch' on" + cset "name='Headphone Left Switch' off" + cset "name='Headphone Right Switch' off" + cset "name='Digital EQ 3 Band Switch' off" + cset "name='Digital EQ 5 Band Switch' off" + cset "name='Digital EQ 7 Band Switch' off" + cset "name='Biquad Switch' off" + cset "name='Filter Mode' Music" + cset "name='ADC Oversampling Rate' 0" + + cset "name='DMIC Mux' DMIC" + cset "name='MIC2 Mux' IN34" + cset "name='Right ADC Mixer MIC2 Switch' on" + cset "name='Left ADC Mixer MIC2 Switch' on" + cset "name='MIC2 Volume' 20" + cset "name='Headset Mic Switch' off" + cset "name='Int Mic Switch' on" + + cset "name='ADCR Boost Volume' 4" + cset "name='ADCL Boost Volume' 4" + cset "name='ADCR Volume' 11" + cset "name='ADCL Volume' 11" + + cset "name='Left Speaker Mixer Left DAC Switch' on" + cset "name='Right Speaker Mixer Right DAC Switch' on" + cset "name='Speaker Left Mixer Volume' 2" + cset "name='Speaker Right Mixer Volume' 2" + cset "name='Record Path DC Blocking' on" + cset "name='Playback Path DC Blocking' on" + + cset "name='Speaker Left Switch' on" + cset "name='Speaker Right Switch' on" + cset "name='Speaker Switch' on" + ] + + DisableSequence [ + ] +} + +SectionDevice."Headphone".0 { + Value { + JackName "ROCKCHIP-I2S Headset Jack" + OutputDspName "" + } + + EnableSequence [ + cdev "hw:ROCKCHIPI2S" + + cset "name='Speaker Switch' off" + cset "name='Headphone Left Switch' on" + cset "name='Headphone Right Switch' on" + ] + DisableSequence [ + cdev "hw:ROCKCHIPI2S" + + cset "name='Headphone Left Switch' off" + cset "name='Headphone Right Switch' off" + cset "name='Speaker Switch' on" + ] +} + +SectionDevice."Mic".0 { + Value { + JackName "ROCKCHIP-I2S Headset Jack" + } + + EnableSequence [ + cdev "hw:ROCKCHIPI2S" + + cset "name='Int Mic Switch' off" + cset "name='DMIC Mux' ADC" + cset "name='Headset Mic Switch' on" + cset "name='Record Path DC Blocking' on" + ] + + DisableSequence [ + cdev "hw:ROCKCHIPI2S" + + cset "name='Headset Mic Switch' off" + cset "name='DMIC Mux' DMIC" + cset "name='Int Mic Switch' on" + cset "name='Record Path DC Blocking' off" + ] +} diff --git a/src/conf/ucm/ROCKCHIP-I2S/ROCKCHIP-I2S.conf b/src/conf/ucm/ROCKCHIP-I2S/ROCKCHIP-I2S.conf new file mode 100644 index 0000000..0c399b0 --- /dev/null +++ b/src/conf/ucm/ROCKCHIP-I2S/ROCKCHIP-I2S.conf @@ -0,0 +1,6 @@ +Comment "Rockchip card" + +SectionUseCase."HiFi" { + File "HiFi.conf" + Comment "Default" +}