From 125e405310a6f7402a3ec57460ed31c155ccf088 Mon Sep 17 00:00:00 2001 From: Ion Agorria Date: Mon, 4 Jul 2022 21:11:14 +0300 Subject: [PATCH 08/11] tegra: Add UCM for RT5631 based ASUS Transformers Realtek RT5631 based ASUS Transformer tablet devices are powered by NVIDIA Tegra30 SoC. They feature 2-channel built-in speaker, built-in 1-channel microphone and 4-pin 3.5mm jack for headphones/headset. Signed-off-by: Ion Agorria Signed-off-by: Svyatoslav Ryhel --- ucm2/Tegra/rt5631/Asus-Transformer-HiFi.conf | 138 ++++++++++++++++++ ucm2/Tegra/rt5631/Asus-Transformer.conf | 8 + ...us Transformer Infinity TF700T RT5631.conf | 1 + .../Asus Transformer Pad TF300TG RT5631.conf | 1 + .../Asus Transformer Pad TF300TL RT5631.conf | 1 + .../Asus Transformer Prime TF201 RT5631.conf | 1 + 6 files changed, 150 insertions(+) create mode 100644 ucm2/Tegra/rt5631/Asus-Transformer-HiFi.conf create mode 100644 ucm2/Tegra/rt5631/Asus-Transformer.conf create mode 120000 ucm2/conf.d/tegra/Asus Transformer Infinity TF700T RT5631.conf create mode 120000 ucm2/conf.d/tegra/Asus Transformer Pad TF300TG RT5631.conf create mode 120000 ucm2/conf.d/tegra/Asus Transformer Pad TF300TL RT5631.conf create mode 120000 ucm2/conf.d/tegra/Asus Transformer Prime TF201 RT5631.conf diff --git a/ucm2/Tegra/rt5631/Asus-Transformer-HiFi.conf b/ucm2/Tegra/rt5631/Asus-Transformer-HiFi.conf new file mode 100644 index 0000000..1d09129 --- /dev/null +++ b/ucm2/Tegra/rt5631/Asus-Transformer-HiFi.conf @@ -0,0 +1,138 @@ +# Use case Configuration for RT5631 based ASUS Transformers + +SectionVerb { + EnableSequence [ + # Alsa Mixer + cset "name='HP Playback Switch' off" + cset "name='Speaker Playback Switch' off" + cset "name='Speaker Playback Volume' 10" + cset "name='PCM Playback Switch' on" + cset "name='PCM Playback Volume' 255" + cset "name='AXI Capture Volume' 23" + + cset "name='AXO2 Playback Switch' on" + cset "name='AXO2MIX Mixer OUTVOLL Playback Switch' on" + + cset "name='DMIC Switch' off" + cset "name='DMIC Capture Switch' off" + + cset "name='HP Playback Volume' 20" + cset "name='HPL Mux' Left HPVOL" + cset "name='HPR Mux' Right HPVOL" + + cset "name='Headset Mic Switch' off" + cset "name='Int Mic Switch' off" + cset "name='Int Spk Switch' on" + + cset "name='Left HPVOL Mux' OUTMIXL" + cset "name='Left OUTVOL Mux' OUTMIXL" + cset "name='Left SPKVOL Mux' SPKMIXL" + + cset "name='MIC1 Boost Volume' 6" + cset "name='MIC1 Mode Control' Differential" + cset "name='MIC2 Boost Volume' 6" + cset "name='MIC2 Mode Control' Single ended" + + cset "name='MONO Playback Switch' off" + cset "name='MONO Mux' MONOMIX" + cset "name='MONOIN Mode Control' Differential" + cset "name='MONOIN_RX Capture Volume' 25" + + cset "name='OUTMIXL Mixer DACL Playback Switch' on" + cset "name='OUTMIXR Mixer DACR Playback Switch' on" + + cset "name='OUTVOL Channel Switch' on" + cset "name='RECMIXL Mixer MIC1_BST1 Capture Switch' on" + + cset "name='Right HPVOL Mux' OUTMIXR" + cset "name='Right OUTVOL Mux' OUTMIXR" + cset "name='Right SPKVOL Mux' SPKMIXR" + + cset "name='SPK Ratio Control' 1.99x" + + cset "name='SPKMIXL Mixer DACL Playback Switch' on" + cset "name='SPKMIXR Mixer DACR Playback Switch' on" + + cset "name='SPOL Mux' SPOLMIX" + cset "name='SPOLMIX Mixer SPKVOLL Playback Switch' on" + + cset "name='SPOR Mux' SPORMIX" + cset "name='SPORMIX Mixer SPKVOLR Playback Switch' on" + ] +} + +SectionDevice."Speakers" { + Comment "Speakers" + + ConflictingDevice [ + "Headphones" + ] + + EnableSequence [ + cset "name='Speaker Playback Switch' on" + cset "name='Int Spk Switch' on" + ] + + DisableSequence [ + cset "name='Int Spk Switch' off" + cset "name='Speaker Playback Switch' off" + ] + + Value { + PlaybackPCM "hw:${CardId}" + PlaybackChannels 2 + PlaybackPriority 200 + PlaybackVolume "Speaker Playback Volume" + PlaybackSwitch "Speaker Playback Switch" + } +} + +SectionDevice."Headphones" { + Comment "Headphones" + + ConflictingDevice [ + "Speakers" + ] + + EnableSequence [ + cset "name='HP Playback Switch' on" + ] + + DisableSequence [ + cset "name='HP Playback Switch' off" + ] + + Value { + PlaybackPCM "hw:${CardId}" + PlaybackChannels 2 + PlaybackPriority 100 + PlaybackVolume "HP Playback Volume" + PlaybackSwitch "HP Playback Switch" + + JackControl "Headphone Jack" + } +} + +SectionDevice."InternalMic" { + Comment "Internal Microphone" + + ConflictingDevice [ + ] + + EnableSequence [ + cset "name='DMIC Capture Switch' on" + cset "name='DMIC Switch' on" + cset "name='Int Mic Switch' on" + ] + + DisableSequence [ + cset "name='DMIC Capture Switch' off" + cset "name='DMIC Switch' off" + cset "name='Int Mic Switch' off" + ] + + Value { + CapturePCM "hw:${CardId}" + CaptureChannels 2 + } +} diff --git a/ucm2/Tegra/rt5631/Asus-Transformer.conf b/ucm2/Tegra/rt5631/Asus-Transformer.conf new file mode 100644 index 0000000..ae24b9a --- /dev/null +++ b/ucm2/Tegra/rt5631/Asus-Transformer.conf @@ -0,0 +1,8 @@ +# Use case Configuration for ASUS Transformer Prime TF201 + +Syntax 4 + +SectionUseCase."HiFi" { + File "/Tegra/rt5631/Asus-Transformer-HiFi.conf" + Comment "Play HiFi quality Music" +} diff --git a/ucm2/conf.d/tegra/Asus Transformer Infinity TF700T RT5631.conf b/ucm2/conf.d/tegra/Asus Transformer Infinity TF700T RT5631.conf new file mode 120000 index 0000000..5be7edf --- /dev/null +++ b/ucm2/conf.d/tegra/Asus Transformer Infinity TF700T RT5631.conf @@ -0,0 +1 @@ +../../Tegra/rt5631/Asus-Transformer.conf \ No newline at end of file diff --git a/ucm2/conf.d/tegra/Asus Transformer Pad TF300TG RT5631.conf b/ucm2/conf.d/tegra/Asus Transformer Pad TF300TG RT5631.conf new file mode 120000 index 0000000..5be7edf --- /dev/null +++ b/ucm2/conf.d/tegra/Asus Transformer Pad TF300TG RT5631.conf @@ -0,0 +1 @@ +../../Tegra/rt5631/Asus-Transformer.conf \ No newline at end of file diff --git a/ucm2/conf.d/tegra/Asus Transformer Pad TF300TL RT5631.conf b/ucm2/conf.d/tegra/Asus Transformer Pad TF300TL RT5631.conf new file mode 120000 index 0000000..5be7edf --- /dev/null +++ b/ucm2/conf.d/tegra/Asus Transformer Pad TF300TL RT5631.conf @@ -0,0 +1 @@ +../../Tegra/rt5631/Asus-Transformer.conf \ No newline at end of file diff --git a/ucm2/conf.d/tegra/Asus Transformer Prime TF201 RT5631.conf b/ucm2/conf.d/tegra/Asus Transformer Prime TF201 RT5631.conf new file mode 120000 index 0000000..5be7edf --- /dev/null +++ b/ucm2/conf.d/tegra/Asus Transformer Prime TF201 RT5631.conf @@ -0,0 +1 @@ +../../Tegra/rt5631/Asus-Transformer.conf \ No newline at end of file -- 2.33.4