USB audio dropouts and Xruns on BBB

Hello,

i would like to ask you for experience with USB audio interfaces and BBB.
I’m having trouble with BBB (rev. A6A) and audio playback with snd-usb-audio under higher interrupt loads.
If i play audio through USB interface and for instance simultaneously transferring data from network mount, i will get audio dropouts. At first it is occasional thing and sounds like few milliseconds pops, but after while it happens more often and leading to serious stops at playback.
It is not completely possible to avoid this situation in desired usage (MPD based network audio player) as this happens for instance during library update, when MPD is rereading tags from all songs.

  • it occurs more often during streaming of high bitrate audio (eg. uncompressed stereo 176.4kHz)
  • ALSA driver access optimization doesn’t help - memory mapped, different buffer and period lengths.
  • forcing PIO mode with CONFIG_MUSB_PIO_ONLY doesn’t help
  • just for test i also tried network access through second USB port (virtual USB eth. interface) to exclude TI ethernet driver, but it is same.
  • it doesn’t seems to be userspace CPU usage issue (tried to generate CPU load with fio and it didn’t produce dropouts)
  • system doesn’t print any other warnings or errors except of Xruns from ALSA layer.
  • I’ve tried several distributions with kernels 3.8.13 (Angstrom, Volumio), 3.12.9 (Voyage), 3.13 (development version of Debian Jessie from RobertCNelson image).
  • just for completeness, it is not issue of my USB interfaces (works great with other Linux systems and some are not bus powered to exclude possible issues with insufficient power from BBB USB port)

My quick steps to reproduce… initiate playback of hi-res audio wav from mmc with aplay and simultaneously open several parallel network TCP connections with iperf.

Can anybody confirm me this issue with BBB? Do you have some tips, what to try next?

Kind regards,

Michal

Hello,

i would like to ask you for experience with USB audio interfaces and BBB.
I'm having trouble with BBB (rev. A6A) and audio playback with
snd-usb-audio under higher interrupt loads.
If i play audio through USB interface and for instance simultaneously
transferring data from network mount, i will get audio dropouts. At first
it is occasional thing and sounds like few milliseconds pops, but after
while it happens more often and leading to serious stops at playback.
It is not completely possible to avoid this situation in desired usage
(MPD based network audio player) as this happens for instance during
library update, when MPD is rereading tags from all songs.

- it occurs more often during streaming of high bitrate audio (eg.
uncompressed stereo 176.4kHz)
- ALSA driver access optimization doesn't help - memory mapped, different
buffer and period lengths.
- forcing PIO mode with CONFIG_MUSB_PIO_ONLY doesn't help
- just for test i also tried network access through second USB port
(virtual USB eth. interface) to exclude TI ethernet driver, but it is same.
- it doesn't seems to be userspace CPU usage issue (tried to generate CPU
load with fio and it didn't produce dropouts)
- system doesn't print any other warnings or errors except of Xruns from
ALSA layer.
- I've tried several distributions with kernels 3.8.13 (Angstrom,
Volumio), 3.12.9 (Voyage), 3.13 (development version of Debian Jessie from RobertCNelson
image).
- just for completeness, it is not issue of my USB interfaces (works great
with other Linux systems and some are not bus powered to exclude possible
issues with insufficient power from BBB USB port)

My quick steps to reproduce.. initiate playback of hi-res audio wav from
mmc with aplay and simultaneously open several parallel network TCP
connections with iperf.

Can anybody confirm me this issue with BBB? Do you have some tips, what to
try next?

Can you please retry with:

Can you please retry with:

http://elinux.org/BeagleBoardDebian#BeagleBone

cd /opt/scripts/tools/
sudo ./update_kernel.sh --beta-kernel

Which will pull in "v3.13.2-bone5" which includes some new usb patches..

Regards,

Can you please retry with:

http://elinux.org/BeagleBoardDebian#BeagleBone

cd /opt/scripts/tools/
sudo ./update_kernel.sh --beta-kernel

Which will pull in “v3.13.2-bone5” which includes some new usb patches…

Hello Robert,

thank you very much for reply and tip to new kernel plus all your work for BBB community.
At first, I am sorry, i overlooked that default kernel at your Jessie image is 3.8.13, i thought, it is latest one.
I upgraded to newest 3.13.2-bone5 and tried everything again.

It seems to be worse than with previous stable kernel. I’ve found following problems.

  • dropouts are immediate after start of PCM playback
  • there are instant crashes at corresponding DMA controller module
  • there is no ctl interface created for snd-usb-audio card (playback could be started, but it is not possible to access any mixer controls from alsa utils - eg. amixer, alsamixer)

I’ve included: dmesg output with crash report from DMA module, interrupts statistics, lsusb output.

Best regards,

Michal

jessie-3.13.2-bone5-interrupt.log (1.29 KB)

jessie-3.13.2-bone5-lsusb.log (26.4 KB)

jessie-3.13.2-bone5-dmesg.log (31.6 KB)

Is there anybody else, whose setup with class audio USB interface is also affected by that dropouts?
Just to exclude, that it is not only issue of my BBB?

Thanks a lot,

Michal