Open faerics opened 2 years ago
@faerics Can you please attach the results of 'alsa-info'? it's likely that there's a missing entry in ACPI matching tables for your device since it defaults to the HDMI-only case.
@plbossart Hello, attaching sudo alsa-info
result.
alsa-info.txt
Another ES8326/ES8336 codec issue?
/sys/bus/acpi/devices/ESSX8326:00/status 15
Yes, it's a codec issue @faerics
/sys/bus/acpi/devices/ESSX8326:00/status 15
This points to the ES8326, NOT the ES8336. The required codec driver was upstreamed in August only, and it's certainly NOT in 5.19
As a courtesy I add the missing patches to https://github.com/thesofproject/linux/tree/es8336-v5.19 but this is not even compile-tested, and it's rather unlikely that you get sound. There will be a need for board configuration and mixer settings, but at least this branch should give you a card that's exposed to userpace.
@plbossart Many thanks for your help. Okay then, let me clarify what my next steps should be. (1) compile the new commit on branch es8336-v5.19 and see if something changes (2) the required codec driver was upsteamed, so I need to compile newer kernel than 5.19. Which one?
By the way, am I right that your new commit for ES8326 does not break entire 8336 branch? Cheers
The es8336-v5.19 branch contains the backported patches from upstream. No need to switch kernel versions.
@plbossart Compiled the new kernel, no changes :( Attaching updated alsa-info output. What else can we do here? alsa-info-new-kernel.txt
you should remove the option snd_intel_dspcfg: dsp_driver=3, that shouldn't be necessary.
also please double check if you see the e8326 driver probe and register ASoC components. You can double-check the latter by looking at /sys/kernel/debug/asoc/components and /sys/kernel/debug/asoc/dais. snd_soc_es8326 is loaded but it could very well be that the driver never probes or exits the probe with some error.
I would also check if we support an acpi table to select this sof_es8336 machine driver. If I look at your PCI ID 8086:34c8, that will be used to look at machine drivers in snd_soc_acpi_intel_icl_machines (sound/soc/intel/common/soc-acpi-intel-icl-match.c) and I don't see any ID for the ES8326. Try to copy this block from JSL into the ICL table:
{
.comp_ids = &essx_83x6,
.drv_name = "sof-essx8336",
.sof_tplg_filename = "sof-jsl-es8336", /* the tplg suffix is added at run time */
.tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_SSP_NUMBER |
SND_SOC_ACPI_TPLG_INTEL_SSP_MSB |
SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER,
},
Hello, @plbossart, sorry for the delay, just got free time to continue trying things you suggest.
snd_intel_dspcfg: dsp_driver=3
option is necessary, and when I remove it, the snd_hda_intel driver is used, which is not what we want. right?
Next,
cat /sys/kernel/debug/asoc/components
0000:00:1f.3
ehdaudio0D2
i2c-ESSX8326:00
dmic-codec
snd-soc-dummy
snd-soc-dummy
/sys/kernel/debug/asoc/dais
also contains string i2c-ESSX8326:00
.
To the last step, I noticed that ES8336 wiki got updated, Should we try to repeat steps using newer v6 kernel?
Also, can you point to the line where to paste that fragment of code? Looked at sound/soc/intel/common/soc-acpi-intel-icl-match.c
and can't find similar block.
Thanks for your help!
Yes @faerics you need the branch listed in the wiki, with the two patches in https://github.com/thesofproject/linux/pull/3954 added on top
@plbossart should these commits be added on top of es8336-v6.0?
yes. I don't have the time to do it for now.
TL;DR no sound, dummy output but seems that something has changed and we need a topology. Cherry picked 2 commits on top of es8336-v6.0 and compiled.
No sound, dummy output is still here. Maybe we are missing some topologies? Loooking at dmesg I noticed this fragment:
[ 4.993993] snd_sof:snd_sof_run_firmware: sof-audio-pci-intel-icl 0000:00:1f.3: firmware boot complete
[ 4.993994] snd_sof:sof_set_fw_state: sof-audio-pci-intel-icl 0000:00:1f.3: fw_state change: 5 -> 6
[ 4.993995] snd_sof:sof_probe_continue: sof-audio-pci-intel-icl 0000:00:1f.3: SOF firmware trace disabled
[ 4.994019] snd_sof:ipc3_log_header: sof-audio-pci-intel-icl 0000:00:1f.3: ipc rx done: 0x70000000
[ 4.994043] snd_sof:sof_machine_register: sof-audio-pci-intel-icl 0000:00:1f.3: created machine sof-essx8336
[ 4.994053] snd_sof_pci:sof_pci_probe_complete: sof-audio-pci-intel-icl 0000:00:1f.3: Completing SOF PCI probe
[ 4.996694] sof-essx8336 sof-essx8336: quirk mask 0x0
[ 4.996697] sof-essx8336 sof-essx8336: quirk SSP0
[ 4.997333] snd_sof:snd_sof_load_topology: sof-audio-pci-intel-icl 0000:00:1f.3: loading topology:intel/sof-tplg/sof-icl-es8336-ssp0.tplg
[ 4.998051] sof-audio-pci-intel-icl 0000:00:1f.3: Direct firmware load for intel/sof-tplg/sof-icl-es8336-ssp0.tplg failed with error -2
[ 4.998054] sof-audio-pci-intel-icl 0000:00:1f.3: error: tplg request firmware intel/sof-tplg/sof-icl-es8336-ssp0.tplg failed err: -2
[ 4.998057] sof-audio-pci-intel-icl 0000:00:1f.3: you may need to download the firmware from https://github.com/thesofproject/sof-bin/
[ 4.998058] sof-audio-pci-intel-icl 0000:00:1f.3: error: failed to load DSP topology -2
[ 4.998059] sof-audio-pci-intel-icl 0000:00:1f.3: ASoC: error at snd_soc_component_probe on 0000:00:1f.3: -2
[ 4.998066] sof-essx8336 sof-essx8336: ASoC: failed to instantiate card -2
[ 4.998126] sof-essx8336 sof-essx8336: snd_soc_register_card failed: -2
[ 4.998127] sof-essx8336: probe of sof-essx8336 failed with error -2
Attaching full alsa-info: alsa-info-v6.txt @plbossart
@faerics please try this:
sudo cp /lib/firmware/intel/sof-tplg/sof-jsl-es8336-ssp0.tplg /lib/firmware/intel/sof-tplg/sof-icl-es8336-ssp0.tplg
@plbossart now I have the soundcard but still no sound. But I can hear some noises when changing volume in headphones. What are our next steps? alsa-info-v6+tplg.txt
@plbossart should I change quirk or try something else?
You can try the quirks suggested here: https://thesofproject.github.io/latest/getting_started/intel_debug/suggestions.html#es8336-support
@plbossart Tested all the quirks, no luck. As per docs, changed 4th, 6th, 7th and 8th of the quirk mask. Results (numbers in breckets are bits enabled; 'no sound at all' options omitted):
noise on headphones (6)
noise on speakers (67)
noise on speakers (678)
noise on startup, no sound (4678)
random noise (7)
noise on headphnoes (4)
noise on speakers (78)
noise on speaker mixed (478)
Can you assist on next steps?
Sorry @faerics I don't have additional suggestions. The only way to progress would be to read the configuration in the _DSM table suggested in another bug report. I don't have the time to work on this, and no hardware to test. This will have to be a community effort.
To people who come here googling:
I got this sort of working on my own INBOOK X2 GEN11, which, while a model not identical to the one discussed in this issue, appears to be at least fairly similar:
Machine:
Type: Laptop System: Infinix product: INBOOK X2 GEN11 v: N/A
serial: XLCXL2362BK0445
Mobo: Infinix model: EM_TG325_200B_V1.0 serial: 29961722B1300970
UEFI: American Megatrends LLC. v: TGL_TG325_200B_V5.1.23 date: 11/10/2022
CPU:
Info: dual core model: 11th Gen Intel Core i3-1115G4 bits: 64 type: MT MCP
cache: L2: 2.5 MiB
Speed (MHz): avg: 2503 min/max: 400/4100 cores: 1: 1015 2: 3000 3: 3000
4: 3000
Audio:
Device-1: Intel Tiger Lake-LP Smart Sound Audio
driver: sof-audio-pci-intel-tgl
Sound Server-1: ALSA v: k6.1.0-1013-oem running: yes
Sound Server-2: PulseAudio v: 15.99.1 running: yes
The magic sauce, as it applies to Ubuntu 22.04:
linux-oem-22.04c
metapackage. Install linux-generic-hwe-22.04-edge
metapackage, which will provide you with kernel version 6.2 with Ubuntu's patches, for which you will need to enable jammy-proposed
repository.firmware-sof-signed
version 2.2.5 from Debian sid or Ubuntu mantic -- I believe these are identical.bash ucm.sh
once you have the driver loading and no sound./etc/modprobe.d/
:# Enable quirks:
# bit 8 - HEADSET_MIC1
# bit 7 - HEADPHONE_GPIO
options snd_soc_sof_es8336 quirk=0x80
(I originally had 0x180
for the quirk, but further experimentation revealed that 0x100 is unnecessary.)
Mess with alsamixer low-level volume levels for optimal results.
Caveats:
pavucontrol
works fine.Not ideal, but better than could be expected.
@Mihara Hi there, Eugene! Thanks for your input to the issue.
Could you please clarify the step
Mess with alsamixer low-level volume levels for optimal results.
What levels did you tweak and what values did you stick with? In my case, hearing strange noises, but not the actual sound.
What levels did you tweak and what values did you stick with? In my case, hearing strange noises, but not the actual sound.
I tried tweaking pretty much all of them, so it's hard to describe. Here's what I have right now:
DAC
is 70 and this is the slider that controls the actual speaker volume.DAC Ramp Rate
is 27 and this affects how quickly volume goes from no sound to the set volume. Why is this even configurable, I couldn't tell you.DAC Recovery Rate
is 25 and I couldn't tell you why.DRC Target Level
is 100.DRC Winsize
is 0.25db/1024 LRCK
It is important to mention that without an alsa-ucm definition that fits this particular combination of hardware, nothing is going to work and you won't even see these sliders, so see step number 3 if you didn't do that already.
@Mihara Hi there, Eugene! Thanks for your input to the issue.
Could you please clarify the step
Mess with alsamixer low-level volume levels for optimal results.
What levels did you tweak and what values did you stick with? In my case, hearing strange noises, but not the actual sound.
Hey bro, Your sound started working?
What levels did you tweak and what values did you stick with? In my case, hearing strange noises, but not the actual sound.
I tried tweaking pretty much all of them, so it's hard to describe. Here's what I have right now:
DAC
is 70 and this is the slider that controls the actual speaker volume.DAC Ramp Rate
is 27 and this affects how quickly volume goes from no sound to the set volume. Why is this even configurable, I couldn't tell you.DAC Recovery Rate
is 25 and I couldn't tell you why.DRC Target Level
is 100.DRC Winsize
is0.25db/1024 LRCK
It is important to mention that without an alsa-ucm definition that fits this particular combination of hardware, nothing is going to work and you won't even see these sliders, so see step number 3 if you didn't do that already.
Bro I tried every step, still no help?
Bro I tried every step, still no help?
This phrase is not actually a question, it's a confusing statement with a question mark added onto it.
It is tempting to assume that "tried every step" means "I have exactly the same situation as yours, exactly the same machine as yours, exactly the same Linux distribution as yours, I did everything you listed and I still hear no sound" but experience tells me this is never what people actually mean.
Please describe your situation in greater detail, what you are doing, and what you are expecting to happen that isn't happening.
Bro I tried every step, still no help?
This phrase is not actually a question, it's a confusing statement with a question mark added onto it.
It is tempting to assume that "tried every step" means "I have exactly the same situation as yours, exactly the same machine as yours, exactly the same Linux distribution as yours, I did everything you listed and I still hear no sound" but experience tells me this is never what people actually mean.
Please describe your situation in greater detail, what you are doing, and what you are expecting to happen that isn't happening.
Sorry for that question mark, but you have same device as me, not same linux distributor but yes pop os 22.04 and I did everything as you did and I got it working,
Thanks.
Bur only one issue that my earphones are not detecting.
Bur only one issue that my earphones are not detecting.
Mine aren't detecting either, but manually switching them through pavucontrol
works.
snd_soc_sof_es8336
I dont know what happened and sound stopped again
Супер! Реально помогло со звуком! Спасибо!!!!
Супер! Реально помогло со звуком! Спасибо!!!!
что именно ты сделал что у тебя заработало тред стал таким большим что я не понимаю где решение проблемы ?)
Hello,
following docs and wiki I've compiled the 5.19.0 + fixes kernel. and see Dummy output instead of the sounding device. New topology files added. My laptop is Infinix Inbook X2 with the following:
Attaching dmesg from boot. Not an audio expert so need some help from the community to investigate this. dmesg-5.19.0+.log
Thanks.