S/PDIF

From HwB

(Difference between revisions)
(Reverting: Simple vandalism)
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
{{todo}}
+
''S/PDIF = Sony/Philips Digital Interface Format'' (a.k.a SPDIF)
''S/PDIF = Sony/Philips Digital Interface Format''
+
  
 
An interface for digital audio.
 
An interface for digital audio.
Line 12: Line 11:
 
because this is the only way to keep the signal quality. To make this
 
because this is the only way to keep the signal quality. To make this
 
possible different devices must be able communicate with one another
 
possible different devices must be able communicate with one another
within the digital domain. Several interfaces exist to perform such tasks,
+
within the digital domain.
from which one has grown to the audio standard worldwide:
+
 
IEC 60958-3:2006 from the EBU.
+
S/PDIF is the consumer version of [[AES/EBU]] professional digital audio interface.
In Japan an equivalent EIAJ CP-340 1987-9 is standard.
+
 
 +
S/PDIF is described in IEC 60958-3:2006. In Japan the equivalent standard is JEITA CPR-1205.
  
 
== Characteristics ==
 
== Characteristics ==
  
Standard IEC 60958 "Digital audio interface" from EBU (European Broadcasting Union) details:
+
IEC 60958-3 specifies up to 768 kHz sampling frequency.
  
* Audio format : linear 16 bit default, up to 24 bit expandable
+
Signal bitrate:
* Allowed sampling frequencies (Fs) of the audio:
+
{| {{border}}
** 44.1kHz from CD
+
! Bitrate !! Fs       !! Usage
** 48 kHz from DAT
+
|-
** 32 kHz from DSR
+
| 2 MHz  || 32 kHz   || DSR (Digital Satellite Receiver)
* One way communication: from a transmitter to a receiver.
+
|-
* Control information:
+
| 2.8 MHz || 44.1 kHz || CD
** V (validity) bit : indicates if audio sample is valid.
+
|-
** U (user) bit : user free coding i.e. running time song, track number.
+
| 3.1 MHz || 48 kHz  || DAT
** C (channel status) bit : emphasis, sampling rate and copy permit.
+
|}
** P (parity) bit : error detection bit to check for good reception.
+
* Coding format: biphase mark except the headers (preambles), for sync purposes.
+
* Bandwidth occupation : 100kHz up to 6Mhz (no DC!)
+
* Signal bitrate is 2.8Mhz (Fs=44.1kHz), 2Mhz (Fs=32kHz) and 3.1Mhz (Fs=48kHz).
+
  
Physical connection:
+
Resolution: up to 24 bits PCM.
  
* Cable: 75&Omega; /-5% (l<10m) or 75&Omega; /-35% (l<10m)
+
Audio can be sent encoded as DTS/AC-3/ATRAC/AAC/MPEG-2 instead of PCM.
* Line driver:
+
** Zout: 75&Omega; /-20% (100kHz .. 6Mhz)
+
** Vout: 0.4Vpp .. 0.6Vpp, <0.05Vdc (75&Omega; terminated)
+
* Line receiver:
+
** Zin: 75&Omega; /-5%
+
** Vin: 0.2Vpp .. 0.6Vpp
+
  
 
== The interface ==
 
== The interface ==
  
IEC 60958-2 is a newer standard which supersedes AES/EBU and also S-PDIF. The S/PDIF interface (IEC 60958-2) is a 'consumer' version of the AES/EBU-interface. The two formats are quite compatible with each other, differing only in the subcode information and connector. The professional format subcode contains ASCII strings for source and destination identification, whereas the commercial format carries the SCMS.
+
There is three different types of S/PDIF connection:
 
+
* Phono connector (electrical)
Here is a short comparison table of AES/EBU and S/PDIF interfaces:
+
* TOSLINK connector (optical)
 +
* TTL
  
 
{| {{border}}
 
{| {{border}}
!                          !! AES/EBU                  !! S/PDIF (IEC 60958)
+
!                          !! colspan="3" | S/PDIF (IEC 60958-3)
 
|-
 
|-
| Cabling                  || 110 &Omega; shielded TP  || 75 &Omega; coaxial or fiber
+
| Connector                || Phono                      || TOSLINK                    || Non-standard
 
|-
 
|-
| Connector               || 3-pin XLR                || RCA (or BNC)
+
| Interface               || Unbalanced                  || Optical                    || Unbalanced                 
 
|-
 
|-
| Signal level            || 3..10V                  || 0.5..1V
+
| Cabling                  || 75 &Omega; coaxial          || 1.0 mm plastic fiber optics || ?                         
 
|-
 
|-
| Modulation               || biphase-mark-code        || biphase-mark-code
+
| Max length               || 10 m                        || 1 m                        || ? m                       
 
|-
 
|-
| Subcode information      || ASCII ID text            || SCMS copy protection info
+
| Output level            || 0.5 V<sub>pp</sub>          || ?                          || 5 V<sub>pp</sub> (TTL)   
 
|-
 
|-
| Max. Resolution         || 24 bits                  || 20 bits (24 bit optional)
+
| Max output              || 0.6 V<sub>pp</sub>         || ?                          || 5 V<sub>pp</sub> (TTL)   
 +
|-
 +
| Max current              || 8 mA                        || ?                          || X mA                       
 +
|-
 +
| Min input                || 0.2 V<sub>pp</sub>          || ?                          || 2 V<sub>pp</sub> (TTL)
 +
|-
 +
| Modulation              || colspan="3" | biphase-mark-code
 +
|-
 +
| Subcode information      || colspan="3" | SCMS copy protection info
 +
|-
 +
| Max. Resolution          || colspan="3" | 20 bits (24 bit optional)
 
|}
 
|}
  
NOTE: AES/EBU also exists in 75 &Omega;/BNC version (AES-3id-1995 standard).
+
=== Phono ===
75 &Omega; BNC version of AES/EBU is very electrically similar to 75 &Omega; coaxial S/PDIF shown above.
+
  
The electrical characteristics of AES/EBU are based on on RS-422,
+
Commonly used XLR-3 microphone cables have various
so basically any differential RS-422 chip will do as the receiver and transmitter chips.
+
impedance ratings (30 &Omega; to 90 &Omega; typical) and exhibit poor digital
S/PDIF coaxial interface is not specifically based on any other standard I know of
+
transmission performance. The result is signal drop out and reduced
(but is quite similar in signal levels and bandwidth requirements to some video signals).
+
cable lengths due to severe impedance mismatching (VSWR) between AES/EBU 110 &Omega;
 +
equipment. AES/EBU signal transmission work for few tens of meters with a good cable.
 +
 
 +
=== TOSLINK ===
 +
 
 +
''TOSLINK = TOShiba-LINK''
 +
 
 +
