The XMOS Support Board is closed to further postings.

Please visit our XCore Exchange community for questions & answers, technical discussions and interesting projects

Alternatively, if you have a bug to report or a sales enquiry please visit our support page for the best way to contact us.

USB 2.0 Audio: How many channels?

Discuss questions related to our reference designs here e.g. USB Audio 2.0, AVB, iPod/iPhone Digital Dock, XAI Multichannel Audio Interface

USB 2.0 Audio: How many channels?

Postby NeoY2k_xmoslinkers » Tue, Jan 12 2010 15:29:47

Hello everyone!
I may have a project using xmos chips. But I'd like to know: how many channels of audio can travel over the USB 2.0 Audio?

I can't find any info on it. There is info on how many channels of AVB you can get using different interfaces (iis, spdif) etc on xmos' website, but I can't find a clear answer about usb audio 2.0.
I heard that several cards could be connected to increase the channel count too under macos 10.6.

Thank you :)

(lilltroll, I see you already dug the subject quite a lot, I read your posts, but didn't found the answer to this question).
NeoY2k_xmoslinkers
 
Posts: 5
Joined: Tue, Jan 12 2010 15:14:34

Re: USB 2.0 Audio: How many channels?

Postby vanjast_xmoslinkers » Tue, Jan 12 2010 20:42:58

Well, I'm busy looking at buying a surround sound 7.1 USB headset.. so I'd imagine you can get many channels over USB2.
I'd imagine is also depends on which codec methods you use, and the quality of sound you require.

It's possible there is no clear cut answer, and you might have to go through protracted hypothetical excercises of trying different methods and hardware to use.
:shock:
vanjast_xmoslinkers
 
Posts: 29
Joined: Thu, May 28 2009 18:41:28

Re: USB 2.0 Audio: How many channels?

Postby ross » Tue, Jan 12 2010 23:44:17

Bear with me, there isn't really an easy answer...

A standard hi-speed isochronous Endpoint can handle a packet up to 1024 bytes in size per 125uS

If we assume a sample size of 32bits (four bytes) then this equates to 10 channels at 192kHz.

So, simultaneous 10 in and 10 out at 192kHz using a input and output endpoint.

If you use synchronous mode, channel-count/freq is linear (so 20 channels at 96kHz), slightly less for asynchronous mode.

The spec also supports "high-bandwith" isochronous endpoints which allow up to three transactions per micro-frame (125uS).
ross
 
Posts: 303
Joined: Tue, Aug 12 2008 10:12:46
Location: Bristol

Re: USB 2.0 Audio: How many channels?

Postby Sam_xmoslinkers » Wed, Jan 13 2010 7:44:15

Ross wrote:So, simultaneous 10 in and 10 out at 192kHz using a input and output endpoint.


What size of device is needed to hit this Ross?
Sam_xmoslinkers
 
Posts: 178
Joined: Tue, Aug 12 2008 10:12:53
Location: Bristol, UK

Re: USB 2.0 Audio: How many channels?

Postby lilltroll_xmoslinkers » Thu, Jan 14 2010 21:18:23

NeoY2k: For the moment I have a full struggle with stereo, since I'm not from computer science; but even I have manage to make a framework to run without glitches now.
lilltroll_xmoslinkers
 
Posts: 30
Joined: Mon, Oct 26 2009 9:26:42
Location: Sweden, Eskilstuna

Re: USB 2.0 Audio: How many channels?

Postby ross » Fri, Jan 15 2010 11:37:50

Sam wrote:What size of device is needed to hit this Ross?


Again, quite hard to quantify given different requirements and features such as additional I/O for MIDI, user controls/interface, DSP functions, mixing requirements and other audio I/O interfaces (S/PDIF, ADAT etc).

A 10 in/out device would conformable fit on a L2.
ross
 
Posts: 303
Joined: Tue, Aug 12 2008 10:12:46
Location: Bristol

Re: USB 2.0 Audio: How many channels?

Postby NeoY2k_xmoslinkers » Fri, Jan 15 2010 16:07:36

Thank you very much, and sorry for the late reply.

So it is feasible, from an "hardware" point of view.

Thinking of the standard "USB audio 2.0"; I thought there was a limit there too, on the computer implementation. Have you heard about any channel count limit? (on OSX).

Would you clarify what is an "isochronous asynchronous" vs "isochronous synchronous"? I don't get it... I thought it was either isochronous, or asynchronous, or synchronous. I must admit I never did anything usb/firewire... before!

For the XMOS size, I'll start with a G4 demo board anyway, if it happens I can fit it in an l2 then fine, if I need bigger, no big deal, these chips are cheap and flexible...
Do you think I'd better buy the "USB Audio 2.0" eval board? If I take the G4 eval board, I'll have all the processing I need, ok no onboard converter but using outboard ones shouldn't cost me much. But having a fully working example on hand, of course, would be handy. If it saves me 2 days, I won't buy it, but if it saves me 2 weeks, not the same!

Lilltroll, I don't come from computer engineering neither... I'm a sound op, but I come from electronics university - I did µC in C before, and stuff like that (VHDL...). So I think getting things done under XMOS may need some time to adapt (and I'll probably ask you a few questions to overcome probably the same problems you had before xD), but programming isn't new to me, so that's fine. (as long as you don't ask me to do DSP on a non-DSP old µC without any DSP instructions. Two weeks to make a lowpass filter >_< ).

I guess, the next step is "just try to make it work, and come out with the result". Ok, I'll buy it xD

Thank you
Nicolas
NeoY2k_xmoslinkers
 
Posts: 5
Joined: Tue, Jan 12 2010 15:14:34

Re: USB 2.0 Audio: How many channels?

Postby ross » Sat, Jan 16 2010 18:59:47

NeoY2k wrote:Thank you very much, and sorry for the late reply.

So it is feasible, from an "hardware" point of view.


No problem, just had a quick read through your posts and your posts don't seem to mention what sort of configuration you are trying to achieve?

NeoY2k wrote:Thinking of the standard "USB audio 2.0"; I thought there was a limit there too, on the computer implementation. Have you heard about any channel count limit? (on OSX).


The current OSX driver can deal with 1 transaction (1024 bytes) per microframe (125uS). The spec allows for 3.

NeoY2k wrote:Would you clarify what is an "isochronous asynchronous" vs "isochronous synchronous"? I don't get it... I thought it was either isochronous, or asynchronous, or synchronous. I must admit I never did anything usb/firewire... before!


There are four types of transactions in the USB spec: Bulk, Control, Isochronous and Interrupt. All audio transactions use isochronous transactions. On top of this is the synchronisation employed: Synchronous means the device is synchronised to the host clock. Asynchronous means the device runs on its own clock (and reports rate to the host).

NeoY2k wrote:For the XMOS size, I'll start with a G4 demo board anyway, if it happens I can fit it in an l2 then fine, if I need bigger, no big deal, these chips are cheap and flexible...
Do you think I'd better buy the "USB Audio 2.0" eval board? If I take the G4 eval board, I'll have all the processing I need, ok no onboard converter but using outboard ones shouldn't cost me much. But having a fully working example on hand, of course, would be handy. If it saves me 2 days, I won't buy it, but if it saves me 2 weeks, not the same!


What sort of configuration are you ultimately looking to design for?

Hope this helps to clear a few things up :)
ross
 
