thesofproject / linux

Linux kernel source tree
Other
89 stars 129 forks source link

Drivers loaded successfully, but no sound yet, HUAWEI MateBook #4397

Open nnseva opened 1 year ago

nnseva commented 1 year ago

(I've checked the sound on Windows OS, it's present and fine)

I've downloaded binaries and installed them manually, basing on the template provided in the README, to the /lib/firmware/intel/sof and /lib/firmware/intel/sof-tplg folders. I've updated them sequentially copying them on the order of versions.

Now I see the SOF infrastructure and modules loaded successfully, sound controls appear, and the system thinks that devices are present. The KDE GUI shows "Comet Lake PCH-LP cAVS Stereo" device on the speakers, and inactive one on the headset microphone.

root@SEVA-MOBILE:/proc# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.2 LTS
Release:        22.04
Codename:       jammy

The dmesg file contains these logs correspondent to SOF:

[    4.466845] sof-audio-pci-intel-cnl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[    4.466918] sof-audio-pci-intel-cnl 0000:00:1f.3: enabling device (0000 -> 0002)
[    4.467110] sof-audio-pci-intel-cnl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[    4.467189] sof-audio-pci-intel-cnl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    4.471401] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915])
[    4.475843] sof-audio-pci-intel-cnl 0000:00:1f.3: use msi interrupt mode
[    4.486750] intel_tcc_cooling: Programmable TCC Offset detected
[    4.537638] sof-audio-pci-intel-cnl 0000:00:1f.3: NHLT_DEVICE_I2S detected, ssp_mask 0x1
[    4.537642] sof-audio-pci-intel-cnl 0000:00:1f.3: hda codecs found, mask 4
[    4.539356] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[    4.539361] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:21:0
[    4.539364] sof-audio-pci-intel-cnl 0000:00:1f.3: FW ABI is more recent than kernel
[    4.539369] sof-audio-pci-intel-cnl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30
[    4.548642] iwlwifi 0000:00:14.3 wlp0s20f3: renamed from wlan0
[    4.639114] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[    4.639119] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:21:0
[    4.639121] sof-audio-pci-intel-cnl 0000:00:1f.3: FW ABI is more recent than kernel
[    4.686210] sof-essx8336 sof-essx8336: quirk mask 0x1a0
[    4.686215] sof-essx8336 sof-essx8336: quirk SSP0
[    4.686217] sof-essx8336 sof-essx8336: quirk DMIC enabled
[    4.686218] sof-essx8336 sof-essx8336: quirk headphone GPIO enabled
[    4.686219] sof-essx8336 sof-essx8336: quirk headset at mic1 port enabled
[    4.718849] sof-audio-pci-intel-cnl 0000:00:1f.3: Topology: ABI 3:22:1 Kernel ABI 3:21:0
[    4.718855] sof-audio-pci-intel-cnl 0000:00:1f.3: warn: topology ABI is more recent than kernel
[    4.719075] sof-essx8336 sof-essx8336: ASoC: Parent card not yet available, widget card binding deferred
[    4.794652] es8316 i2c-ESSX8336:00: assuming static mclk
[    4.862585] input: sof-essx8336 Headset as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input13
[    4.862761] input: sof-essx8336 HDMI/DP,pcm=5 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input14
[    4.863054] input: sof-essx8336 HDMI/DP,pcm=6 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input15
[    4.863512] input: sof-essx8336 HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input16

The kern.log contains almost the same:

