From: Jaroslav Kysela Date: Wed, 27 May 2026 11:31:57 +0000 (+0200) Subject: HDA: move speaker config to HiFi-spk.conf file X-Git-Tag: v1.2.16~3 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=387977a8b60842883db9ae61bc49ba51f3181026;p=alsa-ucm-conf.git HDA: move speaker config to HiFi-spk.conf file No functional change. Signed-off-by: Jaroslav Kysela --- diff --git a/ucm2/HDA/HiFi-analog.conf b/ucm2/HDA/HiFi-analog.conf index 9e44ea8..e9b692e 100644 --- a/ucm2/HDA/HiFi-analog.conf +++ b/ucm2/HDA/HiFi-analog.conf @@ -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 index 0000000..7e6c4d0 --- /dev/null +++ b/ucm2/HDA/HiFi-spk.conf @@ -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" + } +}