Bugzilla – Bug 1213583
Distorted audio with kernel >= 6.4.2
Last modified: 2024-06-25 17:51:03 UTC
Created attachment 868391 [details] Output of alsa-info.txt I have a Lenovo ThinkPad T14s. Since upgrading from kernel-default 6.3.9 to 6.4.2 (and then again to 6.4.3), I have been experiencing severe audio distortion. The problem doesn't occur right away, but seemingly at random after several minutes or hours. It can also often (fairly reliably, but not 100%) be triggered in an application that plays audio by seeking forwards in an audio stream. Once the distortion happens, it usually persists as long as the application remains open. Restarting the application sometimes solves the issue temporarily, but more often the distortion remains for all audio applications until the entire OS is rebooted. Simply restarting alsa or pipewire has no effect. There is a similar report for Arch Linux at <https://bugs.archlinux.org/task/79081?project=1&pagenum=10> which links to Kernel and thesofproject bugs at <https://bugzilla.kernel.org/show_bug.cgi?id=217673> and <https://github.com/thesofproject/linux/issues/4455>, respectively. If this is indeed the same problem, then it would be nice if Tumbleweed could apply whatever patches are provided. I'm running alsa 1.2.9 and pipewire 0.3.72. Here is information on my hardware: # inxi -A Audio: Device-1: Intel Comet Lake PCH-LP cAVS driver: sof-audio-pci-intel-cnl Device-2: Lenovo ThinkPad Dock USB Audio driver: hid-generic,snd-usb-audio,usbhid type: USB API: ALSA v: k6.4.3-1-default status: kernel-api Output of alsa-info.sh is attached.
Likely an issue of SOF. Could you try to switch to the legacy HDA-Intel by passing snd_intel_dspcfg.dsp_driver=1 boot option? It's just for verifying the problem, not meant as a fix, as you'll loose the built-in mic with that.
Yes, I'm no longer able to reproduce the problem when using that kernel parameter.
OK, thanks for confirmation. I'm building a test kernel with a backport patch that was suggested in the SOF issue page. The patch was modified for 5.4.x, so it's totally untested. The package is being built in OBS home:tiwai:bsc1213583. Please check it once after the package build finishes.
(In reply to Takashi Iwai from comment #3) > I'm building a test kernel with a backport patch that was suggested in the > SOF issue page. The patch was modified for 5.4.x, so it's totally untested. > The package is being built in OBS home:tiwai:bsc1213583. Please check it > once after the package build finishes. Yes, with that kernel (and without the snd_intel_dspcfg.dsp_driver=1 parameter) the problem is no longer reproducible for me.
Then please update the info on the upstream bug tracker. The patch is still a downstream one, and we need to wait at least for the upstream submission to be taken into TW kernel.
Could you be more specific as to what information I should provide in the upstream tracker? It's not clear to me what patch you applied and whether the upstream developers have it. The upstream report links to a patch at <https://github.com/thesofproject/linux/pull/4484> but this looks to be slightly different from the ASoC-SOF-intel-hda-Clean-up-link-DMA-for-IPC3-during-stop.patch one included in the patches.suse.tar.bz2 of your kernel package.
Yes, it's the patch ASoC-SOF-intel-hda-Clean-up-link-DMA-for-IPC3-during-stop.patch, from the github issue you mentioned. As mentioend in comment 3, it was modified to fit with 6.4.x kernel, but it should be equivalent. You can report that the modified patch successfully worked for 6.4.x.
(In reply to Takashi Iwai from comment #7) > Yes, it's the patch > ASoC-SOF-intel-hda-Clean-up-link-DMA-for-IPC3-during-stop.patch, from the > github issue you mentioned. As mentioend in comment 3, it was modified to > fit with 6.4.x kernel, but it should be equivalent. You can report that the > modified patch successfully worked for 6.4.x. OK, I think part of the confusion was that you wrote that the patch was modified for 5.4.x, not 6.4.x. I've now reported the result upstream, though it seems that the bug has already been closed in the meantime.
Ah sorry for the typo. Now I took the latest patch from SOF git repo, backported to stable branch, and sent a PR for merge. Hopefully this will be included in near future (I guess it slipped from 6.4.7 TW kernel update, though).