From patchwork Tue Jan 29 10:48:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10785969 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 AD11113B4 for ; Tue, 29 Jan 2019 10:48:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9432F28E66 for ; Tue, 29 Jan 2019 10:48:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8028129292; Tue, 29 Jan 2019 10:48:50 +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.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 AF6272A66C for ; Tue, 29 Jan 2019 10:48:47 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 9F9692674B9; Tue, 29 Jan 2019 11:48:45 +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 6737626749A; Tue, 29 Jan 2019 11:48:43 +0100 (CET) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by alsa0.perex.cz (Postfix) with ESMTP id D5B1826749A for ; Tue, 29 Jan 2019 11:48:39 +0100 (CET) Received: by mail-wr1-f68.google.com with SMTP id t6so21437203wrr.12 for ; Tue, 29 Jan 2019 02:48:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=iPzzyWX4/vzvsfgPybAXHnRNUhV5phldoqz26n/ODvc=; b=WW8+pbpK4cio6c/MHZ3p45XrplrUBP8wXXluOxKNin4KTrr2T6nG5Yzoi887fwPJy4 6fDhGBoZzJI0UjTiJF2lYpRiSMrLgDBPxfUYVGBLhXdvkpq5+yTzwwgYL6PC+qJsSVgp gRXt9lWkXVKK+fkEhrbnzTjOx+9rHcQKLi5LU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=iPzzyWX4/vzvsfgPybAXHnRNUhV5phldoqz26n/ODvc=; b=SohOsZC46LJsHMFLVQCc0ZNJBBBPcLeGRXLtZJJz/sC57V0Yaci+8+PI5lqEoAIpxQ BlOPXUmpl+ET5joNn9L5CGN9q8h94n027UDMk1Gao5iUzld97jflPIOHHetaB+ZYemOI 2i3530sr5+XcOXpaKotgeBx+OekJsGSb9c+/6KvihKRl2767ZFXs9kj3j9BZC2nXpFzY d1rrkZduXbCBTbaf33OFr2H3hl+oRW6QQ+JtSAhN2209tAjdZFLpHwsibFLmWXXcSpk6 niT+xfqG/L27KanxjrtIU19sAZCgFE1Lj0Ahp+cbUWZcLa4E0/BznC9D7ynNxhz0cu8w a94Q== X-Gm-Message-State: AJcUukcaSVgngJw/LwNN87rlFXKz8lRpJSivGSnLueYfucldCkUWO22j qp7wBbOEqj7E6uxXL1iCgmL/Bg== X-Google-Smtp-Source: ALg8bN7Lo54SwUVNx8OhxdS2GmsmpW7uEwCcPirFawpckPjTLP7zp9rRZDKZAnv/4MCNAmbbf7f4Jw== X-Received: by 2002:adf:a78a:: with SMTP id j10mr25847046wrc.191.1548758918915; Tue, 29 Jan 2019 02:48:38 -0800 (PST) Received: from srini-hackbox.lan (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.gmail.com with ESMTPSA id i13sm97131835wrw.32.2019.01.29.02.48.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 29 Jan 2019 02:48:38 -0800 (PST) From: Srinivas Kandagatla To: tiwai@suse.com Date: Tue, 29 Jan 2019 10:48:28 +0000 Message-Id: <20190129104828.24728-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, Srinivas Kandagatla Subject: [alsa-devel] [PATCH] ucm: Add ucm files for DB820c 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP DB820c board is based of MSM8996 Qualcomm SoC, which has support for both Digital and Analog audio. Digital audio is over HDMI and analog is over WCD9335 codec via SLIMbus. Board itself has HDMI port, a 3.5mm audio Jack and an Audio expansion connector. This patch adds support for HDMI port and 3.5mm jack. Signed-off-by: Srinivas Kandagatla --- configure.ac | 1 + src/conf/ucm/DB820c/DB820c.conf | 9 +++ src/conf/ucm/DB820c/HDMI | 37 +++++++++++ src/conf/ucm/DB820c/HiFi | 110 ++++++++++++++++++++++++++++++++ src/conf/ucm/DB820c/Makefile.am | 4 ++ src/conf/ucm/Makefile.am | 1 + 6 files changed, 162 insertions(+) create mode 100644 src/conf/ucm/DB820c/DB820c.conf create mode 100644 src/conf/ucm/DB820c/HDMI create mode 100644 src/conf/ucm/DB820c/HiFi create mode 100644 src/conf/ucm/DB820c/Makefile.am diff --git a/configure.ac b/configure.ac index a0c346ef..e9e1a369 100644 --- a/configure.ac +++ b/configure.ac @@ -747,6 +747,7 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \ src/conf/ucm/cube-i1_TF-Defaultstring-CherryTrailCR/Makefile \ src/conf/ucm/DAISY-I2S/Makefile \ src/conf/ucm/DB410c/Makefile \ + src/conf/ucm/DB820c/Makefile \ src/conf/ucm/Dell-WD15-Dock/Makefile \ src/conf/ucm/GoogleNyan/Makefile \ src/conf/ucm/gpd-win-pocket-rt5645/Makefile \ diff --git a/src/conf/ucm/DB820c/DB820c.conf b/src/conf/ucm/DB820c/DB820c.conf new file mode 100644 index 00000000..58b7ff4e --- /dev/null +++ b/src/conf/ucm/DB820c/DB820c.conf @@ -0,0 +1,9 @@ +SectionUseCase."HiFi" { + File "HiFi" + Comment "HiFi quality Music." +} + +SectionUseCase."HDMI" { + File "HDMI" + Comment "HDMI output." +} diff --git a/src/conf/ucm/DB820c/HDMI b/src/conf/ucm/DB820c/HDMI new file mode 100644 index 00000000..39b28692 --- /dev/null +++ b/src/conf/ucm/DB820c/HDMI @@ -0,0 +1,37 @@ +# Use case configuration for DB820c board. +# Author: Srinivas Kandagatla + +SectionVerb { + EnableSequence [ + cdev "hw:0" + cset "name='HDMI Mixer MultiMedia1' 1" + ] + + DisableSequence [ + cdev "hw:0" + cset "name='HDMI Mixer MultiMedia1' 0" + ] + Value { + TQ "HiFi" + PlaybackPCM "plughw:0,0" + } +} + +SectionDevice."HDMI-stereo" { + #Name "HDMI-stereo" + Comment "HDMI Digital Stereo Output" + + EnableSequence [ + cdev "hw:0" + cset "name='HDMI Mixer MultiMedia1' 1" + ] + + DisableSequence [ + cdev "hw:0" + cset "name='HDMI Mixer MultiMedia1' 0" + ] + + Value { + PlaybackChannels "2" + } +} diff --git a/src/conf/ucm/DB820c/HiFi b/src/conf/ucm/DB820c/HiFi new file mode 100644 index 00000000..4457329f --- /dev/null +++ b/src/conf/ucm/DB820c/HiFi @@ -0,0 +1,110 @@ +# Use case configuration for DB820c board. +# Author: Srinivas Kandagatla + +SectionVerb { + + EnableSequence [ + cdev "hw:0" + cset "name='SLIM RX0 MUX' ZERO" + cset "name='SLIM RX1 MUX' ZERO" + cset "name='SLIM RX2 MUX' ZERO" + cset "name='SLIM RX3 MUX' ZERO" + cset "name='SLIM RX4 MUX' ZERO" + cset "name='SLIM RX5 MUX' AIF4_PB" + cset "name='SLIM RX6 MUX' AIF4_PB" + cset "name='SLIM RX7 MUX' ZERO" + cset "name='RX INT1_2 MUX' RX5" + cset "name='RX INT2_2 MUX' RX6" + ## gain to 0dB + cset "name='RX5 Digital Volume' 68" + ## gain to 0dB + cset "name='RX6 Digital Volume' 68" + cset "name='SLIMBUS_6_RX Audio Mixer MultiMedia2' 1" + cset "name='MultiMedia3 Mixer SLIMBUS_0_TX' 1" + cset "name='RX INT1 DEM MUX' CLSH_DSM_OUT" + cset "name='RX INT2 DEM MUX' CLSH_DSM_OUT" + cset "name='AIF1_CAP Mixer SLIM TX0' 1" + cset "name='SLIM TX0 MUX' DEC0" + cset "name='ADC2 Volume' 12" + cset "name='ADC MUX0' AMIC" + cset "name='AMIC MUX0' ADC2" + ] + + DisableSequence [ + cdev "hw:0" + cset "name='SLIMBUS_6_RX Audio Mixer MultiMedia2' 0" + cset "name='MultiMedia3 Mixer SLIMBUS_0_TX' 0" + ] + + # ALSA PCM + Value { + # ALSA PCM device for HiFi + PlaybackPCM "plughw:0,1" + CapturePCM "plughw:0,2" + } +} + +SectionDevice."Headphones" { + Comment "Headphones playback" + + EnableSequence [ + cdev "hw:0" + cset "name='SLIM RX0 MUX' ZERO" + cset "name='SLIM RX1 MUX' ZERO" + cset "name='SLIM RX2 MUX' ZERO" + cset "name='SLIM RX3 MUX' ZERO" + cset "name='SLIM RX4 MUX' ZERO" + cset "name='SLIM RX5 MUX' AIF4_PB" + cset "name='SLIM RX6 MUX' AIF4_PB" + cset "name='SLIM RX7 MUX' ZERO" + cset "name='RX INT1_2 MUX' RX5" + cset "name='RX INT2_2 MUX' RX6" + ## gain to 0dB + cset "name='RX5 Digital Volume' 68" + ## gain to 0dB + cset "name='RX6 Digital Volume' 68" + cset "name='SLIMBUS_6_RX Audio Mixer MultiMedia2' 1" + cset "name='RX INT1 DEM MUX' CLSH_DSM_OUT" + cset "name='RX INT2 DEM MUX' CLSH_DSM_OUT" + ] + + DisableSequence [ + cdev "hw:0" + cset "name='RX5 Digital Volume' 0" + cset "name='RX6 Digital Volume' 0" + cset "name='SLIM RX5 MUX' ZERO" + cset "name='SLIM RX6 MUX' ZERO" + cset "name='SLIMBUS_6_RX Audio Mixer MultiMedia2' 0" + ] + + Value { + PlaybackChannels "2" + } +} + +SectionDevice."Handset" { + Comment "Headset Microphone" + + EnableSequence [ + cdev "hw:0" + cset "name='MultiMedia3 Mixer SLIMBUS_0_TX' 1" + cset "name='AIF1_CAP Mixer SLIM TX0' 1" + cset "name='SLIM TX0 MUX' DEC0" + cset "name='ADC2 Volume' 12" + cset "name='ADC MUX0' AMIC" + cset "name='AMIC MUX0' ADC2" + ] + + DisableSequence [ + cdev "hw:0" + cset "name='MultiMedia3 Mixer SLIMBUS_0_TX' 0" + cset "name='AIF1_CAP Mixer SLIM TX0' 0" + cset "name='AMIC MUX0' ZERO" + cset "name='SLIM TX0 MUX' ZERO" + cset "name='ADC2 Volume' 0" + ] + + Value { + CaptureChannels "1" + } +} diff --git a/src/conf/ucm/DB820c/Makefile.am b/src/conf/ucm/DB820c/Makefile.am new file mode 100644 index 00000000..16e985e5 --- /dev/null +++ b/src/conf/ucm/DB820c/Makefile.am @@ -0,0 +1,4 @@ +alsaconfigdir = @ALSA_CONFIG_DIR@ +ucmdir = $(alsaconfigdir)/ucm/DB820c +ucm_DATA = DB820c.conf HDMI HiFi +EXTRA_DIST = $(ucm_DATA) diff --git a/src/conf/ucm/Makefile.am b/src/conf/ucm/Makefile.am index ee850ee6..e9f88ed6 100644 --- a/src/conf/ucm/Makefile.am +++ b/src/conf/ucm/Makefile.am @@ -31,6 +31,7 @@ chtrt5650 \ cube-i1_TF-Defaultstring-CherryTrailCR \ DAISY-I2S \ DB410c \ +DB820c \ Dell-WD15-Dock \ GoogleNyan \ gpd-win-pocket-rt5645 \