Skip to content

[BUG] Distorted "metallic" sound after snd_pcm_drain snd_pcm_prepare cycle #5198

@madenvel

Description

@madenvel

Describe the bug
Intermittently sounds becomes distorted after snd_pcm_drain / snd_pcm_prepare ALSA call. Does not happen if the device is reopened after snd_pcm_drain with snd_pcm_close / snd_pcm_open.

To Reproduce
Please find a sample code to reproduce the bug: https://bugzilla.kernel.org/show_bug.cgi?id=219260
Reproducible on ThinkBook 13x Gen4 hardware.

Reproduction Rate
Roughly 2/10 times with the test code attached.

Expected behavior
Device should not need to re-open before the playback.

Impact
Affects sound playback quite significantly, making devices unusable without external audio device.

Environment

  1. Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
    • Kernel: 6.12.0-0.rc0.20240918gt4a39ac5b.306.vanilla.fc40.x86_64, I assume 20240918gt4a39ac5b is the
    • SOF: v2024.06
  2. Name of the topology file
    • Topology: sof-hda-generic-4ch.tplg
  3. Name of the platform(s) on which the bug is observed.
    • Platform: Intel64

ftrace file with snd* filter of the sequence of kernel calls: trace.txt

Metadata

Metadata

Labels

HDAApplies to HD-Audio bus for codec connectionLNLApplies to Lunar Lake platformMTLApplies to Meteor Lake platform.P1Blocker bugs or important featuresTGLApplies to Tiger Lake platformbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions