From 16dd7fbeb68b05cf463d052078f01dbe41f0efb4 Mon Sep 17 00:00:00 2001 From: Dmitry Osipenko Date: Thu, 20 May 2021 08:30:47 +0300 Subject: [PATCH] tegra: Add UCM for Acer Iconia Tab A500 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 Signed-off-by: Jaroslav Kysela --- .../wm8903/Acer Iconia Tab A500 WM8903.conf | 114 ++++++++++++++++++ .../tegra/Acer Iconia Tab A500 WM8903.conf | 8 ++ 2 files changed, 122 insertions(+) create mode 100644 ucm2/Tegra/wm8903/Acer Iconia Tab A500 WM8903.conf create mode 100644 ucm2/conf.d/tegra/Acer Iconia Tab A500 WM8903.conf 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 index 0000000..4615fa4 --- /dev/null +++ b/ucm2/Tegra/wm8903/Acer Iconia Tab A500 WM8903.conf @@ -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 index 0000000..1489344 --- /dev/null +++ b/ucm2/conf.d/tegra/Acer Iconia Tab A500 WM8903.conf @@ -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" +} -- 2.47.1