24.6.198.63
In Reply to: RE: USB and clocks posted by kgiessler on May 27, 2007 at 15:30:49
Unfortunately its complicated. The official USB audio spec does not do things this way, although there IS a mode which has the same result, but is very rarely implemented. That is not to say what you mention cannot be done, its just not an official USB spec. The EMU 0404 USB device does exactly what you are talking about, but as far as I can tell they had to write their own drivers to support their own protocol.
Here is a quick primer on USB modes, otherwise known as more than you ever wanted to know about audio and USB.
Audio data is sent using a scheme called isochronous transfer, ALL of the official USB audio modes use this. Do NOT get this confused with asynchronous, they are not directly related. In isochronous transfer the bandwidth for an audio stream is reserved on the bus. The host sends out evenly spaced packets at the appropriate rate for the audio type and sample rate agreed upon between the host and DAC. There is no synchronization, the data keeps on coming no matter what, the receiving end does not acknowledge anything or request anything, it just keeps coming. There is no error correction (since there is no way to say resend) but there IS error detection, but its pretty much useless because all the receiver can do is turn on a light when it happens. The HOST is in control of the timing.
The first mode is synchronous mode. With this there is a PLL in the receiver that is directly connected to the USB data stream, this PLL recovers the clock. This is very simple and cheap to implement but has problems, it won't work with 44.1 sample rate and its very sensitive to jitter on the USB data lines (which is terrible). In the early days of USB audio there were a lot of these around, and they sounded terrible, fortunately there aren't too many of these left.
The second mode is called adaptive. In this case there is a separate crystal oscillator in the receiver that drives a PLL based frequency synthesizer which actually generates the clock used to clock out the data. There is either hardware or software that checks the average data rate of the incomming data and changes the frequency of the synthesizer as needed to keep the internal FIFO about half full. So you have the jitter of the oscillator and the PLL in this case, which if done right can actually be quite low, but still is going to be in the 50-100ps range in most cases for the best implementations. Most USB audio devices today use adaptive mode, it is by far the most supported mode in USB chips.
The third mode is asynchronous. (note this is still isochronous, a LOT of people have the idea that asynchronous and isochronous are opposites, this is not true, asynchronous mode is still isochronous) This is the one mode where an external clock is used "as is" to clock out the data. When the internal FIFO starts getting full or empty the receiver sends a packet to the HOST telling it to speed up or slow down the data rate so the FIFO does not under/over flow. Properly implemented this could be extremely low jitter. But there is a problem, nobody makes a USB chip that implements this mode out of the box.
There are a couple chips that include USB tranceivers and processors that CAN be programmed to implement this mode, but its neither easy or cheap to do so. I only know of one person that has been succesful at doing this. I tried for several months and finally gave up in disgust. The large companies that have the resources to do this don't care, and the high end companies that do want to do this are too small to make it worth while.
So the net effect is you won't find any asynchronous mode high end USB DACs at this point. If you search here a bit you can find some posts from Gordon where he goes over some of the trials and tribulations he went through trying to make this work. He did get it to work, but he found problems in some OS drivers so I don't think he has actually implemented it in a product.
As I mentioned at the top the EMU 0404 USB is an interesting case. It does implement exactly what you describe using USB 2.0. But the DAC and analog circuitry are not the best on the planet. For a DIY type this would make a very interesting platform to play around with. It also has another interesting aspect, it can synch to an external S/PDIF stream, so it is possible to make a DAC that has a local super low jitter clock, sends out a blank S/PDIF stream, the 0404 synchs to this and sends out a S/PDIF stream synchronized to the DAC, which reclocks the data using its clock. I don't know of any one making a commercial DAC that does this, but its certainly quite easy to do so there might be some models that can do this. This would not take any modification to the 0404.
I hope this makes some sense.
John S.
Follow Ups: