From patchwork Mon Aug 8 13:23:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 9272703 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AF48A6022E for ; Wed, 10 Aug 2016 06:08:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B11D26247 for ; Wed, 10 Aug 2016 06:08:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B5CD27FBC; Wed, 10 Aug 2016 06:08:09 +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=-1.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=no 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 8424126247 for ; Wed, 10 Aug 2016 06:08:06 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id C32B8265DF6; Wed, 10 Aug 2016 08:08:04 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id AA75D26588A; Wed, 10 Aug 2016 08:07:59 +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 8989E266666; Mon, 8 Aug 2016 18:41:48 +0200 (CEST) Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by alsa0.perex.cz (Postfix) with ESMTP id 63B4D2674FC for ; Mon, 8 Aug 2016 15:23:14 +0200 (CEST) Received: by mail-wm0-f47.google.com with SMTP id i5so139105996wmg.0 for ; Mon, 08 Aug 2016 06:23:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=uQWacA+mDQbWsLHJaJfPmFrtzjdQEsgX74AWdm75VbQ=; b=XArKrkuoT20kuq3c9BoDxWykJeOnyy3sSfhO6aFT9yAoAfUV0fHaVJTrGLm/LZ08lY N2agq9pd9w9RrEIxXL3ADo+YABYi17uRvc3t92Rsb0MVMwCINSQMvmVF41mJmR2v2kFb CDXb/5t5WdZQ7S+6QdITiwnscMoj7/N1io844= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=uQWacA+mDQbWsLHJaJfPmFrtzjdQEsgX74AWdm75VbQ=; b=mOXBI1/NAzEElOJ/wxjIOiWJVlMl/mzPrr1PyraIU/B4slhD5POcniK6SpJdhGlpsm ImmI5dNI275VHO65glhg0l+q+9mxkAhdYiGhiRod+g3iFoPMg4+EB+4QQyXg7sbH6C5h /XA1HUUWA3zZoZP66jExV1X1eOwVTCI9cahT6Fgr9WJ6EPccTEgb9DzOlLeXVr8Bs5qX 58JGU57pOP8+OlAzdqw3dpAF08P665xj4kCeF4nWQd7M6ZLWCq00Bbl9oMMK33XIrV40 dxk/H9cvp6C0olvLSiClnr2edBk0PiuMcmAitzLLBjrVvCROcBxTY83ZYe69Ak/9knPa qHxQ== X-Gm-Message-State: AEkoousA4X+n8jTUvQCYjGUbZpb3kICuHkcGbXHKmAHIZkO2OoyUastkX1huM76zXL2LPQET X-Received: by 10.25.159.205 with SMTP id i196mr28967273lfe.45.1470662593826; Mon, 08 Aug 2016 06:23:13 -0700 (PDT) Received: from beaming.home (91-157-170-157.elisa-laajakaista.fi. [91.157.170.157]) by smtp.gmail.com with ESMTPSA id e79sm5583085lji.42.2016.08.08.06.23.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Aug 2016 06:23:12 -0700 (PDT) From: Riku Voipio To: alsa-devel@alsa-project.org Date: Mon, 8 Aug 2016 16:23:10 +0300 Message-Id: <1470662590-23434-1-git-send-email-riku.voipio@linaro.org> X-Mailer: git-send-email 2.1.4 X-Mailman-Approved-At: Wed, 10 Aug 2016 08:07:57 +0200 Cc: nicolas.dechesne@linaro.org, Riku Voipio , Srinivas Kandagatla , patches@linaro.org Subject: [alsa-devel] [PATCH] ucm: Add ucm files for DB410c board. 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 From: Srinivas Kandagatla DB410c board has support for both Digital and Analog audio. Digital audio is over HDMI and analog is over codec chip integrated inside the APQ8016 SOC. It can support: - 3 Microphones: Primary Mic(Handset mic), Headset Mic and Secondary - 2 Digital Microphones. - Earpiece. - Headset. - Loud Speaker. - HDMI. [Riku: squashed Srinivas's patches together and converted spaces to tabs] Signed-off-by: Srinivas Kandagatla Signed-off-by: Riku Voipio Cc: nicolas.dechesne@linaro.org --- configure.ac | 1 + src/conf/ucm/DB410c/DB410c.conf | 8 ++ src/conf/ucm/DB410c/HDMI | 31 +++++++ src/conf/ucm/DB410c/HiFi | 185 ++++++++++++++++++++++++++++++++++++++++ src/conf/ucm/DB410c/Makefile.am | 4 + src/conf/ucm/Makefile.am | 2 +- 6 files changed, 230 insertions(+), 1 deletion(-) create mode 100644 src/conf/ucm/DB410c/DB410c.conf create mode 100644 src/conf/ucm/DB410c/HDMI create mode 100644 src/conf/ucm/DB410c/HiFi create mode 100644 src/conf/ucm/DB410c/Makefile.am diff --git a/configure.ac b/configure.ac index f592e8b..014af5f 100644 --- a/configure.ac +++ b/configure.ac @@ -675,6 +675,7 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \ src/conf/ucm/broadwell-rt286/Makefile \ src/conf/ucm/VEYRON-I2S/Makefile \ src/conf/ucm/chtrt5645/Makefile \ + src/conf/ucm/DB410c/Makefile \ src/conf/topology/Makefile \ src/conf/topology/broadwell/Makefile \ modules/Makefile modules/mixer/Makefile modules/mixer/simple/Makefile \ diff --git a/src/conf/ucm/DB410c/DB410c.conf b/src/conf/ucm/DB410c/DB410c.conf new file mode 100644 index 0000000..590278f --- /dev/null +++ b/src/conf/ucm/DB410c/DB410c.conf @@ -0,0 +1,8 @@ +SectionUseCase."HiFi" { + File "HiFi" + Comment "Play HiFi quality Music." +} +SectionUseCase."HDMI" { + File "HDMI" + Comment "HDMI output." +} diff --git a/src/conf/ucm/DB410c/HDMI b/src/conf/ucm/DB410c/HDMI new file mode 100644 index 0000000..8112bc0 --- /dev/null +++ b/src/conf/ucm/DB410c/HDMI @@ -0,0 +1,31 @@ +# Use case configuration for DB410c board. +# Author: Srinivas Kandagatla + +SectionVerb { + EnableSequence [ + ] + + DisableSequence [ + ] + Value { + TQ "HiFi" + PlaybackPCM "plughw:0,0" + } +} + +SectionDevice."HDMI-stereo" { + #Name "HDMI-stereo" + Comment "HDMI Digital Stereo Output" + + EnableSequence [ + cdev "hw:0" + ] + + DisableSequence [ + cdev "hw:0" + ] + + Value { + PlaybackChannels "2" + } +} diff --git a/src/conf/ucm/DB410c/HiFi b/src/conf/ucm/DB410c/HiFi new file mode 100644 index 0000000..f9cbcf0 --- /dev/null +++ b/src/conf/ucm/DB410c/HiFi @@ -0,0 +1,185 @@ +# Use case configuration for DB410c board. +# Author: Srinivas Kandagatla + +SectionVerb { + + EnableSequence [ + ] + + DisableSequence [ + ] + + # ALSA PCM + Value { + # ALSA PCM device for HiFi + PlaybackPCM "plughw:0,1" + CapturePCM "plughw:0,2" + } +} + + +SectionDevice."Speaker" { + Comment "Speaker playback" + + ConflictingDevice [ + "Headphones" + "Earpiece" + ] + + EnableSequence [ + cdev "hw:0" + cset "name='SPK DAC Switch' 1" + cset "name='RX3 MIX1 INP1' RX1" + ## gain to 0dB + cset "name='RX3 Digital Volume' 128" + ] + + DisableSequence [ + cdev "hw:0" + cset "name='SPK DAC Switch' 0" + cset "name='RX3 MIX1 INP1' ZERO" + ] + + Value { + PlaybackChannels "2" + } +} + + +SectionDevice."Headphones" { + Comment "Headphones playback" + + ConflictingDevice [ + "Speaker" + "Earpiece" + ] + EnableSequence [ + cdev "hw:0" + cset "name='RX1 MIX1 INP1' RX1" + cset "name='RX2 MIX1 INP1' RX2" + cset "name='RDAC2 MUX' RX2" + cset "name='HPHL' 1" + cset "name='HPHR' 1" + ## gain to 0dB + cset "name='RX1 Digital Volume' 128" + ## gain to 0dB + cset "name='RX2 Digital Volume' 128" + ] + + DisableSequence [ + cdev "hw:0" + cset "name='RX1 Digital Volume' 0" + cset "name='RX2 Digital Volume' 0" + cset "name='HPHL' 0" + cset "name='HPHR' 0" + cset "name='RDAC2 MUX' ZERO" + cset "name='RX1 MIX1 INP1' ZERO" + cset "name='RX2 MIX1 INP1' ZERO" + ] + + Value { + PlaybackChannels "2" + } +} + +SectionDevice."Earpiece" { + Comment "Earpiece playback" + + ConflictingDevice [ + "Speaker" + "Headphones" + ] + EnableSequence [ + cdev "hw:0" + ] + + DisableSequence [ + cdev "hw:0" + ] + + Value { + PlaybackChannels "2" + } +} + +SectionDevice."Handset" { + Comment "Headset Microphone" + + EnableSequence [ + cdev "hw:0" + cset "name='DEC1 MUX' ADC2" + cset "name='ADC2 Volume' 8" + cset "name='ADC2 MUX' INP2" + ] + + DisableSequence [ + cdev "hw:0" + cset "name='ADC2 MUX' ZERO" + cset "name='ADC2 Volume' 0" + cset "name='DEC1 MUX' ZERO" + ] + + Value { + CaptureChannels "2" + } +} + +SectionDevice."Primarymic" { + Comment "Primary Microphone" + + EnableSequence [ + cdev "hw:0" + cset "name='DEC1 MUX' ADC1" + cset "name='ADC1 Volume' 8" + ] + + DisableSequence [ + cdev "hw:0" + cset "name='DEC1 MUX' ZERO" + cset "name='ADC1 Volume' 0" + ] + + Value { + CaptureChannels "2" + } +} + +SectionDevice."Secondarymic" { + Comment "Secondary Microphone" + + EnableSequence [ + cdev "hw:0" + cset "name='DEC1 MUX' ADC2" + cset "name='ADC2 Volume' 8" + cset "name='ADC2 MUX' INP2" + ] + + DisableSequence [ + cdev "hw:0" + cset "name='DEC1 MUX' ZERO" + cset "name='ADC2 Volume' 0" + cset "name='ADC2 MUX' ZERO" + ] + + Value { + CaptureChannels "2" + } +} + +SectionDevice."DMIC" { + Comment "Digital Microphone" + + EnableSequence [ + cdev "hw:0" + cset "name='DEC1 MUX' DMIC1" + ] + + DisableSequence [ + cdev "hw:0" + cset "name='DEC1 MUX' ZERO" + ] + + Value { + CaptureChannels "2" + } +} diff --git a/src/conf/ucm/DB410c/Makefile.am b/src/conf/ucm/DB410c/Makefile.am new file mode 100644 index 0000000..e10a136 --- /dev/null +++ b/src/conf/ucm/DB410c/Makefile.am @@ -0,0 +1,4 @@ +alsaconfigdir = @ALSA_CONFIG_DIR@ +ucmdir = $(alsaconfigdir)/ucm/DB410c +ucm_DATA = DB410c.conf HDMI HiFi +EXTRA_DIST = $(ucm_DATA) diff --git a/src/conf/ucm/Makefile.am b/src/conf/ucm/Makefile.am index 8865770..7bf432e 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 VEYRON-I2S chtrt5645 +SUBDIRS=DAISY-I2S PandaBoard PandaBoardES SDP4430 tegraalc5632 PAZ00 GoogleNyan broadwell-rt286 VEYRON-I2S chtrt5645 DB410c