]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
HDA: move speaker config to HiFi-spk.conf file
authorJaroslav Kysela <perex@perex.cz>
Wed, 27 May 2026 11:31:57 +0000 (13:31 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 27 May 2026 11:32:40 +0000 (13:32 +0200)
No functional change.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/HDA/HiFi-analog.conf
ucm2/HDA/HiFi-spk.conf [new file with mode: 0644]

index 9e44ea893f67871c566ea25de1328abd3f0df4d9..e9b692e760b6c20a29330ce9fce73aa8f1014f95 100644 (file)
@@ -172,53 +172,7 @@ If.spk {
                Type String
                Empty "${var:spkvol}"
        }
-       False.SectionDevice."Speaker" {
-               Comment "Speaker"
-
-               If.seq {
-                       Condition {
-                               Type ControlExists
-                               Control "name='Bass Speaker Playback Switch'"
-                       }
-                       True {
-                               EnableSequence [
-                                       cset "name='Speaker Playback Switch' on"
-                                       cset "name='Bass Speaker Playback Switch' on"
-                               ]
-
-                               DisableSequence [
-                                       cset "name='Speaker Playback Switch' off"
-                                       cset "name='Bass Speaker Playback Switch' off"
-                               ]
-                       }
-                       False {
-                               EnableSequence [
-                                       cset "name='${var:spkvol} Playback Switch' on"
-                               ]
-
-                               DisableSequence [
-                                       cset "name='${var:spkvol} Playback Switch' off"
-                               ]
-                       }
-               }
-
-               Value {
-                       PlaybackPriority 100
-                       PlaybackPCM "hw:${CardId}"
-                       PlaybackMixerElem "${var:spkvol}"
-                       PlaybackVolume "${var:spkvol} Playback Volume"
-                       PlaybackSwitch "${var:spkvol} Playback Switch"
-               }
-
-               If.master {
-                       Condition {
-                               Type String
-                               String1 "${var:spkvol}"
-                               String2 "Master"
-                       }
-                       False.Value.PlaybackMasterElem "Master"
-               }
-       }
+       False.Include.hifi-spk.File "/HDA/HiFi-spk.conf"
 }
 
 If.cap-sw {
diff --git a/ucm2/HDA/HiFi-spk.conf b/ucm2/HDA/HiFi-spk.conf
new file mode 100644 (file)
index 0000000..7e6c4d0
--- /dev/null
@@ -0,0 +1,49 @@
+# HDA Speaker configuration
+
+SectionDevice."Speaker" {
+       Comment "Speaker"
+
+       If.seq {
+               Condition {
+                       Type ControlExists
+                       Control "name='Bass Speaker Playback Switch'"
+               }
+               True {
+                       EnableSequence [
+                               cset "name='Speaker Playback Switch' on"
+                               cset "name='Bass Speaker Playback Switch' on"
+                       ]
+
+                       DisableSequence [
+                               cset "name='Speaker Playback Switch' off"
+                               cset "name='Bass Speaker Playback Switch' off"
+                       ]
+               }
+               False {
+                       EnableSequence [
+                               cset "name='${var:spkvol} Playback Switch' on"
+                       ]
+
+                       DisableSequence [
+                               cset "name='${var:spkvol} Playback Switch' off"
+                       ]
+               }
+       }
+
+       Value {
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId}"
+               PlaybackMixerElem "${var:spkvol}"
+               PlaybackVolume "${var:spkvol} Playback Volume"
+               PlaybackSwitch "${var:spkvol} Playback Switch"
+       }
+
+       If.master {
+               Condition {
+                       Type String
+                       String1 "${var:spkvol}"
+                       String2 "Master"
+               }
+               False.Value.PlaybackMasterElem "Master"
+       }
+}