When I play audio on my Beaglebone via a USB sound card, I get some
static in the sound which seems to correlate with activity on the
system. 'top' indicates that kworker/0:1 hovers around 97% CPU. This
happens on both Angstrom and Gentoo. Caching audio to memory before
output helps but does not completely fix it. Does anyone have advice
for dealing with this?
Could be related to DMA not being activated for USB. I think DMA isn't
activated by default for USB due some bugs.
I enabled USB DMA on the 3.1 kernel and it looks like kworker still
hogs the CPU during playback, but there is no static in the sound
unless I do heavy stuff at the same time like move files onto the SD
card. Could a newer kernel improve things or is there anything else I
can do to further prevent static?
Then hope your usb device will still work! As some do, some don’t…
Robert could you elaborate on that please ? I saw the patch comments and they didn’t have much info.
For example I’ve been using USB (with DMA on your Kernel) with 3G HSPA+ modems moving about 10-12Mbps download rates and haven’t had any problem. But most USB Wifi adapters I’ve tried are as stable as a ball (but that could be related to other stuff since on Angstrom I saw the same and it seems Angstrom kernel disables DMA).
I’m even now with your 3.2.28 kernel in preempt mode (not PREEMPT_RT) and haven’t had any issues besides Ethernet needs an extra ifup/ifdown after boot (but I it seems to be related to last wheezy ARMHF stuff).
The USB DMA “bugs” and PREEMPT are big questions for me, specially on PREEMPT there is little info saying why isn’t recommended.
That static is high or low frequency ? You may have some crosstalk due lack
of hump on your power supply.
I've experimented a lot and it's definitely not power supply noise,
it's audio dropouts due to lack of oomph for sure. I'm not doing any
resampling. I think I just need to increase performance a bit to fix
it. I'm working on slimming down the 3.1.0 kernel I'm using. Should
switching to 3.2 or 3.6 increase performance?
Then hope your usb device will still work! As some do, some don't..
Robert could you elaborate on that please ? I saw the patch comments and
they didn't have much info.
For example I've been using USB (with DMA on your Kernel) with 3G HSPA+
modems moving about 10-12Mbps download rates and haven't had any problem.
But most USB Wifi adapters I've tried are as stable as a ball (but that
could be related to other stuff since on Angstrom I saw the same and it
seems Angstrom kernel disables DMA).
I'm even now with your 3.2.28 kernel in preempt mode (not PREEMPT_RT) and
haven't had any issues besides Ethernet needs an extra ifup/ifdown after
boot (but I it seems to be related to last wheezy ARMHF stuff).
I tried CONFIG_PREEMPT and neither USB nor ethernet would work. Maybe
I needed to do a ifup/ifdown for ethernet. USB wouldn't even provide
power to the USB sound card. With CONFIG_VOLUNTARY_PREEMPT, ethernet
worked, but still not USB. This is on 3.1.0.
The USB DMA "bugs" and PREEMPT are big questions for me, specially on
PREEMPT there is little info saying why isn't recommended.
Right now, there's no info, since we can't really say one way or
another... There's a group of devices that usb/dma works just fine and
there's another group of devices where it doesn't (and thus disabling
it makes it work.).. My feeling, leave it enabled, as it should by
it's nature "dma" give your cpu more free cycles to do other things..