alsa-ucm-conf icon indicating copy to clipboard operation
alsa-ucm-conf copied to clipboard

sof-essx8336: update HiFi.conf

Open junocomp opened this issue 2 years ago • 15 comments

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.

junocomp avatar Dec 01 '22 15:12 junocomp

I don't think that it's the right way to update this configuration. I assume that @plbossart and @mchehab tested the previous configs. It would be probably good to gather output from alsa-info.sh --no-upload script as first and do the changes step-by-step.

perexg avatar Dec 07 '22 09:12 perexg

Also, do not forget that there are probably multiple hardware variants which are sharing the similar configuration file, so removing devices and/or modifying the configuration unconditionally without asking the original contributors will result with a regression.

perexg avatar Dec 07 '22 09:12 perexg

@perexg

alsa-info.txt

junocomp avatar Dec 07 '22 22:12 junocomp

@perexg did you check my alsa-info?

junocomp avatar Dec 12 '22 22:12 junocomp

I submited this two weeks ago, I was wondering if someone could take a look at it.

junocomp avatar Dec 19 '22 05:12 junocomp

As I already wrote, I would like probably to see the step-by-step configuration changes e.g. what are minimal configuration changes to make Speaker device work on your hardware?

perexg avatar Dec 19 '22 07:12 perexg

A large part of the issues here is due to wrong/missing quirks. Basically, 2 gpios are used to control speaker and headphone; each of them can be either triggered on low or on high. So, there are 4 different combinations, when both are used - and some systems may use just one gpio for both.

We're working towards improving its detection via ACPI device ESSX _DSM method (see https://github.com/thesofproject/linux/pull/4112). After having those patches applied, there will be just one quirk that won't be auto-detected: if GPIO 0 is speaker or headphone.

Yet, UCM changeset 15a12508003c ("ucm2: put disdevall to HDA/Soundwire configs") caused a regression, breaking support for the system's microphone. It should probably be partially reverted for es8336, until we figure out what caused the regressions.

I submitted a PR with such partial revert: https://github.com/alsa-project/alsa-ucm-conf/pull/258

mchehab avatar Dec 24 '22 09:12 mchehab

@perexg

alsa-info.txt

Btw, if you want to compare, this is the alsa-info.txt from Huawei Matebook D15: huawei-matebook-d15-alsa-info.txt

mchehab avatar Dec 24 '22 10:12 mchehab

This fixed the audio problem along with some adjustments in alsamixer, I have a fully functional speaker. A microphone is recognized now but when using it it only detects noise, it does not detect voice or external noises.

dgox16 avatar Jan 02 '23 05:01 dgox16

@dgox16 Did you try my commit?

junocomp avatar Jan 02 '23 05:01 junocomp

@dgox16 Did you try my commit?

Yes. I did it in my Matebook d15 Only microphone not worked but is detected

dgox16 avatar Jan 02 '23 05:01 dgox16

@dgox16 Did you try my commit?

Yes. I did it in my Matebook d15 Only microphone not worked but is detected

It won't work, as the patch removed support for DMIC (which is used on Matebook). Try, instead, https://github.com/alsa-project/alsa-ucm-conf/pull/258

mchehab avatar Jan 02 '23 10:01 mchehab

Has anyone managed to get this to work?

junocomp avatar Feb 16 '23 13:02 junocomp

I have tested this configuration and the audio indeed works at max volume when the system starts up in a Positivo Master N1250 ROHS, the microphone on the other hand does not work.

ghost avatar Jun 10 '23 01:06 ghost

As I already wrote, I would like probably to see the step-by-step configuration changes e.g. what are minimal configuration changes to make Speaker device work on your hardware?

On my system (a Hasee X5-2021S5H, shipping Tigerlake i5-11300H with ES8336) #328 is the minimal change I've found to make speaker, headphone, and internal digital mic to work. I've not tested headset (with a mic) because I don't have one. See the commit message for the rationale of the changes.

If we remove disdevall, I guess the first change in my PR won't be needed anymore.

xry111 avatar Jun 22 '23 21:06 xry111