SectionDevice."Speaker" {
	Comment "Speakers"

	ConflictingDevice [
		"Headphones"
	]

	EnableSequence [
		cset "name='SPOL MIX SPKVOL L Switch' on"
		cset "name='SPOR MIX SPKVOL R Switch' on"
		# undo MonoSpeaker mixing of right channel to left speaker
		cset "name='SPOL MIX SPKVOL R Switch' off"
		cset "name='Speaker Channel Switch' on"
		cset "name='Speaker L Playback Switch' on"
		cset "name='Speaker R Playback Switch' on"

	]

	DisableSequence [
		cset "name='Speaker Channel Switch' off"
		cset "name='Speaker L Playback Switch' off"
		cset "name='Speaker R Playback Switch' off"
	]

	Value {
		PlaybackPriority 100
		PlaybackPCM "hw:${CardId}"
		PlaybackMixerElem "Speaker"
		PlaybackVolume "Speaker Playback Volume"
		If.SpkAif1 {
			Condition {
				Type String
				String1 "${var:HaveAif}"
				String2 "1"
			}
			True.PlaybackMasterElem "DAC1"
		}
		If.SpkAif2 {
			Condition {
				Type String
				String1 "${var:HaveAif}"
				String2 "2"
			}
			True.PlaybackMasterElem "DAC2"
		}
	}
}