Posts: 303
Joined: Tue, Aug 12 2008 10:12:46
Location: Bristol

Re: USB 2.0 Audio: How many channels?

Postby NeoY2k_xmoslinkers » Sun, Jan 17 2010 10:58:33

Ok! Thank you very much again :)

I'm looking at doing something with ADAT. The most channels I can stuff in it, the best :)

Needs:
- As many I/O as possible
- Low latency
- Low jitter

Too bad OSX doesn't support the 3 transactions as in specs. Hope it will evolve!

Your answers really clarify the situation :) I never found any info about it before O_o.

However, I still don't fully get the the isochronous async/sync stuff - despite searching for it.
What I understand is that the isochronous mode is a kind of digital PLL: one of the two units will slave it's clock to the other. So each have nearly the same frequency, with a nearly constant phase relationship. A buffer accounts for these "nearly". That's for asynchronous.

But then what exactly means asynchronous or synchronous?
Does it just refers to the master of the isochronous timing, synchronous meaning the master is the host, asynchronous the xmos? These both still look like synchronous to me.

Or does synchronous means synchronous (whichever is the master) in that the data stream is unaltered, and you rely on the isochronous performance not to loose sync/provide on spec jitter performance, while asynchronous means connected devices will use asynchronous reclocking to handle timing irregularities of isochronous flux by recreating data stream in the new clock domain?

I heard about your chips as the only ones providing asynchronous audio (I mean, Centrance is a joke, just from the functionality and price point - more than 3 times the HDMI licensing. TI chips are fine if you have a full dev team, but more limited anyway).

But I think this asynchronous obsession is way overrated. More than asynchronous, what was really awaited was to move the timing master out of the computer. Because you can always buffer between the computer and the usb interface (you'll get more latency), but you're not allowed a lot of jitter on the audio interface to preserve full resolution (or even loose sync). Relying on the computer to output the clock (as USB 1.0 audio did, with 1ms bursts (as long as I remember) and several ns jitter, varying with each computer/motherboard/usb chip/power supply) isn't exactly a reliable way to clock equipments. And adding a PLL on the audio interface is no big deal, but as my goal is to do something like 32*32, I can't imagine a brigade of PLLs xD.

I'm reading again your documents now with better understanding - hope I won't have wasted your time with such basic questions.

Thank you,
Nicolas :)
NeoY2k_xmoslinkers
 
Posts: 5
Joined: Tue, Jan 12 2010 15:14:34

Re: USB 2.0 Audio: How many channels?

Postby ross » Mon, Jan 18 2010 21:12:11

NeoY2k wrote:Ok! Thank you very much again :)

I'm looking at doing something with ADAT. The most channels I can stuff in it, the best :)



No problem. Regarding ADAT, will you be limiting the device to 48kHz then?

NeoY2k wrote:Needs:
- As many I/O as possible
- Low latency
- Low jitter

You're in the right place ;-)

NeoY2k wrote:Too bad OSX doesn't support the 3 transactions as in specs. Hope it will evolve!

Your answers really clarify the situation :) I never found any info about it before O_o.

However, I still don't fully get the the isochronous async/sync stuff - despite searching for it.
What I understand is that the isochronous mode is a kind of digital PLL: one of the two units will slave it's clock to the other. So each have nearly the same frequency, with a nearly constant phase relationship. A buffer accounts for these "nearly". That's for asynchronous.

But then what exactly means asynchronous or synchronous?
Does it just refers to the master of the isochronous timing, synchronous meaning the master is the host, asynchronous the xmos? These both still look like synchronous to me.

.....



No, your understanding is incorrect. Isochronous transfers have nothing to do with the synchronisation method used. I think it would be a good idea to have a quick read of the USB 2.0 Spec (available from usb.org) around section 5.12.3 (page 71) to clarify your understanding.

:D
ross
 
Posts: 303
Joined: Tue, Aug 12 2008 10:12:46
Location: Bristol

Re: USB 2.0 Audio: How many channels?

Postby ross » Sun, Jan 24 2010 0:03:31

You okay now Nicolas?
ross
 
Posts: 303
Joined: Tue, Aug 12 2008 10:12:46
Location: Bristol

Re: USB 2.0 Audio: How many channels?

Postby NeoY2k_xmoslinkers » Thu, Feb 11 2010 19:49:19

Sorry I havent replied before - was on other projects that took me way too much time - though not totally unrelated with this one.
Thank you very much for pointing me to the right chapter of the USB specs. Everything is clearer now!

I'll be buying eval boards soon, I have optical receiver/transmitters shipping from Mouser. I'll let you know how things are going!

BTW, how can I get access to the USB Audio 2.0 source code? I understood the binary was downloadable, but the source was restricted under NDA. Could you send me this NDA form?

Thank you very much again,
Nicolas
NeoY2k_xmoslinkers
 
Posts: 5
Joined: Tue, Jan 12 2010 15:14:34

Re: USB 2.0 Audio: How many channels?

Postby ross » Fri, Feb 12 2010 13:26:45

NeoY2k wrote:
BTW, how can I get access to the USB Audio 2.0 source code? I understood the binary was downloadable, but the source was restricted under NDA. Could you send me this NDA form?


You need to make an official request via the support ticketing system at xmos.com to get this form.

Cheers
ross
 
Posts: 303
Joined: Tue, Aug 12 2008 10:12:46
Location: Bristol

Re: USB 2.0 Audio: How many channels?

Postby NeoY2k_xmoslinkers » Tue, Feb 16 2010 23:22:00

Ok, will do so when ordering the eval board.
Thank you :)
NeoY2k_xmoslinkers
 
Posts: 5
Joined: Tue, Jan 12 2010 15:14:34


Return to Reference Design Kits


cron