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

[BUG] Cannot load firmware on Lenovo Yoga C940 with cpu IceLake i7-1065G7 #2134

Closed
perexg opened this issue Nov 24, 2019 · 42 comments
Closed
Labels
Boot Firmware boot or code signing related. bug Something isn't working as expected ICL Applies to IceLake platform P1 Blocker bugs or important features status = 0x0000002c boot status

Comments

@perexg
Copy link

perexg commented Nov 24, 2019

The user cannot load signed firmware v1.3:

[    4.286091] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[    4.286213] sof-audio-pci 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[    4.286225] sof-audio-pci 0000:00:1f.3: enabling device (0000 -> 0002)
[    4.286412] sof-audio-pci 0000:00:1f.3: warning: No matching ASoC machine driver found
[    4.286418] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[    4.286546] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
[    4.286737] sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    4.290985] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 5
[    4.290986] sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[    5.328957] sof-audio-pci 0000:00:1f.3: error: codec #2 probe error, ret: -5
[    5.331010] sof-audio-pci 0000:00:1f.3: unexpected ipc interrupt raised!
[    5.331014] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
[    8.399958] sof-audio-pci 0000:00:1f.3: error: cl_copy_fw: timeout HDA_DSP_SRAM_REG_ROM_STATUS read
[    8.400470] sof-audio-pci 0000:00:1f.3: error: load fw failed ret: -110
[    8.400490] sof-audio-pci 0000:00:1f.3: error: status = 0x0000002c panic = 0x00000000
[    8.400496] sof-audio-pci 0000:00:1f.3: error: failed to reset DSP
[    8.400497] sof-audio-pci 0000:00:1f.3: error: failed to boot DSP firmware -110
[    8.400498] sof-audio-pci 0000:00:1f.3: error: sof_probe_work failed err: -110

00:1f.3 Multimedia audio controller: Intel Corporation Device 34c8 (rev 30)
	Subsystem: Lenovo Device 382e

https://bugzilla.redhat.com/show_bug.cgi?id=1772498

@perexg perexg added the bug Something isn't working as expected label Nov 24, 2019
@pfps
Copy link

pfps commented Nov 25, 2019

I'm the original user for this bug. What can be done to diagnose the problem?

@perexg
Copy link
Author

perexg commented Nov 25, 2019

@pfps: We have finally new firmware from Intel. Please, wait few hours (or to tomorrow). I'm updating Fedora packages right now.

@lgirdwood lgirdwood added Boot Firmware boot or code signing related. P1 Blocker bugs or important features labels Nov 26, 2019
@joshk0
Copy link

joshk0 commented Dec 10, 2019

I'm experiencing a similar issue. Please let me know if I should file a separate bug.

$ dmesg | grep sof-audio-pci
[   28.997977] sof-audio-pci 0000:00:1f.3: warning: No matching ASoC machine driver found
[   28.997980] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040380
[   28.998098] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
[   29.002307] sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[   29.006849] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 5
[   29.006850] sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[   29.034759] sof-audio-pci 0000:00:1f.3: unexpected ipc interrupt raised!
[   29.034761] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
[   32.101032] sof-audio-pci 0000:00:1f.3: error: load fw failed ret: -110
[   32.101047] sof-audio-pci 0000:00:1f.3: error: status = 0x0000002c panic = 0x00000000
[   32.101051] sof-audio-pci 0000:00:1f.3: error: failed to reset DSP
[   32.101052] sof-audio-pci 0000:00:1f.3: error: failed to boot DSP firmware -110
[   32.101053] sof-audio-pci 0000:00:1f.3: error: sof_probe_work failed err: -110

