Repository navigation
Closed
Description
Sound is not restored on suspend/resume with the recent 5.16-rc7 kernel.
This is the kernel log on wake:
[54581.864703] Restarting tasks ...
[54581.865400] sof-audio-pci-intel-cnl 0000:00:1f.3: ipc tx error for 0x80010000 (msg/reply size: 216/12): -19
[54581.865416] sof-audio-pci-intel-cnl 0000:00:1f.3: error: failed resetting DAI config for HDA0.OUT
[54581.867204] done.
[54581.871672] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops 0xffffffff822ad480)
[54581.872203] sof-audio-pci-intel-cnl 0000:00:1f.3: ipc tx error for 0x30010000 (msg/reply size: 96/20): -22
[54581.872213] sof-audio-pci-intel-cnl 0000:00:1f.3: error: failed to load widget HDA0.OUT
[54581.873490] sof-audio-pci-intel-cnl 0000:00:1f.3: error: failed widget list set up for pcm 0 dir 0
[54581.873499] sof-audio-pci-intel-cnl 0000:00:1f.3: ASoC: error at snd_soc_pcm_component_hw_params on 0000:00:1f.3: -22
[54581.873505] HDA Analog: ASoC: soc_pcm_hw_params() failed (-22)
[54581.873537] HDA Analog: ASoC: dpcm_fe_dai_hw_params failed (-22)
[54581.873831] sof-audio-pci-intel-cnl 0000:00:1f.3: ipc tx error for 0x30010000 (msg/reply size: 96/20): -22
[54581.873839] sof-audio-pci-intel-cnl 0000:00:1f.3: error: failed to load widget HDA0.OUT
[54581.873843] sof-audio-pci-intel-cnl 0000:00:1f.3: error: failed setting up DAI widget HDA0.OUT
[54581.873847] sof-audio-pci-intel-cnl 0000:00:1f.3: ASoC: error at snd_soc_dai_hw_params on Analog CPU DAI: -22
[54581.873864] Analog Playback and Capture: ASoC: soc_pcm_hw_params() failed (-22)
[54581.873868] HDA Analog: ASoC: dpcm_fe_dai_hw_params failed (-22)
[54581.874014] sof-audio-pci-intel-cnl 0000:00:1f.3: ipc tx error for 0x30010000 (msg/reply size: 96/20): -22
[54581.874023] sof-audio-pci-intel-cnl 0000:00:1f.3: error: failed to load widget HDA0.OUT
[54581.874025] sof-audio-pci-intel-cnl 0000:00:1f.3: error: failed setting up DAI widget HDA0.OUT
[54581.874028] sof-audio-pci-intel-cnl 0000:00:1f.3: ASoC: error at snd_soc_dai_hw_params on Analog CPU DAI: -22
[54581.874038] Analog Playback and Capture: ASoC: soc_pcm_hw_params() failed (-22)
[54581.874041] HDA Analog: ASoC: dpcm_fe_dai_hw_params failed (-22)
[54581.874278] sof-audio-pci-intel-cnl 0000:00:1f.3: ipc tx error for 0x30010000 (msg/reply size: 96/20): -22
[54581.874294] sof-audio-pci-intel-cnl 0000:00:1f.3: error: failed to load widget HDA0.OUT
[54581.874297] sof-audio-pci-intel-cnl 0000:00:1f.3: error: failed setting up DAI widget HDA0.OUT
[54581.874299] sof-audio-pci-intel-cnl 0000:00:1f.3: ASoC: error at snd_soc_dai_hw_params on Analog CPU DAI: -22
[54581.874309] Analog Playback and Capture: ASoC: soc_pcm_hw_params() failed (-22)
[54581.874316] HDA Analog: ASoC: dpcm_fe_dai_hw_params failed (-22)
[54581.874606] sof-audio-pci-intel-cnl 0000:00:1f.3: ipc tx error for 0x30010000 (msg/reply size: 96/20): -22
[54581.874614] sof-audio-pci-intel-cnl 0000:00:1f.3: error: failed to load widget HDA0.OUT
[54581.874618] sof-audio-pci-intel-cnl 0000:00:1f.3: error: failed setting up DAI widget HDA0.OUT
[54581.874621] sof-audio-pci-intel-cnl 0000:00:1f.3: ASoC: error at snd_soc_dai_hw_params on Analog CPU DAI: -22
[54581.874633] Analog Playback and Capture: ASoC: soc_pcm_hw_params() failed (-22)
[54581.874636] HDA Analog: ASoC: dpcm_fe_dai_hw_params failed (-22)
It works perfectly with the 5.15.13 kernel.
Perhaps it has something to do with the recent changes.
Impact
Annoyance (need to reboot to restore sound)
Environment
This is on a Thinkpad X1 Carbon gen 8 with Intel Comet Lake PCH-LP cAVS audio.
- Kernel: 5.16-rc7 mainline
- SOF: (with kernel)
- Platform: Arch x86_64 with custom built kernel
Log output
Reacted by Jed Liu and Alexandr
Activity
lgirdwood commentedon Jan 10, 2022
@specious how often does this happen ? Fwiw, the changes https://lore.kernel.org/alsa-devel/[email protected]/T/ were a fix for a similar issue on CML hardware so it may be something is still not right (and this fix was stress tested on a lot of HW).
Btw, are you able to run sof-logger next time this happens and attache the FW log. See https://thesofproject.github.io/latest/developer_guides/debugability/logger/index.html
lgirdwood commentedon Jan 10, 2022
@kv2019i fyi.
specious commentedon Jan 11, 2022
It happens consistently on wake. I can boot and have audio, but after the first suspend/resume, it will require a reboot to get it back.
I'd love to help diagnose what is occurring. I can boot into the 5.16-rc7 kernel and test it out. I just installed the
sof-toolspackage and it's got the logger and two other utilities.How exactly do I run the logger? I'm not sure what the
ldcfile is and where it comes from. It also looks like I need to boot withsnd_sof.sof_debug=1(I have it compiled into the kernel).plbossart commentedon Jan 11, 2022
@specious here are some ideas to help find the root cause
a) downgrade to SOF version 1.9.3 . I see that you are using 2:0:0-b678a so we need to rule out a firmware issue in the last release
b) prevent dynamic pipelines for HDaudio. this can be done with the quirk
options snd_sof sof_debug=0xF
specious commentedon Jan 13, 2022
I installed
sof-firmware1.9.3 from the package archive, but dmesg is still reporting:In
/lib/firmware/intelI have:What could I be doing wrong?
And to be clear, audio works perfectly with the 5.15.13 kernel (same configuration), no matter how many times I suspend/resume (either by closing the lid or
sudo rtcwake -m mem -s 1.Arch official kernel is now at 5.16.arch1-1, and I confirmed that audio breaks on suspend/resume, and it also worked with the previous official kernel.
lgirdwood commentedon Jan 14, 2022
@specious
/lib/firmware/intel/sofand/lib/firmware/intel/sof-tplgare directories e.g. on my PCThese are then populated with the binaries and links.
xxxbxxx commentedon Jan 17, 2022
got the same issue!
workaround to avoid reboot:
specious commentedon Jan 17, 2022
If the module is built into the kernel, is there also a way to reinitialize it?
plbossart commentedon Jan 17, 2022
we don't support this case due to dependencies with the firmware loading from the filesystem. The SOF driver has to be module-based. Can you share your kernel config please?
specious commentedon Jan 18, 2022
My kernel configuration: config-linux-5.16-20220118.txt
Although all drivers are built in, everything works perfectly with the 5.15.13 kernel, and until a sleep/wake also on 5.16.0.
I was simply wondering if there's any way to get the driver to reinitialize without doing an
rmmod.dumprop commentedon Jan 23, 2022
I have same problem on opensuse - https://bugzilla.suse.com/show_bug.cgi?id=1195027
alsa-info.sh with broken audio https://alsa-project.org/db/?f=9aa7cd2010b1474ccc835b55d807077bc69018d6
carmilso commentedon Jan 24, 2022
Hi! I have exactly the same issue but with
snd_sof_pci_intel_tgl. Thanks for thermmodworkaround, I'll keep subscribed to the issue2 remaining items
dumprop commentedon Jan 24, 2022
Yes, unless I can't see
mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops 0xffffffff822ad480. I have:(on boot, if it's make sense)
(after resume, so there are no anything related to mei_hdcp)
tmoesi commentedon Jan 27, 2022
Hi,
I have a very similar issue and have to do
to get my audio to work after wakeup from suspend.
This is my dmesg:
Environment
I am running a Lenovo Yoga 7 slim with kernel
5.16.2-1-MANJARO.Information around the hardware can also be found at https://linux-hardware.org/?probe=896b348390.
tiwai commentedon Jan 27, 2022
A similar bug report on bugzilla.kernel.org https://bugzilla.kernel.org/show_bug.cgi?id=215535
It suggests that the first bad commit is 5fcdbb2d45df6afb654674379546996b0027aa3e
("ASoC: SOF: Add support for dynamic pipelines")
[-][BUG] ipc tx error on suspend/resume[/-][+][BUG] ipc tx error on suspend/resume (error loading HDA0.OUT)[/+]lgirdwood commentedon Jan 27, 2022
@plbossart @ranj063 is there a kernel config or module option that can disable dynamic pipelines so we can root cause and workaround atm ?
ujfalusi commentedon Jan 27, 2022
Hi,
While trying to reproduce a different issue I think I did hit this issue:
#5134 (comment)
In short: 5.16.1-artix1-1 kernel
suspend while aplay is running and on resume I see
stopping aplay and starting it again will fail and I have this in the dmesg:
Checked that vanilla 5.16 and 5.16.1 also have the same issue, but 5.17-rc1 does not. With some bisecting
I ended up backporting the attached patches to 5.16.1 from 5.17-rc1 and the resume issue is resolved:
backports_from_5.17-rc1.tar.gz
@ranj063, @plbossart, @kv2019i
I'll try to find a simpler way to fix it, but this is a good start.
dmesg from the start of the first playback to resume: dmesg.txt
firmware log for the same window: firmware-log.txt
galibozek commentedon Jan 27, 2022
this 96da174024b9c63bd5d3358668d0bc12677be877 (ASoC: SOF: handle paused streams during system suspend) commit added in 5.16.3 - https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.16.3
ujfalusi commentedon Jan 27, 2022
@galibozek, 5.16.3 appears to be working correctly, thanks for the heads up!
dumprop commentedon Feb 2, 2022
Yes, now I don't notice such a problem
lgirdwood commentedon Feb 4, 2022
Closing since resolved with kernel update.
resound (temporary workaround for sof bug)