]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
ucm2: HDA - add second Line output (Front)
authorJaroslav Kysela <perex@perex.cz>
Mon, 21 Mar 2022 14:34:58 +0000 (15:34 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 10 May 2022 14:59:23 +0000 (16:59 +0200)
BugLink: https://github.com/alsa-project/alsa-ucm-conf/issues/141
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/HDA/HiFi-analog.conf

index 2434c6d639782bd32720595b44918780529dd456..72834d1ce5dd9766d564b2407f32282bb25e4ca6 100644 (file)
@@ -1,6 +1,7 @@
 # Generic HDA devices for analog I/O
 
 Define.DeviceFrontMic ""
+Define.LineDevice ""
 Define.hpvol "Headphone"
 Define.hpjack "Headphone Jack"
 Define.loctl "Line"
@@ -40,6 +41,16 @@ If.lineout {
        }
 }
 
+If.linefront {
+       Condition {
+               Type ControlExists
+               Control "name='Front Playback Volume'"
+       }
+       True.Define {
+               LineDevice "1"
+       }
+}
+
 If.hplo {
        Condition {
                Type ControlExists
@@ -222,7 +233,7 @@ If.line {
                Type ControlExists
                Control "name='${var:loctl} Playback Switch'"
        }
-       True.SectionDevice."Line" {
+       True.SectionDevice."Line${var:LineDevice}" {
                Comment "Line Output"
 
                If.conflict {
@@ -254,3 +265,34 @@ If.line {
                }
        }
 }
+
+If.linefront {
+       Condition {
+               Type ControlExists
+               Control "name='Front Playback Switch'"
+       }
+       True.SectionDevice."Line2" {
+               Comment "Second Line Output"
+
+               ConflictingDevice [
+                       "Line${var:LineDevice}"
+               ]
+
+               EnableSequence [
+                       cset "name='Front Playback Switch' on"
+               ]
+               DisableSequence [
+                       cset "name='Front Playback Switch' off"
+               ]
+
+               Value {
+                       PlaybackPriority 250
+                       PlaybackPCM "hw:${CardId}"
+                       PlaybackMixerElem "Front"
+                       PlaybackMasterElem "Master"
+                       PlaybackVolume "Front Playback Volume"
+                       PlaybackSwitch "Front Playback Switch"
+                       JackControl "Line Out Front Jack"
+               }
+       }
+}