I am running Ubuntu 19.10 Eoan on 5.3.0-24-generic. Hardware is a Lenovo X1 Carbon 7th Gen. The sound card is as follows (It's different from that of the OP but the error seems very similar)

00:1f.3 Audio device: Intel Corporation Device 02c8 (prog-if 80)
	Subsystem: Lenovo Device 2292
	Flags: bus master, fast devsel, latency 64, IRQ 177
	Memory at ea23c000 (64-bit, non-prefetchable) [size=16K]
	Memory at ea000000 (64-bit, non-prefetchable) [size=1M]
	Capabilities: <access denied>
	Kernel driver in use: sof-audio-pci
	Kernel modules: snd_hda_intel, snd_soc_skl, sof_pci_dev

I can provide more hardware info on request. Thank you!

@pfps
Copy link

pfps commented Dec 10, 2019

The most recent versions load for me, but I haven't had a chance to put everything through its paces because of other issues. You need special kernels and not-yet-generally-released versions of firmware, alsa, and pulseaudio, though. Ubuntu tends to lag quite a bit behind the bleeding-edge versions of software so it may be a while until everything is picked up there.

The X1 V7 is different from the Yoga C940 and may be better supported.

@joshk0
Copy link

joshk0 commented Dec 10, 2019

Yeah, worse yet i seem to have a different build of the V7. Most people with V7s have this sound card (8086:9dc8 instead of 8086:02c8) and it seems like Ubuntu 19.10 does work with those, but 02c8 seems to be slightly different.

@plbossart
Copy link
Member

02c8 == CometLake LP
9dc8 == CannonLake

@joshk0 which firmware version were you trying to use?

@lbetlej FYI

@joshk0
Copy link

joshk0 commented Dec 13, 2019

Hi, thanks for your answer. I tried using the 1.3 signed one. I wasn't sure if i could go to the very latest one on the kernel version that I'm on (5.3.0-24-generic in Ubuntu); can i?

Also, can you confirm my mental model that I'm not even getting to the point where the topology files are a factor? As long as I'm overwriting /lib/firmware/intel/sof/sof-cnl.ri with whatever i'm trying to use, that should be getting picked up when the kernel module loads, right?

BTW -- if i try to rmmod and modprobe again, it causes a kernel BUG (i'm not on that computer now and can't paste it), not sure if that matters. LMK!

@kv2019i
Copy link
Collaborator

kv2019i commented Dec 13, 2019

@joshk0 @pfps There are multiple issues in the logs. First HDMI codec initializing fails
[ 5.328957] sof-audio-pci 0000:00:1f.3: error: codec #2 probe error, ret: -5
... and then FW load fails:
[ 32.101032] sof-audio-pci 0000:00:1f.3: error: load fw failed ret: -110

I may have idea how to solve #1. A fix in i915 driver is needed on some ICL platforms (0x34C8, sof-icl.ri). The patches were now included in v.5.5-rc1. The patches are these:
drm/i915: save AUD_FREQ_CNTRL state at audio domain suspend
drm/i915: Fix audio power up sequence for gen10+ display
drm/i915: extend audio CDCLK>=2*BCLK constraint to more platforms

In latest sound master, we've also added a feature to pass "codec_mask" parameter to snd_sof_intel_hda_common (e.g. with codec_mask=1 you can ignore the HDMI codec and probe should pass). Unfortunately this not in v5.5-rc1 and earlier and is only very recently merged to sound master.

For the other issue of FW loading, it seems that at least for some people the issue is solved. @perexg as the original submitted, is the issue on C940 now solved?

@kv2019i
Copy link
Collaborator

kv2019i commented Dec 13, 2019

@joshk0 wrote:

I'm experiencing a similar issue. Please let me know if I should file a separate bug.

I think so yes. Your device has a different generation audio-DSP (0x02c8 -> cAVS1.8 -> sof-cnl.ri, see:
https://thesofproject.github.io/latest/platforms/intel-cavs/index.html ), so the issue potentially different than what is seen on IceLake (0x34c8, sof-icl.ri).

Hi, thanks for your answer. I tried using the 1.3 signed one. I wasn't sure if i could go to the very latest one on the kernel version that I'm on (5.3.0-24-generic in Ubuntu); can i?

In general we have backwards compability for minor-version changes in ABI. The old-kernel new-fw combo is in practise less tested, so some issues may be seen. UPDATE: at least one known issue is this #2181 -> "sof-audio-pci 0000:00:1f.3: error: invalid kcontrol count 2 for volume").

Also, can you confirm my mental model that I'm not even getting to the point where the topology > files are a factor? As long as I'm overwriting /lib/firmware/intel/sof/sof-cnl.ri with whatever i'm trying

It is highly recommended to use topology files that match the FW release (both topology files and FW are versioned). So you if change sof-cnl.ri, you should take topology files from same release. There's ongoing work to improve how topology files are distributed, see e.g. #2200

BTW -- if i try to rmmod and modprobe again, it causes a kernel BUG (i'm not on that computer now and can't paste it), not sure if that matters. LMK!

That should work and the test is covered by SOF CI, so it if happens with latest upstream kernel, a separate bug should be filed for this as well.

@joshk0
Copy link

joshk0 commented Dec 15, 2019

Update: The latest sof-cnl.ri file works with the original 5.3.0-24-generic kernel so I won't file an issue. BTW, I also tried that on 5.5-rc1, which now wants sof-cml.ri. On that kernel version, I got it to work by symlinking sof-cnl.ri to sof-cml.ri. Could that be because of https://patchwork.kernel.org/patch/11262555/ ? I find it strange that this is the only place on the internet which mentions that filename.

@perexg
Copy link
Author

perexg commented Dec 15, 2019

I believe that Intel should release signed sof-cml.ri, too. The changes are probably queued to 5.6 kernel - https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/log/?h=for-5.6 .

@kv2019i
Copy link
Collaborator

kv2019i commented Dec 17, 2019

@joshk0 wrote:

Update: The latest sof-cnl.ri file works with the original 5.3.0-24-generic kernel so I won't file an issue.

Ok, good!

BTW, I also tried that on 5.5-rc1, which now wants sof-cml.ri. On that kernel version, I got it to work by symlinking sof-cnl.ri to sof-cml.ri. Could that be because of https://patchwork.kernel.org/patch/11262555/ ? I find it strange that this is the only place on the internet which mentions that filename.

Yes, this is very recent change (in upstream the main patch is "ASoC: Intel: acpi-match: split CNL tables in three", part of 5.5-rc1 already). Matching FW release has not been made, but it will be included (FYI @lgirdwood and @xiulipan )

@slawblauciak
Copy link
Collaborator

Any updates on this issue? Is it still relevant in the light of the aforementioned commit?

@lgirdwood
Copy link
Member

@slawblauciak I've tagged v1.4.2 now as it passes all validation on the development boards, I think we just need @lbetlej to arrange the signing now.

@pfps
Copy link

pfps commented Jan 21, 2020

I think that this can be closed. I have been able to load the software on my Yoga C940. (There are other issues with this laptop, but those are reported elsewhere.)

@paulmenzel
Copy link

@pfps, could you please paste the relevant log lines (including the Linux version, and firmware version) for the archive and reference?

@danielcherubini
Copy link

@pfps could you update this page https://wiki.archlinux.org/index.php/Lenovo_Yoga_c940 with the update to SOF, and it would be nice if you could add any other issues you have?

@pfps
Copy link

pfps commented Jan 21, 2020

@paulmenzel OK.
I've attached information from a successful load and semi-successful startup. Sometimes the load succeeds but the startup fails. I think that this has been addressed recently, but the current Fedora 31 kernel doesn't have SOF so I'm waiting for everything to be available in Fedora Rawhide.
@danielcherubini I did some minor changes to the Arch page.

Edit: Put more information in log extract.
Lenovo-C940-SOF.txt

@paulmenzel
Copy link

Thanks. The gist should be.

Jan 21 11:48:40 idefix kernel: sof-audio-pci 0000:00:1f.3: hda codecs found, mask 5
Jan 21 11:48:40 idefix kernel: sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
Jan 21 11:48:40 idefix kernel: sof-audio-pci 0000:00:1f.3: unexpected ipc interrupt raised!
Jan 21 11:48:40 idefix kernel: sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
Jan 21 11:48:40 idefix kernel: sof-audio-pci 0000:00:1f.3: Firmware info: version 1:1:0-fcf6c
Jan 21 11:48:40 idefix kernel: sof-audio-pci 0000:00:1f.3: Firmware: ABI 3:11:0 Kernel ABI 3:11:0
Jan 21 11:48:40 idefix kernel: sof-audio-pci 0000:00:1f.3: firmware boot complete

No idea what version 1:1:0-fcf6c is.

@perexg
Copy link
Author

perexg commented Jan 21, 2020

It's wrong tag interpretation in the released binary firmware from Intel. Use 'fcf6c' git hash prefix only. It should be fixed with the recent firmware files. It's 1.4.1 firmware. fcf6c8c

@pfps
Copy link

pfps commented Feb 2, 2020

I'm running with a version of Fedora that I think should have good SOF support - kernel 5.4.14-200.fc31.x86_64

Sometimes everything starts fine and the mic is fine and the speakers are OK. Sometimes the firmware loads but I see an immediate failure, as in
Feb 01 15:02:07 idefix kernel: sof-audio-pci 0000:00:1f.3: Firmware info: version 1:1:0-fcf6c
Feb 01 15:02:07 idefix kernel: sof-audio-pci 0000:00:1f.3: Firmware: ABI 3:11:0 Kernel ABI 3:11:0
Feb 01 15:02:07 idefix kernel: sof-audio-pci 0000:00:1f.3: firmware boot complete
Feb 01 15:02:07 idefix kernel: skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: failed to init link iDisp1: -517

Even when sound works initially I sometimes experience later failures. The worst one is thousands (maybe even hundreds of thousands) or message like
Feb 01 16:35:07 idefix kernel: sof-audio-pci 0000:00:1f.3: ASoC: can't set Analog CPU DAI hw params: -16
Feb 01 16:35:07 idefix kernel: Analog Playback and Capture: ASoC: hw_params BE failed -16
Feb 01 16:35:07 idefix kernel: HDA Analog: ASoC: hw_params BE failed -16
This may only be happening after suspending and resuming.

@danielcherubini
Copy link

It’s working fantastic on Arch 5.5 on the C940

@kv2019i
Copy link
Collaborator

kv2019i commented Feb 3, 2020

@pfps wrote:

Sometimes everything starts fine and the mic is fine and the speakers are OK. Sometimes the firmware loads but I see an immediate failure, as in
Feb 01 15:02:07 idefix kernel: sof-audio-pci 0000:00:1f.3: Firmware info: version 1:1:0-fcf6c
Feb 01 15:02:07 idefix kernel: sof-audio-pci 0000:00:1f.3: Firmware: ABI 3:11:0 Kernel ABI 3:11:0
Feb 01 15:02:07 idefix kernel: sof-audio-pci 0000:00:1f.3: firmware boot complete
Feb 01 15:02:07 idefix kernel: skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: failed to init link iDisp1: -517

If you can reproduce this, can you file a new bug on this and provide full kernel logs? Firmware is loading here, so we can close this bug. This could be a case where communication with i915 is failing and that is blocking audio driver load.

Even when sound works initially I sometimes experience later failures. The worst one is thousands (maybe even hundreds of thousands) or message like
Feb 01 16:35:07 idefix kernel: sof-audio-pci 0000:00:1f.3: ASoC: can't set Analog CPU DAI hw params: -16
Feb 01 16:35:07 idefix kernel: Analog Playback and Capture: ASoC: hw_params BE failed -16
Feb 01 16:35:07 idefix kernel: HDA Analog: ASoC: hw_params BE failed -16
This may only be happening after suspending and resuming.

And ditto here.

@jlaham
Copy link

jlaham commented Feb 8, 2020

@danielcherubini is it working for you with PulseAudio on your C940?

I'm running GNOME on Arch (package versions below) with no custom patching. On a normal boot all sound devices (connected at 0000:00:1f.3) are detected, however I'd get no sound. Digging in a little further, aplay and arecord will list devices detected and alsamixer will run, but they will all hang before completing. Further digging led me to find that PulseAudio remains in a state of "Starting" and never actually starts.

If I mask pulseaudio.service, then aplay, arecord, and alsamixer will operate normally without hanging detecting all devices, and I can get sound since ALSA loads the drivers normally. At that point, if I run pulseaudio &, manually after booting into GNOME, most of the time it will run fine and I'll get (stereo) speakers and the mic working. I've also tried blacklisting snd_hda_intel and snd_soc_skl but that hasn't led to any noticeable changes since SOF drivers are being picked up correctly on boot.

At first this sounds like it may be an issue with PulseAudio, but examining dmesg I see this notice showing up on boot, which makes me wonder if there is some sort of race condition happening somewhere:

[    4.018569] sof-audio-pci 0000:00:1f.3: ASoC: Parent card not yet available, widget card binding deferred

and after some time after boot:

[  **396.402424**] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
[  **396.492809**] sof-audio-pci 0000:00:1f.3: firmware boot complete

Boot Logs: https://pastebin.com/UwSGJAkm

Package versions:

  • linux 5.5.2.arch1-1
  • linux-firmware 20200122.1eb2408-1
  • pulseaudio 13.0-3
  • pulseaudio-alsa 2-5
  • alsa-firmware 1.2.1-2
  • alsa-lib 1.2.1.2-3
  • alsa-plugins 1.2.1-1
  • alsa-topology-conf 1.2.1-1
  • alsa-ucm-conf 1.2.1.2-1
  • alsa-utils 1.2.1-2
  • sof-firmware 1.4.2-1

@poscat0x04
Copy link

Can confirm it's working on Arch with kernel 5.5+

@lgirdwood
Copy link
Member

@jlaham Thanks, I've pasted here below too. We have seen some issues with Linux, Pulseaudio and UCM integration that have caused similar issues, I think now that @kv2019i and @juimonen have recently upstreamed all remaining UCM/Pulseaudio fixes. Any out standing guys ?
I also see you have FW version v1.4.1 (based on the incorrect version string, version v1.4.2 has been released recently so I'd recommend this too). I think it's likely that some of your ingredients (either kernel, FW, UCM, Pulseaudio) are missing some recent updates.

[    2.614893] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[    2.615075] snd_hda_intel 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[    3.030904] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[    3.031083] sof-audio-pci 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[    3.031096] sof-audio-pci 0000:00:1f.3: enabling device (0000 -> 0002)
[    3.031323] sof-audio-pci 0000:00:1f.3: warning: No matching ASoC machine driver found
[    3.031328] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[    3.031484] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
[    3.903102] sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    3.907578] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 5
[    3.907582] sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[    3.934726] sof-audio-pci 0000:00:1f.3: unexpected ipc interrupt raised!
[    3.934728] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
[    4.020258] sof-audio-pci 0000:00:1f.3: Firmware info: version 1:1:0-fcf6c
[    4.020259] sof-audio-pci 0000:00:1f.3: Firmware: ABI 3:11:0 Kernel ABI 3:11:0
[    4.020483] sof-audio-pci 0000:00:1f.3: firmware boot complete
[    4.022898] skl_hda_dsp_generic skl_hda_dsp_generic: info: override BE DAI link iDisp1
[    4.022900] skl_hda_dsp_generic skl_hda_dsp_generic: info: override BE DAI link iDisp2
[    4.022900] skl_hda_dsp_generic skl_hda_dsp_generic: info: override BE DAI link iDisp3
[    4.022901] skl_hda_dsp_generic skl_hda_dsp_generic: info: override BE DAI link Analog Playback and Capture
[    4.022901] skl_hda_dsp_generic skl_hda_dsp_generic: info: override BE DAI link Digital Playback and Capture
[    4.022902] skl_hda_dsp_generic skl_hda_dsp_generic: info: override BE DAI link dmic01
[    4.022902] skl_hda_dsp_generic skl_hda_dsp_generic: info: override BE DAI link dmic16k
[    4.023506] sof-audio-pci 0000:00:1f.3: Topology: ABI 3:11:0 Kernel ABI 3:11:0
[    4.023509] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp3 Tx not handled
[    4.024416] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name codec0_in not handled
[    4.024417] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp2 Tx not handled
[    4.025218] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name codec1_in not handled
[    4.025219] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp1 Tx not handled
[    4.026037] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name codec0_out not handled
[    4.026039] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name Analog CPU Playback not handled
[    4.026852] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name codec1_out not handled
[    4.026854] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name Digital CPU Playback not handled
[    4.026855] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name codec2_in not handled
[    4.026856] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name Alt Analog CPU Playback not handled
[    4.026856] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name codec2_out not handled
[    4.026857] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name Analog CPU Capture not handled
[    4.027775] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp1_out not handled
[    4.027779] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name Digital CPU Capture not handled
[    4.028650] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp2_out not handled
[    4.028652] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name Alt Analog CPU Capture not handled
[    4.029506] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp3_out not handled
[    4.037538] sof-audio-pci 0000:00:1f.3: ASoC: Parent card not yet available, widget card binding deferred
[    4.054691] snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC298: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
[    4.054693] snd_hda_codec_realtek ehdaudio0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    4.054694] snd_hda_codec_realtek ehdaudio0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[    4.054694] snd_hda_codec_realtek ehdaudio0D0:    mono: mono_out=0x0
[    4.054695] snd_hda_codec_realtek ehdaudio0D0:    inputs:
[    4.054696] snd_hda_codec_realtek ehdaudio0D0:      Mic=0x18
[    4.096124] snd_hda_codec_realtek ehdaudio0D0: ASoC: sink widget AIF1TX overwritten
[    4.096128] snd_hda_codec_realtek ehdaudio0D0: ASoC: source widget AIF1RX overwritten
[    4.096159] skl_hda_dsp_generic skl_hda_dsp_generic: intel-hdmi-hifi1 <-> iDisp1 Pin mapping ok
[    4.096161] skl_hda_dsp_generic skl_hda_dsp_generic: intel-hdmi-hifi2 <-> iDisp2 Pin mapping ok
[    4.096163] skl_hda_dsp_generic skl_hda_dsp_generic: intel-hdmi-hifi3 <-> iDisp3 Pin mapping ok
[    4.096165] skl_hda_dsp_generic skl_hda_dsp_generic: Analog Codec DAI <-> Analog CPU DAI mapping ok
[    4.096167] skl_hda_dsp_generic skl_hda_dsp_generic: Digital Codec DAI <-> Digital CPU DAI mapping ok
[    4.096170] skl_hda_dsp_generic skl_hda_dsp_generic: dmic-hifi <-> DMIC01 Pin mapping ok
[    4.096172] skl_hda_dsp_generic skl_hda_dsp_generic: dmic-hifi <-> DMIC16k Pin mapping ok
[    4.096187] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> DMIC48kHz 6 mapping ok
[    4.096201] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> DMIC16kHz 7 mapping ok
[    4.096220] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDA Analog 0 mapping ok
[    4.096241] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDA Digital 1 mapping ok
[    4.096252] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDMI1 3 mapping ok
[    4.096261] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDMI2 4 mapping ok
[    4.096276] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDMI3 5 mapping ok
[    4.096327] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget hifi3 overwritten
[    4.096330] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget hifi2 overwritten
[    4.096333] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget hifi1 overwritten
[    4.096336] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: source widget Codec Output Pin1 overwritten
[    4.096338] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget Codec Input Pin1 overwritten
[    4.096343] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget Analog Codec Playback overwritten
[    4.096346] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget Digital Codec Playback overwritten
[    4.096350] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: sink widget Alt Analog Codec Playback overwritten
[    4.096354] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: source widget Analog Codec Capture overwritten
[    4.096357] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: source widget Digital Codec Capture overwritten
[    4.096361] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: source widget Alt Analog Codec Capture overwritten
[    4.096368] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 3
[    4.096369] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 4
[    4.101276] input: sof-hda-dsp Mic as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input22
[    4.101307] input: sof-hda-dsp Headphone as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input23
[    4.101330] input: sof-hda-dsp HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input24
[    4.101356] input: sof-hda-dsp HDMI/DP,pcm=4 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input25
[    4.101379] input: sof-hda-dsp HDMI/DP,pcm=5 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input26
[  181.602985] snd_hda_codec_hdmi ehdaudio0D2: Unable to sync register 0x2f8100. -5
[  396.402424] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
[  396.492809] sof-audio-pci 0000:00:1f.3: firmware boot complete

@kv2019i
Copy link
Collaborator

kv2019i commented Feb 10, 2020

@jlaham Based on this trace:
[ 181.602985] snd_hda_codec_hdmi ehdaudio0D2: Unable to sync register 0x2f8100. -5

I think you are hitting same bug as:
thesofproject/linux#1764
Fixed with following patch series sent upstream:
https://mailman.alsa-project.org/pipermail/alsa-devel/2020-February/162509.html

Did you have HDMI/DP monitor connected during boot?

PS As stated earlier in the bug, these errors are no longer related to firmware load, but are rather Linux driver issues.

@jlaham
Copy link

jlaham commented Feb 11, 2020

Thanks both for your feedback.

@kv2019i I did not have anything plugged in; trying to keep my machine as "vanilla" as can be when debugging these sorts of issues.

I was to make some significant progress on this from my end, and now have a functioning system; following are my findings:

  1. I can confirm that firmware is loading fine now
  2. Only caveat is that every few reboots there will be one where no devices are detected, but another reboot solves the issue; not the end of the world, plus I rarely reboot unless debugging startup issues
  3. This is possible now a driver issue or a udevd issue, as I was able to narrow it down to some funky interaction between PulseAudio and its reliance on udevd; commenting out use of load-module module-udev-detect and using static hardware detection load-module module-detect fixed all the weird hanging issues I was experiencing previously.

@lgirdwood
Copy link
Member

@jlaham can you attach the dmesg for 2 next time it happens.

@kv2019i
Copy link
Collaborator

kv2019i commented Feb 11, 2020

@jlaham wrote.

  1. Only caveat is that every few reboots there will be one where no devices are detected, but another reboot solves the issue; not the end of the world, plus I rarely reboot unless debugging startup issues

Ack, and based on your previous logs, I believe this is fixed with in upstream kernel (see link to patches above). If rootcause is the same, reloading the SOF kernels driver can also help to detect the devices. Thank you for the report!

@kv2019i
Copy link
Collaborator

kv2019i commented Feb 11, 2020

@lgirdwood @perexg Can we close this now?

@lgirdwood
Copy link
Member

@kv2019i I think so. It can be re-opened if needed.

@ghost
Copy link

ghost commented Feb 19, 2020

Hello, I am commenting here as I have some issues with the sof driver with my C940 under manjaro gnome with kernel 5.5.4-1 or 5.6-rc2. I have never been able to make the speakers working (showing fake output in gnome sound manager) or the mic except partially with kernel 5.4. I moved to the unstable branch to test with latest packages.

The main error in dmesg is the following:

[ 0.688205] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[ 0.688206] software IO TLB: mapped [mem 0x1ea78000-0x22a78000] (64MB)
[ 2.476564] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[ 2.483455] sof-audio-pci 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[ 2.483469] sof-audio-pci 0000:00:1f.3: enabling device (0000 -> 0002)
[ 2.483688] sof-audio-pci 0000:00:1f.3: warning: No matching ASoC machine driver found
[ 2.483695] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[ 2.483886] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
[ 3.290712] sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 3.295722] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 5
[ 3.295725] sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[ 3.386039] sof-audio-pci 0000:00:1f.3: Direct firmware load for intel/sof/sof-icl.ri failed with error -2
[ 3.386043] sof-audio-pci 0000:00:1f.3: error: request firmware intel/sof/sof-icl.ri failed err: -2
[ 3.386044] sof-audio-pci 0000:00:1f.3: error: failed to load DSP firmware -2
[ 3.386477] sof-audio-pci 0000:00:1f.3: error: sof_probe_work failed err: -2

