many (16+) channels streaming over usb audio 2.0?

If you have a simple question and just want an answer.
Post Reply
mlrogers
New User
Posts: 3
Joined: Fri Jan 29, 2016 2:28 am

many (16+) channels streaming over usb audio 2.0?

Post by mlrogers »

I'm new to XMOS, and usb audio 2.0, but not new to hardware or software engineering. My current need is to stream lots of audio channels (hopefully over USB), output only (so no recording needed, just DACs). I'm wondering about the xCORE-200 eXplorerKIT for getting started, but obviously I would like to know if what I want to do is possible with this hardware (I guess that means the XEF216-512-TQ128 in this case). 

Or are there some more ports I can connect to and configure as more I2S channels on the xCore-200 Multichannel Audio Platform Board?

A couple of questions:

I've been digging in the I2S/TDM Library documentation a bit (just found it about an hour ago) - it says I can have 32 channels in and 32 out, but it doesn't say (or I didn't find that part yet) if they can all be I2S or if I have to mix it with TDM. Tables 3 and 4 seem to imply that I can go no higher than 8 audio channels (so 4 I2S channels) per logical core. Can I (must I) do all 32 using 4 cores?

Does USB Audio 2.0 allow for so many channels to stream? I know 8 will show up on my Mac and linux boxes magically when I plug an 8-channel audio device into the USB port - is there a limit built into USB Audio 2.0?

Thanks in advance -

Michael



Guest

Post by Guest »

This is one of the more useful documents on USB 2 audio class. (Apple TN2274). Go to the "Maximum Packet Size" section for your answer

https://developer.apple.com/library/mac ... 1-TNTAG8_1
mlrogers
New User
Posts: 3
Joined: Fri Jan 29, 2016 2:28 am

Post by mlrogers »

Thanks, I've bookmarked that page. There is easily enough bandwidth to do what I want (32 channels at 48K, 24b --> gets me 616 Bytes/packet, async or adaptive). I pretty much thought it would be able to handle the throughput. So does the spec give you as many channels as you can fit into the bandwidth? Or does it impose a limit?

Also, I'm still hoping to find out if the xCore-200 can do that many I2S channels (32).

Thanks
Guest

Post by Guest »

You're on the right track. We run 8 channels of 192k 32b - no problem. I'm not sure whether all host drivers are happy to make 24b samples in USB 2 - but maybe not a problem.
The other challenge - getting 32 channels of data out of the XMOS. TDM interface vs IIS?
mlrogers
New User
Posts: 3
Joined: Fri Jan 29, 2016 2:28 am

Post by mlrogers »

TDM vs IIs - It seems (from the XMOS docs) that the I2S/TDM library can produce 4 TDM streams (each with 4 channels/frame - so 16 audio channels), or 2 streams with 8 channels/frame from a single 62.5MHz core, at 48kHz and 32b, so I will guess that I can task 2 cores and get 32 channels of up to 32b samples at 48kHz (As far as I can tell , the channels are always 32b, an they just fill the unused with trailing zeros). But it also says it can do the same with input streams (unclear if it can do that simultaneously), so I wonder if it can do all output and no input and I could get a full 32 channels per core.

From that, I would say TDM is worth exploring.

| ' I'm not sure whether all host drivers are happy to make 24b samples in USB 2 - but maybe not a problem'

-> Do you think it's because it might not want to push that much data, or because 24b is a weird number for it? Even at 32b samples, we're still looking at only 808 Bytes/packet. Max packet size for 'high speed' USB 2 is 1024, so we're good there.

I guess it's time to order a board and jump down the rabbit hole!
CalebRoberts
Junior Member
Posts: 4
Joined: Wed Feb 03, 2016 10:20 pm

Post by CalebRoberts »

mlrogers wrote: | ' I'm not sure whether all host drivers are happy to make 24b samples in USB 2 - but maybe not a problem'

-> Do you think it's because it might not want to push that much data, or because 24b is a weird number for it? Even at 32b samples, we're still looking at only 808 Bytes/packet. Max packet size for 'high speed' USB 2 is 1024, so we're good there.

There may be no host driver issues with 24 bit format.
24b is weird but maybe no problem. All U2 implementations I've see use 32 bits. Reorganizing 24 bits into 32 bit words is a hassle and costs cycles. The code is there to handle it though.
Post Reply