From f3694c25a0b57f5cabc581ccf8124497782f5526 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Fri, 8 Jul 2022 16:52:26 +0200 Subject: [PATCH] tegra: max98090: cleanups - add "all switches (devices) off" to the verb's enable sequence - reshuffle positions of device enable/disable sequences in HiFi.conf - add missing newline to the end of file Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/173 Signed-off-by: Jaroslav Kysela --- ucm2/Tegra/max98090/HiFi.conf | 64 +++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 25 deletions(-) diff --git a/ucm2/Tegra/max98090/HiFi.conf b/ucm2/Tegra/max98090/HiFi.conf index bc3a71f..5a8f8d8 100644 --- a/ucm2/Tegra/max98090/HiFi.conf +++ b/ucm2/Tegra/max98090/HiFi.conf @@ -1,20 +1,32 @@ +SectionVerb { + EnableSequence [ + cset "name='Speakers Switch' off" + cset "name='Headphones Switch' off" + cset "name='Mic Jack Switch' off" + cset "name='Int Mic Switch' off" + ] +} + SectionDevice."Speakers" { Comment = "Speakers" ConflictingDevice [ "Headphones" ] - Value { - PlaybackPriority 100 - PlaybackPCM "hw:${CardId}" - PlaybackVolume "Speaker Volume" - } + EnableSequence [ cset "name='Speakers Switch' on" ] + DisableSequence [ cset "name='Speakers Switch' off" ] + + Value { + PlaybackPriority 100 + PlaybackPCM "hw:${CardId}" + PlaybackVolume "Speaker Volume" + } } SectionDevice."Headphones" { @@ -23,27 +35,27 @@ SectionDevice."Headphones" { ConflictingDevice [ "Speakers" ] - Value { - PlaybackPriority 100 - PlaybackPCM "hw:${CardId}" - PlaybackVolume "Headphone Volume" - JackControl "Headphone Jack" - } + EnableSequence [ cset "name='Headphones Switch' on" ] + DisableSequence [ cset "name='Headphones Switch' off" ] + + Value { + PlaybackPriority 100 + PlaybackPCM "hw:${CardId}" + PlaybackVolume "Headphone Volume" + JackControl "Headphone Jack" + } + } -SectionDevice."InternalMicrophone" { +SectionDevice."Mic" { Comment "Internal Microphone" - ConflictingDevice [ - "HeadsetMicrophone" - ] - EnableSequence [ cset "name='Int Mic Switch' on" cset "name='DMIC Mux' DMIC" @@ -61,25 +73,27 @@ SectionDevice."InternalMicrophone" { } } -SectionDevice."HeadsetMicrophone" { +SectionDevice."Headset" { Comment = "Headset Microphone" ConflictingDevice [ - "InternalMicrophone" + "Mic" ] - Value { - CapturePriority 100 - CapturePCM "hw:${CardId}" - #CaptureControl "MIC2" - JackControl "Mic Jack" - } EnableSequence [ cset "name='Mic Jack Switch' on" cset "name='DMIC Mux' ADC" ] + DisableSequence [ cset "name='Mic Jack Switch' off" cset "name='DMIC Mux' DMIC" ] -} \ No newline at end of file + + Value { + CapturePriority 100 + CapturePCM "hw:${CardId}" + #CaptureControl "MIC2" + JackControl "Mic Jack" + } +} -- 2.47.1