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

[ADL-P] Missing topology for ES8336 Alder Lake P device (i5-1240P Huawei Matebook 14 2022) #4111

Closed
Jay-716 opened this issue Dec 21, 2022 · 60 comments

Comments

@Jay-716
Copy link

Jay-716 commented Dec 21, 2022

Sorry for this seemingly duplicate issue.

Problem

tplg request firmware intel/sof-tplg/sof-adl-es83x6-dmic4ch-ssp0.tplg failed err: -2 at every boot.
Due to the missing tplg file, my speaker never work.

My Environment

OS: Arch Linux
Machine: Huawei Matebook 14 2022 (KLVF-XX M1010)
Kernel: 6.0.12-arch1-1
CPU: 12th Gen Intel i5-1240P (16) @ 4.400GHz
Soundcard: Intel Corporation Alder Lake PCH-P High Definition Audio Controller (rev 01)
sof-firmware version: 2.2.3

Check Support for ES8336 on My Machine

I have read the github wiki and sof docs as well as github issues related to the es8336 issues.
I check the kernel(the archlinux official kernel) that I am currently using, and the commits which are related to es8336 and mentioned by the wiki are actually in there.
And the compiling configs mentioned in the wiki are the same as mentioned in the wiki.
alsa-info.sh also detects my audio device as /sys/bus/acpi/devices/ESSX8336:00
lsmod also shows that es8336 related modules are loaded.

Logs

alsa-info.txt
lspci.txt
kernel_log.txt

Here is the tplg loading section in the kernel log:

Dec 21 14:55:31 arch kernel: sof-essx8336 sof-essx8336: quirk mask 0x20
Dec 21 14:55:31 arch kernel: sof-essx8336 sof-essx8336: quirk SSP0
Dec 21 14:55:31 arch kernel: sof-essx8336 sof-essx8336: quirk DMIC enabled
Dec 21 14:55:31 arch kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: Direct firmware load for intel/sof-tplg/sof-adl-es83x6-dmic4ch-ssp0.tplg failed with error -2
Dec 21 14:55:31 arch kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: error: tplg request firmware intel/sof-tplg/sof-adl-es83x6-dmic4ch-ssp0.tplg failed err: -2
Dec 21 14:55:31 arch kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: you may need to download the firmware from https://github.com/thesofproject/sof-bin/
Dec 21 14:55:31 arch kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to load DSP topology -2
Dec 21 14:55:31 arch kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_component_probe on 0000:00:1f.3: -2
Dec 21 14:55:31 arch kernel: sof-essx8336 sof-essx8336: ASoC: failed to instantiate card -2
Dec 21 14:55:31 arch kernel: sof-essx8336 sof-essx8336: snd_soc_register_card failed: -2
Dec 21 14:55:31 arch kernel: sof-essx8336: probe of sof-essx8336 failed with error -2

Cannot Find the tplg Required

And I check the files under /usr/lib/firmware/intel/sof-tplg-v2.2.3/ , and there is NOT a file named sof-adl-es83x6-dmic4ch-ssp0.tplg, only to find the similar tplg for apl.
In the tplgs file([es8336_topologies_main.tar.gz] provided in the wiki page, I cannot find this tplg too.

PS. I don't know exactly if this issue should be submit to thesofproject/sof or thesofproject/linux, so I submit it here.
And I owe this problem to the missing tplg file, which may be inappropriate or inaccurate because it is just my guess.
If further information is needed, please let me know. I will post them below.
Thanks for your viewing. :)

@plbossart
Copy link
Member

Thanks for reporting this issue, which is actually a problem on both SOF and linux sides. Gah.

You can try a temporary fix by backup up your files in intel/sof-tplg/ and then
cp sof-tgl-es8336-dmic4ch-ssp0.tplg sof-adl-es83x6-dmic4ch-ssp0.tplg

I'll submit a rename and add the missing topologies.

plbossart added a commit to plbossart/sof that referenced this issue Dec 21, 2022
The ADL integration was botched with missing topologies and errors in
topology names in the kernel.

Link: thesofproject/linux#4111
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
@Jay-716
Copy link
Author

Jay-716 commented Dec 22, 2022

