Re: [PATCH v3] ALSA: usb-audio: Fix boot-time audio stuttering for USB Audio device

From: Takashi Iwai

Date: Tue Jul 28 2026 - 12:38:18 EST


On Tue, 28 Jul 2026 13:13:09 +0200,
Zhang Heng wrote:
>
> 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@xxxxxxxxxx>

Looks a bit like voodoo, but better than vanilla, as it seems.
Applied to for-next branch now.


thanks,

Takashi