]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
ucm2: Add config for Rockchip/rk3399-gru-sound
authorAlper Nebi Yasak <alpernebiyasak@gmail.com>
Wed, 8 Jul 2020 20:09:19 +0000 (23:09 +0300)
committerJaroslav Kysela <perex@perex.cz>
Tue, 18 Aug 2020 15:06:08 +0000 (17:06 +0200)
This is the internal card for a number of ChromeOS devices based on the
Gru board. Config is taken from ChromeOS sources [1] and modified to
mostly look like Rockchip/max98090. Tested on a Samsung Chromebook Plus
(rk3399-gru-kevin) running Linux 5.7+.

[1] https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/75cf7da335c11469956c84ddfa4e2ca73b268441/overlay-kevin/chromeos-base/chromeos-bsp-kevin/files/audio-config/ucm-config/rk3399-gru-sound

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/Rockchip/rk3399-gru-sound/HiFi.conf [new file with mode: 0644]
ucm2/Rockchip/rk3399-gru-sound/rk3399-gru-sound.conf [new file with mode: 0644]
ucm2/module/rk3399-gru-sound.conf [new symlink]

diff --git a/ucm2/Rockchip/rk3399-gru-sound/HiFi.conf b/ucm2/Rockchip/rk3399-gru-sound/HiFi.conf
new file mode 100644 (file)
index 0000000..4da6f1a
--- /dev/null
@@ -0,0 +1,125 @@
+SectionVerb {
+       Value {
+               MinBufferLevel "512"
+       }
+
+       EnableSequence [
+               cset "name='Stereo1 DMIC Mux' DMIC1"
+               cset "name='Sto1 ADC MIXL DMIC Switch' on"
+               cset "name='Sto1 ADC MIXR DMIC Switch' on"
+
+               cset "name='Mixer Out FilterL DACL Switch' on"
+               cset "name='Mixer Out FilterR DACR Switch' on"
+               cset "name='Playback Digital Switch' on"
+               cset "name='Headphone Switch' on"
+
+               cset "name='Mixin Volume' 11"
+               cset "name='Mixin Switch' on"
+               cset "name='Mixer In Mic Switch' on"
+               cset "name='Out DAIL Mux' ADC"
+               cset "name='Out DAIR Mux' ADC"
+               cset "name='ADC1 Capture Volume' 51"
+               cset "name='Mic Volume' 6"
+               cset "name='Capture Digital Switch' on"
+               cset "name='Mic Switch' on"
+
+               cset "name='Speakers Switch' off"
+               cset "name='Int Mic Switch' off"
+               cset "name='Headphones Switch' off"
+               cset "name='Headset Mic Switch' off"
+       ]
+}
+
+SectionDevice."Speaker" {
+       Comment "Speaker"
+
+       Value {
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId},0"
+               PlaybackMixerElem "Speakers"
+       }
+
+       EnableSequence [
+               cset "name='Speakers Switch' on"
+       ]
+
+       DisableSequence [
+               cset "name='Speakers Switch' off"
+       ]
+
+       ConflictingDevice [
+               "Headphones"
+       ]
+}
+
+SectionDevice."Mic" {
+       Comment "Internal Microphone"
+
+       Value {
+               CapturePriority 100
+               CapturePCM "hw:${CardId},1"
+               CaptureMixerElem "ADC1"
+       }
+
+       EnableSequence [
+               cset "name='Int Mic Switch' on"
+       ]
+
+       DisableSequence [
+               cset "name='Int Mic Switch' off"
+       ]
+
+       ConflictingDevice [
+               "Headset"
+       ]
+}
+
+SectionDevice."Headphones" {
+       Comment "Headphones"
+
+       Value {
+               PlaybackPriority 200
+               PlaybackPCM "hw:${CardId},2"
+               PlaybackMixerElem "Headphone"
+               JackControl "Headphones Jack"
+       }
+
+       EnableSequence [
+               cset "name='Headphones Switch' on"
+               cset "name='DAC Soft Mute Switch' off"
+               cset "name='Headphone Switch' on"
+       ]
+
+       DisableSequence [
+               cset "name='Headphone Switch' off"
+               cset "name='DAC Soft Mute Switch' on"
+               cset "name='Headphones Switch' off"
+       ]
+
+       ConflictingDevice [
+               "Speaker"
+       ]
+}
+
+SectionDevice."Headset" {
+       Comment "Headset Microphone"
+
+       Value {
+               CapturePriority 200
+               CapturePCM "hw:${CardId},2"
+               CaptureMixerElem "Mic"
+               JackControl "Headset Mic Jack"
+       }
+
+       EnableSequence [
+               cset "name='Headset Mic Switch' on"
+       ]
+
+       DisableSequence [
+               cset "name='Headset Mic Switch' off"
+       ]
+
+       ConflictingDevice [
+               "Mic"
+       ]
+}
diff --git a/ucm2/Rockchip/rk3399-gru-sound/rk3399-gru-sound.conf b/ucm2/Rockchip/rk3399-gru-sound/rk3399-gru-sound.conf
new file mode 100644 (file)
index 0000000..afd7ac1
--- /dev/null
@@ -0,0 +1,8 @@
+Syntax 2
+
+Comment "Rockchip Gru card"
+
+SectionUseCase."HiFi" {
+       File "/Rockchip/rk3399-gru-sound/HiFi.conf"
+       Comment "Default"
+}
diff --git a/ucm2/module/rk3399-gru-sound.conf b/ucm2/module/rk3399-gru-sound.conf
new file mode 120000 (symlink)
index 0000000..9116f77
--- /dev/null
@@ -0,0 +1 @@
+../Rockchip/rk3399-gru-sound/rk3399-gru-sound.conf
\ No newline at end of file