thesofproject / linux

Linux kernel source tree
Other
89 stars 129 forks source link

essx8336 not detected at all? #4011

Open Usulyre opened 1 year ago

Usulyre commented 1 year ago

Hi, I have windows 10 os and audio is working I have essx8336 sound device.

I have defaults in bios settings.

I'm trying to get audio working in any linux distro, tried ubuntu, fedora, arch, nothing works.

My problem is that the essx8336 card is not detected at all even after kernel updates, etc.

Do I have to change something in bios to get it to be detected in linux?

I can provide info, let me know what is necessary thanks in advance.

plbossart commented 1 year ago

Start with this and https://github.com/thesofproject/linux/wiki/ES8336-support and https://thesofproject.github.io/latest/getting_started/intel_debug/suggestions.html#es8336-support

Usulyre commented 1 year ago

Yes I have looked over those two links already. I didn't really try the 'quirk' parameter yet though although in ubuntu i followed this guide:

https://forum.ubuntu.org.cn/viewtopic.php?f=42&t=493254

Is it not being detected because I don't know the 'quirk' value?

How exactly do I find the correct 'quirk' value?

plbossart commented 1 year ago

well, if you look at the links but don't follow the suggestions, and use a reference to a webpage in Chinese I am not sure how I can help.

Usulyre commented 1 year ago

Hi, I used google translate

sudo apt install --install-recommends linux-oem-22.04a

git clone https://github.com/yangxiaohua2009/custom-kernel

cd custom-kernel