There also an optical version of S/PDIF interface which is usually called TOSLINK,
 +
because uses TOSLINK optical components. The transmission media is 1 mm plastic fiber
 +
and the signals are transmitted using visible light (red transmitting LED).
 +
The optical signals have exactly the same format as the electrical S/PDIF signals,
 +
they are just converted to light signals (light on/off). Because high light signal
 +
attenuation in the TOSLINK fiber optic cable, the transmission distance available
 +
using this technique is less than 10 meters (with some equipments only few meters).
 +
 
 +
Connector is called JIS F05 (JIS C5974-1993 F05)
 +
 
 +
=== TTL level ===
 +
 
 +
The 2 pin header connection found on CD-ROM units and sound cards (internally) are
 +
usually TTL level. The data format is same as the other formats. You need an adapter
 +
to connect the TTL level signal to an amplifier with Phono or TOSLINK connectors.
 +
 
 +
== Comparision with AES/EBU ==
 +
 
 +
The two formats are quite compatible with each other, differing only in the subcode
 +
information and connector. The professional format subcode contains ASCII strings
 +
for source and destination identification, whereas the commercial format carries the SCMS.
  
 
Both S/PDIF and AES/EBU can, and do transfer 24 bit words.
 
Both S/PDIF and AES/EBU can, and do transfer 24 bit words.
Line 83: Line 110:
 
While many equipments use more than 16 bits in internal processing, it's not unusual
 
While many equipments use more than 16 bits in internal processing, it's not unusual
 
for the output to be limited to 16 bits.
 
for the output to be limited to 16 bits.
 
'''Note on HDR-2 (2 pin header) interface used in some PC products:'''<br />
 
Many modern PC CD-ROM drives and some sound cards (SB32, AWE32, etc.) have a two pin
 
digital output connector in the back of the drive and they sometimes call that
 
interface S/PDIF. Unfortunately the electrical signal which comes from it is not
 
exactly what is described in S/PDIF specifications. The data format is exactly
 
the same, but the signal is TTL level (5Vpp) signal instead of the normal 1Vpp signal.
 
The output level might be selected to make the interfacing to other digital electronics
 
easy when signal is traveling inside the computer (the normal output driver system and
 
input amplifiers can be avoided). The downside of this is that you need to build some
 
electronics to make the signal from the CD-ROM drive to match what normal S/PDIF equipments expect.
 
  
 
=== Multi channel audio and S/PDIF ===
 
=== Multi channel audio and S/PDIF ===
  
 
IEC 958 was named IEC 60958 in 1998. IEC 60958 (The S/PDIF) can carry normal audio
 
IEC 958 was named IEC 60958 in 1998. IEC 60958 (The S/PDIF) can carry normal audio
and IEC 61937 data streams. IEC 61937 data streams can contain multichannel sound
+
and IEC 61937 data streams. IEC 61937 data streams can contain multi channel sound
like MPEG2, AC3 or DTS. When IEC 61937 data strams are transferred, the bits which
+
like MPEG2, AC3 or DTS. When IEC 61937 data streams are transferred, the bits which
 
normally carry audio samples are replaced with the data bits from the data stream
 
normally carry audio samples are replaced with the data bits from the data stream
 
and the headers of the S/PDIF signal. Channel-status information contains one bit
 
and the headers of the S/PDIF signal. Channel-status information contains one bit
Line 110: Line 126:
 
those header bits to determine what to do with the received data.
 
those header bits to determine what to do with the received data.
  
=== Cabling details ===
+
== Quality ==
 
+
S/PDIF (IEC 60958) uses 75 &Omega; coaxial cable and RCA connectors. 75 &Omega; coaxial cable
+
is inexpensive, because it is the same cable as used in video transmission (you can
+
buy a video cable with RCA connectors to connect you S/PDIF equipments together).
+
Coaxial S/PDIF connections work typically at least to 10-15 meter distances with
+
good 75 &Omega; coaxial cable.
+
 
+
AES/EBU-interface uses the well known symmetrical connections with transformer
+
isolation and an output impedance of 110 &Omega;. The signal-level of this interface
+
is reasonably higher than in the consumer version (3...10 volts). Because AES/EBU
+
digital audio signals are transmitted at high, video-like frequencies
+
(at around 6MHz) and should be handled very differently than standard
+
analog audio lines. Commonly used XLR-3 microphone cables have various
+
impedance ratings (30 &Omega; to 90 &Omega; typical) and exhibit poor digital
+
transmission performance. The result is signal drop out and reduced
+
cable lengths due to severe impedance mis-matching (VSWR) between AES/EBU 110 &Omega;
+
equipment. AES/EBU signal transmission work for few tens of meters with a good cable.
+
 
+
There also an optical version of S/PDIF interface which is usually called Toslink,
+
because uses Toslink optical components. The transmission media is 1 mm plastic fiber
+
and the signals are transmitted using visible light (red transmitting LED).
+
The optical signals have exactly the same format as the electrical S/PDIF signals,
+
they are just converted to light signals (light on/off). Because high light signal
+
attenuation in the Toslink fiber optic cable, the transmission distance available
+
using this technique is less than 10 meters (with some equipments only few meters).
+
 
+
=== What can make difference in the sound of digital signal ? ===
+
  
 
There are two things which can cause differences between the sound of digital interfaces:
 
There are two things which can cause differences between the sound of digital interfaces:
  
==== 1. Jitter (clock phase noise) ====
+
=== Jitter (clock phase noise) ===
  
 
This really only affects sound of the signal going directly to a DAC.
 
This really only affects sound of the signal going directly to a DAC.
Line 149: Line 138:
 
reclocking circuitry, so the jitter is not so big problem nowadays that it used to be.
 
reclocking circuitry, so the jitter is not so big problem nowadays that it used to be.
  
==== 2. Errors ====
+
=== Errors ===
  
 
This usually causes very significant changes in the sound, often loud popping
 
This usually causes very significant changes in the sound, often loud popping
Line 155: Line 144:
 
either are a sign of a very broken link which is probably intermittently dropping out altogether.
 
either are a sign of a very broken link which is probably intermittently dropping out altogether.
  
=== S/PDIF signals ===
+
== Bit rate ==
  
 
The signal on the digital output of a CD-player looks like almost perfect sine-wave,
 
The signal on the digital output of a CD-player looks like almost perfect sine-wave,
Line 162: Line 151:
 
For each sample, two 32-bit words are transmitted, which results in a bit-rate of:
 
For each sample, two 32-bit words are transmitted, which results in a bit-rate of:
  