Thanks for your timely reply.
I then cp sof-tgl-es8336-dmic4ch-ssp0.tplg sof-adl-es83x6-dmic4ch-ssp0.tplg, and the sound work! But the volume is extremely tiny, though I set all the volume settings to 100%(and even higher).
I don't know if it's related to the sound server. I am currently using pipewire, wireplumber, pipewire-alsa now.
I try to change the volume in amixer, alsamixer, pavucontrol, wpctl, and the sound are still tiny.
I follow the instruction to enable the dynamic debug, and here is the full dmesg log.
dmesg.txt
Here is the related section:

[    5.478734] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[    5.478819] sof-audio-pci-intel-tgl 0000:00:1f.3: enabling device (0000 -> 0002)
[    5.478970] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[    5.479032] sof-audio-pci-intel-tgl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    5.485846] sof-audio-pci-intel-tgl 0000:00:1f.3: use msi interrupt mode
[    5.594033] sof-audio-pci-intel-tgl 0000:00:1f.3: NHLT_DEVICE_I2S detected, ssp_mask 0x1
[    5.594038] sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 4
[    5.596341] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[    5.596346] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
[    5.596356] sof-audio-pci-intel-tgl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30
[    5.689982] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[    5.689986] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
[   12.131755] sof-essx8336 sof-essx8336: quirk mask 0x20
[   12.131758] sof-essx8336 sof-essx8336: quirk SSP0
[   12.131759] sof-essx8336 sof-essx8336: quirk DMIC enabled
[   12.132925] sof-audio-pci-intel-tgl 0000:00:1f.3: Topology: ABI 3:22:1 Kernel ABI 3:23:0
[   12.133035] sof-essx8336 sof-essx8336: ASoC: Parent card not yet available, widget card binding deferred
[   12.303767] sof-essx8336 sof-essx8336: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 3
[   12.330530] input: sof-essx8336 Headset as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input12
[   12.350352] input: sof-essx8336 HDMI/DP,pcm=5 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input13
[   12.350425] input: sof-essx8336 HDMI/DP,pcm=6 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input14
[   12.350520] input: sof-essx8336 HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input15

If I sould modify the quirk? or if I sould use sof-logger to get the DSP traces? or if I should try pulseaudio?
My distro kernel seems does not have the trace support, so it may be a little bit inconvinent to do that because I have never tried to build a custom kernel, but I will have a try if the DSP traces are needed.
Sorry. :)

@plbossart
Copy link
Member

@yangxiaohua2009 can you comment on the 'low sound' issue reported by multiple people?

@yangxiaohua2009
Copy link

@Jay-716 Can you provide alsainfo/amixer when playing music? Thanks

@Jay-716
Copy link
Author

Jay-716 commented Dec 23, 2022

Here is the output when playing video with mpv:
alsa-info.txt
amixer.txt
wpctl.txt

PS. I suddenly got infected with COVID-19, so my reply may not be timely. Sorry.

@Jay-716
Copy link
Author

Jay-716 commented Dec 25, 2022

@yangxiaohua2009 Additional information is here:
pactl_list_sinks.txt
pactl_list_sink_inputs.txt

I think it may probably be a pipewire issue, but I cannot make sure.

@yangxiaohua2009
Copy link

Your Headphone is -48dB and your DAC is -60% vol, which makes your sound extremely low.
Set them back to 0dB and you can hear load sound.

Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 3
  Mono:
  Front Left: Playback 0 [0%] [-48.00dB] [off]
  Front Right: Playback 0 [0%] [-48.00dB] [off]

Simple mixer control 'DAC',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 192
  Mono:
  Front Left: Playback 115 [60%] [-38.50dB]
  Front Right: Playback 115 [60%] [-38.50dB]

@yangxiaohua2009
Copy link

I actually have a script help you doing that
4.zip

@Jay-716
Copy link
Author

Jay-716 commented Dec 25, 2022

OMG, The sound works perfectly now!!!
This problem has confused me for a long time, so I am very grateful to you guys for your timely and enthusiastic help!
Given that the pr thesofproject/sof#6878 will solve the original missing topology issue, I shall close this issue after that pr is successfully merged.
Thanks. :)

lgirdwood pushed a commit to thesofproject/sof that referenced this issue Jan 4, 2023
The ADL integration was botched with missing topologies and errors in
topology names in the kernel.

Link: thesofproject/linux#4111
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
@ToutouDogo
Copy link

ToutouDogo commented Jan 11, 2023

I actually have a script help you doing that 4.zip

