ucm: Add ucm files for DB820c board
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tue, 29 Jan 2019 10:48:28 +0000 (10:48 +0000)
committerTakashi Iwai <tiwai@suse.de>
Tue, 29 Jan 2019 13:33:17 +0000 (14:33 +0100)
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 <srinivas.kandagatla@linaro.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

configure.ac
src/conf/ucm/DB820c/DB820c.conf [new file with mode: 0644]
src/conf/ucm/DB820c/HDMI [new file with mode: 0644]
src/conf/ucm/DB820c/HiFi [new file with mode: 0644]
src/conf/ucm/DB820c/Makefile.am [new file with mode: 0644]
src/conf/ucm/Makefile.am

index a0c346e..e9e1a36 100644 (file)
@@ -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 (file)
index 0000000..58b7ff4
--- /dev/null
@@ -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 (file)
index 0000000..39b2869
--- /dev/null
@@ -0,0 +1,37 @@
+# Use case configuration for DB820c board.
+# Author: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+
+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 (file)
index 0000000..4457329
--- /dev/null
@@ -0,0 +1,110 @@
+# Use case configuration for DB820c board.
+# Author: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+
+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 (file)
index 0000000..16e985e
--- /dev/null
@@ -0,0 +1,4 @@
+alsaconfigdir = @ALSA_CONFIG_DIR@
+ucmdir = $(alsaconfigdir)/ucm/DB820c
+ucm_DATA = DB820c.conf HDMI HiFi
+EXTRA_DIST = $(ucm_DATA)
index ee850ee..e9f88ed 100644 (file)
@@ -31,6 +31,7 @@ chtrt5650 \
 cube-i1_TF-Defaultstring-CherryTrailCR \
 DAISY-I2S \
 DB410c \
+DB820c \
 Dell-WD15-Dock \
 GoogleNyan \
 gpd-win-pocket-rt5645 \