You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
USB audio playback at 44100 Hz to a full-speed DAC connected behind the on-board
high-speed hub is audibly distorted (crackling/garbled). Playback at 48000 Hz on the
same device is clean. First 44.1 kHz playback after boot triggers a WARN_ON_ONCE at drivers/usb/dwc2/hcd.c:2684 in dwc2_assign_and_init_hc()
(the "split OUT is assumed aligned" check firing on an unaligned xfer_dma).
This is a regression: identical hardware and use case work correctly on Ubuntu 24.04's
6.8-raspi kernel; broken on Ubuntu 26.04's 7.0.0-1011-raspi and 7.0.0-1014-raspi
(both carry the raspberrypi.com downstream patchset).
Steps to reproduce
Raspberry Pi 3 Model B, full-speed USB audio DAC (here: SMSL Q5, 0451:0003,
TI, adaptive isoc OUT, S24_3LE) plugged into any port (topologically behind the
built-in LAN9514 high-speed hub).
aplay -D plughw:CARD=smsl /usr/share/sounds/alsa/... (any 44.1 kHz material,
e.g. a 44100 Hz 24-bit WAV).
Audio is distorted; dmesg shows the WARNING below (once per boot).
Repeat with 48 kHz material → clean audio, no WARNING.
Why 44.1 kHz specifically (analysis)
At full speed, 44100 Hz gives alternating 44/45-sample isoc packets. With S24_3LE
stereo (6 bytes/frame) that is 264/270-byte packets. 264 % 4 = 0 but 270 % 4 = 2,
so every other packet's DMA offset lands 2 bytes off word alignment. At 48 kHz the
packet is a constant 288 bytes (word-multiple), so everything stays aligned — which
matches the observed good/bad behaviour exactly.
snd-usb-audio submits its URBs with URB_NO_TRANSFER_DMA_MAP (pre-mapped coherent
buffers). Since commit 279fbca ("drivers: dwc2: better handle hardware length &
alignment issues", June 2025) such URBs bypass dwc2_alloc_dma_aligned_buffer()'s
bounce/realign path entirely, relying on the BCM283x whole-word-write behaviour being
benign. For isoc OUT split transfers that assumption doesn't hold: the unaligned xfer_dma reaches dwc2_assign_and_init_hc(), trips WARN_ON_ONCE(hsotg->params.host_dma && (chan->xfer_dma & 0x3)), and the data
actually transmitted is byte-shifted → garbled audio.
I verified the running Ubuntu 7.0.0-1014-raspi kernel contains this commit
(strings on vmlinuz shows its "Unaligned DMA-mapped buffer" message); the working
6.8-raspi kernels predate the whole June-2025 dwc2 split series (also a63acce, 53eec62, ec2d895 — cf. follow-up fixes in PR #7290 and
PR #6906). Possibly related to #4915 (same WARN, isoc IN capture, 5.10 era).
Environment
Hardware: Raspberry Pi 3 Model B Rev 1.2 (BCM2837, dwc2 at 3f980000.usb)
OS/kernel: Ubuntu 26.04 LTS, 7.0.0-1014-raspi Ramdisk files for emergency kernel #14-Ubuntu (also 7.0.0-1011-raspi);
last known good: Ubuntu 24.04, 6.8.0-1050-raspi
DAC: SMSL Q5 AMP, 0451:0003 (TI), full speed, behind LAN9514 hub port 4
lsusb -t:
/: Bus 001.Port 001: Dev 001, Class=root_hub, Driver=dwc2/1p, 480M
|__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/5p, 480M
|__ Port 001: Dev 003, If 0, Class=Vendor Specific Class, Driver=smsc95xx, 480M
|__ Port 004: Dev 004, If 0, Class=Audio, Driver=snd-usb-audio, 12M
|__ Port 004: Dev 004, If 1, Class=Audio, Driver=snd-usb-audio, 12M
Stream (/proc/asound/card1/stream0): Interface 1, Altset 1, S24_3LE, 2ch,
EP 0x01 OUT ADAPTIVE, rates 44100/48000/88200/96000
Kernel log
usb 1-1.4: 1:1: cannot get freq at ep 0x1
------------[ cut here ]------------
WARNING: drivers/usb/dwc2/hcd.c:2684 at dwc2_assign_and_init_hc+0x260/0x580, CPU#2: swapper/2/0
Hardware name: Raspberry Pi 3 Model B Rev 1.2 (DT)
pc : dwc2_assign_and_init_hc+0x260/0x580
lr : dwc2_assign_and_init_hc+0x210/0x580
Call trace:
dwc2_assign_and_init_hc+0x260/0x580 (P)
dwc2_hcd_select_transactions+0x88/0x340
dwc2_handle_hcd_intr+0x384/0xa20
_dwc2_hcd_irq+0x1c/0x30
usb_hcd_irq+0x38/0x60
__handle_irq_event_percpu+0x74/0x400
handle_irq_event+0x4c/0x110
handle_level_irq+0xe0/0x180
handle_irq_desc+0x3c/0x68
generic_handle_domain_irq+0x20/0x40
bcm2836_chained_handle_irq+0x30/0x60
handle_irq_desc+0x3c/0x68
generic_handle_domain_irq+0x20/0x40
bcm2836_arm_irqchip_handle_irq+0xa4/0x100
call_on_irq_stack+0x30/0x48
do_interrupt_handler+0x88/0x98
el1_interrupt+0x48/0xb0
el1h_64_irq_handler+0x18/0x30
el1h_64_irq+0x84/0x88
default_idle_call+0x38/0x178 (P)
cpuidle_idle_call+0xbc/0x240
do_idle+0xb0/0x128
cpu_startup_entry+0x40/0x50
secondary_start_kernel+0xe4/0x128
__secondary_switched+0xc0/0xc8
---[ end trace 0000000000000000 ]---
The WARN is once-per-boot; subsequent 44.1 kHz playback only logs cannot get freq at ep 0x1, but audio stays distorted.
Describe the bug
USB audio playback at 44100 Hz to a full-speed DAC connected behind the on-board
high-speed hub is audibly distorted (crackling/garbled). Playback at 48000 Hz on the
same device is clean. First 44.1 kHz playback after boot triggers a
WARN_ON_ONCEatdrivers/usb/dwc2/hcd.c:2684indwc2_assign_and_init_hc()(the "split OUT is assumed aligned" check firing on an unaligned
xfer_dma).This is a regression: identical hardware and use case work correctly on Ubuntu 24.04's
6.8-raspi kernel; broken on Ubuntu 26.04's 7.0.0-1011-raspi and 7.0.0-1014-raspi
(both carry the raspberrypi.com downstream patchset).
Steps to reproduce
0451:0003,TI, adaptive isoc OUT, S24_3LE) plugged into any port (topologically behind the
built-in LAN9514 high-speed hub).
aplay -D plughw:CARD=smsl /usr/share/sounds/alsa/...(any 44.1 kHz material,e.g. a 44100 Hz 24-bit WAV).
dmesgshows the WARNING below (once per boot).Why 44.1 kHz specifically (analysis)
At full speed, 44100 Hz gives alternating 44/45-sample isoc packets. With S24_3LE
stereo (6 bytes/frame) that is 264/270-byte packets. 264 % 4 = 0 but 270 % 4 = 2,
so every other packet's DMA offset lands 2 bytes off word alignment. At 48 kHz the
packet is a constant 288 bytes (word-multiple), so everything stays aligned — which
matches the observed good/bad behaviour exactly.
snd-usb-audio submits its URBs with
URB_NO_TRANSFER_DMA_MAP(pre-mapped coherentbuffers). Since commit 279fbca ("drivers: dwc2: better handle hardware length &
alignment issues", June 2025) such URBs bypass
dwc2_alloc_dma_aligned_buffer()'sbounce/realign path entirely, relying on the BCM283x whole-word-write behaviour being
benign. For isoc OUT split transfers that assumption doesn't hold: the unaligned
xfer_dmareachesdwc2_assign_and_init_hc(), tripsWARN_ON_ONCE(hsotg->params.host_dma && (chan->xfer_dma & 0x3)), and the dataactually transmitted is byte-shifted → garbled audio.
I verified the running Ubuntu 7.0.0-1014-raspi kernel contains this commit
(
stringson vmlinuz shows its "Unaligned DMA-mapped buffer" message); the working6.8-raspi kernels predate the whole June-2025 dwc2 split series (also
a63acce, 53eec62, ec2d895 — cf. follow-up fixes in PR #7290 and
PR #6906). Possibly related to #4915 (same WARN, isoc IN capture, 5.10 era).
Environment
last known good: Ubuntu 24.04, 6.8.0-1050-raspi
0451:0003(TI), full speed, behind LAN9514 hub port 4lsusb -t:/proc/asound/card1/stream0): Interface 1, Altset 1, S24_3LE, 2ch,EP 0x01 OUT ADAPTIVE, rates 44100/48000/88200/96000
Kernel log
The WARN is once-per-boot; subsequent 44.1 kHz playback only logs
cannot get freq at ep 0x1, but audio stays distorted.Full trace with register dump (journalctl -k)
Happy to test patches or a revert of 279fbca on this hardware.