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

Kernel 5.8.x compatibility #2

Closed
wants to merge 3 commits into from
Closed

Conversation

villuv
Copy link

@villuv villuv commented Aug 25, 2020

These changes were needed to compile it with kernel 5.8.3-arch1-1

PS: Didn't get the sound working though on my 9700, complains about missing firmware files...

resolves #1

@karora
Copy link

karora commented Aug 26, 2020

@villuv You should be able to resolve the firmware issues by:

git clone -b stable-v1.5.1 https://github.com/thesofproject/sof-bin.git
cd sof-bin
./go.sh
reboot

@karora
Copy link

karora commented Aug 26, 2020

With the firmware loaded I do get these errors though:

  MODPOST /var/lib/dkms/soundwire/1.3.1/build/Module.symvers
ERROR: modpost: "sdw_intel_acpi_scan" [/var/lib/dkms/soundwire/1.3.1/build/soc/sof/intel/snd-sof-intel-hda-common.ko] undefined!
ERROR: modpost: "sdw_intel_probe" [/var/lib/dkms/soundwire/1.3.1/build/soc/sof/intel/snd-sof-intel-hda-common.ko] undefined!
ERROR: modpost: "sdw_intel_process_wakeen_event" [/var/lib/dkms/soundwire/1.3.1/build/soc/sof/intel/snd-sof-intel-hda-common.ko] undefined!
ERROR: modpost: "sdw_intel_startup" [/var/lib/dkms/soundwire/1.3.1/build/soc/sof/intel/snd-sof-intel-hda-common.ko] undefined!
ERROR: modpost: "sdw_intel_exit" [/var/lib/dkms/soundwire/1.3.1/build/soc/sof/intel/snd-sof-intel-hda-common.ko] undefined!
ERROR: modpost: "sdw_intel_enable_irq" [/var/lib/dkms/soundwire/1.3.1/build/soc/sof/intel/snd-sof-intel-hda-common.ko] undefined!
ERROR: modpost: "sdw_intel_thread" [/var/lib/dkms/soundwire/1.3.1/build/soc/sof/intel/snd-sof-intel-hda-common.ko] undefined!
make[3]: *** [/usr/src/linux-headers-5.8.0-trunk-common/scripts/Makefile.modpost:111: /var/lib/dkms/soundwire/1.3.1/build/Module.symvers] Error 1
make[3]: *** Deleting file '/var/lib/dkms/soundwire/1.3.1/build/Module.symvers'
make[2]: *** [/usr/src/linux-headers-5.8.0-trunk-common/Makefile:1681: modules] Error 2
make[1]: *** [/usr/src/linux-headers-5.8.0-trunk-common/Makefile:185: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.8.0-trunk-amd64'
make: *** [Makefile:10: all] Error 2

@villuv
Copy link
Author

villuv commented Aug 26, 2020

@villuv You should be able to resolve the firmware issues by:

git clone -b stable-v1.5.1 https://github.com/thesofproject/sof-bin.git
cd sof-bin
./go.sh
reboot

Thanks for the tip but this is exactly what Arch's sof-firmware 1.5.1-1 package does, so I doubt it makes a difference: https://github.com/archlinux/svntogit-packages/blob/packages/sof-firmware/trunk/PKGBUILD

Also sof-bin doesn't contain those firmware files it is looking for.

At what point you get those errors? dkms build ?

@karora
Copy link

karora commented Aug 26, 2020

Right, those are the final lines of the dkms build output. This is on a Dell XPS 9700 running Debian Sid.

@karora
Copy link

karora commented Aug 26, 2020

While the firmware files aren't present in that archive by those names, the go.sh script does rename them into the correct places:

karora@orwell:/usr/src$ find sof-bin -name sof-cml.ri
karora@orwell:/usr/src$ find /lib/firmware -name sof-cml.ri
/lib/firmware/intel/sof/sof-cml.ri

Interestingly, in go.sh, you can see that it's using the same firmware for three different names:

ln -s ${VERSION}/intel-signed/sof-cnl-${VERSION}.ri sof-cfl.ri
ln -s ${VERSION}/intel-signed/sof-cnl-${VERSION}.ri sof-cnl.ri
ln -s ${VERSION}/intel-signed/sof-cnl-${VERSION}.ri sof-cml.ri

@villuv
Copy link
Author

villuv commented Aug 26, 2020

Right, those are the final lines of the dkms build output. This is on a Dell XPS 9700 running Debian Sid.

Ok, please make sure that you have kernel headers matching your kernel version. You could "dry run" compile the modules with make KVER=$(uname -r). I'm shooting a bit in the dark here, I'm not very familiar with Debian's arrangements...

Yes, arch package runs the go.sh script, but it doesn't create those files it comlains about, in dmesg

snd_soc_skl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
snd_soc_skl 0000:00:1f.3: enabling device (0000 -> 0002)
snd_soc_skl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
snd_soc_skl 0000:00:1f.3: Direct firmware load for 6c8-DELL-DellInc-538378241-tplg.bin failed with error -2
snd_soc_skl 0000:00:1f.3: tplg fw 6c8-DELL-DellInc-538378241-tplg.bin load failed with -2, trying alternative tplg name skl_hda_dsp_generic-tplg.bin
snd_soc_skl 0000:00:1f.3: Direct firmware load for skl_hda_dsp_generic-tplg.bin failed with error -2
snd_soc_skl 0000:00:1f.3: tplg skl_hda_dsp_generic-tplg.bin failed with -2, falling back to dfw_sst.bin
snd_soc_skl 0000:00:1f.3: Direct firmware load for dfw_sst.bin failed with error -2
snd_soc_skl 0000:00:1f.3: Fallback tplg fw dfw_sst.bin load failed with -2
snd_soc_skl 0000:00:1f.3: Failed to init topology!
snd_soc_skl 0000:00:1f.3: ASoC: failed to probe component -2

I have a hunch that this snd_soc_skl is not a correct module, but it doesn't help if I blacklist it...

@karora
Copy link

karora commented Aug 26, 2020

Could be. The Debian 5.8 kernel & headers only came available in the last day or two, so there could be bugs in something there, I guess, but the other dkms packages all built fine for this kernel. I don't have a snd_soc_skl though:

root@orwell:/etc# dmesg | grep -e '\(sof\|snd\|skl\|firmware\)'
[    1.065577] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[    1.065578] software IO TLB: mapped [mem 0x4711b000-0x4b11b000] (64MB)
[    1.118004] integrity: Loaded X.509 cert 'Microsoft Windows Production PCA 2011: a92902398e16c49778cd90f99e4f9ae17c55af53'
[    1.118015] integrity: Loaded X.509 cert 'Microsoft Corporation UEFI CA 2011: 13adbf4309bd82709c8cd54f316ed522988a1bd4'
[    1.469289] i915 0000:00:02.0: firmware: direct-loading firmware i915/kbl_dmc_ver1_04.bin
[    1.470408] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_04.bin (v1.4)
[   18.015022] platform regulatory.0: firmware: direct-loading firmware regulatory.db
[   18.015144] platform regulatory.0: firmware: direct-loading firmware regulatory.db.p7s
[   18.019026] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[   18.019105] snd_hda_intel 0000:01:00.1: enabling device (0000 -> 0002)
[   18.019266] snd_hda_intel 0000:01:00.1: Disabling MSI
[   18.019276] snd_hda_intel 0000:01:00.1: Handle vga_switcheroo audio client
[   18.089954] uvcvideo 1-5:1.2: Entity type for entity IR Microsoft Extended Controls  was not initialized!
[   18.098786] iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-QuZ-a0-hr-b0-56.ucode (-2)
[   18.099093] firmware_class: See https://wiki.debian.org/Firmware for information about missing firmware
[   18.099404] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-56.ucode failed with error -2
[   18.103365] iwlwifi 0000:00:14.3: firmware: direct-loading firmware iwlwifi-QuZ-a0-hr-b0-55.ucode
[   18.103584] iwlwifi 0000:00:14.3: loaded firmware version 55.d9698065.0 QuZ-a0-hr-b0-55.ucode op_mode iwlmvm
[   18.103594] iwlwifi 0000:00:14.3: firmware: failed to load iwl-debug-yoyo.bin (-2)
[   18.103656] iwlwifi 0000:00:14.3: Direct firmware load for iwl-debug-yoyo.bin failed with error -2
[   18.423063] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[   18.423077] sof-audio-pci 0000:00:1f.3: enabling device (0000 -> 0002)
[   18.423585] usbcore: registered new interface driver snd-usb-audio
[   18.447736] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[   18.447835] sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[   18.454370] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
[   18.465336] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 4
[   18.465338] sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[   18.465341] sof-audio-pci 0000:00:1f.3: DMICs detected in NHLT tables: 0
[   18.467923] sof-audio-pci 0000:00:1f.3: firmware: direct-loading firmware intel/sof/sof-cml.ri
[   18.600652] sof-audio-pci 0000:00:1f.3: Firmware info: version 1:5:1-88707
[   18.600653] sof-audio-pci 0000:00:1f.3: Firmware: ABI 3:16:0 Kernel ABI 3:16:0
[   18.601150] sof-audio-pci 0000:00:1f.3: warning: unknown ext header type 3 size 0x1c
[   18.601184] sof-audio-pci 0000:00:1f.3: warning: unknown ext header type 4 size 0x10
[   18.603834] skl_hda_dsp_generic skl_hda_dsp_generic: info: override BE DAI link iDisp1
[   18.603835] skl_hda_dsp_generic skl_hda_dsp_generic: info: override BE DAI link iDisp2
[   18.603836] skl_hda_dsp_generic skl_hda_dsp_generic: info: override BE DAI link iDisp3
[   18.603836] skl_hda_dsp_generic skl_hda_dsp_generic: info: override BE DAI link dmic01
[   18.603837] skl_hda_dsp_generic skl_hda_dsp_generic: info: override BE DAI link dmic16k
[   18.604222] sof-audio-pci 0000:00:1f.3: firmware: direct-loading firmware intel/sof-tplg/sof-hda-generic-idisp.tplg
[   18.604228] sof-audio-pci 0000:00:1f.3: Topology: ABI 3:16:0 Kernel ABI 3:16:0
[   18.604230] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp3 Tx not handled
[   18.604232] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp2 Tx not handled
[   18.621763] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp1_out not handled
[   18.621765] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp1 Tx not handled
[   18.622685] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp2_out not handled
[   18.623658] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp3_out not handled
[   18.625298] sof-audio-pci 0000:00:1f.3: ASoC: Parent card not yet available, widget card binding deferred
[   18.631941] skl_hda_dsp_generic skl_hda_dsp_generic: intel-hdmi-hifi1 <-> iDisp1 Pin mapping ok
[   18.631944] skl_hda_dsp_generic skl_hda_dsp_generic: intel-hdmi-hifi2 <-> iDisp2 Pin mapping ok
[   18.631946] skl_hda_dsp_generic skl_hda_dsp_generic: intel-hdmi-hifi3 <-> iDisp3 Pin mapping ok
[   18.631948] skl_hda_dsp_generic skl_hda_dsp_generic: dmic-hifi <-> DMIC01 Pin mapping ok
[   18.631951] skl_hda_dsp_generic skl_hda_dsp_generic: dmic-hifi <-> DMIC16k Pin mapping ok
[   18.631959] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDMI1 1 mapping ok
[   18.631964] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDMI2 2 mapping ok
[   18.631969] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDMI3 3 mapping ok
[   18.642802] input: sof-hda-dsp HDMI/DP,pcm=1 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card2/input35
[   18.642842] input: sof-hda-dsp HDMI/DP,pcm=2 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card2/input36
[   18.642873] input: sof-hda-dsp HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card2/input37
[   21.407294] snd_hda_intel 0000:01:00.1: can't change power state from D3cold to D0 (config space inaccessible)
[   21.786760] snd_hda_codec_hdmi hdaudioC0D0: Unable to sync register 0x4f0800. -5
[   21.786767] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   21.786772] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   21.786778] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   21.786788] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   21.786793] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   21.786798] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   21.786804] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   21.786810] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   21.786815] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   21.786821] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   21.786823] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   21.786824] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   21.786825] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   21.786826] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   21.786828] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   21.786829] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   28.835169] snd_hda_intel 0000:01:00.1: can't change power state from D3cold to D0 (config space inaccessible)
[   29.218706] snd_hda_codec_hdmi hdaudioC0D0: Unable to sync register 0x4f0800. -5
[   29.218711] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   29.218713] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   29.218715] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   29.218716] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   29.218717] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   29.218718] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   29.218721] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   29.218722] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   29.218723] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   29.218724] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   29.218725] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   29.218726] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   29.218727] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   29.218728] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   29.218729] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
[   29.218730] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1

