S/PDIF

Sony/Philips Digital Interconnect Format is essentially a minor modification of the original AES/EBU standard for consumer use.

 

It has become the digital equivalent of the analogue RCA connection, in fact it often uses the same RCA connectors.

It is one way communication (unidirectional) from a transmitter to a receiver.

 

By definition electrical signal transmission is analogue, that’s the way electricity works.
Transmitting analogue audio is sending a voltage that fluctuates over time.
Transmitting digital audio over SPDIF is sending bits at a certain sample rate.

 

The audio signal is send as bits so we are not interested in having the exact analogue signal at the receiver but only in detecting the bits correctly, the logical 1 and 0.
This is a very robust technology, so bit perfect transmission is relatively easy to obtain.
If this wasn't the case, internet banking would be far more exiting.
If bit perfect transmission fails us, it is in general clearly audible because bit flipping translates into clicks and  pops.

 

The time base is derived from the speed the bits are pouring in.
This speed is generated by a clock so fully analogue.

Any fluctuation in clock speed is a fluctuation in sample rate, that’s what we call jitter.

 

As there is no perfect clock, there will always be some jitter. But if these fluctuations become to high, they will rise above audible threshold. Opinions about this threshold varies, some say that anything below the 200 ns is not audible, others say that depending on the architecture of the DAC and the use of  upsampling, a value as incredibly low as 20 ps is required.

 

SPDIF is a stone age protocol, the signal is digital, the time base is analogue and therefore sensitive to disturbances in the analogue domain.

Word length

SPDIF allows for 24 bit words.
Add a pea-amble and a couple of status bits including a parity bit and you have a 32 bit word for each channel

Biphase Mark Code

Suppose there is a long passage filled with silence.
All zeros so 0 V on the line.
How could the receiver distinguish this from no signal?
How could the receiver detect the sample rate?
It might even be interpreted as DC!

 

Source: Micah Elizabeth Scott [2]

 

Bihase Mark Code is the trick to generate a signal that changes even if we send a bunch of zero’s. A zero bit is encoded by a transition followed by a non-transition, whereas a one bit turns into two transitions.
As a consequence the bit rate doubles.

 

Sample rate 44100 Hz
Word length 32 Bit
Channels 2 Stereo
biphase-mark-code 2 per bit
Frequency 5644800 Hz (SR*Bit*Channel* biphase)

A SPDIF doing 2 channel stereo at 44.1 kHz runs at 5.6 MHz.

 

References

  1. SPDIF - ePanorama.net
  2. S/PDIF Digital Audio on a Microcontroller - Micah Elizabeth Scott
  3. SPDIF - Hardware Book
  4. Is the AES/EBU S/PDIF digital audio interface flawed? - Malcolm Omar Hawksford, Chris Dunn - AES 1992