craigcabrey / thinkbook-13x-gen4-enablement

Tracking hardware enablement for Linux on the 2024 ThinkBook 13x Gen4
13 stars 0 forks source link

Randomly distorted sound (metallic) #9

Open madenvel opened 3 months ago

madenvel commented 3 months ago

Randomly sounds start being very distorted until alsa device is re-initialized. Looks like it easy to reproduce in a "stress" test that runs snd_pcm_prepare / snd_pcm_start / snd_pcm_drain in some loop, less often happens when used normally.

Did not get to the bottom of that but feels like a race condition between some init / de-init procedures that need to be sync'ed.

[802301.284220] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.3: DSP1: cirrus/cs35l41-dsp1-spk-prot-17aa38c8.wmfw: Fri 31 Mar 2023 10:42:49 W. Europe Daylight Time
[802301.284303] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.3: DSP1: Failed to read algorithm info: -16
[802301.284308] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.3: Cannot Initialize Firmware. Error: -16
[802301.284310] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.3: DSP1: Failed to read SCRATCH0: -16
[802301.315694] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.3: Enable(1) failed: -16
[802302.553638] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.3: Enable(0) failed: -16
[802302.560528] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.3: Requesting Firmware Load after HDA_GEN_PCM_ACT_CLOSE
[802302.564600] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.3: DSP1: cirrus/cs35l41-dsp1-spk-prot-17aa38c8.wmfw: format 3 timestamp 0x64269d09
madenvel commented 2 months ago

The firmware errors above are gone but distortion still happens.

I've open an issue but now have doubts as that could be a hardware issue (there are a few similar reports on Lenovo website).

@craigcabrey do you have time to try the test code on the laptop to see if you have the issue?

craigcabrey commented 2 months ago

I can try this weekend, you are referring to the sample repro program linked on that issue?

craigcabrey commented 2 months ago

For what it's worth, I have also encountered this issue, though much less frequently in latest kernels (anecdotal, I know).