May 30 13:32:21 SEVA-MOBILE kernel: [    4.461456] sof-audio-pci-intel-cnl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
May 30 13:32:21 SEVA-MOBILE kernel: [    4.461530] sof-audio-pci-intel-cnl 0000:00:1f.3: enabling device (0000 -> 0002)
May 30 13:32:21 SEVA-MOBILE kernel: [    4.461727] sof-audio-pci-intel-cnl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
May 30 13:32:21 SEVA-MOBILE kernel: [    4.461811] sof-audio-pci-intel-cnl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
May 30 13:32:21 SEVA-MOBILE kernel: [    4.468590] sof-audio-pci-intel-cnl 0000:00:1f.3: use msi interrupt mode
May 30 13:32:21 SEVA-MOBILE kernel: [    4.475411] intel_tcc_cooling: Programmable TCC Offset detected
May 30 13:32:21 SEVA-MOBILE kernel: [    4.501715] sof-audio-pci-intel-cnl 0000:00:1f.3: NHLT_DEVICE_I2S detected, ssp_mask 0x1
May 30 13:32:21 SEVA-MOBILE kernel: [    4.501721] sof-audio-pci-intel-cnl 0000:00:1f.3: hda codecs found, mask 4
May 30 13:32:21 SEVA-MOBILE kernel: [    4.503350] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware info: version 2:2:0-57864
May 30 13:32:21 SEVA-MOBILE kernel: [    4.503354] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:21:0
May 30 13:32:21 SEVA-MOBILE kernel: [    4.503357] sof-audio-pci-intel-cnl 0000:00:1f.3: FW ABI is more recent than kernel
May 30 13:32:21 SEVA-MOBILE kernel: [    4.503361] sof-audio-pci-intel-cnl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30
May 30 13:32:21 SEVA-MOBILE kernel: [    4.513960] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915])
May 30 13:32:21 SEVA-MOBILE kernel: [    4.603254] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware info: version 2:2:0-57864
May 30 13:32:21 SEVA-MOBILE kernel: [    4.603259] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:21:0
May 30 13:32:21 SEVA-MOBILE kernel: [    4.603262] sof-audio-pci-intel-cnl 0000:00:1f.3: FW ABI is more recent than kernel
May 30 13:32:21 SEVA-MOBILE kernel: [    4.641126] iwlwifi 0000:00:14.3 wlp0s20f3: renamed from wlan0
May 30 13:32:21 SEVA-MOBILE kernel: [    4.738795] sof-essx8336 sof-essx8336: quirk mask 0x1a0
May 30 13:32:21 SEVA-MOBILE kernel: [    4.738800] sof-essx8336 sof-essx8336: quirk SSP0
May 30 13:32:21 SEVA-MOBILE kernel: [    4.738802] sof-essx8336 sof-essx8336: quirk DMIC enabled
May 30 13:32:21 SEVA-MOBILE kernel: [    4.738803] sof-essx8336 sof-essx8336: quirk headphone GPIO enabled
May 30 13:32:21 SEVA-MOBILE kernel: [    4.738804] sof-essx8336 sof-essx8336: quirk headset at mic1 port enabled
May 30 13:32:22 SEVA-MOBILE kernel: [    4.787957] sof-audio-pci-intel-cnl 0000:00:1f.3: Topology: ABI 3:22:1 Kernel ABI 3:21:0
May 30 13:32:22 SEVA-MOBILE kernel: [    4.787964] sof-audio-pci-intel-cnl 0000:00:1f.3: warn: topology ABI is more recent than kernel
May 30 13:32:22 SEVA-MOBILE kernel: [    4.788257] sof-essx8336 sof-essx8336: ASoC: Parent card not yet available, widget card binding deferred
May 30 13:32:22 SEVA-MOBILE kernel: [    4.820748] es8316 i2c-ESSX8336:00: assuming static mclk
May 30 13:32:22 SEVA-MOBILE kernel: [    4.837222] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
May 30 13:32:22 SEVA-MOBILE kernel: [    4.837229] Bluetooth: BNEP filters: protocol multicast
May 30 13:32:22 SEVA-MOBILE kernel: [    4.837236] Bluetooth: BNEP socket layer initialized
May 30 13:32:22 SEVA-MOBILE kernel: [    4.909665] input: sof-essx8336 Headset as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input13
May 30 13:32:22 SEVA-MOBILE kernel: [    4.909806] input: sof-essx8336 HDMI/DP,pcm=5 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input14
May 30 13:32:22 SEVA-MOBILE kernel: [    4.909956] input: sof-essx8336 HDMI/DP,pcm=6 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input15
May 30 13:32:22 SEVA-MOBILE kernel: [    4.910056] input: sof-essx8336 HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input16

/proc/asound/cards

 0 [sofessx8336    ]: sof-essx8336 - sof-essx8336
                      HUAWEI-BOHB_WAX9-M1140-BOHB_WAX9_PCB_B2