I joined the full dmesg logs for kernel 5.5 and 5.6 together with the packages version installed on my machine. Hope in can help you.

Thanks for your efforts !
dmesg-5.5.4-1.log
dmesg-5.6.0-1-rc2.log
pacman.txt

@plbossart
Copy link
Member

[ 3.295725] sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[ 3.386039] sof-audio-pci 0000:00:1f.3: Direct firmware load for intel/sof/sof-icl.ri failed with error -2
[ 3.386043] sof-audio-pci 0000:00:1f.3: error: request firmware intel/sof/sof-icl.ri failed err: -2
[ 3.386044] sof-audio-pci 0000:00:1f.3: error: failed to load DSP firmware -2
[ 3.386477] sof-audio-pci 0000:00:1f.3: error: sof_probe_work failed err: -2

This looks like you don't have any firmware installed on your device?

can you do a

ls -l /lib/firmware/intel/sof*

and paste the results?

@ghost
Copy link

ghost commented Feb 19, 2020

Thanks for your very quick answer ! Indeed, no sof installed, I thought it was by default... No now it seems ok from dmesg but still no speakers/mic detected by gnome with fake speakers in sound menu.

ls -l /lib/firmware/intel/sof*
/lib/firmware/intel/sof:
total 1992
drwxr-xr-x 2 root root 4096 20 fév 00:20 debug
-rw-r--r-- 1 root root 282624 23 jan 00:40 sof-apl.ri
-rw-r--r-- 1 root root 109616 23 jan 00:40 sof-bdw.ri
-rw-r--r-- 1 root root 88164 23 jan 00:40 sof-byt.ri
lrwxrwxrwx 1 root root 10 23 jan 00:40 sof-cfl.ri -> sof-cnl.ri
-rw-r--r-- 1 root root 88972 23 jan 00:40 sof-cht.ri
lrwxrwxrwx 1 root root 10 23 jan 00:40 sof-cml.ri -> sof-cnl.ri
-rw-r--r-- 1 root root 286720 23 jan 00:40 sof-cnl.ri
-rw-r--r-- 1 root root 109616 23 jan 00:40 sof-hsw.ri
-rw-r--r-- 1 root root 286720 23 jan 00:40 sof-icl.ri
-rw-r--r-- 1 root root 115472 23 jan 00:40 sof-imx8.ri
-rw-r--r-- 1 root root 176128 23 jan 00:40 sof-jsl.ri
-rw-r--r-- 1 root root 151552 23 jan 00:40 sof-kbl.ri
-rw-r--r-- 1 root root 151552 23 jan 00:40 sof-skl.ri
-rw-r--r-- 1 root root 180224 23 jan 00:40 sof-sue.ri