{|
+
{| {{border}}
 
| 2.8224 Mbit/s || 44.1 kHz sampling rate, CD, DAT
 
| 2.8224 Mbit/s || 44.1 kHz sampling rate, CD, DAT
 
|-
 
|-
Line 169: Line 158:
 
| 2.0480 Mbit/s || 32 kHz sampling rate, for satellite purposes
 
| 2.0480 Mbit/s || 32 kHz sampling rate, for satellite purposes
 
|}
 
|}
 
The output impedance is standard 75 &Omega;, so ordinary coaxial cable
 
designed for video applications can be used. The minimal input level
 
of S/PDIF interface is 200 mVtt which allows some cable losses.
 
There is no real need for special quality cable as long as the cable
 
is made of 75 &Omega; coaxial cable (a good video accessory cable works
 
also as good S/PDIF cable).
 
  
 
== The Coding Format ==
 
== The Coding Format ==
Line 217: Line 199:
 
| Preamble M || Marks a word with data for channel A that isn't at the start of the data-block.
 
| Preamble M || Marks a word with data for channel A that isn't at the start of the data-block.
 
|-
 
|-
| Preamble W || Marks a word containing data for channel B. (right, for stereo). When using more than 2 channels, this could also be any other channel (except for A).
+
| Preamble W || Marks a word containing data for channel B. (right, for stereo).<br/>When using more than 2 channels, this could also be any other channel (except for A).
 
|}
 
|}
  
Line 280: Line 262:
 
! bit            !! meaning
 
! bit            !! meaning
 
|-
 
|-
| 0-3           || control bits:
+
| 0-1           || channel status bits:
* bit 0: 0 (is set to 1 during 4 channel transmission)
+
 
* bit 1: 0=Digital audio, 1=Non-audio  (reserved to be 0 on old S/PDIF specs)
+
{| {{border}}
* bit 2: copy-protection. Copying is allowed when this bit is set.
+
! bit 0 !! bit 1 !!
* bit 3: is set when pre-emphasis is used.
+
|-
 +
| 0     || 0    || IEC 60958-3 (Consumer)
 +
|-
 +
| 1     || 0     || IEC 60958-4 (Professional)
 +
|-
 +
| 0     || 1    || IEC 61397 (MPEG/AC-3/DTS/AAC/ATRAC), IEC 62105 and others
 +
|-
 +
| 1    || 1    || SMPTE 337M and others
 +
|}
 +
 
 +
|-
 +
| 2             || copy-protection. Copying is allowed when this bit is set.
 +
|-
 +
| 3             || is set when pre-emphasis is used.
 
|-
 
|-
 
| 4-7            || 0 (reserved)
 
| 4-7            || 0 (reserved)
 
|-
 
|-
| 9-15          || catagory-code:
+
| 9-15          || category-code:
 
* 0 = common 2-channel format
 
* 0 = common 2-channel format
 
* 1 = 2-channel CD-format (set by a CD-player when a subcode is transmitted)
 
* 1 = 2-channel CD-format (set by a CD-player when a subcode is transmitted)
Line 303: Line 298:
  
 
The electrical interface for S/PDIF signals can be either 75 &Omega; coaxial cable or
 
The electrical interface for S/PDIF signals can be either 75 &Omega; coaxial cable or
optical fiber (usually called Toslink). Usually consumer models use that coaxial cable
+
optical fiber (usually called TOSLINK). Usually consumer models use that coaxial cable
 
interface and semiprofessional/professional equipments use optical interface.
 
interface and semiprofessional/professional equipments use optical interface.
 
The electrical signal in the coaxial cable is about 500mVtt.
 
The electrical signal in the coaxial cable is about 500mVtt.
Line 310: Line 305:
  
 
There are differences in the electrical characteristics of AES/EBU and S/PDIF interfaces:
 
There are differences in the electrical characteristics of AES/EBU and S/PDIF interfaces:
 
 
* AES/EBU uses a balanced differential line based on XLR connectors and the signal levels are 5 volts
 
* AES/EBU uses a balanced differential line based on XLR connectors and the signal levels are 5 volts
* S/P-DIF uses a coaxial unbalanced line with RCA connectors and the signal levels are around 0.5 volts
+
* S/PDIF uses a coaxial unbalanced line with RCA connectors and the signal levels are around 0.5 volts
  
 
You can convert one electrical interface to another with a small amount of off-the-shelf hardware and
 
You can convert one electrical interface to another with a small amount of off-the-shelf hardware and
Line 318: Line 312:
  
 
But the protocol used in AES/EBU and S/PDIF is not exactly the same and that can cause sometimes
 
But the protocol used in AES/EBU and S/PDIF is not exactly the same and that can cause sometimes
problems. The basic data format of AES and S/P-DIF are identical. There is a bit in the channel
+
problems. The basic data format of AES and S/PDIF are identical. There is a bit in the channel
 
status frame that tells which is which. Depending upon the setting of that bit, some bits have
 
status frame that tells which is which. Depending upon the setting of that bit, some bits have
 
different meanings. For example, the bits used to describe de-emphasis in the AES/EBU protocol
 
different meanings. For example, the bits used to describe de-emphasis in the AES/EBU protocol
overlap the bits used to implement the SCMS protocol in S/P-DIF land.
+
overlap the bits used to implement the SCMS protocol in S/PDIF land.
  
The big problem comes in the fact that MANY products out there are VERY picky about what
+
Some equipment are very flexible and will reject data that is different from what it
they see in the bits, and even though a given signal may fall within the letter of the
+
is expecting. So an S/PDIF equipment may reject AES/EBU data.
standard, some equipment will absolutely refuse to talk to it. Many equipments are
+
reasonably flexible and tolerant of slight foos in the signal so the simple converters
+
can work on those. But a simple converter that works fine with one piece will as likely
+
not work with another.
+
 
+
== What are different types of IEC 60958 interface ==
+
 
+
There are 2 implementations of IEC 60958: consumer and professional. Those are referred in
+
standard as IEC 60958 Types I and II. IEC 60958 professional format is same as AES/EBU but is
+
carried over same type of coaxial or optical interface as consumer S/PDIF. IEC 60958 consumer
+
format is the S/PDIF format used in CD-players. You can put an S-PDIF data stream on an
+
AES/EBU physical balanced cable, or vice versa, and still have it be valid IEC 60958 data.
+
Professional and consumer formats (Types I and II) differ only in the subcode information.
+
In order to do track indexing, you must have a consumer format data stream (ie. an S/PDIF style data).
+
  
 
== Jitter specifications of AES/EBU interface ==
 
== Jitter specifications of AES/EBU interface ==
Line 344: Line 324:
 
The AES/EBU standard for serial digital audio uses typically 163 ns clock rate and allows
 
The AES/EBU standard for serial digital audio uses typically 163 ns clock rate and allows
 
up to -20 ns of jitter in the signal. This peaks to peak value of 40 ns is aroun 1/4 of the
 
