Home Computer Audio Asylum

Music servers and other computer based digital audio technologies.

RE: It's not a simple matter

The situation is more complex than your understanding. There are (at least) the following clocks operating

In the USB 2.0 class 2 async audio computer:

1. A USB frame clock that dispatches a USB frame every 8 kHz.
2. A USB bit clock that times the sending of the bits that compose a USB frame (480 MBPS, typically generated by a frequency multiplier off a lower speed crystal)

In the DAC:

3. A USB receiver clock, used to receive the incoming bits of a packet (480 MBPS, typically kept phase locked to the USB transmit clock so that the bits of the packet can be received)
4. An audio clock running at the sample rate used to time the switching circuits that generate the analog output.

There is also control logic associated with the USB receiver circuitry and the DAC circuitry, and these may involve additional clocks. It is possible to design the DAC so that all of the control circuitry is synchronous with a single master clock, but my suspicion is that most DACs have separate clocks for these sections.

Packets are received by the DAC at (more or less) the time they are transmitted, which will depend on the timing at the computer and the transmission time over the wire. In addition, there will variable delay at the receiver, involving synchronizing the receiver clock with the bits coming in and this may depend on the relative timing and frequency of the computer and receiver bit clocks as well as the signal amplitude. At some point, the receive will recognize the start of packet and will begin accumulating data bits in the USB packet and later, the end of packet. The timing of the end of packet will depend timing of the packet start by the computer and the number of bits in the packet which depends on the audio data. At the end of packet the DAC receiver logic will verify that the packet was correctly received (CRC check passed) and then some number of audio samples are available for playback in a buffer.

Clocking of data out of the buffer is controlled by a clock that should be synchronous with the audio sample clock, ideally isolated from it. (But this may not be the case in some designs.) Because the computer 8 kHz clock is asynchronous with the DACs audio master clock a feedback mechanism is invoked. This allows the DAC to control the number of audio samples in the packets it will be getting. This enables the receiver circuits in the DAC to control the buffer load, preventing underflow or overflow despite a rate difference between the computer and DAC clocks.

In no case does the DAC control the rate at which the clocks in the computer operate.


My experience has been that most computer programmers do not understand the details of hardware clocking, even those who design I/O drivers. Furthermore my experience has been that most hardware designers do not understand the operation of systems involving multiple clocks that operate asynchronously, especially when these are connected by wires that may have noise on them. If you find my explanation difficult to understand, then it is quite possible that (1) you do not have sufficient understanding of how these types of systems really work, or (2) I made a mistake in these posts, which is likely due to the length and complexity of the USB specifications, or (3) this system is too complex for me to have a complete and accurate understanding. :-)

If I had to allocate budget for a USB DAC, I would allocate all of my budget for the DAC, buying the cheapest possible streamer, and spending all of my money on the DAC, including the best possible clocking architecture, clock circuitry, power supplies, USB receiver circuitry and isolation circuitry that attempts complete separation of the USB receiver circuitry from the actual DAC portions.


Tony Lauck

"Diversity is the law of nature; no two entities in this universe are uniform." - P.R. Sarkar


This post is made possible by the generous support of people like you and our sponsors:
  McShane Design  


Follow Ups Full Thread
Follow Ups

FAQ

Post a Message!

Forgot Password?
Moniker (Username):
Password (Optional):
  Remember my Moniker & Password  (What's this?)    Eat Me
E-Mail (Optional):
Subject:
Message:   (Posts are subject to Content Rules)
Optional Link URL:
Optional Link Title:
Optional Image URL:
Upload Image:
E-mail Replies:  Automagically notify you when someone responds.