# Priority UCM device priority
#
-DefineMacro.HDMI.If.hdmi {
- Condition {
- Type ControlExists
- Control "iface=CARD,name='HDMI/DP,pcm=${var:__Device} Jack'"
+DefineMacro.HDMI {
+ If.1 {
+ Condition {
+ Type RegexMatch
+ Regex "(^$|0)"
+ String "${var:-__Device}"
+ }
+ True.Define.__Suffix ""
+ False.Define.__Suffix ",pcm=${var:__Device}"
}
- True {
- SectionDevice."HDMI${var:__Number}" {
+ If.2 {
+ Condition {
+ Type ControlExists
+ Control "iface=CARD,name='HDMI/DP${var:__Suffix} Jack'"
+ }
+ True.SectionDevice."HDMI${var:__Number}" {
Comment "HDMI / DisplayPort ${var:__Number} Output"
EnableSequence [
Value {
PlaybackPriority "${var:__Priority}"
PlaybackPCM "hw:${CardId},${var:__Device}"
- JackControl "HDMI/DP,pcm=${var:__Device} Jack"
+ JackControl "HDMI/DP${var:__Suffix} Jack"
}
}
}