linux icon indicating copy to clipboard operation
linux copied to clipboard

es8336 HiFi.conf

Open junocomp opened this issue 3 years ago • 1 comments

I believe the current HiFi.conf for es8336 is incorrect and does not enable the require volumes for the speakers.

I have attached my conf file, this enables the speakers from startup, detects the HDMI audio and enables the internal microphone. I have tested this on 3 devices now and it seems to work. Can other people test it too please. If it works, it will be worth pushing it upstream.

Make sure you backup your /usr/share/alsa/ucm2/Intel/sof-essx8336/HiFi.conf and replace it with the configuration below. Restart your machine to take effect.

SectionVerb {
	EnableSequence [
		#disdevall ""
		# Disable all inputs / outputs
		#   (may be duplicated with disdevall)
		cset "name='Left Headphone Mixer Left DAC Switch' on"
		cset "name='Right Headphone Mixer Right DAC Switch' on"
	]
}

SectionDevice."Mic" {
		Comment "Analog Microphone"

		EnableSequence [
			cset "name='Internal Mic Switch' on"
			cset "name='Headset Mic Switch' on"
		]

		DisableSequence [

				]

		Value {
			CapturePriority 100
			CapturePCM "hw:${CardId}"
			CaptureMixerElem "ADC PGA Gain"
			CaptureMasterElem "ADC"
		}
}

SectionDevice."Speaker" {
	Comment "Speakers"

	ConflictingDevice [
		"Headphones"
	]

	EnableSequence [
		cset "name='Speaker Switch' on"
		cset "name='Differential Mux' lin1-rin1"
	]

	DisableSequence [
		cset "name='Speaker Switch' off"
		cset "name='Differential Mux' lin2-rin2"
	]
	Value {
		PlaybackPriority 100
		PlaybackPCM "hw:${CardId}"
		# The es8316 only has a HP-amp which is muxed to the speaker
		# or to the headpones output
		PlaybackMixerElem "Headphone Mixer"
		PlaybackMasterElem "DAC"
	}
}

SectionDevice."Headphones" {
	Comment "Headphones"

	ConflictingDevice [
		"Speaker"
	]
	
	EnableSequence [
                cset "name='Headset Mic Switch' on"
                cset "name='Speaker Switch' off"
                cset "name='Differential Mux' lin2-rin2"
        ]
        
        DisableSequence [
		cset "name='Differential Mux' lin1-rin1"
	]

	Value {
		PlaybackPriority 300
		PlaybackPCM "hw:${CardId}"
		PlaybackMixerElem "Headphone Mixer"
		PlaybackMasterElem "DAC"
		JackControl "Headphone Jack"
		JackHWMute "Speaker"
	}
}

Include.hdmi.File "/Intel/sof-essx8336/Hdmi.conf"

junocomp avatar Nov 07 '22 16:11 junocomp

@junocomp it'd be easier to review if you provided a PR against the upstream alsa-ucm-conf directly. You will not get much feedback here, and you'd want to ping @yangxiaohua2009 on UCM changes anyways.

plbossart avatar Nov 10 '22 17:11 plbossart

closing since it's already filed against alsa-ucm-conf

plbossart avatar Dec 13 '22 00:12 plbossart