Hello, I'm a beginner with linux. How do we run this please ? Thanks, it might help me for solving #4093

[EDIT] just had to add
bash ./
Sorry for newbie question.

Not sufficient to solve issue #4093. Please let me now if this comment is irrelevant.

@yangxiaohua2009
Copy link

I saw your alsa info. One control is off so you cannot hear sound.

Simple mixer control 'Right Headphone Mixer Right DAC',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]

Does the playback device in your sound settings change when you insert a headset/headphone? If so you should have sound after running the shell script which changes the mixer controls

You may run alsainfo again or run amixer -c 0 to see if the 'Right Headphone Mixer Right DAC' mix is now on

@yangxiaohua2009
Copy link

@ToutouDogo Also I cannot see your dmesg. Since your HUAWEI device have 2 gpios, one for speaker and one for headphone, your need to set quirk (to enable 2 gpios).
First dmesg | grep tplg and you can see which ssp you're using (0, 1 or 2)
Then overwrite the origin quirk.
If you are using ssp 0, try options snd_soc_sof_es8336 quirk=0x80
If you are using ssp 1, try options snd_soc_sof_es8336 quirk=0x81
If you are using ssp 2, try options snd_soc_sof_es8336 quirk=0x82

@ToutouDogo
Copy link

I saw your alsa info. One control is off so you cannot hear sound.

Simple mixer control 'Right Headphone Mixer Right DAC',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]

Does the playback device in your sound settings change when you insert a headset/headphone? If so you should have sound after running the shell script which changes the mixer controls

You may run alsainfo again or run amixer -c 0 to see if the 'Right Headphone Mixer Right DAC' mix is now on

Indeed, inserting headset made it work!
amixer -c 0 displays 'Right Headphone Mixer Right DAC' mix on

@ToutouDogo
Copy link

ToutouDogo commented Jan 12, 2023

@ToutouDogo Also I cannot see your dmesg. Since your HUAWEI device have 2 gpios, one for speaker and one for headphone, your need to set quirk (to enable 2 gpios). First dmesg | grep tplg and you can see which ssp you're using (0, 1 or 2) Then overwrite the origin quirk. If you are using ssp 0, try options snd_soc_sof_es8336 quirk=0x80 If you are using ssp 1, try options snd_soc_sof_es8336 quirk=0x81 If you are using ssp 2, try options snd_soc_sof_es8336 quirk=0x82

Audio from headphones is fixed thank you very much. Only speaker are missing, I feel so close from solving this.

Here is the dmesg with tplg
20230112_dmesg_tplg.txt
If I understand well I am using ssp 0.

Yet, when I tried to add the line options snd_soc_sof_es8336 quirk=0x80 in etc/modprobe.d/alsa-base.conf, "dummy output" came back after reboot.

@yangxiaohua2009
Copy link

Please try quirk=0xa0 since you're using dmic.

@sstavridis
Copy link

Hi,

I have the same issue on my matebook 14. I tried everything and the sound doesn't work!

My environment

OS: Ubuntu
Kernel: 6.1.4-060104-generic
Machine: Huawei Matebook 14 2021 (KLVD-WXX9)
CPU: 11th Gen i5-1135G7
Soundcard: Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller (rev 20)

I tried everything I found and the sound didn't work.
Does any suggestions, please?

@Jay-716
Copy link
Author

Jay-716 commented Jan 13, 2023

@sstavridis Hi,
The alsa-info.sh output and kernel log may be helpful for the developers to help you.
:)

@ToutouDogo
Copy link

Please try quirk=0xa0 since you're using dmic.

We're moving forward, since with this quirk 0xa0 the "dummy output" issue does not pop back as it does with other quirks.
Nevertheless, still no sound from speakers.
dmesg 20230113.txt
alsa-info.txt

@Jay-716
Copy link
Author

Jay-716 commented Jan 17, 2023

Late update for the original issue:
I was so excited when my speakers worked, so I ignore another two issues. Sorry.
This is just some kind of complaint or note about the weird es8336 codec chipset. Just ignore it if you don't want to spend your treasured time helping me fix that.

  • My speaker works now, but there are loud pops when starting a sound or muting the sound, though I have disabled power_save using options snd_hda_intel power_save=0 following the pipewire wiki. Anyway, this issue is relatively bearable.

  • The biggest problem is that my speakers work fine but my microphones don't. The only input device I can see in the pavucontrol is the "Headset Microphone(unplugged)". The internal mic is not listed and consequently cannot capture any sound(in OBS Studio and pw-record).

