}
}
+If.hpvol {
+ Condition {
+ Type ControlExists
+ Control "name='Headphone Playback Volume'"
+ }
+ False.Define.hpvol ""
+}
+
If.hplo {
Condition {
Type ControlExists
}
}
-SectionDevice."Headphones" {
- Comment "Headphones"
+If.hp {
+ Condition {
+ Type String
+ Empty "${var:hpvol}"
+ }
+ False.SectionDevice."Headphones" {
+ Comment "Headphones"
- If.headphone_switch {
- Condition {
- Type ControlExists
- Control "name='Headphone Playback Switch'"
- }
- True {
- EnableSequence [
- cset "name='Headphone Playback Switch' on"
- ]
- DisableSequence [
- cset "name='Headphone Playback Switch' off"
- ]
+ If.headphone_switch {
+ Condition {
+ Type ControlExists
+ Control "name='Headphone Playback Switch'"
+ }
+ True {
+ EnableSequence [
+ cset "name='Headphone Playback Switch' on"
+ ]
+ DisableSequence [
+ cset "name='Headphone Playback Switch' off"
+ ]
+ }
}
- }
- Value {
- PlaybackPriority 200
- PlaybackPCM "hw:${CardId}"
- PlaybackMixerElem "${var:hpvol}"
- PlaybackMasterElem "Master"
- PlaybackVolume "${var:hpvol} Playback Volume"
- PlaybackSwitch "Headphone Playback Switch"
- JackControl "${var:hpjack}"
+ Value {
+ PlaybackPriority 200
+ PlaybackPCM "hw:${CardId}"
+ PlaybackMixerElem "${var:hpvol}"
+ PlaybackMasterElem "Master"
+ PlaybackVolume "${var:hpvol} Playback Volume"
+ PlaybackSwitch "Headphone Playback Switch"
+ JackControl "${var:hpjack}"
+ }
}
}