]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
tegra: Add UCM for WM8903 based ASUS Transformers
authorSvyatoslav Ryhel <clamor95@gmail.com>
Mon, 4 Jul 2022 18:16:09 +0000 (21:16 +0300)
committerJaroslav Kysela <perex@perex.cz>
Mon, 21 Aug 2023 13:34:40 +0000 (15:34 +0200)
Wolfson Microelectronics WM8903 based ASUS Transformer tablet devices
are powered by NVIDIA Tegra30 SoC. They feature 2-channel speaker,
built-in mono microphone and 4-pin 3.5mm jack for headphones and
headset.

Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/291
Tested-by: Robert Eckelmann <longnoserob@gmail.com> # ASUS TF101 T20
Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # ASUS TF300T T30
Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # ASUS TF300T T30
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/Tegra/wm8903/Asus-Transformer-HiFi.conf [new file with mode: 0644]
ucm2/Tegra/wm8903/Asus-Transformer.conf [new file with mode: 0644]
ucm2/conf.d/tegra/Asus EeePad Slider WM8903.conf [new symlink]
ucm2/conf.d/tegra/Asus EeePad Transformer WM8903.conf [new symlink]
ucm2/conf.d/tegra/Asus Transformer Pad TF300T WM8903.conf [new symlink]

diff --git a/ucm2/Tegra/wm8903/Asus-Transformer-HiFi.conf b/ucm2/Tegra/wm8903/Asus-Transformer-HiFi.conf
new file mode 100644 (file)
index 0000000..48e7a65
--- /dev/null
@@ -0,0 +1,108 @@
+# Use case Configuration for WM8903 based ASUS Transformers
+
+SectionDevice."Speaker" {
+       Comment "Speaker"
+
+       ConflictingDevice [
+               "Headphones"
+       ]
+
+       EnableSequence [
+               cset "name='Speaker Switch' on"
+               cset "name='Int Spk Switch' on"
+       ]
+
+       DisableSequence [
+               cset "name='Int Spk Switch' off"
+               cset "name='Speaker Switch' off"
+       ]
+
+       Value {
+               PlaybackPCM "hw:${CardId}"
+               PlaybackChannels 2
+               PlaybackPriority 200
+
+               PlaybackMixerElem "Speaker"
+       }
+}
+
+SectionDevice."Headphones" {
+       Comment "Headphones"
+
+       ConflictingDevice [
+               "Speaker"
+       ]
+
+       EnableSequence [
+               cset "name='Headphone Switch' on"
+       ]
+
+       DisableSequence [
+               cset "name='Headphone Switch' off"
+       ]
+
+       Value {
+               PlaybackPCM "hw:${CardId}"
+               PlaybackChannels 2
+               PlaybackPriority 100
+
+               PlaybackMixerElem "Headphone"
+
+               JackControl "Headphone Jack"
+       }
+}
+
+SectionDevice."Mic1" {
+       Comment "Internal Microphone"
+
+       ConflictingDevice [
+               "Mic2"
+       ]
+
+       EnableSequence [
+               cset "name='Int Mic Switch' on"
+               cset "name='ADC Input' DMIC"
+       ]
+
+       DisableSequence [
+               cset "name='Int Mic Switch' off"
+       ]
+
+       Value {
+               CapturePCM "hw:${CardId}"
+               CapturePriority 200
+       }
+}
+
+SectionDevice."Mic2" {
+       Comment "External Microphone"
+
+       ConflictingDevice [
+               "Mic1"
+       ]
+
+       EnableSequence [
+               cset "name='Mic Jack Switch' on"
+               cset "name='ADC Input' ADC"
+
+               cset "name='Left Capture Mux' Left"
+
+               cset "name='Left Input Mux' IN1L"
+               cset "name='Left Input Inverting Mux' IN2L"
+               cset "name='Left Input Mode Mux' Differential Mic"
+
+               cset "name='Left Input PGA Switch' on"
+       ]
+
+       DisableSequence [
+               cset "name='Mic Jack Switch' off"
+               cset "name='Left Input PGA Switch' off"
+       ]
+
+       Value {
+               CapturePCM "hw:${CardId}"
+               CapturePriority 100
+
+               JackControl "Mic Jack"
+       }
+}
diff --git a/ucm2/Tegra/wm8903/Asus-Transformer.conf b/ucm2/Tegra/wm8903/Asus-Transformer.conf
new file mode 100644 (file)
index 0000000..4d62dd2
--- /dev/null
@@ -0,0 +1,37 @@
+# Use case Configuration for WM8903 based ASUS Transformers
+
+Syntax 4
+
+BootSequence [
+       cset "name='HPF Switch' on"
+       cset "name='HPF Mode' Voice 1"
+
+       cset "name='DRC Switch' on"
+       cset "name='Digital Capture Volume' 127"
+
+       cset "name='Headphone Switch' off"
+       cset "name='Headphone ZC Switch' off"
+       cset "name='Headphone Volume' 45"
+
+       cset "name='Line Out Switch' on"
+       cset "name='Line Out ZC Switch' off"
+       cset "name='Line Out Volume' 57"
+
+       cset "name='Speaker Switch' off"
+       cset "name='Speaker ZC Switch' off"
+       cset "name='Speaker Volume' 60"
+
+       cset "name='Int Spk Switch' on"
+       cset "name='Int Mic Switch' off"
+       cset "name='Mic Jack Switch' off"
+
+       cset "name='ADC Input' DMIC"
+
+       cset "name='Left Speaker Mixer DACL Switch' on"
+       cset "name='Right Speaker Mixer DACR Switch' on"
+]
+
+SectionUseCase."HiFi" {
+    File "/Tegra/wm8903/Asus-Transformer-HiFi.conf"
+    Comment "Play HiFi quality Music"
+}
diff --git a/ucm2/conf.d/tegra/Asus EeePad Slider WM8903.conf b/ucm2/conf.d/tegra/Asus EeePad Slider WM8903.conf
new file mode 120000 (symlink)
index 0000000..ab543c4
--- /dev/null
@@ -0,0 +1 @@
+../../Tegra/wm8903/Asus-Transformer.conf
\ No newline at end of file
diff --git a/ucm2/conf.d/tegra/Asus EeePad Transformer WM8903.conf b/ucm2/conf.d/tegra/Asus EeePad Transformer WM8903.conf
new file mode 120000 (symlink)
index 0000000..ab543c4
--- /dev/null
@@ -0,0 +1 @@
+../../Tegra/wm8903/Asus-Transformer.conf
\ No newline at end of file
diff --git a/ucm2/conf.d/tegra/Asus Transformer Pad TF300T WM8903.conf b/ucm2/conf.d/tegra/Asus Transformer Pad TF300T WM8903.conf
new file mode 120000 (symlink)
index 0000000..ab543c4
--- /dev/null
@@ -0,0 +1 @@
+../../Tegra/wm8903/Asus-Transformer.conf
\ No newline at end of file