gnickm/sof-essx8336-debian-fix

Upgrade to 5.18

Opened this issue · 22 comments

Is it possible to upgrade the .deb kernels to 5.18.3 or higher?

Thanks

Looks like the latest in sid is 5.18.2: https://packages.debian.org/sid/kernel/linux-headers-5.18.0-1-amd64

Hit this issue again when they are up to 5.18.3 and I'll rebuild the kernel.

Okay! I'll build a new kernel. And write down how I do it this time...

Ok great. Thanks

New kernel is built, but I need to test on my hardware and make sure everything is legit.

Ok great. Thanks. Let me know when is ready so I can test it as well.

@giovannicaligaris Deb packages are live in the 1.1.0 PR branch: https://github.com/gnickm/sof-essx8336-debian-fix/tree/version/1.1.0/dist

I installed and the sound card is detected. After running setup-pulseaudio.sh I can hear a crackling sound when the tablet powers on and thats about it. No sound after that. I tried disabling the pulseaudio setup and I get the same result.

Very close now, but I am not sure what it could be.

 sudo dmesg | grep sof
 [sudo] password for mobian: 
 [    1.019790] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
 [    1.019793] software IO TLB: mapped [mem 0x00000000694fe000-0x000000006d4fe000] (64MB)
 [    4.385777] xor: measuring software checksum speed
 [    5.096151] Modules linked in: rtsx_usb(+) btrfs blake2b_generic xor sd_mod t10_pi crc64_rocksoft crc64 crc_t10dif crct10dif_generic uas usb_storage raid6_pq zstd_compress libcrc32c crc32c_generic hid_generic usbhid hid i915 drm_buddy i2c_algo_bit drm_dp_helper spi_pxa2xx_platform dw_dmac dw_dmac_core cec mmc_block rc_core ahci ttm libahci drm_kms_helper libata xhci_pci xhci_hcd drm sdhci_pci scsi_mod usbcore cqhci sdhci i2c_i801 crct10dif_pclmul crct10dif_common crc32_pclmul crc32c_intel mmc_core i2c_smbus intel_lpss_pci scsi_common intel_lpss idma64 usb_common wmi battery video pinctrl_jasperlake button
 [   13.380855] sof-audio-pci-intel-icl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
 [   13.380983] sof-audio-pci-intel-icl 0000:00:1f.3: enabling device (0000 -> 0002)
 [   13.381255] sof-audio-pci-intel-icl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
 [   13.381392] sof-audio-pci-intel-icl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
 [   13.388454] sof-audio-pci-intel-icl 0000:00:1f.3: use msi interrupt mode
 [   13.450141] sof-audio-pci-intel-icl 0000:00:1f.3: NHLT_DEVICE_I2S detected, ssp_mask 0x1
 [   13.450150] sof-audio-pci-intel-icl 0000:00:1f.3: hda codecs found, mask 4
 [   13.481723] sof-audio-pci-intel-icl 0000:00:1f.3: firmware: direct-loading firmware intel/sof/sof-jsl.ri
 [   13.481737] sof-audio-pci-intel-icl 0000:00:1f.3: Firmware info: version 2:1:1-3964a
 [   13.481739] sof-audio-pci-intel-icl 0000:00:1f.3: Firmware: ABI 3:21:0 Kernel ABI 3:19:1
 [   13.481741] sof-audio-pci-intel-icl 0000:00:1f.3: warn: FW ABI is more recent than kernel
 [   13.481749] sof-audio-pci-intel-icl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30
 [   13.585078] sof-audio-pci-intel-icl 0000:00:1f.3: Firmware info: version 2:1:1-3964a
 [   13.585086] sof-audio-pci-intel-icl 0000:00:1f.3: Firmware: ABI 3:21:0 Kernel ABI 3:19:1
 [   13.585088] sof-audio-pci-intel-icl 0000:00:1f.3: warn: FW ABI is more recent than kernel
 [   13.670488] sof-essx8336 sof-essx8336: quirk mask 0x0
 [   13.670495] sof-essx8336 sof-essx8336: quirk SSP0
 [   13.722791] sof-audio-pci-intel-icl 0000:00:1f.3: firmware: direct-loading firmware intel/sof-tplg/sof-jsl-es8336-ssp0.tplg
 [   13.722813] sof-audio-pci-intel-icl 0000:00:1f.3: Topology: ABI 3:20:0 Kernel ABI 3:19:1
 [   13.722817] sof-audio-pci-intel-icl 0000:00:1f.3: warn: topology ABI is more recent than kernel
 [   13.723073] sof-essx8336 sof-essx8336: ASoC: Parent card not yet available, widget card binding deferred
 [   13.830283] sof-essx8336 sof-essx8336: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 3
 [   13.830290] sof-essx8336 sof-essx8336: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 4
 [   13.850061] input: sof-essx8336 Headset as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input18
 [   13.850124] input: sof-essx8336 HDMI/DP,pcm=5 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input19
 [   13.850177] input: sof-essx8336 HDMI/DP,pcm=6 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input20
 [   13.850228] input: sof-essx8336 HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input21
 

