]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
ucm2: HDA - add support for 'Line Playback' controls
authorJaroslav Kysela <perex@perex.cz>
Mon, 21 Mar 2022 14:15:05 +0000 (15:15 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 10 May 2022 14:59:07 +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 9c8510b4a41664f7ca76bb6dd2464ba0054750cf..f1e8fa4b7e20cb8941dead5d2a027595ad6505d3 100644 (file)
@@ -3,7 +3,8 @@
 Define.DeviceFrontMic ""
 Define.hpvol "Headphone"
 Define.hpjack "Headphone Jack"
-Define.lovol "Line Out"
+Define.loctl "Line"
+Define.lovol "Line"
 
 If.fmic {
        Condition {
@@ -28,6 +29,17 @@ If.fmic {
        }
 }
 
+If.lineout {
+       Condition {
+               Type ControlExists
+               Control "name='Line Out Playback Volume'"
+       }
+       True.Define {
+               loctl "Line Out"
+               lovol "Line Out"
+       }
+}
+
 If.hplo {
        Condition {
                Type ControlExists
@@ -199,10 +211,10 @@ If.frontmic {
        }
 }
 
-If.lineout {
+If.line {
        Condition {
                Type ControlExists
-               Control "name='Line Out Playback Switch'"
+               Control "name='${var:loctl} Playback Switch'"
        }
        True.SectionDevice."Line" {
                Comment "Line Output"
@@ -219,10 +231,10 @@ If.lineout {
                }
 
                EnableSequence [
-                       cset "name='Line Out Playback Switch' on"
+                       cset "name='${var:loctl} Playback Switch' on"
                ]
                DisableSequence [
-                       cset "name='Line Out Playback Switch' off"
+                       cset "name='${var:loctl} Playback Switch' off"
                ]
 
                Value {
@@ -231,8 +243,8 @@ If.lineout {
                        PlaybackMixerElem "${var:lovol}"
                        PlaybackMasterElem "Master"
                        PlaybackVolume "${var:lovol} Playback Volume"
-                       PlaybackSwitch "Line Out Playback Switch"
-                       JackControl "Line Out Jack"
+                       PlaybackSwitch "${var:loctl} Playback Switch"
+                       JackControl "${var:loctl} Jack"
                }
        }
 }