/proc/asound/modules

 0 snd_soc_sof_es8336

/proc/asound/pcm

00-00: ES8336 (*) :  : playback 1 : capture 1
00-01: DMIC (*) :  : capture 1
00-02: DMIC16kHz (*) :  : capture 1
00-05: HDMI 1 (*) :  : playback 1
00-06: HDMI 2 (*) :  : playback 1
00-07: HDMI 3 (*) :  : playback 1

/proc/asound/version

Advanced Linux Sound Architecture Driver Version k5.19.0-42-generic.
root@SEVA-MOBILE:/proc# cat /proc/modules | grep sof
snd_sof_probes 20480 0 - Live 0xffffffffc0d61000
snd_soc_sof_es8336 20480 5 - Live 0xffffffffc0d54000
snd_soc_intel_hda_dsp_common 20480 1 snd_soc_sof_es8336, Live 0xffffffffc0aa5000
snd_sof_pci_intel_cnl 16384 4 - Live 0xffffffffc0f12000
snd_sof_intel_hda_common 139264 1 snd_sof_pci_intel_cnl, Live 0xffffffffc1103000
soundwire_intel 45056 1 snd_sof_intel_hda_common, Live 0xffffffffc0f36000
snd_sof_intel_hda 20480 1 snd_sof_intel_hda_common, Live 0xffffffffc0f1a000
snd_sof_pci 24576 2 snd_sof_pci_intel_cnl,snd_sof_intel_hda_common, Live 0xffffffffc0a75000
snd_sof_xtensa_dsp 16384 1 snd_sof_intel_hda_common, Live 0xffffffffc0796000
snd_sof 208896 3 snd_sof_probes,snd_sof_intel_hda_common,snd_sof_pci, Live 0xffffffffc1410000
snd_sof_utils 20480 1 snd_sof, Live 0xffffffffc09b9000
snd_soc_hdac_hda 24576 1 snd_sof_intel_hda_common, Live 0xffffffffc0ba5000
snd_hda_ext_core 36864 3 snd_sof_intel_hda_common,snd_sof_intel_hda,snd_soc_hdac_hda, Live 0xffffffffc0fe2000
snd_soc_acpi_intel_match 69632 2 snd_sof_pci_intel_cnl,snd_sof_intel_hda_common, Live 0xffffffffc0ca8000
snd_soc_acpi 16384 2 snd_sof_intel_hda_common,snd_soc_acpi_intel_match, Live 0xffffffffc0c65000
snd_intel_dspcfg 36864 2 snd_sof_intel_hda_common,snd_hda_intel, Live 0xffffffffc0c85000
snd_intel_sdw_acpi 20480 2 snd_sof_intel_hda_common,snd_intel_dspcfg, Live 0xffffffffc0a6f000
snd_soc_core 368640 8 snd_sof_probes,snd_soc_sof_es8336,snd_soc_dmic,snd_sof_intel_hda_common,soundwire_intel,snd_sof,snd_soc_hdac_hda,snd_soc_es8316, Live 0xffffffffc0bd1000
snd_hda_core 114688 8 snd_soc_intel_hda_dsp_common,snd_hda_codec_hdmi,snd_sof_intel_hda_common,snd_sof_intel_hda,snd_soc_hdac_hda,snd_hda_ext_core,snd_hda_intel,snd_hda_codec, Live 0xffffffffc0d6a000
snd_compress 24576 2 snd_sof_probes,snd_soc_core, Live 0xffffffffc0bae000
snd_pcm 159744 14 snd_hda_codec_hdmi,snd_sof_intel_hda_common,soundwire_intel,snd_sof,snd_sof_utils,snd_hda_intel,snd_soc_es8316,snd_soc_core,snd_hda_codec,snd_hda_core,snd_compress,snd_pcm_dmaengine, Live 0xffffffffc09cc000
snd 114688 22 snd_ctl_led,snd_soc_sof_es8336,snd_hda_codec_hdmi,snd_sof,snd_hda_intel,snd_rawmidi,snd_soc_core,snd_hda_codec,snd_seq,snd_compress,snd_hwdep,snd_seq_device,snd_pcm,snd_timer, Live 0xffffffffc079c000