/lib/firmware/intel/sof-tplg:
total 1668
-rw-r--r-- 1 root root 33227 23 jan 00:40 sof-apl-da7219.tplg
-rw-r--r-- 1 root root 23311 23 jan 00:40 sof-apl-demux-pcm512x.tplg
-rw-r--r-- 1 root root 10295 23 jan 00:40 sof-apl-dmic-2ch.tplg
-rw-r--r-- 1 root root 10431 23 jan 00:40 sof-apl-dmic-4ch.tplg
-rw-r--r-- 1 root root 10295 23 jan 00:40 sof-apl-dmic-a2ch-b2ch.tplg
-rw-r--r-- 1 root root 10363 23 jan 00:40 sof-apl-dmic-a2ch-b4ch.tplg
-rw-r--r-- 1 root root 5223 23 jan 00:40 sof-apl-dmic-a2ch.tplg
-rw-r--r-- 1 root root 10363 23 jan 00:40 sof-apl-dmic-a4ch-b2ch.tplg
-rw-r--r-- 1 root root 5223 23 jan 00:40 sof-apl-dmic-b2ch.tplg
-rw-r--r-- 1 root root 6743 23 jan 00:40 sof-apl-eq-dmic.tplg
-rw-r--r-- 1 root root 7223 23 jan 00:40 sof-apl-eq-pcm512x.tplg
-rw-r--r-- 1 root root 9019 23 jan 00:40 sof-apl-keyword-detect.tplg
-rw-r--r-- 1 root root 38003 23 jan 00:40 sof-apl-nocodec.tplg
-rw-r--r-- 1 root root 5127 23 jan 00:40 sof-apl-pcm512x-nohdmi.tplg
-rw-r--r-- 1 root root 25031 23 jan 00:40 sof-apl-pcm512x.tplg
-rw-r--r-- 1 root root 19815 23 jan 00:40 sof-apl-rt298.tplg
-rw-r--r-- 1 root root 5791 23 jan 00:40 sof-apl-src-50khz-pcm512x.tplg
-rw-r--r-- 1 root root 11623 23 jan 00:40 sof-apl-src-dmic.tplg
-rw-r--r-- 1 root root 5791 23 jan 00:40 sof-apl-src-pcm512x.tplg
-rw-r--r-- 1 root root 43619 23 jan 00:40 sof-apl-tdf8532.tplg
-rw-r--r-- 1 root root 5127 23 jan 00:40 sof-apl-wm8804.tplg
-rw-r--r-- 1 root root 12579 23 jan 00:40 sof-bdw-rt286.tplg
-rw-r--r-- 1 root root 12579 23 jan 00:40 sof-bdw-rt5640.tplg
-rw-r--r-- 1 root root 13371 23 jan 00:40 sof-byt-da7213.tplg
-rw-r--r-- 1 root root 13107 23 jan 00:40 sof-byt-nocodec.tplg
-rw-r--r-- 1 root root 13371 23 jan 00:40 sof-byt-rt5640.tplg
-rw-r--r-- 1 root root 13371 23 jan 00:40 sof-byt-rt5645.tplg
-rw-r--r-- 1 root root 13371 23 jan 00:40 sof-byt-rt5651.tplg
-rw-r--r-- 1 root root 13371 23 jan 00:40 sof-byt-rt5682.tplg
-rw-r--r-- 1 root root 13371 23 jan 00:40 sof-cht-max98090.tplg
-rw-r--r-- 1 root root 13107 23 jan 00:40 sof-cht-nocodec.tplg
-rw-r--r-- 1 root root 7927 23 jan 00:40 sof-cht-rt5682.tplg
-rw-r--r-- 1 root root 5555 23 jan 00:40 sof-cht-src-50khz-pcm512x.tplg
-rw-r--r-- 1 root root 34187 23 jan 00:40 sof-cml-demux-rt5682-max98357a.tplg
-rw-r--r-- 1 root root 29283 23 jan 00:40 sof-cml-demux-rt5682.tplg
-rw-r--r-- 1 root root 39787 23 jan 00:40 sof-cml-rt1011-rt5682.tplg
-rw-r--r-- 1 root root 34883 23 jan 00:40 sof-cml-rt5682-kwd.tplg
-rw-r--r-- 1 root root 39787 23 jan 00:40 sof-cml-rt5682-max98357a.tplg
-rw-r--r-- 1 root root 31123 23 jan 00:40 sof-cml-rt5682.tplg
-rw-r--r-- 1 root root 32719 23 jan 00:40 sof-cml-rt700.tplg
-rw-r--r-- 1 root root 34411 23 jan 00:40 sof-cml-rt711-rt1308-mono-rt715.tplg
-rw-r--r-- 1 root root 39295 23 jan 00:40 sof-cml-rt711-rt1308-rt715.tplg
-rw-r--r-- 1 root root 26751 23 jan 00:40 sof-cml-src-rt5682.tplg
-rw-r--r-- 1 root root 25715 23 jan 00:40 sof-cnl-nocodec.tplg
-rw-r--r-- 1 root root 11335 23 jan 00:40 sof-cnl-rt274.tplg
-rw-r--r-- 1 root root 43555 23 jan 00:40 sof-glk-da7219-kwd.tplg
-rw-r--r-- 1 root root 34831 23 jan 00:40 sof-glk-da7219.tplg
-rw-r--r-- 1 root root 33967 23 jan 00:40 sof-glk-rt5682.tplg
-rw-r--r-- 1 root root 45375 23 jan 00:40 sof-hda-generic-2ch.tplg
-rw-r--r-- 1 root root 45511 23 jan 00:40 sof-hda-generic-4ch.tplg
-rw-r--r-- 1 root root 28723 23 jan 00:40 sof-hda-generic-idisp-2ch.tplg
-rw-r--r-- 1 root root 28859 23 jan 00:40 sof-hda-generic-idisp-4ch.tplg
-rw-r--r-- 1 root root 16135 23 jan 00:40 sof-hda-generic-idisp.tplg
-rw-r--r-- 1 root root 32787 23 jan 00:40 sof-hda-generic.tplg
-rw-r--r-- 1 root root 12579 23 jan 00:40 sof-hsw-rt5640.tplg
-rw-r--r-- 1 root root 4259 23 jan 00:40 sof-icl-dmic-4ch.tplg
-rw-r--r-- 1 root root 7327 23 jan 00:40 sof-icl-nocodec.tplg
-rw-r--r-- 1 root root 34883 23 jan 00:40 sof-icl-rt5682-kwd.tplg
-rw-r--r-- 1 root root 31123 23 jan 00:40 sof-icl-rt5682.tplg
-rw-r--r-- 1 root root 32719 23 jan 00:40 sof-icl-rt700.tplg
-rw-r--r-- 1 root root 39295 23 jan 00:40 sof-icl-rt711-rt1308-rt715-hdmi.tplg
-rw-r--r-- 1 root root 24643 23 jan 00:40 sof-icl-rt711-rt1308-rt715.tplg
-rw-r--r-- 1 root root 7291 23 jan 00:40 sof-imx8qxp-cs42888.tplg
-rw-r--r-- 1 root root 5091 23 jan 00:40 sof-imx8qxp-nocodec-sai.tplg
-rw-r--r-- 1 root root 5091 23 jan 00:40 sof-imx8qxp-nocodec.tplg
-rw-r--r-- 1 root root 7291 23 jan 00:40 sof-imx8qxp-wm8960.tplg
-rw-r--r-- 1 root root 25647 23 jan 00:40 sof-tgl-nocodec.tplg
-rw-r--r-- 1 root root 25071 23 jan 00:40 sof-tgl-rt711-rt1308-nohdmi.tplg
-rw-r--r-- 1 root root 44607 23 jan 00:40 sof-tgl-rt711-rt1308.tplg
-rw-r--r-- 1 root root 29283 23 jan 00:40 sof-whl-demux-rt5682.tplg
-rw-r--r-- 1 root root 34883 23 jan 00:40 sof-whl-rt5682-kwd.tplg
-rw-r--r-- 1 root root 31123 23 jan 00:40 sof-whl-rt5682.tplg