I do tons of searching and find tons of different issues related to es8336 codec chipsets. I think this chipset is very annoying and troublesome to some degree. So I may not try to fix these issues these days, because, on one hand, it may be time-consuming for me and the developers, on the other hand, my speakers just work, though not fine. :)

Logs when playing sound with mpv and recording sound with pw-record simultaneously:
alsa-info.txt
full_kernel_log.txt
kernel_log_snd|sound|sof.txt

PS. Sorry for my poor English, please forgive me for my typo and mistakes.
Thanks to the developers again.

@yangxiaohua2009
Copy link

@Jay-716 Please try quirk=0xe0 since you have an inverted configuration

@yangxiaohua2009
Copy link

yangxiaohua2009 commented Jan 17, 2023

@ToutouDogo There are two gpios, one for speaker and one for headphone.
When playing music, insert and unplug your headset and cat /sys/kernel/debug/gpio so you can see the gpio level change.
amixer sset Speaker on amixer sset Speaker off and amixer sset Headphone off amixer sset Headphone on can change the Speaker/Headphone gpio level seperately.
Either Speaker or Headphone must be on so you can hear sound.

If still nothing happens, try quirk=0xb0 which invert the two gpios

@Jay-716
Copy link
Author

Jay-716 commented Jan 17, 2023

@Jay-716 Please try quirk=0xe0 since you have an inverted configuration

Thanks for your swift reply very much. And thanks for your treasured time.

I use options snd_soc_sof_es8336 quirk=0xe0

Speaker
The speaker works not so fine. When I adjust the volume in pavucontrol, I can hear the bubbling sound made by pavucontrol as the feedback of volume adjustment. However, when playing sound with mpv, firefox, they cannot play sound as the video plays. Pipewire seems cannot handle the speaker properly.
Many erros like no node avaliable(reported by mpv):

[ao/pipewire] Stream in error state, trying to reload...
[ao/pipewire] Error during playback: No such file or directory, no node available

Mic
When I use pw-record to record sound, it exited and reported errors above like no node avaliable.
OBS Studio does not work too.

In pavucontrol, the output devices list "Speaker (unavaliable)" and "Headphones", the input devices list "Headset microphone(unplugged)". screenshot1 screenshot2
alsamixer shows the "default sound device"(pipewire) "dose not have any controls". I cannot adjust the volume of pipewire, but the real sound card controls are normal and can be adjusted. screenshot3 screenshot4

Logs
Kernel logs with dynamic debug enabled: dmesg.txt
alsa-info.sh when playing video in firefox and mpv simultaneously: alsa-info.txt

@yangxiaohua2009
Copy link

The alsa/kernel level works fine but the user/alsa-ucm-conf level works badly.
You may try official alsa-ucm-conf here or my ucm script ucm.zip

Also, before change ucm, can you select headphone and see if you can have sound?

@Jay-716
Copy link
Author

Jay-716 commented Jan 17, 2023

Also, before change ucm, can you select headphone and see if you can have sound?

The default output device in pavucontrol is the "Headphone", and the speaker works fine when playing videos.
The other output device "Speaker(unavailable)" would not work. The behavior of mpv is weird. It keeps flashing in pavucontrol and plays no sound. It may be corresponding to the errors I mentioned above.([ao/pipewire] Stream in error state, trying to reload...)
Here is the log after modifying quirk and before changing ucm: alsa-info-before-ucm.txt

You may try official alsa-ucm-conf here or my ucm script ucm.zip

I'm currently using the official alsa-ucm-conf 1.2.8 (an official package required by alsa in archlinux). I check the files between the official github repo and that installed in my pc, they are actually the same one.

Now I switch to the ucm you provided.
Unfortunately, the devices listed do not change. There are sounds both "Headphone" and "Speaker(unavailable)". The volume of the former is higher, and that of the latter is lower. The mic is still "Headset microphone(unplugged)" and do not work.
Here is the log after switching to your ucm script(when selecting different output device):
alsa-info-Headphone.txt
alsa-info-Speaker(unavaliable).txt

I am considering migrating back to pulseaudio instead of pipewire to see if these issues remain.
Sorry for this disappointing result.

