SectionVerb {
	EnableSequence [
	cset "name='Output 1 Playback Volume' 33"
	cset "name='Output 2 Playback Volume' 33"
	cset "name='PCM Volume' 174"

	cset "name='Capture Digital Volume' 174"
	cset "name='Mic PGA Volume' 3"

	cset "name='Headphones Switch' off"
	cset "name='Capture ZC Switch' off"
	]
}

Define {
	SpeakerName ""
}

If.SpkrSwtch {
	Condition {
		Type ControlExists
		Control "name='Speaker Switch'"
	}
	True.Define {
		SpeakerName "Speaker"
	}
}

If.Spk {
	Condition {
		Type String
		Empty "${var:SpeakerName}"
	}

	False.SectionDevice."Speaker" {
		Comment "${var:SpeakerName}"

		EnableSequence [
			cset "name='Speaker Switch' on"
		]

		DisableSequence [
			cset "name='Speaker Switch' off"
		]

		Value {
			PlaybackPriority 200
			PlaybackPCM "hw:${CardId}"
			PlaybackMixerElem "PCM"
		}
	}
}

SectionDevice."Headphones" {
	Comment "Headphones"
#	If.SpkrSwtch {
#		Condition {
#			Type ControlExists
#			Control "name='Speaker Switch'"
#		}
#		True {
#			ConflictingDevice [
#				"Speaker"
#			]
#		}
#	}

	EnableSequence [
		cset "name='Headphones Switch' on"
	]

	DisableSequence [
		cset "name='Headphones Switch' off"
	]

	Value {
		PlaybackPriority 200
		PlaybackPCM "hw:${CardId}"
		PlaybackMixerElem "PCM"
		JackControl "Headphones Jack"
		JackHWMute "Speaker"
	}
}

SectionDevice."Headset" {
	Comment "Headset Microphone"

	ConflictingDevice [
		"Mic"
	]

	EnableSequence [
		cset "name='Capture ZC Switch' on"
	]

	DisableSequence [
		cset "name='Capture ZC Switch' off"
	]

	Value {
		CapturePriority 200
		CapturePCM "hw:${CardId}"
#		CaptureMixerElem "Capture Digital"
#		CaptureMasterElem "Mic PGA"
	}
}

SectionDevice."Mic" {
	Comment "Internal Microphone"

	ConflictingDevice [
		"Headset"
	]

	Value {
		CapturePriority 100
		CapturePCM "hw:${CardId}"
	}

	EnableSequence [
#		cset "name='Differential Mux' Line 2"
#		cset "name='Main Mic Switch' on"
	]

	DisableSequence [
#		cset "name='Main Mic Switch' off"
	]
}