up to -20 ns of jitter in the signal. This peaks to peak value of 40 ns is aroun 1/4 of the
unit interval. D/A conversion clock jitter requirements are considrably tighter. A draft
+
unit interval. D/A conversion clock jitter requirements are considerably tighter. A draft
AES/EBU standard specifies the D/A converter clock at 1 ns jitte; however, a theoretical
+
AES/EBU standard specifies the D/A converter clock at 1 ns jitter; however, a theoretical
 
value for 16-bit audio could be as small as 0.1 nsec. Small jitter D/A conversion is
 
value for 16-bit audio could be as small as 0.1 nsec. Small jitter D/A conversion is
 
implemented by using separate PLL clocks for data recover and DAC and by using a buffering
 
implemented by using separate PLL clocks for data recover and DAC and by using a buffering
Line 351: Line 331:
  
 
== Conversion circuits ==
 
== Conversion circuits ==
 
Here are some AES/EBU and S/PDIF circuit collected from various sources. The following circuit
 
will only convert the signal levels, not other protocol details.
 
  
 
Remember that although the audio data is the same in both AES/EBU and S/PDIF interfaces,
 
Remember that although the audio data is the same in both AES/EBU and S/PDIF interfaces,
Line 366: Line 343:
 
But simply fixing the physical interface works far more often than it doesn't.
 
But simply fixing the physical interface works far more often than it doesn't.
  
=== How to do different conversions using the circuit below ===
+
Adapters between different formats:
 +
* [[AES3 to AES3id]]
 +
* [[AES3 to S/PDIF]]
 +
* [[AES3id to AES3]]
 +
* [[AES3id to S/PDIF]]
 +
* [[S/PDIF to AES3]]
  
Here are some ideas how to make the most common conversions using the circits described below.
+
== Input/output circuits ==
Note: there is no guarantee that the information in this or the circuit are correct
+
* [[S/PDIF input]]
(they are believed to be correct but note tested by the author).
+
* [[S/PDIF output]]
 +
* [[S/PDIF optical]]
  
* AES/EBU to S/PDIF: There is complete circuit for this
+
== See also ==
* S/PDIF to AES/EBU: There is complete circuit for this
+
* [[AES/EBU]]
* S/PDIF to optical: S/PDIF coax input circuit followed with optical TOSLINK output
+
* Optical to S/ODIF: Optical TOSLINK receiver followed with S/PDIF output buffer circuit
+
* CD-ROM digital output to normal S/PDIF: S/PDIF output buffer circuit does this
+
* CD-ROM digital output to optical: Connect optical TOSLINK output circuit to CD-ROM output
+
  
