On Mon, 15 May 2023 17:39:50 +0200, Marek Marczykowski-Górecki wrote: > > Hi, > > I have a rather interesting issue on HP EliteBook 1040, with Intel ADL > HDA. Sometimes (often) audio output is heavily distorted, but then > opening pavucontrol or just launching `parecord /dev/null` fixes the issue > instantly. But, when the mixer or recording is closed, then few seconds > later issue comes back. > > You can hear this at https://cloud.marmarek.net/s/46prqZnwrqDkBdD > Initially recording was running, then about 10s stopped and you can > hear the issue few seconds later. Then I starter recording again, and > the issue is gone. > This is how it should sound: https://youtube.com/watch?v=4Tr0otuiQuU > I do not see any kernel messages when issue happens. > > The issue happens on Linux 6.1.26, 6.2.10, and 6.3.2. I haven't tested > other versions. It happens only when running under Xen (in PV dom0). The > very same Linux started directly works fine. Full dmesg of both native > and Xen boots is at https://gist.github.com/marmarek/548ee79282446344a172109bcd943930 > > When running Linux 6.3.2 there, I noticed that just after boot first > playback is okay, but if I start and stop recording it breaks. And then > after some time of idle it fixes itself again. I have not observed this > behavior on 6.2.10 (it was broken initially too), but I could be also > doing some things differently. > > I have few other ADL-based systems (but not HP), and they do not show > this issue, only this HP laptop is affected. Example dmesg from another > ADL-based system: > https://gist.github.com/marmarek/38c5ba3ec58f9300fbc1842ddc9fa4f5 > > I'm not sure if that's the relevant difference, but comparing dmesg from > working and not working systems, I see those on boot for the > problematic case: > snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100 > snd_hda_intel 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver > sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100 > sof-audio-pci-intel-tgl 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver > sof-audio-pci-intel-tgl 0000:00:1f.3: enabling device (0000 -> 0002) > xen: registering gsi 16 triggering 0 polarity 1 > Already setup the GSI :16 > sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100 > sof-audio-pci-intel-tgl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915]) > sof-audio-pci-intel-tgl 0000:00:1f.3: use msi interrupt mode > sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 5 > sof-audio-pci-intel-tgl 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now > sof-audio-pci-intel-tgl 0000:00:1f.3: DMICs detected in NHLT tables: 2 > sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864 > sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0 > sof-audio-pci-intel-tgl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30 > sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864 > sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0 > sof-audio-pci-intel-tgl 0000:00:1f.3: Topology: ABI 3:22:1 Kernel ABI 3:23:0 > skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: Parent card not yet available, widget card binding deferred > cs35l41-hda spi0-CSC3551:00-cs35l41-hda.0: DSP1: Firmware version: 3 > cs35l41-hda spi0-CSC3551:00-cs35l41-hda.0: DSP1: cirrus/cs35l41-dsp1-spk-prot-103c8974.wmfw: Fri 27 Aug 2021 14:58:19 W. Europe Daylight Time > cs35l41-hda spi0-CSC3551:00-cs35l41-hda.0: DSP1: Firmware: 400a4 vendor: 0x2 v0.43.1, 2 algorithms > cs35l41-hda spi0-CSC3551:00-cs35l41-hda.0: DSP1: 0: ID cd v29.63.1 XM@94 YM@e > cs35l41-hda spi0-CSC3551:00-cs35l41-hda.0: DSP1: 1: ID f20b v0.1.0 XM@176 YM@0 > cs35l41-hda spi0-CSC3551:00-cs35l41-hda.0: DSP1: spk-prot: E:\Amp Tuning\HP\840\0527\103C8972_220527.bin > snd_hda_codec_realtek ehdaudio0D0: bound spi0-CSC3551:00-cs35l41-hda.0 (ops cs35l41_hda_comp_ops [snd_hda_scodec_cs35l41]) > cs35l41-hda spi0-CSC3551:00-cs35l41-hda.1: DSP1: Firmware version: 3 > cs35l41-hda spi0-CSC3551:00-cs35l41-hda.1: DSP1: cirrus/cs35l41-dsp1-spk-prot-103c8974.wmfw: Fri 27 Aug 2021 14:58:19 W. Europe Daylight Time > cs35l41-hda spi0-CSC3551:00-cs35l41-hda.1: DSP1: Firmware: 400a4 vendor: 0x2 v0.43.1, 2 algorithms > cs35l41-hda spi0-CSC3551:00-cs35l41-hda.1: DSP1: 0: ID cd v29.63.1 XM@94 YM@e > cs35l41-hda spi0-CSC3551:00-cs35l41-hda.1: DSP1: 1: ID f20b v0.1.0 XM@176 YM@0 > cs35l41-hda spi0-CSC3551:00-cs35l41-hda.1: DSP1: spk-prot: E:\Amp Tuning\HP\840\0527\103C8972_220527.bin > snd_hda_codec_realtek ehdaudio0D0: bound spi0-CSC3551:00-cs35l41-hda.1 (ops cs35l41_hda_comp_ops [snd_hda_scodec_cs35l41]) > > > Any ideas? Could you try to switch to the legacy HD-audio driver (e.g. by passing snd_intel_dspcfg.dsp_driver=1 option) and check whether the issue persists or not? This will narrow down whether it's SOF-specific problem or not, at least. thanks, Takashi