@villuv
Copy link
Author

villuv commented Aug 26, 2020

That's interesting. I don't have any sof- things mentioned in dmesg at all...

Do you happen to have anything related in /etc/modprobe.d, /etc/modules-load.d or asoundrc?

I see that you have some power management issues, maybe this helps:

/etc/modprobe.d/hda_intel_no_powersave.conf :

options snd_hda_intel power_save=0

@karora
Copy link

karora commented Aug 28, 2020

No, there's nothing in /etc/modprobe.d or /etc/modules-load.d or asoundrc loading that stuff - it's just auto-detected and loaded automatically. It might be related to the way the Debian kernel gets built - basically (almost) all drivers get enabled and built as modules. Setting power_save=0 on snd_hda_intel doesn't make a difference to the D3cold to D0 message, but it might be that I should be applying that to one of these other modules:

# lsmod | grep snd
snd_soc_skl_hda_dsp    24576  0
snd_soc_hdac_hdmi      40960  1 snd_soc_skl_hda_dsp
snd_soc_dmic           16384  1
snd_sof_pci            20480  0
snd_sof_intel_hda_common    90112  1 snd_sof_pci
snd_sof_intel_hda      20480  1 snd_sof_intel_hda_common
snd_sof_intel_byt      20480  1 snd_sof_pci
snd_sof_intel_ipc      20480  1 snd_sof_intel_byt
snd_sof               135168  4 snd_sof_pci,snd_sof_intel_hda_common,snd_sof_intel_byt,snd_sof_intel_ipc
snd_sof_xtensa_dsp     16384  2 snd_sof_intel_hda_common,snd_sof_intel_byt
snd_soc_hdac_hda       24576  1 snd_sof_intel_hda_common
snd_hda_ext_core       36864  4 snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_soc_hdac_hda,snd_sof_intel_hda
snd_soc_acpi_intel_match    45056  2 snd_sof_pci,snd_sof_intel_hda_common
snd_soc_acpi           16384  3 snd_soc_acpi_intel_match,snd_sof_intel_hda_common,snd_sof_intel_byt
snd_soc_core          303104  6 snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_soc_hdac_hda,snd_soc_dmic,snd_soc_skl_hda_dsp
snd_compress           32768  1 snd_soc_core
ledtrig_audio          16384  2 snd_sof,dell_laptop
snd_hda_codec_hdmi     73728  2
snd_hda_intel          57344  1
snd_intel_dspcfg       24576  3 snd_hda_intel,snd_sof_pci,snd_sof_intel_hda_common
snd_hda_codec         163840  4 snd_hda_codec_hdmi,snd_hda_intel,snd_soc_hdac_hda,snd_soc_skl_hda_dsp
snd_hda_core          106496  9 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_soc_hdac_hda,snd_sof_intel_hda,snd_soc_skl_hda_dsp
snd_hwdep              16384  1 snd_hda_codec
snd_pcm               135168  9 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_compress,snd_soc_core,snd_hda_core
snd_timer              49152  1 snd_pcm
snd                   110592  11 snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_timer,snd_compress,snd_soc_core,snd_pcm,snd_soc_skl_hda_dsp
soundcore              16384  1 snd