@ToutouDogo
Copy link

Thank you for the explaination, and for your huge patience.

:~$ amixer sset Speaker on
Simple mixer control 'Speaker',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]

:~$ amixer sset Headphone off
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 3
  Mono:
  Front Left: Playback 3 [100%] [0.00dB] [off]
  Front Right: Playback 3 [100%] [0.00dB] [off]

I then turn up volume to maximum with keyboard key, and no sound either from Speaker, or Headphone.

:~$ sudo cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 664-1023, parent: platform/INT34C5:00, INT34C5:00:
 gpio-680 (                    |headphone-enable    ) out hi ACTIVE LOW
 gpio-681 (                    |speakers-enable     ) out hi ACTIVE LOW

:~$ amixer cset name='Headphone Playback Volume' 3,3 
numid=1,iface=MIXER,name='Headphone Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0
  : values=3,3
  | dBrange-
    rangemin=0,,rangemax=0
      | dBscale-min=-48.00dB,step=0.00dB,mute=0
    rangemin=1,,rangemax=3
      | dBscale-min=-24.00dB,step=12.00dB,mute=0

And sill no sound, either from Speaker, or Headphone, Headphone being plugged all along as you precised.
Maybe its dumb but I also tried 10, 100, 1000, 10000 instead of 3,3 for the last command, without success.

@yangxiaohua2009
Copy link

@ToutouDogo You may want to try this patch #4112. This patch changes the gpio level.

@yangxiaohua2009
Copy link

yangxiaohua2009 commented Jan 30, 2023

@Jay-716 a folder named sof-essx8336 with sof-essx8336.conf in it under ucm2 or ucm2/conf.d should give you normal ucm configuration. Even if the ucm is not working The speaker can be available. Yes you should debug pipewire or switch to pulseaudio.

@ToutouDogo
Copy link

ToutouDogo commented Feb 5, 2023

@ToutouDogo You may want to try this patch #4112. This patch changes the gpio level.

I did try.

  • With quirk 0xa0

With headphones plugged in, there's sound from headphone as previously reported.

sudo cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 664-1023, parent: platform/INT34C5:00, INT34C5:00:
 gpio-680 (                    |speakers-enable     ) out lo 
 gpio-681 (                    |headphone-enable    ) out lo ACTIVE LOW

This output does not changes, when I amixer sset Headphone off amixer sset Headphone on, but sound goes off if I set Headphone off.

amixer sset Speaker on cut sound from headphones when headphones are plugged, but no sound from speaker, even with amixer sset Headphone off.

sudo cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 664-1023, parent: platform/INT34C5:00, INT34C5:00:
 gpio-680 (                    |speakers-enable     ) out hi 
 gpio-681 (                    |headphone-enable    ) out hi ACTIVE LOW

The output is the same when I unplugg headphones, and still no sound from speakers.

  • with quirk 0xb0

Headphones plugged, sound from headphones.

sudo cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 664-1023, parent: platform/INT34C5:00, INT34C5:00:
 gpio-680 (                    |headphone-enable    ) out lo ACTIVE LOW
 gpio-681 (                    |speakers-enable     ) out lo 

amixer sset Speaker on

sudo cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 664-1023, parent: platform/INT34C5:00, INT34C5:00:
 gpio-680 (                    |headphone-enable    ) out hi ACTIVE LOW
 gpio-681 (                    |speakers-enable     ) out hi 

amixer sset Heaphone off

sudo cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 664-1023, parent: platform/INT34C5:00, INT34C5:00:
 gpio-680 (                    |headphone-enable    ) out hi ACTIVE LOW
 gpio-681 (                    |speakers-enable     ) out hi 

Unplugged Headphones, still no sound.
Same cat.
amixer sset Headphone on amixer sset Speaker off

sudo cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 664-1023, parent: platform/INT34C5:00, INT34C5:00:
 gpio-680 (                    |headphone-enable    ) out lo ACTIVE LOW
 gpio-681 (                    |speakers-enable     ) out lo 

No sound.
Plugging Headphones, sounds back in Headphones.

@sstavridis
Copy link

sstavridis commented Feb 6, 2023