[ 0.687162] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[ 0.687163] software IO TLB: mapped [mem 0x1ea78000-0x22a78000] (64MB)
[ 2.807355] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[ 2.807732] sof-audio-pci 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[ 2.807745] sof-audio-pci 0000:00:1f.3: enabling device (0000 -> 0002)
[ 2.808024] sof-audio-pci 0000:00:1f.3: warning: No matching ASoC machine driver found
[ 2.808032] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[ 2.808214] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
[ 3.575842] sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 3.580196] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 5
[ 3.580200] sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[ 4.617112] sof-audio-pci 0000:00:1f.3: error: codec #2 probe error, ret: -5
[ 4.618286] sof-audio-pci 0000:00:1f.3: unexpected ipc interrupt raised!
[ 4.618288] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
[ 4.717911] sof-audio-pci 0000:00:1f.3: Firmware info: version 1:1:0-fcf6c
[ 4.717912] sof-audio-pci 0000:00:1f.3: Firmware: ABI 3:11:0 Kernel ABI 3:11:0
[ 4.718129] sof-audio-pci 0000:00:1f.3: firmware boot complete
dmesg-5.5.4-1-sof.log

@ghost
Copy link

ghost commented Feb 19, 2020

Ok I had to reboot a second time as hinted in a previous comment and it is now working ! Sorry for having polluted the issue... Thanks for the help !

