File HiFi.conf of Package alsa.3768

SectionVerb {
	# ALSA PCM
	Value {
		TQ "HiFi"

		# ALSA PCM device for HiFi
		PlaybackPCM "hw:cherrytrailcrau,0"
		CapturePCM "hw:cherrytrailcrau,0"
	}

	EnableSequence [
		cdev "hw:cherrytrailcrau"

		# Enable audio output path
		cset "name='codec_out0 mix 0 pcm0_in Switch' on"
		cset "name='media0_out mix 0 media1_in Switch' on"

		cset "name='media1_in Gain 0 Ramp Delay' 50"
		cset "name='media1_in Gain 0 Switch' on"
		cset "name='media1_in Gain 0 Volume' 0dB"

		cset "name='pcm0_in Gain 0 Ramp Delay' 50"
		cset "name='pcm0_in Gain 0 Switch' on"
		cset "name='pcm0_in Gain 0 Volume' 0dB"

		cset "name='codec_out0 Gain 0 Ramp Delay' 50"
		cset "name='codec_out0 Gain 0 Switch' on"
		cset "name='codec_out0 Gain 0 Volume' 0dB"

		# Enable audio input path
		cset "name='pcm1_out mix 0 media_loop2_in Switch' on"
		cset "name='media_loop2_out mix 0 codec_in0 Switch' on"

		cset "name='codec_in0 Gain 0 Ramp Delay' 50"
		cset "name='codec_in0 Gain 0 Switch' on"
		cset "name='codec_in0 Gain 0 Volume' 0dB"

		cset "name='media_loop2_out Gain 0 Ramp Delay' 50"
		cset "name='media_loop2_out Gain 0 Switch' on"
		cset "name='media_loop2_out Gain 0 Volume' 0dB"

		cset "name='pcm1_out Gain 0 Ramp Delay' 50"
		cset "name='pcm1_out Gain 0 Switch' on"
		cset "name='pcm1_out Gain 0 Volume' 0dB"

		# Output Configuration
		cset "name='DAC1 MIXL DAC1 Switch' on"
		cset "name='DAC1 MIXR DAC1 Switch' on"
		cset "name='DAC L2 Mux' 'IF1 DAC'"
		cset "name='DAC R2 Mux' 'IF1 DAC'"
		cset "name='DAC2 Playback Switch' on"

		cset "name='Stereo DAC MIXL DAC L1 Switch' on"
		cset "name='Stereo DAC MIXL DAC L2 Switch' on"
		cset "name='Stereo DAC MIXR DAC R1 Switch' on"
		cset "name='Stereo DAC MIXR DAC R2 Switch' on"

		cset "name='HPOVOL MIXL DAC1 Switch' on"
		cset "name='HPOVOL MIXR DAC1 Switch' on"
		cset "name='HPO MIX HPVOL Switch' on"

		cset "name='LOUT MIX DAC L1 Switch' on"
		cset "name='LOUT MIX DAC R1 Switch' on"
		cset "name='LOUT L Playback Switch' on"
		cset "name='LOUT R Playback Switch' on"

		# Input Configuration
		cset "name='Stereo1 DMIC Mux' DMIC1"
		cset "name='Stereo1 ADC L2 Mux' DMIC"
		cset "name='Stereo1 ADC R2 Mux' DMIC"
		cset "name='Stereo1 ADC L1 Mux' ADC"
		cset "name='Stereo1 ADC R1 Mux' ADC"
		cset "name='Stereo2 DMIC Mux' DMIC1"
		cset "name='Stereo2 ADC L2 Mux' DMIC"
		cset "name='Stereo2 ADC R2 Mux' DMIC"
		cset "name='Stereo2 ADC L1 Mux' ADC"
		cset "name='Stereo2 ADC R1 Mux' ADC"
		cset "name='Stereo2 ADC LR Mux' L"

		cset "name='IN1 Boost Volume' 0"
		cset "name='IN2 Boost Volume' 0"
		cset "name='IN Capture Volume' 23"
	]

	DisableSequence [
		cdev "hw:cherrytrailcrau"

		# Disable audio output path
		cset "name='codec_out0 mix 0 pcm0_in Switch' off"
		cset "name='media0_out mix 0 media1_in Switch' off"

		cset "name='media1_in Gain 0 Switch' off"
		cset "name='pcm0_in Gain 0 Switch' off"
		cset "name='codec_out0 Gain 0 Switch' off"

		# Disable audio input path
		cset "name='pcm1_out mix 0 media_loop2_in Switch' off"
		cset "name='media_loop2_out mix 0 codec_in0 Switch' off"

		cset "name='media_loop2_out Gain 0 Switch' off"
		cset "name='pcm1_out Gain 0 Switch' off"
		cset "name='codec_in0 Gain 0 Switch' off"
	]
}

SectionDevice."Speaker" {
	Comment "Speaker"

	Value {
		PlaybackChannels "2"
	}

	ConflictingDevice [
		"Headphone"
	]

	EnableSequence [
		cdev "hw:cherrytrailcrau"

		cset "name='Ext Spk Switch' on"
		cset "name='OUT Channel Switch' on"
		cset "name='OUT Playback Volume' 80%"
	]

	DisableSequence [
		cdev "hw:cherrytrailcrau"

		cset "name='OUT Channel Switch' off"
		cset "name='Ext Spk Switch' off"
	]
}

SectionDevice."Headphone".0 {
	Comment "Headphones"

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

	ConflictingDevice [
		"Speaker"
	]

	EnableSequence [
		cdev "hw:cherrytrailcrau"

		cset "name='Headphone Switch' on"
		cset "name='HP Playback Volume' 80%"
	]

	DisableSequence [
		cdev "hw:cherrytrailcrau"

		cset "name='Headphone Switch' off"
	]
}

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

	Value {
		CaptureChannels "2"
		CapturePriority "150"
	}

	EnableSequence [
		cdev "hw:cherrytrailcrau"

		cset "name='Int Mic Switch' on"
		cset "name='Sto1 ADC MIXL ADC2 Switch' on"
		cset "name='Sto1 ADC MIXR ADC2 Switch' on"
	]

	DisableSequence [
		cdev "hw:cherrytrailcrau"

		cset "name='Sto1 ADC MIXL ADC2 Switch' off"
		cset "name='Sto1 ADC MIXR ADC2 Switch' off"
		cset "name='Int Mic Switch' off"
	]
}

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

	Value {
		CaptureChannels "2"
		JackControl "Headset Mic Jack"
		JackHWMute "Mic"
	}

	EnableSequence [
		cdev "hw:cherrytrailcrau"

		cset "name='Headset Mic Switch' on"
		cset "name='RECMIXL BST1 Switch' on"
		cset "name='RECMIXR BST1 Switch' on"
		cset "name='Sto1 ADC MIXL ADC1 Switch' on"
		cset "name='Sto1 ADC MIXR ADC1 Switch' on"
	]

	DisableSequence [
		cdev "hw:cherrytrailcrau"

		cset "name='Headset Mic Switch' off"
		cset "name='RECMIXL BST1 Switch' off"
		cset "name='RECMIXR BST1 Switch' off"
		cset "name='Sto1 ADC MIXL ADC1 Switch' off"
		cset "name='Sto1 ADC MIXR ADC1 Switch' off"
	]
}
openSUSE Build Service is sponsored by