USB versus SPDIF

Resolution

A lot of people think USB audio is limited to 16 bits/48 kHz max.
A lot of (cheap and sometimes not so cheap) USB DACs are indeed limited to this resolution.

This is because the manufacturer decided to use a simple and cheap of the shelf hardware solution.

Another common misunderstanding is the specification of the bus (USB 1,2 or 3) and the USB audio standard (1 or 2).

USB Audio Class 1 standard (1998)

This standard allows for 24 bits/96 kHz max.
The standard itself doesn't impose any limitation on sample rate.
Class 1 is tied to USB 1 Full Speed = 12 MHz


Every millisecond a package is send.
Maximum package size is 1024 bytes.

2 channel * 24 bit * 96000 Hz sample rate= 4608000 bits/s or 576 Byte/ms
This fits in the 1024 byte limit.
Any higher popular sample rate e.g. 176 kHz needs 1056 bytes so in excess of the maximum package size.

 

All operating systems (Win, OSX, and Linux) support USB Audio Class 1 natively.
This means you donít need to install drivers, it is plug&play.
All support 2 channel audio with 24 bit words and 96 kHz sample rate

USB Audio Class 2 standard (2009)

It is downwards compatible with class 1.
USB Audio Class 2 additionally supports 32 bit and all common sample rates > 96 kHz
Class 2 uses High Speed (480 MHz). This requires USB 2 or 3.
As the data rate of High Speed is 40 X Full speed, recording a 60 channel using 24 bits at 96 kHz †(132 Mbit/s) is not a problem.

From mid-2010 on USB audio class 2 drivers are available in OSX 10.6.4 and Linux.
Both support sample rates up to 384 kHz.
It is unclear if Microsoft is going to support USB Audio 2.
You need a third party USB class 2 driver on Windows.

Companies like Thesycon or Centrance have developed  a USB Class 2 Audio driver for Windows.

Using High Speed USB for playback †there are no limits in resolution.

SPDIF

SPDIF allows 20 bits, optional 24 bits audio and the sample rate could be as high as 192 kHz.

Jitter

The send rate of the SPDIF bus is used to generate the sample rate.
SPDIF is real time; any fluctuation in the clock of the sender translates into input jitter.

 

USB in isochronous mode (used for audio) runs at a fixed rate.
Frames are send to the receiver.
These frames contain a variable amount of data.
USB is quasi real time as the data is send in discrete packages with the frame rate of the bus (12 MHz or 480 MHz ) but the total amount of data send is proportional to the sample rate.

 

In adaptive mode the sample rate is guessed from the rate the data is pouring in.
The DAC has to adapt its speed to the sender to avoid buffer over/under run.

In asynchronous mode the DAC tells the PC how many data to send.
This allows for using a fixed clock at the DAC.

By design asynchronous USB allows for an implementation with a very low intrinsic jitter.

Error correction

Both protocols are unidirectional, the sender starts sending and when an error occurs, no retry is possible.
Isochronous USB does have an error detection mechanism (CRC), but no retry or guarantee of delivery.

Sound quality

There are high quality implementations of SPDIF.
Small wonder from the 80's on audio industry had the time to optimize the product.
However a PC might have a SPDIF header but probably not one of the highest possible quality.

 

The advantage of asynchronous USB is that due to this protocol the DAC is independent of the source as far as the timing is concerned. This allows for using a high quality fixed clock inside the DAC. Often asynchronous USB is combined with other measures like galvanic isolation to shield the DAC as much as possible from the electrical noise of the PC.

 

Technically both SPDIF and USB are capable of bit perfect transmission with low jitter.
As usual the result will be dependent on the implementation.

 

Measurements

Jim Lesurf measured the digital out of 2 PCs and a USB DAC

Fig1.gif - 40Kb


This is the references signal.

Fig2.gif - 40Kb

SPDIF over coax
The onboard SPDIF of this PC is pretty good, the distortion is low.


Fig4.gif - 44Kb


SPDIF over optical
According to Jim the heavy distortion is due to a badly implemented sample rate conversion from 44.1 to 48.

Fig5.gif - 40Kb


USB
Using an outboard USB DAC gives a signal almost identical to the reference.

Recording the SPDIF out of the DAC proved the signal to be bit perfect.

 

Archimago did a J-test (16/44) using different protocols.

USB adaptive mode

USB asynchronous mode

Optical (Toslink)

 

Thes test where done running CPU and GNU at 100%.

Adaptive mode is the worse with its noise and a nasty spike close to 15 kHz.

Asynchronous USB performs much better.

The Toslink is almost identical to asynchronous USB.

 

Be design all this measurements are valid for the implementations tested.
You can’t generalize and call the results as being valid for all possible SPDIF or USB implementations.

References

Sound (Linux) Computing - Jim Lesurf (2009)

MEASUREMENTS: Adaptive AUNE X1, Asynchronous "Breeze Audio" CM6631A USB, and Jitter - Archimago's Musings (March 2013)