@sstavridis haha at least your speaker works now. I am not familiar with Ubuntu, but in Arch, there is a systemd service called alsa-restore.service, which will automatically store/restore alsa config(usually located in /var/lib/alsa/asound.state) when shutdown and boot. So you can check if this service exists in Ubuntu. As for the other issues, I am sorry that I cannot help because I know little about them and am frustrated.

PS. Huawei's laptops are very unfriendly to linux actually. I nearly got mad fixing tons of bugs. Btw, Deepin is not made by Huawei. What Huawei made is Euler OS. Regards.

@Jay-716 Even though I was frustrated I decided to give it one more chance. So, I installed Manjaro and it seems to recognize everything out of the box. The only issue is that the sound is too low. I open the alsamixer make the appropriate settings, exit, and then execute sudo alsactl store. But after a reboot, it seems that the setting didn't save.
Any recommendation?

@yangxiaohua2009
Copy link

yangxiaohua2009 commented Feb 7, 2023

@sstavridis edit the file /usr/share/alsa/ucm2/Intel/sof-essx8336/sof-essx8336.conf and change the 'DAC Volume' from 60% to 100% should solve your problem.

@sstavridis
Copy link

@sstavridis edit the file /usr/share/alsa/ucm2/Intel/sof-essx8336/sof-essx8336.conf and change the 'DAC Volume' from 60% to 100% should solve your problem.

@yangxiaohua2009 I can't find this file, this location doesn't even exists

@yangxiaohua2009
Copy link

@sstavridis what does alsaucm reload tell you? If no result returns then you can find the file using
find -name sof-essx8336.conf under folder /usr/share/alsa/ucm2/

@sstavridis
Copy link

@yangxiaohua2009 alsaucm reload doesn't return anything.
When I run find -name sof-essx8336.conf I get two results

./conf.d/sof-essx8336/sof-essx8336.conf
./Intel/sof-essx8336/sof-essx8336.conf

What should I do?
Furthermore it seems that the microphone doesn't work

@yangxiaohua2009
Copy link

You may change the DAC volume in /usr/share/alsa/ucm2/Intel/sof-essx8336/sof-essx8336.conf

Also, you may want to manuelly enable mic by

                        cset "name='Internal Mic Switch' on"
			cset "name='ADC PGA Gain Volume' 10"
			cset "name='ADC Capture Volume' 150"
			cset "name='Headset Mic Switch' on"
			cset "name='Digital Mic Mux' 'dmic disable'"			

and switch between the two mic input via

cset "name='Differential Mux' 'lin1-rin1'"
cset "name='Differential Mux' 'lin2-rin2'"

@sstavridis

@sstavridis
Copy link

@yangxiaohua2009
I made the changes to DAC volume but the sound is still very low, you can see the attached file sof-essx8336.conf.txt
Also, I have run your 4.zip script in which you run the same commands as above to enable the mic but it didn't work, should I copy and paste them inside the conf instead?
The only way I managed to make the sound louder is to open terminal type alsamixer as shown in step1.png then F6 and select default: 0 sof-essx8336 as shown in step2.png and the raise the first Headphone bar as show in step3.png.

Sorry all this question but I'm new to linux.
Thanks for your help!

sof-essx8336.conf.txt
step1
step2
step3

@yangxiaohua2009
Copy link

You may want to backup and replace your HiFi.conf file with this one:
HiFi.zip.

cset "name='Headphone Playback Volume' 3,3" added to EnableSequence.
@sstavridis

@sstavridis
Copy link

@yangxiaohua2009 Unfortunately, it didn't work...

@Jay-716
Copy link
Author

Jay-716 commented Feb 13, 2023

@yangxiaohua2009 Sorry for disturbing you again. This is just a late inform, and my issues are almost finished. No need to reply if you don't want to. Thanks. :)
My speaker and mic work relatively fine now. I applied the dmic ucm you provided wrongly so they are not correctly loaded. And now I figure it out and they loaded correctly.
I find that only when I select the "Pro Audio" profile in pavucontrol, the mic starts to work.

Here are my tests:

  • default quirk 0x20, default ucm:
    Have "Stereo Input and Stereo Output", "Stereo Input", "Stereo Output", "Pro Audio", "Off" profiles.
    "Stereo Input and Stereo Output": speaker works, mic not capturing sound.
    "Pro Audio": both speaker and mic work.
    alsa-info_default_quirk_default_ucm.txt

  • quirk 0xe0, default ucm:
    the same as above

  • default quirk 0x20, dmic ucm:
    Have "Pro Audio", "Off" profiles.
    "Pro Audio" both speaker and mic works fine as above.

  • quirk 0xe0, dmic ucm:
    the same as above
    alsa-info_quirk_ucm.txt

