# Use case for devices on realtek,rt5651-codec card.

SectionVerb {
	EnableSequence [
		cdev "hw:realtekrt5651co"
	]

	DisableSequence [
		cdev "hw:realtekrt5651co"
	]
}

SectionDevice."Headphone".0 {
	Comment "Headphone Playback"

	EnableSequence [
		cdev "hw:realtekrt5651co"

		cset "name='DAC MIXL INF1 Switch' 1"
		cset "name='DAC MIXR INF1 Switch' 1"
		cset "name='Stereo DAC MIXL DAC L1 Switch' 1"
		cset "name='Stereo DAC MIXR DAC R1 Switch' 1"
		cset "name='DAC MIXL INF1 Switch' 1"
		cset "name='DAC MIXR INF1 Switch' 1"
		cset "name='OUT MIXL DAC L1 Switch' 1"
		cset "name='OUT MIXR DAC R1 Switch' 1"
		cset "name='HPOVOL L Switch'' 1"
		cset "name='HPOVOL R Switch' 1"
		cset "name='HPO MIX HPVOL Switch' 1"
		cset "name='HPO R Playback Switch' 1"
		cset "name='HPO L Playback Switch' 1"
	]

	DisableSequence [
		cdev "hw:realtekrt5651co"

		cset "name='HPO L Playback Switch' 0"
		cset "name='HPO R Playback Switch' 0"
		cset "name='HPO MIX HPVOL Switch' 0"
		cset "name='HPOVOL R Switch' 0"
		cset "name='HPOVOL L Switch'' 0"
		cset "name='OUT MIXR DAC R1 Switch' 0"
		cset "name='OUT MIXL DAC L1 Switch' 0"
		cset "name='DAC MIXR INF1 Switch' 0"
		cset "name='DAC MIXL INF1 Switch' 0"
		cset "name='Stereo DAC MIXR DAC R1 Switch' 0"
		cset "name='Stereo DAC MIXL DAC L1 Switch' 0"
		cset "name='DAC MIXR INF1 Switch' 0"
		cset "name='DAC MIXL INF1 Switch' 0"
	]

	Value {
		PlaybackPCM "hw:realtekrt5651co"
		PlaybackChannels "2"
		PlaybackPriority "2"
		# JackControl "Headphone Jack"
		# JackHWMute "Headphone"
	}
}

SectionDevice."Speaker".0 {
	Comment "Speaker Playback"

	EnableSequence [
		cdev "hw:realtekrt5651co"

		cset "name='DAC MIXL INF1 Switch' 1"
		cset "name='DAC MIXR INF1 Switch' 1"
		cset "name='Stereo DAC MIXL DAC L1 Switch' 1"
		cset "name='Stereo DAC MIXR DAC R1 Switch' 1"
		cset "name='DAC MIXL INF1 Switch' 1"
		cset "name='DAC MIXR INF1 Switch' 1"
		cset "name='OUT MIXL DAC L1 Switch' 1"
		cset "name='OUT MIXR DAC R1 Switch' 1"
	]

	DisableSequence [
		cdev "hw:realtekrt5651co"

		cset "name='OUT MIXR DAC R1 Switch' 0"
		cset "name='OUT MIXL DAC L1 Switch' 0"
		cset "name='DAC MIXR INF1 Switch' 0"
		cset "name='DAC MIXL INF1 Switch' 0"
		cset "name='Stereo DAC MIXR DAC R1 Switch' 0"
		cset "name='Stereo DAC MIXL DAC L1 Switch' 0"
		cset "name='DAC MIXR INF1 Switch' 0"
		cset "name='DAC MIXL INF1 Switch' 0"
	]

	Value {
		PlaybackPCM "hw:realtekrt5651co"
		PlaybackChannels "2"
		PlaybackPriority "2"
		# JackControl "Headphone Jack"
		# JackHWMute "Headphone"
	}
}

SectionDevice."Mic".0 {
	Comment "Internal Microphone"

	Value {
		CaptureChannels "2"
		CapturePriority "150"
	}

	EnableSequence [
		cdev "hw:realtekrt5651co"

		cset "name='RECMIXL BST2 Switch' 1"
		cset "name='RECMIXR BST2 Switch' 1"
		cset "name='Stereo1 ADC L1 Mux' 1"
		cset "name='Stereo1 ADC R1 Mux' 1"
		cset "name='Stereo1 ADC MIXL ADC1 Switch' 1"
		cset "name='Stereo1 ADC MIXR ADC1 Switchx' 1"
		cset "name='ADC Capture Switch' 1"
		cset "name='IN2 Boost' 2"
		cset "name='ADC Capture Volume' 47"
	]

	DisableSequence [
		cdev "hw:realtekrt5651co"
	]
}

SectionDevice."HSMic".1 {
	Comment "Headset Microphone"

	Value {
		CaptureChannels "2"
		# JackControl "Headphone Jack"
		# JackHWMute "Mic"
	}

	EnableSequence [
		cdev "hw:realtekrt5651co"
	]

	DisableSequence [
		cdev "hw:realtekrt5651co"
	]
}

