# UCM for Intel Kabylake platforms with RT5660
# For Audio in I2S mode

SectionVerb {

	EnableSequence [
	]

	DisableSequence [
	]

	# ALSA PCM
	Value {
		# ALSA PCM device for HiFi
		PlaybackPCM "hw:kblrt5660,0"
		CapturePCM "hw:kblrt5660,1"
	}
}

SectionDevice."LineOut" {
	Comment "LineOut playback"

	EnableSequence [
		cdev "hw:kblrt5660"
		cset "name='DAC1 Playback Volume' 30"
		cset "name='OUT Playback Volume' 19"
		cset "name='OUT Playback Switch' on"
		cset "name='codec0_out mo media0_in mi Switch' on"
		cset "name='DAC1 MIXL DAC1 Switch' on"
		cset "name='DAC1 MIXR DAC1 Switch' on"
		cset "name='Stereo DAC MIXL DAC L1 Switch' on"
		cset "name='Stereo DAC MIXR DAC L1 Switch' off"
		cset "name='Stereo DAC MIXR DAC R1 Switch' on"
		cset "name='Stereo DAC MIXL DAC R1 Switch' off"
		cset "name='LOUT MIX DAC Switch' on"
		cset "name='Line Out Switch' on"
	]

	DisableSequence [
		cdev "hw:kblrt5660"
		cset "name='Line Out Switch' off"
		cset "name='DAC1 MIXL DAC1' off"
		cset "name='DAC1 MIXR DAC1' off"
	]

	Value {
		PlaybackChannels "2"
		JackDev "rt5660-jack"
		JackControl "Line Out Jack"
	}
}

SectionDevice."LineIn" {
	Comment "LineIn capture"

	EnableSequence [
		cdev "hw:kblrt5660"

		cset "name='ADC Capture Volume' 30"
		cset "name='IN1 Boost Volume' 30"
		cset "name='IN2 Boost Volume' 30"
		cset "name='STO1 ADC Boost Gain Volume' 1"
		cset "name='RECMIXL BST1 Switch' off"
		cset "name='RECMIXR BST1 Switch' on"
		cset "name='RECMIXL BST2 Switch' on"
		cset "name='RECMIXR BST2 Switch' off"
		cset "name='Line In Switch' on"
		cset "name='Sto1 ADC MIXR ADC1 Switch' on"
		cset "name='Sto1 ADC MIXL ADC1 Switch' on"
		cset "name='media0_out mo codec0_in mi Switch' on"
	]

	DisableSequence [
		cdev "hw:kblrt5660"
		cset "name='Line In Switch' off"
		cset "name='Sto1 ADC MIXR ADC1 Switch' off"
		cset "name='Sto1 ADC MIXL ADC1 Switch' off"
	]

	Value {
		CaptureChannels "2"
		JackDev "rt5660-jack"
		JackControl "Line In Jack"
	}
}