Remaining small problems:

  • To make both speaker and mic work, I need to switch to "Pro Audio" profile instead of the default "Stereo Input and Stereo Output" profile.
  • Loud pop when start or stop playing sound. If there is any "power_save" options?

These problems are relatively tolerable. At least the mic works.
Thank you very very much for your patience and enthusiasm.
Best regards.

@yangxiaohua2009
Copy link

@Jay-716 You may want to follow this link to disable suspend on idle so that there is no pop noise, at the cost that you may not have sound after system suspend and resume. Or you may open sound settings to keep the codec always on at the cost of more power consumption.

@yangxiaohua2009
Copy link

@sstavridis Can you make sound loader with typing cset name='Headphone Playback Volume' 3,3 in terminal?

@Jay-716
Copy link
Author

Jay-716 commented Feb 14, 2023

It works. I should have searched for it myself. In the beginning, I expected it as some kind of a module parameter instead of a sound server side solution. But it works fine too.
Thank you very much for your long term help. Your long-lasting enthusiasm and patience are highly appreciated. :)

@sstavridis
Copy link

@yangxiaohua2009 I tried it and the terminal returns amixer: Cannot find the given element from control default.
Furthermore, I open Volume Control by typing pavucontrol and set Profile to Pro Audio in the Configuration tab.
After that the microphone works, but the sound doesn't.
Any ideas? I've tried everything I'm so frustrated...

Thank you very much for your help!

@yangxiaohua2009
Copy link

Please provide your amixer contents information or alsainfo so I can know which amixer control went wrong. You may want to try
amixer -c 0 cset name='Headphone Playback Volume' 3,3 and amixer -c 0 cset name='Headphone Volume' 192,192 @sstavridis

@sstavridis
Copy link

sstavridis commented Feb 17, 2023

@yangxiaohua2009
Hello here is my alsainfo and the amixer contents file.

amixer_contents.txt

Also i tried amixer -c 0 cset name='Headphone Playback Volume' 3,3 and it seems to work but after a reboot it doesn't even though I run sudo alsactl store.
For amixer -c 0 cset name='Headphone Volume' 192,192 the terminal gives me amixer: Cannot find the given element from control sysdefault:0

@yangxiaohua2009
Copy link

@sstavridis Try adding (sleep 6; amixer -c 0 cset name='Headphone Playback Volume' 3,3) & at the end of your ~/.profile file.
This makes sure the command is executed everytime you reboot.

@sstavridis
Copy link

@yangxiaohua2009
Sorry for the delay, still no fix. I'm so frustrated...
The sound is too low, the microphone is not working and when I plug in headphones the sound works from the speaker and headphones simultaneously.

@ToutouDogo
Copy link

Hey it's been a while, I still haven't found a way to fix my speaker and mic, even though headphones are functionning. Do you have any comment about my last post on this issue? Thank you #4111 (comment)

@yangxiaohua2009
Copy link

@ToutouDogo You may want to open the mic controls by

amixer cset name='ADC PGA Gain Volume' 10
amixer cset name='ADC Capture Volume' 150
amixer cset name='Headset Mic Switch' on
amixer cset name='Digital Mic Mux' 'dmic disable'
amixer cset name='Internal Mic Switch' on
amixer cset name='Differential Mux' 'lin1-rin1'

mengdonglin pushed a commit to mengdonglin/sof that referenced this issue Apr 28, 2023
The ADL integration was botched with missing topologies and errors in
topology names in the kernel.

Link: thesofproject/linux#4111
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
(cherry picked from commit 57e976e)
kv2019i pushed a commit to thesofproject/sof that referenced this issue May 2, 2023
The ADL integration was botched with missing topologies and errors in
topology names in the kernel.

Link: thesofproject/linux#4111
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
(cherry picked from commit 57e976e)
@ToutouDogo
Copy link

Sorry @yangxiaohua2009 , this is did not solve the issue. I see there were commits pushed by @mengdonglin and @kv2019i
. I would be pleased to try stuffs, I only need the instructions to implement it. Thank you !

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

No branches or pull requests

6 participants