@villuv
Copy link
Author

villuv commented Aug 28, 2020

Thanks for your info. I don't seem to have any snd_soc_ modules loaded for some reason. When I modprobe-d those modules manually, nothing happened. I also updated to kernel 5.8.5, no changes.

Just out of curiosity, check if your sound device has the same hardware ID-s as mine:

villuv@xps$ sudo lspci -nn -v | grep -A 10 audio
00:1f.3 Multimedia audio controller [0401]: Intel Corporation Comet Lake PCH cAVS [8086:06c8]
        Subsystem: Dell Device [1028:098f]
        Flags: bus master, fast devsel, latency 64, IRQ 16
        Memory at 609b118000 (64-bit, non-prefetchable) [size=16K]
        Memory at 609b000000 (64-bit, non-prefetchable) [size=1M]
        Capabilities: [50] Power Management version 3
        Capabilities: [80] Vendor Specific Information: Len=14 <?>
        Capabilities: [60] MSI: Enable- Count=1/1 Maskable- 64bit+
        Kernel driver in use: snd_soc_skl
        Kernel modules: snd_soc_skl, snd_hda_intel

@karora
Copy link

karora commented Aug 28, 2020

So this is the Dell XPS 9700 (the new 17" model for 2020 that's only been available for a couple of months). It has two audio controllers according to lspci, one at 00:1f.3 and one at 01:00.1. I think the one at 01:00.1 might actually be the one causing the power messages since when I google those they tend to be associated with other Nvidia things. I suspect this might be related to some HDMI-ish output (though there's no HDMI port, just four USB-C/Thunderbolt-3 ports).

Anyway, here are the relevant lspci outputs:

# lspci -v -s 00:1f.3 
00:1f.3 Multimedia audio controller: Intel Corporation Comet Lake PCH cAVS
	Subsystem: Dell Comet Lake PCH cAVS
	Flags: bus master, fast devsel, latency 64, IRQ 227, IOMMU group 16
	Memory at 609b218000 (64-bit, non-prefetchable) [size=16K]
	Memory at 609b100000 (64-bit, non-prefetchable) [size=1M]
	Capabilities: [50] Power Management version 3
	Capabilities: [80] Vendor Specific Information: Len=14 <?>
	Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
	Kernel driver in use: sof-audio-pci
	Kernel modules: snd_hda_intel, snd_sof_pci

# lspci -v -s 01:00.1 
01:00.1 Audio device: NVIDIA Corporation TU106 High Definition Audio Controller (rev ff) (prog-if ff)
	!!! Unknown header type 7f
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel

@karora
Copy link

karora commented Aug 28, 2020

Sorry. Not enough "v's" in that :-)

