OSDN Git Service

tegra: Add UCM for Acer Iconia Tab A500
authorDmitry Osipenko <digetx@gmail.com>
Thu, 20 May 2021 05:30:47 +0000 (08:30 +0300)
committerJaroslav Kysela <perex@perex.cz>
Thu, 27 May 2021 07:08:38 +0000 (09:08 +0200)
Acer Iconia Tab A500 is a tablet device which is powered by NVIDIA Tegra20
SoC, it has WM8903 audio CODEC. The device has built-in 2-channel speaker,
built-in mono microphone and 4-pin 3.5mm jack for headphones and headset.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/Tegra/wm8903/Acer Iconia Tab A500 WM8903.conf [new file with mode: 0644]
ucm2/conf.d/tegra/Acer Iconia Tab A500 WM8903.conf [new file with mode: 0644]

diff --git a/ucm2/Tegra/wm8903/Acer Iconia Tab A500 WM8903.conf b/ucm2/Tegra/wm8903/Acer Iconia Tab A500 WM8903.conf
new file mode 100644 (file)
index 0000000..4615fa4
--- /dev/null
@@ -0,0 +1,114 @@
+# Use case Configuration for Acer Iconia Tab A500
+
+SectionVerb {
+       EnableSequence [
+               # WM8903 Output Configuration
+               cset "name='Digital Playback Volume' 80"
+               cset "name='Headphone Volume' 42"
+               cset "name='Line Out Volume' 42"
+               cset "name='DAC Boost Volume' 0"
+
+               # WM8903 Output Routing
+               cset "name='Left Output Mixer DACL Switch' on"
+               cset "name='Left Output Mixer DACR Switch' off"
+               cset "name='Right Output Mixer DACL Switch' off"
+               cset "name='Right Output Mixer DACR Switch' on"
+
+               # WM8903 Input Configuration
+               cset "name='Digital Capture Volume' 120"
+               cset "name='DRC Compressor Threshold Volume' 124"
+               cset "name='DRC Compressor Slope R0' 1"
+               cset "name='DRC Compressor Slope R1' 1"
+               cset "name='DRC Maximum Gain Volume' 1"
+               cset "name='DRC Minimum Gain Volume' 0"
+               cset "name='DRC Volume' 13"
+
+               # WM8903 Input Routing
+               cset "name='Left Input PGA Switch' on"
+               cset "name='Right Input PGA Switch' on"
+
+               # Tegra-specific switches
+               cset "name='Int Spk Switch' on"
+               cset "name='Int Mic Switch' on"
+       ]
+}
+
+SectionDevice."Speakers" {
+       Comment "Speakers"
+
+       ConflictingDevice [
+               "Headphones"
+       ]
+
+       EnableSequence [
+               cset "name='Headphone Switch' off"
+               cset "name='Line Out Switch' on"
+       ]
+
+       Value {
+               PlaybackPCM "hw:${CardId}"
+               PlaybackMixerElem "Line Out"
+       }
+}
+
+SectionDevice."Headphones" {
+       Comment "Headphones"
+
+       ConflictingDevice [
+               "Speakers"
+       ]
+
+       EnableSequence [
+               cset "name='Line Out Switch' off"
+               cset "name='Headphone Switch' on"
+       ]
+
+       Value {
+               PlaybackPCM "hw:${CardId}"
+               PlaybackMixerElem "Headphone"
+               JackControl "Headphone Jack"
+       }
+}
+
+SectionDevice."InternalMic" {
+       Comment "Internal Microphone"
+
+       ConflictingDevice [
+               "HeadsetMic"
+       ]
+
+       EnableSequence [
+               cset "name='Left Input PGA Volume' 31"
+               cset "name='Right Input PGA Volume' 31"
+               cset "name='Left Input Inverting Mux' IN1L"
+               cset "name='Right Input Inverting Mux' IN1R"
+               cset "name='DRC Switch' on"
+       ]
+
+       Value {
+               CapturePCM "hw:${CardId}"
+               CaptureMixerElem "Digital"
+       }
+}
+
+SectionDevice."HeadsetMic" {
+       Comment "Headset Microphone"
+
+       ConflictingDevice [
+               "InternalMic"
+       ]
+
+       EnableSequence [
+               cset "name='Left Input PGA Volume' 25"
+               cset "name='Right Input PGA Volume' 25"
+               cset "name='Left Input Inverting Mux' IN2L"
+               cset "name='Right Input Inverting Mux' IN2R"
+               cset "name='DRC Switch' off"
+       ]
+
+       Value {
+               CapturePCM "hw:${CardId}"
+               CaptureMixerElem "Digital"
+               JackControl "Mic Jack"
+       }
+}
diff --git a/ucm2/conf.d/tegra/Acer Iconia Tab A500 WM8903.conf b/ucm2/conf.d/tegra/Acer Iconia Tab A500 WM8903.conf
new file mode 100644 (file)
index 0000000..1489344
--- /dev/null
@@ -0,0 +1,8 @@
+# Use case Configuration for Acer Iconia Tab A500
+
+Syntax 4
+
+SectionUseCase."HiFi" {
+       File "/Tegra/wm8903/Acer Iconia Tab A500 WM8903.conf"
+       Comment "Play HiFi quality Music"
+}