]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
tegra: max98090: add speakers and internal mic
authorAnton Bambura <jenneron@protonmail.com>
Sun, 19 Jun 2022 06:11:04 +0000 (09:11 +0300)
committerJaroslav Kysela <perex@perex.cz>
Fri, 8 Jul 2022 14:58:47 +0000 (16:58 +0200)
Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/173
Signed-off-by: Anton Bambura <jenneron@protonmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/Tegra/max98090/HiFi.conf

index 542859160b4cd206c95b637c99ed8f3f4686f7e1..93d32172255be3eff86fc1a022825fc433e4ebd1 100644 (file)
@@ -37,10 +37,38 @@ SectionVerb {
        ]
 }
 
+SectionDevice."Speakers" {
+       Comment = "Speakers"
+
+       ConflictingDevice [
+               "Headphones"
+       ]
+       Value {
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId}"
+               PlaybackVolume "Speaker Volume"
+       }
+       EnableSequence [
+               cset "name='Speakers Switch' on"
+               cset "name='Headphones Switch' off"
+       ]
+       DisableSequence [
+               cset "name='Headphones Switch' on"
+               cset "name='Speakers Switch' off"
+       ]
+}
+
 SectionDevice."Headphones" {
+       Comment = "Headphones"
+
+       ConflictingDevice [
+               "Speakers"
+       ]
        Value {
                PlaybackPriority 100
                PlaybackPCM "hw:${CardId}"
+               PlaybackVolume "Headphone Volume"
+               JackControl "Headphone Jack"
        }
        EnableSequence [
                cset "name='Speakers Switch' off"
@@ -52,22 +80,53 @@ SectionDevice."Headphones" {
        ]
 }
 
-SectionDevice."Mic" {
+SectionDevice."InternalMicrophone" {
+       Comment "Internal Microphone"
+
+       ConflictingDevice [
+               "HeadsetMicrophone"
+       ]
+
+       EnableSequence [
+               cset "name='Int Mic Switch' on"
+               cset "name='Mic Jack Switch' off"
+               cset "name='DMIC Mux' DMIC"
+       ]
+
+       DisableSequence [
+               cset "name='Int Mic Switch' off"
+               cset "name='Mic Jack Switch' on"
+               cset "name='DMIC Mux' ADC"
+       ]
+
+       Value {
+               CapturePCM "hw:${CardId}"
+               CaptureChannels 2
+               CaptureVolume "MIC2 Volume"
+       }
+}
+
+SectionDevice."HeadsetMicrophone" {
+       Comment = "Headset Microphone"
+
+       ConflictingDevice [
+               "InternalMicrophone"
+       ]
+
        Value {
                CapturePriority 100
                CapturePCM "hw:${CardId}"
                #CaptureControl "MIC2"
+               JackControl "Mic Jack"
        }
        EnableSequence [
                cset "name='Int Mic Switch' off"
                cset "name='DMIC Mux' ADC"
                cset "name='Mic Jack Switch' on"
-               cset "name='Record Path DC Blocking' on"
        ]
        DisableSequence [
                cset "name='Mic Jack Switch' off"
                cset "name='DMIC Mux' DMIC"
                cset "name='Int Mic Switch' on"
-               cset "name='Record Path DC Blocking' off"
        ]
 }