summaryrefslogtreecommitdiff
path: root/samples/workqueue
diff options
context:
space:
mode:
authorZhang Heng <zhangheng@kylinos.cn>2026-07-28 19:13:09 +0800
committerTakashi Iwai <tiwai@suse.de>2026-07-28 18:31:45 +0200
commitb7adaa94e336f3b062ab85131d299d09e6d7ff47 (patch)
tree1798e1696bf13e267aef052ef305f65a8ff4818c /samples/workqueue
parent46a6393e96b1a9a08fc53ee2ce9485238a06da13 (diff)
ALSA: usb-audio: Fix boot-time audio stuttering for USB Audio device
This USB Audio device (0x1e0b:0xd01e) exhibits audio stuttering during boot when playing audio. Once the system is fully booted, playback is normal. The device reports its isochronous endpoints with the Asynchronous sync type (bmAttributes = 0x03), which causes the driver to calculate nurbs = min(max_urbs, ...) = 3, providing only ~16ms of buffering. During boot, the higher system scheduling jitter (e.g., from init scripts, device enumeration, and driver probing) can exceed this buffer depth, causing audible stuttering. This patch adds a device-specific quirk (QUIRK_FLAG_PLAYBACK_URB_FIXUP) that applies two changes for this device: 1. Forces nurbs to MAX_URBS (12), providing sufficient buffering 2. Sets URB_ISO_ASAP flag for more consistent xHCI scheduling Both changes are required together for stable boot-time playback: - The larger buffer absorbs scheduling jitter during boot - URB_ISO_ASAP ensures consistent URB submission timing, preventing the xHCI scheduler from introducing variable delays Test methodology: - Without patch: reboot and play audio → stuttering audible in all tests (reproduced consistently across multiple attempts) - With nurbs=8 only: occasional minor stuttering observed after multiple tests (insufficient buffer depth) - With full patch (nurbs=12 + URB_ISO_ASAP): reboot and play audio → no stuttering observed (tested in 10+ reboot cycles without reproducing the issue) Signed-off-by: Zhang Heng <zhangheng@kylinos.cn> Link: https://patch.msgid.link/20260728111309.1271834-1-zhangheng@kylinos.cn Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'samples/workqueue')
0 files changed, 0 insertions, 0 deletions