# lspci -vvv -s 00:1f.3 
00:1f.3 Multimedia audio controller: Intel Corporation Comet Lake PCH cAVS
	Subsystem: Dell Comet Lake PCH cAVS
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 64
	Interrupt: pin A routed to IRQ 227
	IOMMU group: 16
	Region 0: Memory at 609b218000 (64-bit, non-prefetchable) [size=16K]
	Region 4: Memory at 609b100000 (64-bit, non-prefetchable) [size=1M]
	Capabilities: [50] Power Management version 3
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0-,D1-,D2-,D3hot+,D3cold+)
		Status: D3 NoSoftRst+ PME-Enable+ DSel=0 DScale=0 PME-
	Capabilities: [80] Vendor Specific Information: Len=14 <?>
	Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
		Address: 00000000fee00f78  Data: 0000
	Kernel driver in use: sof-audio-pci
	Kernel modules: snd_hda_intel, snd_sof_pci

@karora
Copy link

karora commented Aug 28, 2020

Once more with the -nn...

# lspci -nn -vvv -s 00:1f.3 
00:1f.3 Multimedia audio controller [0401]: Intel Corporation Comet Lake PCH cAVS [8086:06c8]
	Subsystem: Dell Comet Lake PCH cAVS [1028:098f]
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 64
	Interrupt: pin A routed to IRQ 227
	IOMMU group: 16
	Region 0: Memory at 609b218000 (64-bit, non-prefetchable) [size=16K]
	Region 4: Memory at 609b100000 (64-bit, non-prefetchable) [size=1M]
	Capabilities: [50] Power Management version 3
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0-,D1-,D2-,D3hot+,D3cold+)
		Status: D3 NoSoftRst+ PME-Enable+ DSel=0 DScale=0 PME-
	Capabilities: [80] Vendor Specific Information: Len=14 <?>
	Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
		Address: 00000000fee00f78  Data: 0000
	Kernel driver in use: sof-audio-pci
	Kernel modules: snd_hda_intel, snd_sof_pci

# lspci -nn -vvv -s 01:00.1
01:00.1 Audio device [0403]: NVIDIA Corporation TU106 High Definition Audio Controller [10de:10f9] (rev ff) (prog-if ff)
	!!! Unknown header type 7f
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel

@villuv
Copy link
Author

villuv commented Aug 28, 2020

Thanks, looks to be the same hardware.
Anyway, I found this bug report https://bugs.launchpad.net/ubuntu/+source/linux-oem-osp1/+bug/1864061 that basically tells
that snd_soc_skl is an old driver and sof_pci_dev is new one and if the former gets loaded first it is screwed. It seems that arch kernel still has this old module built in.

Based on this, I put following to /etc/modprobe.d

blacklist snd_soc_skl
blacklist snd_soc_skl_ipc
blacklist snd_soc_ssp_clk

And removed the soundwire module as it seemed to be prevening sof modules to load properly:

sudo dkms remove soundwire/1.3.0

After that dmesg looks like this:

villuv@xps$ dmesg | grep sof
[    0.555986] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[    0.555988] software IO TLB: mapped [mem 0x4755c000-0x4b55c000] (64MB)
[    2.412227] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[    2.412238] sof-audio-pci 0000:00:1f.3: enabling device (0000 -> 0002)
[    2.412411] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[    2.536537] sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    2.552590] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
[    2.594942] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 4
[    2.594943] sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[    2.594947] sof-audio-pci 0000:00:1f.3: DMICs detected in NHLT tables: 0
[    2.714799] sof-audio-pci 0000:00:1f.3: Firmware info: version 1:5:1-88707
[    2.714801] sof-audio-pci 0000:00:1f.3: Firmware: ABI 3:16:0 Kernel ABI 3:16:0
[    2.715180] sof-audio-pci 0000:00:1f.3: warning: unknown ext header type 3 size 0x1c
[    2.715199] sof-audio-pci 0000:00:1f.3: warning: unknown ext header type 4 size 0x10
[    2.718689] sof-audio-pci 0000:00:1f.3: Topology: ABI 3:16:0 Kernel ABI 3:16:0
[    2.718692] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp3 Tx not handled
[    2.718693] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp2 Tx not handled
[    2.719768] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp1_out not handled
[    2.719770] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp1 Tx not handled
[    2.720764] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp2_out not handled
[    2.721805] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp3_out not handled
[    2.723479] sof-audio-pci 0000:00:1f.3: ASoC: Parent card not yet available, widget card binding deferred
[    2.741815] input: sof-hda-dsp HDMI/DP,pcm=1 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input28
[    2.741867] input: sof-hda-dsp HDMI/DP,pcm=2 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input29
[    2.741893] input: sof-hda-dsp HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input30

And I don't get any complaints about missing firmware and lsmod output looks similar to yours.

Also I now see three HDMI outputs, but still no onboard sound. Next I try figuring out what this "Parent card not available" thing is about.

@mark-hayward
Copy link

I recently upgraded arch and it gave me a 5.8 kernel. Did you ever manage to resolve this?

@villuv
Copy link
Author

villuv commented Sep 18, 2020

I recently upgraded arch and it gave me a 5.8 kernel. Did you ever manage to resolve this?

Hi, I'm running also latest on arch (5.8.9-arch2-1), no luck...

What I've heard (unfortunately I've lost the source, it might have been Debian bug list) is that there's a possibility this gets fixed in 5.9 kernel with latest ALSA & Pulseaudio. So around mid October I guess.

@szbergeron
Copy link

Maybe I'm wrong but I thought 5.9 merge window was already closed and they were sending out RCs?

@villuv
Copy link
Author

villuv commented Sep 18, 2020

Maybe I'm wrong but I thought 5.9 merge window was already closed and they were sending out RCs?

Yes, they are at RC5 currently, so likely they will release around mid Octoboer or so. I don't have resources to experiment with RC kernels at the moment, but I can see that there are bunch of changes to sound drivers coming in.

@maaarghk
Copy link
Owner

I saw someone on I think opensuse ticket system say it was likely to be 5.10. the Dev in the thesofproject repo seems totally dysfunctional so I'd be surprised with that even. The code in this repo doesn't remotely resemble what's going on in there so I dunno if there's been a big refactor but I couldn't get it to work.