@mengdonglin mengdonglin added the ICL Applies to IceLake platform label Mar 12, 2020
@mengdonglin mengdonglin added the status = 0x0000002c boot status label Apr 28, 2020
@buzuddha
Copy link

buzuddha commented Jun 4, 2020

I'm having issues here too. I'm new to arch. As of now I have the left speaker (weak at max volume) and the mic appears to work. See attached for how far I've gotten.

I'd be very grateful for any guidance. Thanks for your time and consideration!

Yoga C940 CannonLake i7-9750H
sof-troubleshoot.txt

@danielcherubini
Copy link

danielcherubini commented Jun 4, 2020

@buzuddha
Copy link

buzuddha commented Jun 4, 2020

So as far as I can tell I've done what is described in the wiki.

  1. installed sof-firmware using pacman
  2. blacklisted snd_hda_intel and snd_soc_skl
  3. added the lines to load alsa modules

@paulmenzel
Copy link

@buzuddha, this issue is closed, and your issues is probably something else. Please create a new issue.

@aleksfadini
Copy link

So as far as I can tell I've done what is described in the wiki.

  1. installed sof-firmware using pacman
  2. blacklisted snd_hda_intel and snd_soc_skl
  3. added the lines to load alsa modules

I'm having the same issues, with the Cannonlake C940. Could it have to do with our version of the C940 that is different?

@aleksfadini
Copy link

@buzuddha, this issue is closed, and your issues is probably something else. Please create a new issue.

I am another user having the same issue, I think our Lenovo Yoga c940 being the CannonLake version might have different hardware.
I opened this issue
thesofproject/linux#2020 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Boot Firmware boot or code signing related. bug Something isn't working as expected ICL Applies to IceLake platform P1 Blocker bugs or important features status = 0x0000002c boot status
Projects
None yet
Development

No branches or pull requests