[ 13.722791] sof-audio-pci-intel-icl 0000:00:1f.3: firmware: direct-loading firmware intel/sof-tplg/sof-jsl-es8336-ssp0.tplg
[ 13.723073] sof-essx8336 sof-essx8336: ASoC: Parent card not yet available, widget card binding deferred

Ugh, same issue as in #2 . You have a board that isn't supported by the sof yet.

Found an interesting message just now about why ES8336 support sucks so bad in linux: https://lore.kernel.org/all/20220308192610.392950-6-pierre-louis.bossart@linux.intel.com/T/

As I suspected these chips were developed specifically for Windows.

@gnickm It is working on Manjaro for some reason. I wonder if they patched something

On Manjaro

sudo dmesg | grep sof 
[sudo] password for manjaro: 
[    1.169687] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[    1.169690] software IO TLB: mapped [mem 0x000000006997f000-0x000000006d97f000] (64MB)
[    6.758550] sof-audio-pci-intel-icl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[    6.758723] sof-audio-pci-intel-icl 0000:00:1f.3: enabling device (0000 -> 0002)
[    6.759208] sof-audio-pci-intel-icl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[    6.759542] sof-audio-pci-intel-icl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    6.768454] sof-audio-pci-intel-icl 0000:00:1f.3: use msi interrupt mode
[    6.814964] sof-audio-pci-intel-icl 0000:00:1f.3: NHLT_DEVICE_I2S detected, ssp_mask 0x1
[    6.814983] sof-audio-pci-intel-icl 0000:00:1f.3: hda codecs found, mask 4
[    6.823771] sof-audio-pci-intel-icl 0000:00:1f.3: Firmware info: version 2:1:1-3964a
[    6.823783] sof-audio-pci-intel-icl 0000:00:1f.3: Firmware: ABI 3:21:0 Kernel ABI 3:19:1
[    6.823789] sof-audio-pci-intel-icl 0000:00:1f.3: warn: FW ABI is more recent than kernel
[    6.823804] sof-audio-pci-intel-icl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30
[    6.924390] sof-audio-pci-intel-icl 0000:00:1f.3: Firmware info: version 2:1:1-3964a
[    6.924408] sof-audio-pci-intel-icl 0000:00:1f.3: Firmware: ABI 3:21:0 Kernel ABI 3:19:1
[    6.924416] sof-audio-pci-intel-icl 0000:00:1f.3: warn: FW ABI is more recent than kernel
[    6.973812] sof-essx8336 sof-essx8336: quirk mask 0x0
[    6.973825] sof-essx8336 sof-essx8336: quirk SSP0
[    6.981739] sof-audio-pci-intel-icl 0000:00:1f.3: Topology: ABI 3:21:0 Kernel ABI 3:19:1
[    6.981751] sof-audio-pci-intel-icl 0000:00:1f.3: warn: topology ABI is more recent than kernel
[    6.982076] sof-essx8336 sof-essx8336: ASoC: Parent card not yet available, widget card binding deferred
[    7.069796] sof-essx8336 sof-essx8336: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 3
[    7.069809] sof-essx8336 sof-essx8336: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 4
[    7.087922] input: sof-essx8336 Headset as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input13
[    7.088065] input: sof-essx8336 HDMI/DP,pcm=5 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input14
[    7.088173] input: sof-essx8336 HDMI/DP,pcm=6 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input15
[    7.088272] input: sof-essx8336 HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1f.3/sof-essx8336/sound/card0/input16

@giovannicaligaris Weird, I thought the Parent card not yet available meant it didn't work... What does aplay -l and arecord -l give you?

On Debian

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sofessx8336 [sof-essx8336], device 0: ES8336 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofessx8336 [sof-essx8336], device 5: HDMI 1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofessx8336 [sof-essx8336], device 6: HDMI 2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofessx8336 [sof-essx8336], device 7: HDMI 3 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Good news, I figured out!

For some reason your setup-sof.sh script messes something up with the sof folders.

I started from scratch and all I did was install your custom kernel and install firmware-sof-signed on Debian. Restarted and then on the terminal type alsamixer and with F6 selected the sof sound card. Increased all the volumes and now there is sound!

Thanks a lot man. Your kernel now makes my tablet usable.

@giovannicaligaris Which firmware-sof-signed did you use? From sid? Starting to think the sof "fixes" I have implemented are specific to my crap hardware...

apt-cache policy firmware-sof-signed 
firmware-sof-signed:
  Installed: 2.1.1-1
  Candidate: 2.1.1-1
  Version table:
 *** 2.1.1-1 500
        500 http://deb.debian.org/debian bookworm/non-free amd64 Packages
        500 http://deb.debian.org/debian unstable/non-free amd64 Packages
        100 /var/lib/dpkg/status

Actually, setup-alsa.sh has to be run at least once.

Can you show me how you built the kernel?

Can you show me how you built the kernel?

@giovannicaligaris https://github.com/gnickm/sof-essx8336-debian-fix/blob/version/1.1.0/build-kernel.sh

@gnickm Thank you

@gnickm which file did you add CONFIG_SND_SOC_INTEL_SOF_ES8336_MACH=m