@szbergeron
Copy link

szbergeron commented Sep 18, 2020

I am currently running an rc3 build of mainline 5.9 but there does not seem to be any improvement in detection of the card.

@maaarghk do you have a link to any mailing list thread tracking attempts to merge sofproject code? I haven't been able to find anything from a cursory look so it's hard to track progress on it.

Edit to add: running 5.9 built from the sof project repo doesn't seem to pick up the card either, not sure if that's supposed to work

@maaarghk
Copy link
Owner

i was referring to this -> https://bugzilla.opensuse.org/show_bug.cgi?id=1176200 but it obv just refers to that specific distro.

Does anyone know if it's plausible to use #ifdefs to make this repo work automatically on 5.7, 5.8 and 5.9? would prefer not to be telling people "checkout a branch based on your kernel version".

@villuv
Copy link
Author

villuv commented Sep 21, 2020

I'm far from being kernel dev, but this might do the trick

#if LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0)
        dmab->area = __vmalloc(size, gfp, PAGE_KERNEL);
#else
        dmab->area = __vmalloc(size, gfp);
#endif

I can try it out a bit later

@szbergeron
Copy link

@maaarghk I tried building from the repo they mentioned there (https://github.com/thesofproject/linux) but didn't end up having it appear correctly in alsamixer, I might have to try again though. Am not sure if suse is using different library versions than arch and if that could be affecting things in userland or if something funky is going on with the kernel driver still for me.

@maaarghk
Copy link
Owner

indeed I tried that too and also didn't get it working, but I'm not sure if the hardware IDs were present. the code in this repo is based off a much older driver than that repo, which i got from canonical (https://launchpad.net/~canonical-hwe-team soundwire-dkms)

@maaarghk
Copy link
Owner

luckily for everyone, i accidentally upgraded my kernel to 5.8, and then got sound working. superseded by #3

@maaarghk maaarghk closed this Sep 27, 2020
@villuv
Copy link
Author

villuv commented Sep 28, 2020

luckily for everyone, i accidentally upgraded my kernel to 5.8, and then got sound working. superseded by #3

Just to clarify, did you get your sound working with "clean" 5.8 or using this soundwire dkms module?
Could you please post relevant parts of dmesg and lsmod of your working configuration?
Is built-in microphone array also working?

Thanks!

Edit: typos

@maaarghk
Copy link
Owner

Hey, using the dkms module. 5.8 still had the old driver that you mentioned above, I had to blacklist that and build this. But checkout branch latest-sofproject first.

@brandon-braner
Copy link

Hey just curious if this had been resolved. Moving to linux from mac and running Pop OS on my 9700 and am running into the sound issue. Any help would be appreciated.

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

Successfully merging this pull request may close these issues.

Linux 5.8.1 compilation error: too many arguments to function ‘__vmalloc’
6 participants