I could provide any other system info also.

marc-hb commented 1 year ago

Thanks for the detailed system information. Can you please take a look at these?

nnseva commented 1 year ago

Please fix the doc (or the code) https://thesofproject.github.io/latest/getting_started/intel_debug/suggestions.html#es8336-support:

/sys/module/snd_soc_sof_es8336/parameters/quirk reports only overridden quirk value, not the default one. When the override is not set, the /sys/module/snd_soc_sof_es8336/parameters/quirk reports -1 on my host.

The default value is reported in the dmesg log. If overloaded, it is said like this:

[    5.048328] sof-essx8336 sof-essx8336: Overriding quirk 0x1a0 => 0x120

The default quirk (0x1a0) on my host contains an undocumented bit BIT(5). When I turned this bit to 0, the sound subsystem did not show me a sound card.

I've checked also all documented bits to turn on or off one by one based on the default value. I've found the only SOF_ES8336_JD_INVERTED really noticeable, it really reverts the selection of input when inserting the headphones jack.

continue looking...

nnseva commented 1 year ago

dmesg log with quirk override with all debug on dmesg log without quirk override with all debug on

marc-hb commented 1 year ago

Please fix the doc (or the code)

Note 5.19.0-43-generic is pretty old now, maybe this has already been fixed? I have no idea sorry, however you should always be testing a more recent kernel.

Also keep in mind that:

nnseva commented 1 year ago

Note 5.19.0-43-generic is pretty old now, maybe this has already been fixed? I have no idea sorry, however you should always be testing a more recent kernel.

It's the current version of the Ubuntu kernel now. I've just installed the non-default 6.1-oem now, and the result is the same, silence on all channels, speakers as well as headphones.

The default quirk is also not reported on the /sys/module/snd_soc_sof_es8336/parameters/quirk, only overwritten.

marc-hb commented 1 year ago

/sys/module/snd_soc_sof_es8336/parameters/quirk reports only overridden quirk value, not the default one. When the override is not set, the /sys/module/snd_soc_sof_es8336/parameters/quirk reports -1 on my host.

Could you please file a new issue about this? Unlike all the system information you shared so far, it does not seem device specific.

nnseva commented 11 months ago

Continue trying.

Now the kernel 6.2.0 provided by Ubuntu is used. There were no noticeable changes - silence on all channels.

root@SEVA-MOBILE:/disk0/home/seva# uname -srm
Linux 6.2.0-33-generic x86_64

Also, 2.6 and 2.7 files from the sof-bin project have been copied to the /lib/firmware/intel to the corresponding folders.

What is new noticed: trying to connect the TV to the HDMI cable, no changes on the sound control panel - neither device nor port has been changed.

A new DMESG file with debug on is applied.

marc-hb commented 11 months ago

Also, 2.6 and 2.7 files from the sof-bin project have been copied to the /lib/firmware/intel to the corresponding folders.

Make sure you download files from https://github.com/thesofproject/sof-bin/releases, NOT directly from https://github.com/thesofproject/sof-bin. See the README.md.

Considering there is no v2.7 at the former, I'm pretty sure you used the wrong place.

nnseva commented 11 months ago

Hi @marc-hb,

appears to be no difference.

The 2.7 version is present in the last public release sof-bin-v2023.09-rc1.

Although you are right, really I've copied binaries directly from the sources of the sof-bin before. I've investigated the install.sh script and used corrected paths as they are used there, checking dmesg log for reports about loading errors.

Anyway, now I've downloaded a release and installed the binaries using the install.sh script there. Looks like the rsync utility just skipped files because they were on proper places already.

To be sure, I've deleted all sof-* subfolders in the /lib/firmware/intel folder, evaluated install.sh again, and rebooted the host. No difference.

nnseva commented 9 months ago

Tried sof-bin-2023.09.2 on the Ubuntu 22.04 with the same result. Installed using official way: download binary package, unarchive, and run sudo install.sh.

Tried ubuntu v.23.04, it looks like already containing sof drivers v.2.4, and recognizing my sound card properly, but no sound also.

nnseva commented 8 months ago

Tried sof-bin-2023.12 on the Ubuntu 22.04, no any changes found.