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

SectionDevice."Line1" {
	Comment "Line playback"

	EnableSequence [
		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 [
		cset "name='Line Out Switch' off"
		cset "name='DAC1 MIXL DAC1' off"
		cset "name='DAC1 MIXR DAC1' off"
	]

	Value {
		PlaybackPriority 100
		PlaybackPCM "hw:${CardId}"
		JackDev "rt5660-jack"
		JackControl "Line Out Jack"
	}
}

SectionDevice."Line2" {
	Comment "Line capture"

	EnableSequence [
		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 [
		cset "name='Line In Switch' off"
		cset "name='Sto1 ADC MIXR ADC1 Switch' off"
		cset "name='Sto1 ADC MIXL ADC1 Switch' off"
	]

	Value {
		CapturePriority 100
		CapturePCM "hw:${CardId},1"		
		JackDev "rt5660-jack"
		JackControl "Line In Jack"
	}
}