cp ./tplg/* /lib/firmware/intel/sof-tplg/

cp sof-jsl.ri /lib/firmware/intel/sof/

cp -r sof-essx8336 /usr/share/alsa/ucm2

cd /lib/firmware/intel/sof-tplg

cp sof-jsl-es8336-ssp1.tplg sof-jsl-es8336.tplg

gedit /etc/modprobe.d/alsa-base.conf

and add a line

options snd_soc_sof_es8336 quirk=0x01

Is it not being detected because I don't know the 'quirk' value?

How exactly do I find the correct 'quirk' value?

plbossart commented 1 year ago

in general we don't provide any guidance for custom kernels here. If you file an issue against the SOF driver, you need to first follow the links and install whatever is recommended for 5.19 or 6.0.

If you want to ask @yangxiaohua2009 for support on his custom kernel that's a different topic and different support.

Pick one.

Usulyre commented 1 year ago

Hi, all I'm saying is that I tried that. I followed the links as well.

I also did the the "setup sof on a linux machine" Sound audio card was not detected at all. So I only see the 'quirk' parameter as an option. Again I would like to ask:

Is it not being detected because I don't know the 'quirk' value?

How exactly do I find the correct 'quirk' value?

plbossart commented 1 year ago

if you followed the links, then you must have tried with 6.0+patches, enabled dynamic debug and attached the logs. I don't even know what the 'quirk' value might be until we see the results. I don't even know what platform this is - you provided zero information.

Usulyre commented 1 year ago

Just finished installing the kernel on xubuntu. What log do i provide? How to install sof-logger? Also I am unclear about dynamic debug as well.

Usulyre commented 1 year ago

alsa-info.txt

plbossart commented 1 year ago

Just copy this file sof-dyndbg.conf.txt as /etc/modprobe.d/sof-dyndbg.conf

Also make sure that you have all ES8336 options selected, e.g.

CONFIG_SND_SOC_INTEL_SOF_ES8336_MACH=m CONFIG_SND_SOC_ES8316=m CONFIG_SND_SOC_ES8326=m

plbossart commented 1 year ago

and attach the dmesg log

Usulyre commented 1 year ago

Ok, i downloaded the sof-dyndbg.conf.txt and copied the contents into /etc/modprobe.d/sof-dyndbg.conf file.

Where do i put:

CONFIG_SND_SOC_INTEL_SOF_ES8336_MACH=m CONFIG_SND_SOC_ES8316=m CONFIG_SND_SOC_ES8326=m

plbossart commented 1 year ago

just add it to your config file and re-run 'make olddefconfig' and check it's still there. alternatively use 'make menuconfig' and select them manually.

Usulyre commented 1 year ago

Where is the config file located? Is it in the /work/sof/linux folder created in the beginning?

plbossart commented 1 year ago

sorry, I will have to point you to the online doc at this point: https://thesofproject.github.io/latest/getting_started/setup_linux/install_locally.html

Usulyre commented 1 year ago

added to config file in my /work/sof/linux folder. Ran 'make olddefconfig' and still there.

Dmesg from var/log

dmesg.txt

plbossart commented 1 year ago

it's likely that you are still having configuration issues @Usulyre. Unfortunately I don't have time to help further.

yangxiaohua2009 commented 1 year ago

@Usulyre The config files lie in /work/sof/linux/arch/x86/configs You shound see may files end in defconfig there. Copy the es_6_1_defconfig file to the folder and just run make es_6_1_defconfig and compile again. This makes sure that you have CONFIG_SND_SOC_INTEL_SOF_ES8336_MACH=m in your config file. es_6_1_defconfig.zip

Usulyre commented 1 year ago

Hi, @yangxiaohua2009

I copied the file to that folder and ran make es_6_1_defconfig and recompiled. I still have no audio/sound and essx8336 doesn't show up as a device either.

What can I do next?

yangxiaohua2009 commented 1 year ago

copy the sof-dyndbg.conf.txt to /etc/modprobe.d/sof-dyndbg.conf and give us your dmesg. This config file is not the defconfig file. You need to copy it to /etc/modprobe.d/ so that we can get enough information from your dmesg

Usulyre commented 1 year ago

After copying, do i recompile it then give the dmesg?

yangxiaohua2009 commented 1 year ago

I wonder if you have installed the kernel. After compiling the kernel, you need to install it by sudo make install and sudo make modules_install

Usulyre commented 1 year ago

Yes, I did that step. Do I recompile before sending the dmesg again?

fredoh9 commented 1 year ago

@Usulyre copying sof-dyndbg.conf doesn't need recompiling kernel. copy it to /etc/modprobe.d/sof-dyndbg.conf and reboot once

Usulyre commented 1 year ago

Ok, well here is dmesg dmesg.txt

Usulyre commented 1 year ago

Sorry updated dmesg here dmesg.txt

plbossart commented 1 year ago

@Usulyre sorry, no luck here. You have a plain vanilla ApolloLake device (PCI ID 0x5a98), you should see the SOF driver probe on this device and it doesn't. I guess you still have configuration issues.

Usulyre commented 1 year ago

I'm really not sure what I am doing wrong for the configuration.

yangxiaohua2009 commented 1 year ago

@Usulyre Please provide the config file name 'config-6.1.0-rc1-sof+' in your /boot/ folder to prove that your configuration is correct

Usulyre commented 1 year ago

config-6.1.0-rc1-sof+.txt

Usulyre commented 1 year ago

anybody have a chance to look at it?

plbossart commented 1 year ago

the configuration looks alright - no idea why you don't see any probe happening. Try with lspci -vvv and check if any drivers are bound to the PCI device

00:0e.0 Audio device [0403]: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster [8086:5a98] (rev 0d)

Usulyre commented 1 year ago

lspci-1.txt

plbossart commented 1 year ago

this is pretty clear: you are not using the SOF driver

    Kernel driver in use: snd_hda_intel
    Kernel modules: snd_hda_intel, snd_sof_pci_intel_apl

but you do have CONFIG_SND_INTEL_DSP_CONFIG=m

try adding this in /etc/modprobe.d/alsa-base.conf

options snd-intel-dspcfg dsp_driver=3

and attach the dmesg log

Usulyre commented 1 year ago

dmesg.txt

yangxiaohua2009 commented 1 year ago

@Usulyre Can you somehow provide the kernel you are using so that I can test your kernel? You may use make -j8 bindeb-pkg to generate deb files.

Usulyre commented 1 year ago

@yangxiaohua2009 Do you mean you need the version/info of the kernel?

yangxiaohua2009 commented 1 year ago

No, your kernel in deb form like this

Usulyre commented 1 year ago

Can you post how to do that? I have no idea how to.

Usulyre commented 1 year ago

newfolder.zip

Usulyre commented 1 year ago

newfolder2.zip

yangxiaohua2009 commented 1 year ago

Your kernel works fine on my APL DUT. Maybe you are blocking some modules or using the wrong params? apl.log

yangxiaohua2009 commented 1 year ago

lsmod | grep snd should give you these modules

snd_soc_sof_es8336     24576  3
snd_soc_intel_hda_dsp_common    20480  1 snd_soc_sof_es8336
snd_sof_probes         20480  0
snd_soc_dmic           16384  0
snd_hda_codec_hdmi     77824  1
snd_sof_pci_intel_apl    16384  0
snd_sof_intel_hda_common   159744  1 snd_sof_pci_intel_apl
snd_sof_pci            24576  2 snd_sof_intel_hda_common,snd_sof_pci_intel_apl
snd_sof_intel_hda      24576  1 snd_sof_intel_hda_common
snd_sof_xtensa_dsp     16384  1 snd_sof_intel_hda_common
snd_sof               282624  4 snd_sof_pci,snd_sof_intel_hda_common,snd_sof_probes,snd_sof_intel_hda
snd_sof_utils          20480  1 snd_sof
snd_soc_acpi_intel_match    77824  2 snd_sof_intel_hda_common,snd_sof_pci_intel_apl
snd_soc_acpi           16384  2 snd_soc_acpi_intel_match,snd_sof_intel_hda_common
snd_soc_hdac_hda       24576  1 snd_sof_intel_hda_common
snd_hda_ext_core       32768  3 snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda
snd_hda_intel          53248  0
snd_intel_dspcfg       24576  3 snd_hda_intel,snd_sof,snd_sof_intel_hda_common
snd_hda_codec         167936  5 snd_hda_codec_hdmi,snd_hda_intel,snd_soc_intel_hda_dsp_common,snd_soc_hdac_hda,snd_sof_intel_hda
snd_hwdep              20480  1 snd_hda_codec
snd_hda_core          118784  8 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_soc_intel_hda_dsp_common,snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda
snd_soc_es8316         49152  1
snd_soc_core          348160  7 snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_soc_sof_es8336,snd_sof_probes,snd_soc_es8316,snd_soc_dmic
snd_compress           24576  2 snd_soc_core,snd_sof_probes
snd_seq                73728  0
snd_pcm               147456  10 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_sof,snd_sof_intel_hda_common,snd_compress,snd_soc_core,snd_sof_utils,snd_soc_es8316,snd_hda_core
snd_seq_device         16384  1 snd_seq
snd_timer              40960  2 snd_seq,snd_pcm
snd                   118784  18 snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_sof,snd_timer,snd_compress,snd_soc_core,snd_soc_sof_es8336,snd_pcm
soundcore              16384  1 snd