Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

es8336 HiFi.conf #244

Open
junocomp opened this issue Nov 19, 2022 · 5 comments
Open

es8336 HiFi.conf #244

junocomp opened this issue Nov 19, 2022 · 5 comments

Comments

@junocomp
Copy link

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 with Debian 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"
@perexg
Copy link
Member

perexg commented Nov 21, 2022

It would be better to create a PR (pull request) to see and comment changes. You can point to the raw file (like https://raw.githubusercontent.com/perexg/alsa-ucm-conf/issue/239/ucm2/HDA/DualCodecs/HiFi.conf) in your repo.

@junocomp
Copy link
Author

@perexg I am not sure how to do a PR, should I push it to master?

@junocomp
Copy link
Author

@perexg can you help me make a PR?

@junocomp
Copy link
Author

junocomp commented Dec 4, 2022

created

#246

@joakim-tjernlund
Copy link

Looking at https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/772 I wonder
if not all EnableSequence/DisableSequence should match ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants