Bug 204539

Summary: es8316 - speakers ONLY work with headphones plugged in
Product: Drivers Reporter: xenobro (hcdorn)
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Status: NEW ---    
Severity: normal    
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: 5.2.6 Subsystem:
Regression: No Bisected commit-id:
Attachments: alsa-info.sh
aplay -lL
dmesg
lscpu
lshw
lspci -nn
lsusb
working controls in alsamixer
es8316 compile errors

Description xenobro 2019-08-09 08:48:55 UTC
Created attachment 284279 [details]
alsa-info.sh

Hi everyone, I'm having problems with the "infamous" es8316 chipset, but since it's slightly different than most I've seen here, I've decided to file a separate bug.
The internal speakers of my "Positivo 2 em 1 Q432A" work fine with Arch Linux's standard kernel modules (5.2.6-arch1-1-ARCH), but ONLY if there's something plugged in the headphones port and Pulseaudio is installed.
Alsamixer only has a working Master volume in the default "Pulseaudio card" and none under Intel HDMI/DP LPE Audio card, but under bytcht-es8316 there are 160(?!) controls, though only the listed below affect the sound output. 
I'd like to use my speakers without having to plug something in the headphone plug.
I've also tried to follow the 2nd post on this site (with the appropriate corrections), but ran into compiling errors described in the attachments, so any help would be great:
https://askubuntu.com/questions/1034619/problem-with-audio-device-es8316-and-ubuntu-18-04/1036386#1036386
If there's anything else I should do or post, just tell me and I'll do it.
Sorry for the long post and thank you very much,
xenobro.
P.S.: How do I insert line breaks in the plain text description?
Comment 1 xenobro 2019-08-09 08:53:54 UTC
Created attachment 284281 [details]
aplay -lL
Comment 2 xenobro 2019-08-09 08:54:31 UTC
Created attachment 284283 [details]
dmesg
Comment 3 xenobro 2019-08-09 08:55:13 UTC
Created attachment 284285 [details]
lscpu
Comment 4 xenobro 2019-08-09 08:55:56 UTC
Created attachment 284287 [details]
lshw
Comment 5 xenobro 2019-08-09 08:56:34 UTC
Created attachment 284289 [details]
lspci -nn
Comment 6 xenobro 2019-08-09 08:58:29 UTC
Created attachment 284291 [details]
lsusb
Comment 7 xenobro 2019-08-09 08:59:47 UTC
Created attachment 284293 [details]
working controls in alsamixer
Comment 8 xenobro 2019-08-09 09:05:24 UTC
Oh, and please ignore the P.S.: I cannot edit the description to erase it.
Comment 9 xenobro 2019-08-09 09:20:33 UTC
Created attachment 284295 [details]
es8316 compile errors
Comment 10 xenobro 2019-08-13 03:29:36 UTC
So, restarting everything from scratch, I managed to make the speakers work without the headphones: install alsa-lib, alsa-utils, pulseaudio, pulseaudio-alsa, reboot, alsamixer, F6, bytcht-es8316, Speaker, unmute.
There are still a lot of problems though: Headphones and Headphone Mixer seem to be the main channels and control general volume, even with hps unplugged, though muting them makes no difference; Speaker channel is just a mute/unmute switch, not a volume slider; plugging hps in doesn't mute the speakers but turns on DAC Mono Mix and changes Playback Polarity to R Invert, and after that, unplugging it mutes the Speakers; going into pavucontrol with hps unplugged, initially "Headphones (plugged in)" is the main channel, the other is "Mono (unplugged)", and both have sound; if I change to the latter, speakers still work, though "DAC Mono Mix" is unmuted and "Playback Polarity" goes to "R Invert" on alsamixer, as mentioned above, but changing back to "Headphones (plugged in)" after that mutes the Speakers; with hps plugged in, almost the same: initially "Headphones (unplugged)" is the main channel, sound on hps and speakers; changing to "Mono Speakers" (notice the "unplugged" disappeared) unmutes "DAC Mono Mix" and changes "Playback Polarity" on the mixer; going back to "Headphones (unplugged)" mutes the speakers, just as unplugging the hps does; neither internal external mikes seem to work; and I don't know if HDMI audio works.
Before all that, I've tried to use the UCM files from the links on the site above, but they've actually made the situation worse, probably because I couldn't compile the modules from the sources linked.
Anyway, if I should change anything, move this bug or give anymore info, just tell me and I'll do it, but I'd really like to have these issues solved.
Thank you very much in advance,
xenobro.