SectionVerb {
	EnableSequence [
	]
}

If.hdmi {
	Condition {
		Type ControlExists
		Control "iface=CARD,name='HDMI/DP,pcm=1 Jack'"
	}
	True {
		SectionDevice."HDMI1" {
			Comment "HDMI / DisplayPort 1 Output"

			EnableSequence [
				cset "name='IEC958 Playback Switch' on"
			]

			DisableSequence [
				cset "name='IEC958 Playback Switch' off"
			]

			Value {
				PlaybackPriority 210
				PlaybackPCM "hw:${CardId},1"
				JackControl "HDMI/DP,pcm=1 Jack"
			}
		}
	}
}

If.hdmi {
	Condition {
		Type ControlExists
		Control "iface=CARD,name='HDMI/DP,pcm=2 Jack'"
	}
	True {
		SectionDevice."HDMI2" {
			Comment "HDMI / DisplayPort 2 Output"

			EnableSequence [
				cset "name='IEC958 Playback Switch',index=1 on"
			]

			DisableSequence [
				cset "name='IEC958 Playback Switch',index=1 off"
			]

			Value {
				PlaybackPriority 220
				PlaybackPCM "hw:${CardId},2"
				JackControl "HDMI/DP,pcm=2 Jack"
			}
		}
	}
}

If.hdmi {
	Condition {
		Type ControlExists
		Control "iface=CARD,name='HDMI/DP,pcm=3 Jack'"
	}
	True {
		SectionDevice."HDMI3" {
			Comment "HDMI / DisplayPort 3 Output"

			EnableSequence [
				cset "name='IEC958 Playback Switch',index=2 on"
			]

			DisableSequence [
				cset "name='IEC958 Playback Switch',index=2 off"
			]

			Value {
				PlaybackPriority 230
				PlaybackPCM "hw:${CardId},3"
				JackControl "HDMI/DP,pcm=3 Jack"
			}
		}
	}
}