For every other conversion combination you can think of you can find circuits on the lis below.
+
== Links ==
To build an dapter you need two parts connected after each other.
+
* [http://www.ebu.ch/CMSimages/en/tec_AES-EBU_eg_tcm6-11890.pdf The EBU/AES Digital Audio Interface: Engineering Guidelines]
 
+
* First you need an input circuit which converts the input you want (coax,optical or AES/EBU) to TTL format (if the input is in TTL format you don't need any input circuitry)
+
* Connect a suitable output circuit with TTL input after the receiving electronics to give you the output format you want (coax,optical,AES/EBU,TTL)
+
 
+
After you have selected the suitable circuit parts, built them an attached them together
+
you get the conversion circuit you want. If you need more than one output, you can
+
connect few (1-4) output modules to one input circuitry to have more then one output.
+
 
+
=== AES/EBU to S/PDIF signal level converter ===
+
 
+
[[Image:AES_to_SPDIF.svg|300px]]
+
 
+
The idea for this circuit is taken from articles posted to Usenet News.
+
 
+
If you are looking for a professional components for 110 &Omega; to 75 &Omega; interconnection
+
then check [http://www.canare.com/ Canare] web site where they have [http://www.canare.com/digitalaudio/impedancetransformers.html 110 OHM-75 OHM IMPEDANCE TRANSFORMERS].
+
 
+
=== S/PDIF to AES/EBU ===
+
 
+
                                            _
+
                    5 volt                | \
+
SPDIF out:          |                    -|  O-
+
                    _  --4,7k-          | |_/ |
+
              diode ^ |  _    |    _  |  _  |
+
        10 u ( )    | | | \  |    | \  | | \  |      100 n
+
O-- -- -||- -------- - -|  O-- -- -|  O- -|  O- -120 r-||- ---- -- 2
+
    |  |    |        |  |_/  |  | |_/    |_/            |    |
+
    |  -||-  100n  _      2,2k |                      1 k  |
+
  75r              ^ diode  |  |    IC                |    |  AES in
+
    |                |        --- |                      ---  |
+
  ---              ---          |      _                    220r
+
                                  |      | \          100 n    |
+
                                  -- ---|  O--- --120 r-||- --- --- 3
+
  Diode = 1N914 or 1N4148            |  |_/    |          |
+
                                    |    _    |        1 k    --- 1
+
                                    |  | \    |          |  |
+
    IC = 74HC04 or CMOS 4049        ---|  O---          --- ---
+
                                        |_/
+
 
+
The idea for this circuit is taken from articles posted to Usenet News.
+
 
+
== S/PDIF conversion circuit building blocks ==
+
 
+
This is a collection of S/PDIF circuits found from various sources.
+
The circuits are presented as building blocks which have one end on
+
S/PDIF standard signal and other end an TTL level signal. The TTL level
+
signal end of the circuits is designed to be the the interface which you
+
can use to wire different modules together to make whatever S/PDIF converter
+
circuit you want. The circuit are presented as building blocks because with
+
this approacs you can most easily build a suitable circuit for all conversion needs.
+
 
+
Here are tips for building a reconversion circuits for different uses:
+
 
+
* Coaxial S/PDIF to optical: Select any S/PDIF coaxial input circuit and connect it's TTL output to one optical S/PDIF (Toslink) output circuit.
+
* Optical S/PDIF to coaxial: Select one optical S/PDIF input circuit and connect it's TTL output to any coaxial S/PDIF output circuit.
+
* CD-ROM digital out to coaxial: CD-ROMs output TTL level S/PDIF, so get it to coaxial you just need a coaxial output circuit where you directly connect the digital signal from your CD-ROM drive.
+
 
+
For other conversion needs do a little thinking and you should find quite easily the answer what blocks to connect to each other.
+
 
+
== S/PDIF output buffer circuits ==
+
 
+
Here is set of output circuit which take in TTL level S/PDIF signal in and output standard S/PDIF coax cable output signal. Those output circuit are very useful building blocks for all kinds of S/PDIF related electronics projects. All the circuits do basically the same thing. They just use different components, so use the one where you can easily get components.
+
 
+
=== S/PDIF output buffer circuit ===
+
 
+
                                                          S/PDIF output
+
                                                          (RCA or BNC)
+
                            |\
+
TTL level signal ----- -----| O-----680R-- ---------      ------- center pin
+
                      |    |/            |        |    |
+
                      |                  |          )||(
+
                      |    |\            |          )||(
+
                        -----| O-----680R--          )||(
+
                            |/            |          )||(
+
                                        100R        |    |
+
                          74HC04          |        |    ------- ground
+
                                            ---- ----  T1
+
                                                |
+
                                              ---
+
 
+
Idea for this circuit is taken from "A digital Output for the CD720" web page (was at http://www.spiceisle.com/homepages/brian/audiodiy/mods/digi-out.htm). The transformer T1 is high quality 1:1 pulse transformer (can be salvaged from old broken network interface card or similar source).
+
 
+
=== Another S/PDIF output circuit ===
+
 
+
                            |\
+
                        -----| O-----------
+
                      |    |/            |              S/PDIF output
+
                      |                  |  100nF        (RCA or BNC)
+
                      |    |\            |  ||      T1
+
TTL level signal ----- -----| O----------- ---||----      ------- --75R--- center pin
+
                      |    |/            |  ||    |    |      |
+
                      |                  |          )|| |      |
+
                      |    |\            |    15  )||(  3    220R
+
                        -----| O-----------    turns )||( turns  |
+
                      |    |/            |          )|| |      |
+
                      |                  |        |    |      |
+
                      |    |\04          |        |    ------- -------- ground
+
                        -----| 0-----------          |
+
                            |/                    ---
+
+
                          74HCU04
+
 
+
This circuit is part of circuit "Splitter for S/PDIF coax/optical output" by T. Giesberts from Elektor Electronics magazine July/August 1995 pages 78-79. The transformer T1 is made to G2.3-FT12 ferrite ring core. Primary coil is 15 turns of 0.5 mm diameter enamelled copper wire and secondary is 3 turns of 0.5 mm diameter enamelled copper wire. The chip 74HCU04 is manufactured by [http://www.semiconductors.philips.com/ Philips]
+
 
+
The circuit in the magazine had 3 outputs. The two extra output were made by adding two more output coils to T1 and the output resistors.
+
 
+
=== Output circuit with transformer used as impedance matcher ===
+
 
+
This circuit is taken from Digital One V. 1.1 documentation. Digital One is from NET-Labs and is designed by by Enland Unruh.
+
 
+
                                                                S/PDIF output
+
+
                            IC1              0.1 uF        0.1 uF
+
                            |\                ||            ||
+
TTL level signal -----------|  -----750R-- ---||----      --||--- center pin
+
                            |/            |  ||    |    |  ||
+
                                          |          )||(
+
                                          |          )||(
+
                                          |          )||(
+
                                          |          )||(
+
                                        499R        |    |
+
                                          |        |    ------- ground
+
                                            ---- ----  T1
+
                                                |
+
                                              ---
+
 
+
T1 is a HF-transformer which has 2:1 turns ratio. Transformer type used in example circuit is SC944-05. IC1 in this circuit consists of 8 parallel connected buffer ports from 74ACQ244 IC.
+
 
+
=== Output with 1:1 pulse transformer ===
+
 
+
This is the recommended S/PDIF output circuit from [http://www.crystal.com/ Crystal Semiconductor] CD4237 single chip multimedia audio system IC datasheet page 71. ''''''
+
 
+
                                                                S/PDIF output
+
                            IC1
+
                            |\
+
TTL level signal -----------|  -----374R-- ---------      ------- center pin
+
                            |/            |        |    |
+
                                          |          )||(
+
                                          |          )||(
+
                                          |          )||(
+
                                          |          )||(
+
                                        90.9R        |    |
+
                                          |        |    ------- ground
+
                                            ---- ----  T1
+
                                                |
+
                                              ---
+
 
+
The transformer used in this circuit is 1:1 pulse transformer (the original application note suggested pulse transformer from Pulse Engineering or Schott Corporation). IC1 is a buffer IC which must be capable to supply enough current to drive the 75 &Omega; S/PDIF interface to full voltage swing specified (capable of loading 415 &Omega; load or capable of supplying 12 mA current).
+
 
+
=== Simple S/PDIF output without galvanic isolation ===
+
 
+
                            |\
+
                        -----| O-----------
+
                      |    |/            |              S/PDIF output
+
                      |                  |  150nF        (RCA or BNC)
+
              |\      |    |\            |  ||
+
TTL level ---| o------ -----| O----------- ---||-----374R--- ----- center pin
+
signal      |/      |    |/            |  ||            |
+
                      |                  |                |
+
                      |    |\            |                93R1
+
                        -----| O-----------                  |
+
                      |    |/            |                  ----- ground
+
                      |                  |                |
+
                      |    |\            |                ---
+
                        -----| 0-----------
+
                      |    |/            |
+
                      |                  |
+
                      |    |\            |
+
                        -----| 0-----------
+
                            |/
+
+
                          74HTU04
+
 
+
This circuit does not provide any isolation on the output. The TTL level signal form 74HCT04 buffer is attenuated to the levels specified in S/PDIF optical interface by using the voltage divider made of 374 &Omega; and 93.1 &Omega; resistors. This circuit is based on S/PDIF converter circuit diagram from Elektor Electronics magazine issue 4/1997 page 66.
+
 
+
=== Simplest TTL to S/PDIF coax interface ===
+
 
+
          100nF
+
  TTL ----||-----330ohm-- --------- coax S/PDIF signal out
+
  in                    |
+
                      100ohm
+
                          |
+
  Ground ----------------- --------- coax signal ground
+
 
+
This circuit interfaces directly to the TTL level output provided by some sound equipment (CD-ROM or sound card). This circuit works if the equipment which gives out TTL level has powerful enough TTL output to run this circuit (enough current output capability). If this simple circuit does not work reliably, then you need to build a circuit which includes the buffering electronics.
+
 
+
=== Isolation transformer for S/PDIF output ===
+
 
+
If your equipment (for example sound cards) has an S/PDIF output which does not have an isolation transformer at the output, you can easily add the transformer to it by putting a suitable transformer afther the original output.
+
 
+
Elector Electronics magazine issue 7-8/1999 recommend building the transformer for S/PDIF isolation in the following way:
+
 
+
The transformer must have good coupling factor, so the transformer core must be a toroidal core made of high permiability material. The prototype described in the magazine uses Philips Type TN13/7.5/5-3E25 core which has permeability rating (yt) of 4500. The primary and secondary windings consisted of 6 turns of 0.5 mm diameter enamelled copper wire laid on opposite sides of toroid. The transformer used in this prototype was described to have a bandwidth raged from 50 kHz to 17 MHz, which is more than adequate for an S/PDIF link.
+
 
+
The transformer should be fitted directly to the source and the receiving end must be properly terminated for reliable operation. The reason for this is that the transformer input and output impedances are not exactly 75 &Omega;.
+
 
+
== S/PDIF input circuits ==
+
 
+
The following circuits can be used to convert S/PDIF signals to TTL level signals which can be connected to any suitable output circuit or directly to digital electronics.
+
 
+
=== S/PDIF coax input circuit ===
+
 
+
                                    ----10K--
+
                      10 nF        |        |
+
                        ||          |    |\  |        |\
+
S/PDIF input ------ ---||----100R-- ----| O-- --- ----| O----- TTL out
+
                    |  ||              |/      |    |/
+
                  75R                          10K
+
                    |                74HCU04    |
+
                  ---                          ---
+
 
+
This circuit is part of circuit "Splitter for S/PDIF coax/optical output" by T. Giesberts from Elektor Electronics magazine July/August 1995 pages 78-79. The chip 74HCU04 is manufactured by [http://www.semiconductors.philips.com/ Philips]
+
 
+
=== Another input circuit ===
+
 
+
                              ----10K-----  5V
+
                            |    /\
+
                            ---    |
+
                      4700 pF      |
+
                        ||          |    |\            |\
+
S/PDIF input ----------||---------- ----| O-----------| O----- TTL out
+
( /-500mV)            ||              |/            |/
+
+
                                          7404
+
 
+
The capacitor works as DC blocking capacitor. 10 k&Omega; trimpot signal raises its ground potential to the point that Hex Inverter IC1 recognizes the difference between a digital 1 and 0 input. When you firt test the circuit then first addjust 10 k&Omega; trimmer to the center and then adjust it so that the circuit receivers the S/PDIF signal well. If you have a voltmeter, you can adjust the trimpot to show around 2.6V at pin 1 of the IC. The inverter buffers the input and produces TTL 0-5V output signal. This circuit does not provide the 75 &Omega; termination resistor, so you need to add it if you have problems because of cable signal reflections. This circuit is part of [http://members.tripod.com/~Psych/coax-ttl-md.html Coax Digital Out to MD] circuit design.
+
 
+
== Optical S/PDIF output circuit ==
+
 
+
=== Optical TOSLINK output ===
+
 
+
                        ________________
+
                      4|            ___|
+
TTL signal -----------|            /
+
                      |          |
+
                      3|          |
+
  5V--4R7-- -----------|          |
+
          |          2|  TOTX173 |
+
            ---8k2-----|          |
+
          |          |          |
+
          === 100 nF  |          |
+
          |          1|            \___
+
            -----------|________________|
+
          |
+
          ---
+
 
+
The 4.7 &Omega; resistor and 100 nF capacitor make a filter against digital noise in 5V power source. The Toslink transmitting module used in this circuit is [http://www.toshiba.com/taec/components/Datasheet/TOTX173.pdf TOTX173] from [http://www.toshiba.com/ Toshiba]. This circuit is a part of circuit diagram from Elektor Electronics magazine issue 4/1997 page 65.
+
 
+
==== TORX173 and TOTX173 module pinouts ====
+
 
+
Toshiba optical receiver &amp; transmitter modules used for S/P-DIF TORX173, TOTX173 top view:
+
 
+
    opto
+
    ----
+
  6.    .5
+
    ....
+
    1234
+
 
+
{| {{border}}
+
! Pin !! TORX173    !! TOTX173
+
|-
+
| 1  || out        || GND
+
|-
+
| 2  || GND        || R
+
|-
+
| 3  || Vcc        || Vcc
+
|-
+
| 4  || GND        || in
+
|-
+
| 5  || case(GND)  || case(GND)
+
|-
+
| 6  || case(GND)  || case(GND)
+
|}
+
+
Vcc  5V (use 0.1 uF decoupling to GND)
+
          (use 47 uH choke to connect Pin 3 to Vcc for TORX)
+
R    8.2 k&Omega; to Vcc
+
 
+
TORX and TOTX are both high active and are CMOS/TLL logic compatible.
+
 
+
More information and datasheets is available at [http://www.toshiba.com/ Toshiba] [http://www.toshiba.com/taec/cgi-bin/display.cgi?table=Category&CategoryID=7071 optoelectronics components web page TOSLINK section].
+
 
+
=== Very cheap optical S/PDIF output ===
+
 
+
With TOSLINK modules available for as low as $10 it hardly seems worth it to bother with the trouble of making your own TOSLINK module due to the fact that the ones from Sharp have a built-in connector and are much easier to interface. But if you really want to make your own optical output interface, you can do it because S/PDIF optical (Toslink) transmitter is just basically a red LED coupled to the optical fiber. So to build a very basic output circuit you only need a red LED and a resistor, both available from any place where electronic components are sold.
+
 
+
The circuit is very simple:
+
 
+
                    _____
+
TTL signal -------|_____|---------
+
                                  |
+
                                  ---
+
                                  V  LED
+
                                  ---
+
                                  |
+
    Ground -----------------------
+
 
+
The idea of the circuit is that the digital data is fed through a series current limiting resistor to the LED (typically LEDs only require 5-30mA). A digital 0 is 0V and the LED is off. A digital 1 is 5V and the LED is on. That's it!
+
 
+
If for some reason the circuit does not work, try to change the LED and also try to connecting it better to the optical fiber. NOTE: Not all LEDs will work, so you may have to experiment a bit. Optimally, you want a high-brightness RED LED with a typical wavelength of 660nm.
+
 
+
If swapping the LED doesn't work, you might want to try using a hex inverter (7404 or similar IC) to buffer the signal. This might be good practice too, just in case the TTL SPDIF output of your source device isn't designed to handle a 20~30mA load this circuit generates.
+
 
+
== Optical S/PDIF output circuit ==
+
 
+
=== Optical TOSLINK receiver ===
+
 
+
  _____________
+
|___          |1
+
    \        |----------------- TTL output
+
      |        |
+
      |TORX173 |3
+
      |        |---- ----coil47uH-----  5V
+
      |        |    |
+
      |        |  === 100 nF
+
      |        |2  |
+
      |        |----
+
      |        |4  |
+
      |        |----
+
      |        |5  |
+
      |        |----
+
      |        |6  |
+
  __/        |----
+
  |____________|    |
+
                  ---
+
 
+
The 47 microhenry coil and 100 nF capacitor make a filter against digital noise in 5V power source. The Toslink receiving module used in this circuit is TORX173 from [http://www.toshiba.com/ Toshiba]. This circuit is a part of circuit diagram from Elektor Electronics magazine issue 4/1997 page 66.
+
 
+
==== TORX173 and TOTX173 module pinouts ====
+
 
+
Toshiba optical receiver &amp; transmitter modules used for S/P-DIF TORX173, TOTX173 top view:
+
 
+
  opto
+
  ----
+
6.    .5
+
  ....
+
  1234
+
 
+
{| {{border}}
+
! Pin !! TORX173    !! TOTX173
+
|-
+
| 1  || out        || GND
+
|-
+
| 2  || GND        || R
+
|-
+
| 3  || Vcc        || Vcc
+
|-
+
| 4  || GND        || in
+
|-
+
| 5  || case(GND)  || case(GND)
+
|-
+
| 6  || case(GND)  || case(GND)
+
|}
+
+
Vcc  5V (use 0.1 uF decoupling to GND)
+
          (use 47 uH choke to connect Pin 3 to Vcc for TORX)
+
R    8.2 k&Omega; to Vcc
+
 
+
TORX and TOTX are both high active and are CMOS/TLL logic compatible.
+
 
+
More information and datasheets is available at [http://www.toshiba.com/ Toshiba] [http://www.toshiba.com/taec/nonflash/components/opto.html optoelectronics components] web page TOSLINK section.
+
  
 
== Standards ==
 
== Standards ==
 
* IEC 60958-3:2006 ''(old name: IEC 958-3:1989)''
 
* IEC 60958-3:2006 ''(old name: IEC 958-3:1989)''
* EIAJ CP-340 1987-9 (Japanese equivalent)
+
* JEITA CPR-1205 (former EIAJ CP-340 1987-9 & EIAJ CP-1201)
 +
* (CP-1201 Japanese equivalent of IEC 60958)
 +
 
 +
== Contributors ==
 +
* [[User:Joakim|Joakim Ögren]]
  
 
== Sources ==
 
== Sources ==

Latest revision as of 22:01, 20 November 2010

S/PDIF = Sony/Philips Digital Interface Format (a.k.a SPDIF)

An interface for digital audio.

Contents

History

Since the early 80's, a step towards digital audio has been set by the introduction of the Compact Disc player. In the beginning, those signals stayed inside the set, and were converted to analog signals before leaving the cabinet. A new trend is to keep signals into the digital domain as long as possible, because this is the only way to keep the signal quality. To make this possible different devices must be able communicate with one another within the digital domain.

S/PDIF is the consumer version of AES/EBU professional digital audio interface.

S/PDIF is described in IEC 60958-3:2006. In Japan the equivalent standard is JEITA CPR-1205.

Characteristics

IEC 60958-3 specifies up to 768 kHz sampling frequency.

Signal bitrate:

Bitrate Fs Usage
2 MHz 32 kHz DSR (Digital Satellite Receiver)
2.8 MHz 44.1 kHz CD
3.1 MHz 48 kHz DAT

Resolution: up to 24 bits PCM.

Audio can be sent encoded as DTS/AC-3/ATRAC/AAC/MPEG-2 instead of PCM.

The interface

There is three different types of S/PDIF connection:

  • Phono connector (electrical)
  • TOSLINK connector (optical)
  • TTL
S/PDIF (IEC 60958-3)
Connector Phono TOSLINK Non-standard
Interface Unbalanced Optical Unbalanced
Cabling 75 Ω coaxial 1.0 mm plastic fiber optics  ?
Max length 10 m 1 m  ? m
Output level 0.5 Vpp  ? 5 Vpp (TTL)
Max output 0.6 Vpp  ? 5 Vpp (TTL)
Max current 8 mA  ? X mA
Min input 0.2 Vpp  ? 2 Vpp (TTL)
Modulation biphase-mark-code
Subcode information SCMS copy protection info
Max. Resolution 20 bits (24 bit optional)

Phono

Commonly used XLR-3 microphone cables have various impedance ratings (30 Ω to 90 Ω typical) and exhibit poor digital transmission performance. The result is signal drop out and reduced cable lengths due to severe impedance mismatching (VSWR) between AES/EBU 110 Ω equipment. AES/EBU signal transmission work for few tens of meters with a good cable.

TOSLINK

TOSLINK = TOShiba-LINK

There also an optical version of S/PDIF interface which is usually called TOSLINK, because uses TOSLINK optical components. The transmission media is 1 mm plastic fiber and the signals are transmitted using visible light (red transmitting LED). The optical signals have exactly the same format as the electrical S/PDIF signals, they are just converted to light signals (light on/off). Because high light signal attenuation in the TOSLINK fiber optic cable, the transmission distance available using this technique is less than 10 meters (with some equipments only few meters).

Connector is called JIS F05 (JIS C5974-1993 F05)

TTL level

The 2 pin header connection found on CD-ROM units and sound cards (internally) are usually TTL level. The data format is same as the other formats. You need an adapter to connect the TTL level signal to an amplifier with Phono or TOSLINK connectors.

Comparision with AES/EBU

The two formats are quite compatible with each other, differing only in the subcode information and connector. The professional format subcode contains ASCII strings for source and destination identification, whereas the commercial format carries the SCMS.

Both S/PDIF and AES/EBU can, and do transfer 24 bit words. In AES/EBU, the last 4 bits have a defined usage, so if anyone puts audio in there, it has to go to something that doesn't expect the standard specifies. But in S/PDIF, there's nothing that says what you have to use the bits for, so filling them all up with audio is acceptable. Typical S/PDIF equipments only use 16 or 20 bit resolutions. While many equipments use more than 16 bits in internal processing, it's not unusual for the output to be limited to 16 bits.

Multi channel audio and S/PDIF

IEC 958 was named IEC 60958 in 1998. IEC 60958 (The S/PDIF) can carry normal audio and IEC 61937 data streams. IEC 61937 data streams can contain multi channel sound like MPEG2, AC3 or DTS. When IEC 61937 data streams are transferred, the bits which normally carry audio samples are replaced with the data bits from the data stream and the headers of the S/PDIF signal. Channel-status information contains one bit (but 1) which tells if the data in S/PDIF frame is digital audio or some other data (DTS, AC3, MPEG audio etc.). This bit will tell normal digital audio equipments that they don't try to play back this data as they were audio samples. (would sound really horrible if this happens for some reason).

The equipments which can handle both normal audio and IEC 61937 just look at those header bits to determine what to do with the received data.

Quality

There are two things which can cause differences between the sound of digital interfaces:

Jitter (clock phase noise)

This really only affects sound of the signal going directly to a DAC. If you're running into a computer, the computer is effectively going to be reclocking everything. Same applies also to CD-recorders, DAT tape decks and similar devices. Even modern DACs have typically a small buffer and reclocking circuitry, so the jitter is not so big problem nowadays that it used to be.

Errors

This usually causes very significant changes in the sound, often loud popping noises but occasionally less offensive effects. Any data loss or errors in either are a sign of a very broken link which is probably intermittently dropping out altogether.

Bit rate

The signal on the digital output of a CD-player looks like almost perfect sine-wave, with an amplitude of 500 mVtt and a frequency of almost 3 MHz.

For each sample, two 32-bit words are transmitted, which results in a bit-rate of:

2.8224 Mbit/s 44.1 kHz sampling rate, CD, DAT
3.0720 Mbit/s 48 kHz sampling rate, DAT
2.0480 Mbit/s 32 kHz sampling rate, for satellite purposes

The Coding Format

The digital signal is coded using the 'biphase-mark-code' (BMC), which is a kind of phase-modulation. In this system, two zero-crossings of the signal mean a logical 1 and one zero-crossing means a logical 0.

BiphaseMarkCode.svg

The frequency of the clock if twice the bitrate. Every bit of the original data is represented as two logical states, which, together, form a cell. The length of a cel ('time-slot') is equal to the length of a databit. The logical level at the start of a bit is always inverted to the level at the end of the previous bit. The level at the end of a bit is equal (a 0 transmitted) or inverted (a 1 transmitted) to the start of that bit.

The first 4 bits of a 32-bit word (bits 0 through 3) form a preamble which takes care of synchronisation. This sync-pattern doesn't actually carry any data, but only equals four data bits in length. It also doesn't use the BMC, so bit patterns which include more than two 0's or 1's in a row can occur (in fact, they always do).

There are 3 different sync-patterns, but they can appear in different forms, depending on the last cell of the previous 32-bit word (parity):

Preamble cell-order cell-order
(last cell "0") (last cell "1")
"B" 11101000 00010111
"M" 11100010 00011101
"W" 11100100 00011011
Preamble B Marks a word containing data for channel A (left) at the start of the data-block.
Preamble M Marks a word with data for channel A that isn't at the start of the data-block.
Preamble W Marks a word containing data for channel B. (right, for stereo).
When using more than 2 channels, this could also be any other channel (except for A).

Word and Block Formats

Every sample is transmitted as a 32-bit word (subframe). These bits are used as follows:

bits meaning
0-3 Preamble (see above; special structure)
4-7 Auxillary-audio-databits
8-27 Sample

(A 24-bit sample can be used (using bits 4-27).
A CD-player uses only 16 bits, so only bits 13 (LSB) to 27 (MSB) are used. Bits 4-12 are set to 0).

28 Validity

(When this bit is set, the sample should not be used by the receiver. A CD-player uses the 'error-flag' to set this bit).

29 Subcode-data
30 Channel-status-information
31 Parity (bit 0-3 are not included)

The number of subframes that are used depends on the number of channels that is transmitted. A CD-player uses Channels A and B (left/right) and so each frame contains two subframes. A block contains 192 frames and starts with a preamble "B":

"M" Ch.1 "W" Ch.2 "B" Ch.1 "W" Ch.2 "M" Ch.1 "W" Ch.2 "M" ...
sub sub
Frame 191 Frame 0 Frame 1
Block start

Channel status and subcode information

In each block, 384 bits of channel status and subcode info are transmitted. The Channel-status bits are equal for both subframes, so actually only 192 useful bits are transmitted:

bit meaning
0-1 channel status bits:
bit 0 bit 1
0 0 IEC 60958-3 (Consumer)
1 0 IEC 60958-4 (Professional)
0 1 IEC 61397 (MPEG/AC-3/DTS/AAC/ATRAC), IEC 62105 and others
1 1 SMPTE 337M and others
2 copy-protection. Copying is allowed when this bit is set.
3 is set when pre-emphasis is used.
4-7 0 (reserved)
9-15 category-code:
  • 0 = common 2-channel format
  • 1 = 2-channel CD-format (set by a CD-player when a subcode is transmitted)
  • 2 = 2-channel PCM-encoder-decoder format
  • others are not used
19-191 0 (reserved)

The subcode-bits can be used by the manufacturer at will. They are used in blocks of 1176 bits before which a sync-word of 16 "0"-bits is transmitted

Electrical Interface

The electrical interface for S/PDIF signals can be either 75 Ω coaxial cable or optical fiber (usually called TOSLINK). Usually consumer models use that coaxial cable interface and semiprofessional/professional equipments use optical interface. The electrical signal in the coaxial cable is about 500mVtt.

Converting between AES/EBU and S/PDIF interfaces

There are differences in the electrical characteristics of AES/EBU and S/PDIF interfaces:

  • AES/EBU uses a balanced differential line based on XLR connectors and the signal levels are 5 volts
  • S/PDIF uses a coaxial unbalanced line with RCA connectors and the signal levels are around 0.5 volts

You can convert one electrical interface to another with a small amount of off-the-shelf hardware and a little time as you can see in the circuit below.

But the protocol used in AES/EBU and S/PDIF is not exactly the same and that can cause sometimes problems. The basic data format of AES and S/PDIF are identical. There is a bit in the channel status frame that tells which is which. Depending upon the setting of that bit, some bits have different meanings. For example, the bits used to describe de-emphasis in the AES/EBU protocol overlap the bits used to implement the SCMS protocol in S/PDIF land.

Some equipment are very flexible and will reject data that is different from what it is expecting. So an S/PDIF equipment may reject AES/EBU data.

Jitter specifications of AES/EBU interface

The AES/EBU standard for serial digital audio uses typically 163 ns clock rate and allows up to -20 ns of jitter in the signal. This peaks to peak value of 40 ns is aroun 1/4 of the unit interval. D/A conversion clock jitter requirements are considerably tighter. A draft AES/EBU standard specifies the D/A converter clock at 1 ns jitter; however, a theoretical value for 16-bit audio could be as small as 0.1 nsec. Small jitter D/A conversion is implemented by using separate PLL clocks for data recover and DAC and by using a buffering between data recovery and DAC.

Conversion circuits

Remember that although the audio data is the same in both AES/EBU and S/PDIF interfaces, they are indeed different formats, at least in their subcode. AES converted to coax is NOT S/PDIF, and S/PDIF converted to XLR balanced is NOT AES. They are still their native format, just the transmission medium has changed. Whether they will work in your application depends on the equipment chosen.

Some DATs have a switch that selects one format or the other regardless of the physical interface, some just ignore what they don't understand (usually resulting in the generally positive benefit of ignoring SCMS encoding), and some indeed gag on the "other" format. But simply fixing the physical interface works far more often than it doesn't.

Adapters between different formats:

Input/output circuits

See also

Links

Standards

  • IEC 60958-3:2006 (old name: IEC 958-3:1989)
  • JEITA CPR-1205 (former EIAJ CP-340 1987-9 & EIAJ CP-1201)
  • (CP-1201 Japanese equivalent of IEC 60958)

Contributors

Sources