SectionDevice."Headphones" {
	Comment "Headphones"

	ConflictingDevice [
		"Speaker"
		"MonoSpeaker"
	]

	EnableSequence [
		cdev "hw:bytcrrt5651"

		# Swap left and right
		cset "name='Stereo DAC MIXL DAC R1 Switch' on"
		cset "name='Stereo DAC MIXL DAC L1 Switch' off"
		cset "name='Stereo DAC MIXR DAC L1 Switch' on"
		cset "name='Stereo DAC MIXR DAC R1 Switch' off"

		cset "name='Headphone Switch' on"
		cset "name='HPO L Playback Switch' on"
		cset "name='HPO R Playback Switch' on"
		# Done after turning the HP on to keep the bias and clk on
		cset "name='Speaker Switch' off"
		cset "name='LOUT L Playback Switch' off"
		cset "name='LOUT R Playback Switch' off"
	]

	DisableSequence [
		cdev "hw:bytcrrt5651"
		# Disabling the HP switches is done by the Speaker EnableSeq

		# Unswap left and right
		cset "name='Stereo DAC MIXL DAC L1 Switch' on"
		cset "name='Stereo DAC MIXL DAC R1 Switch' off"
		cset "name='Stereo DAC MIXR DAC R1 Switch' on"
		cset "name='Stereo DAC MIXR DAC L1 Switch' off"
	]

	Value {
		PlaybackChannels "2"
		JackControl "Headphone Jack"
	}
}
