chect
Posts: 1
Joined: Tue Jun 09, 2015 12:36 am

16 audio streams possible over USB/SATA?

Tue Jun 09, 2015 12:55 am

Finally dipping my feet into the ARM world and have an idea for a pretty interesting project but it hinges on being able to stream audio from 8-16 separate files (8 streams, stereo, is ideal, so 16 total). The plan is to just use 16/44.1 but it would help to double the sample rate if possible since we may end up doing some DSP that would benefit from the higher sample rate (I know you really can't tell the difference coming out of speakers).

From my calculations 16 streams * 16 bits * 44100kHz = 1128960bps/10000000 = 11.3Mbps. Double that to 22.6 if we use 88.2kHz, slightly more if we go 96kHz

Since they will be streaming from separate files and I want to work off of small packets it will be pretty much worst case scenario for data reads. I've been looking at USB 3.0 flash drive benchmarks on tomshardware.com and for a 4kb random read it goes almost 20MB for a decent flash drive. I figure that's more than enough. Ideally I could stream all this off a single flash drive and avoid SATA entirely (which looks like it adds some serious complexity and a more advanced chip). Seems like that's a possibility.

What I don't know is how much the chip influences this bandwidth benchmark. Obviously I'll have to get a couple dev boards to verify that this would work but I was wondering how I should go about figuring this out? Is there any code that would be a good place to start? Seems simple to do a single audio stream but multiple sample playback gets messy.

Looks like it wouldn't work with the USB 2.0 ports on the pi, but maybe a separate USB 3.0 chip streaming the data to then be processed? Or maybe there's a better board available like the banana pi project.

Thanks!

drgeoff
Posts: 10676
Joined: Wed Jan 25, 2012 6:39 pm

Re: 16 audio streams possible over USB/SATA?

Tue Jun 09, 2015 8:31 am

12 Mbit/s ought to be within the capabilities of the USB on RPi but you need to ensure the CPU is not too bogged down doing other things.

There isn't really any feasible way of adding a USB3 interface chip to a RPi and realising the potential higher speed.

jboyer43
Posts: 10
Joined: Mon Jun 08, 2015 3:48 pm
Location: Canada

Re: 16 audio streams possible over USB/SATA?

Tue Jun 09, 2015 2:09 pm

drgeoff wrote:12 Mbit/s ought to be within the capabilities of the USB on RPi but you need to ensure the CPU is not too bogged down doing other things.

There isn't really any feasible way of adding a USB3 interface chip to a RPi and realising the potential higher speed.
Newbie question: does this mean that the ARM I/O cannot support faster speeds; or that the PI system cannot het a HAT offering USB 3? Is it worthwhile, anyway?
Jerome

Return to “Beginners”