S/PDIF explained

S/PDIF (Sony/Philips Digital Interface)[1] [2] is a type of digital audio interface used in consumer audio equipment to output audio over relatively short distances. The signal is transmitted over either a coaxial cable using RCA or BNC connectors, or a fibre-optic cable using TOSLINK connectors. S/PDIF interconnects components in home theaters and other digital high-fidelity systems.

S/PDIF is based on the AES3 interconnect standard.[3] S/PDIF can carry two channels of uncompressed PCM audio or compressed 5.1 surround sound; it cannot support lossless surround formats that require greater bandwidth.[4]

S/PDIF is a data link layer protocol as well as a set of physical layer specifications for carrying digital audio signals over either optical or electrical cable. The name stands for Sony/Philips Digital Interconnect Format but is also known as Sony/Philips Digital Interface. Sony and Philips were the primary designers of S/PDIF. S/PDIF is standardized in IEC 60958 as IEC 60958 type II (IEC 958 before 1998).[5]

Applications

A common use is to carry two channels of uncompressed digital audio from a CD player to an amplifying receiver.

The S/PDIF interface is also used to carry compressed digital audio for surround sound as defined by the IEC 61937 standard. This mode is used to connect the output of a Blu-ray, DVD player or computer, via optical or coax, to a home theatre amplifying receiver that supports Dolby Digital or DTS Digital Surround decoding.

Hardware specifications

S/PDIF was developed at the same time as the main standard, AES3, used to interconnect professional audio equipment in the professional audio field. This resulted from the desire of the various stakeholders to have at least sufficient similarities between the two interfaces to allow the use of the same, or very similar, designs for interfacing ICs.[6] S/PDIF is nearly identical at the protocol level, but uses either coaxial cable (with RCA connectors) or optical fibre (TOSLINK; i.e., JIS F05 or EIAJ optical), both of which cost less than the XLR connection used by AES3. The RCA connectors are typically colour-coded orange to differentiate from other RCA connector uses such as composite video. S/PDIF uses 75 Ω coaxial cable while AES3 uses 110 Ω balanced twisted pair.

Signals transmitted over consumer-grade TOSLINK connections are identical in content to those transmitted over coaxial connectors. Optical provides electrical isolation that can help address ground loop issues in systems. The electrical connection can be more robust and supports longer connections.[7]

Comparison of AES3 and S/PDIF[8]
AES3S/PDIF
BalancedUnbalancedCopperOptical
Cabling110 Ω STP75 Ω coaxial75 Ω coaxialOptical fibre
Connector3-pin XLRBNCRCA or BNCTOSLINK
Output level2–7 V peak to peak1.0–1.2 V peak to peak0.5–0.6 V peak to peak
Min. input level0.2 V0.32 V0.2 V
Max. distance1000 m100 m10 m
ModulationBiphase mark code
Subcode informationASCII id. textSCMS copy protection info.
Audio bit depth24 bits20 bits (24 bits, optionally)

Protocol specifications

S/PDIF is used to transmit digital signals in a number of formats, the most common being the 48 kHz sample rate format (used in Digital Audio Tape) and the 44.1 kHz format, used in CD audio. In order to support both sample rates, as well as others that might be needed, the format has no defined bit rate. Instead, the data is sent using biphase mark code, which has either one or two transitions for every bit, allowing the original word clock to be extracted from the signal itself.

S/PDIF protocol differs from AES3 only in the channel status bits; see for the high-level view. Both protocols group 192 samples into an audio block, and transmit one channel status bit per sample, providing one 192-bit channel status word per channel per audio block. For S/PDIF, the 192-bit status word is identical between the two channels and is divided into 12 words of 16 bits each, with the first 16 bits being a control code.

S/PDIF control word components
ByteBit width=45%Unset (0) width=45%Set (1)
00 Consumer (S/PDIF) Professional (AES3)
(changes meaning to AES3 channel status word)
1 Normal PCM Compressed data
2 Copy restrict Copy permit
32 channels 4 channels
4
5 No pre-emphasis Pre-emphasis 50/15
Mode, defines subsequent bytes; values other than zero are undefined.
10–6Audio source category indicating the type of source equipment (general, CD-DA, DVD, etc.)
7L-bit, original or copy
20–3Source number
4–7Channel number
30–3Sampling frequency: : 44.1 kHz, : 48 kHz, : 32 kHz
4–5Clock accuracy: : 50ppm,: 1100ppm, : variable pitch (requires compatible receiver)
6–7colspan="2"
4 0Word length 20 bitsWord length 24 bits
1–3Sample length (0: undefined, 1–4: word length minus 1-4 bits, 5: full word length)
4–7colspan="2"
5–100-7EAN-13 code (possibly in binary-coded decimal)
110-3
4–7colspan="2"
12–130-7rowspan=2 colspan="2"
140–3
4-7ISRC (encoding unclear; ISRC is 2 alphabetic, 3 alphanumeric and 7 numeric, which is 262 × 363 × 107 ≈ 248.164 and so obviously fits into 7.5 bytes, but a naive 5 ASCII + 7 BCD would be 8.5 bytes)
15–21 0–7
0–7

Data framing

S/PDIF is meant to be used for transmitting 20-bit audio data streams plus other related information. S/PDIF can also transport 24-bit samples by way of four extra bits; however, not all equipment supports this, and these extra bits may be ignored.

To transmit sources with less than 20 bits of sample accuracy, the superfluous bits will be set to zero, and the 4:1 - 3 bits (sample length) are set accordingly.

IEC 61937 encapsulation

IEC 61937 defines a way to transmit compressed, multi-channel data over S/PDIF.[9]

A number of encodings are available over IEC 61937, including Dolby AC-3/E-AC-3, Dolby TrueHD, MP3, AAC, ATRAC, DTS, and WMA Pro.[10] [11]

Limitations

The receiver does not control the data rate, so it must avoid bit slip by synchronizing its reception with the source clock. Many S/PDIF implementations cannot fully decouple the final signal from influence of the source or the interconnect. Specifically, the process of clock recovery used to synchronize reception may produce jitter.[12] [13] [14] If the DAC does not have a stable clock reference then noise will be introduced into the resulting analog signal. However, receivers can implement various strategies that limit this influence.[15]

See also

External links

Notes and References

  1. Web site: S/PDIF Information . . 3 April 2018. 21 July 2017.
  2. Web site: S/PDIF . 3 April 2018.
  3. Web site: SoundSystem SixPack 5.1+ True 6 Channel + Digital In & out – Stuff Worth Knowing. TerraTec. 43. 18 January 2011. 5 July 2001.
  4. Book: High-Definition DVD Handbook : Producing for HD-DVD and Blu-Ray Disc: Producing for HD-DVD and Blu-Ray Disc . Mark Johnson . Charles Crawford . Chris Armbrust . McGraw Hill Professional . 2007 . 9780071485852 . 4–10 . ...connections such as S/PDIF do not have the bandwidth necessary to deliver uncompressed surround sound... . registration .
  5. Web site: Sound card. kioskea.net. Kioskea Network. 4 August 2010. The components of a sound card are: [...] An SPDIF digital output (Sony Philips Digital Interface, also known as S/PDIF or S-PDIF or IEC 958 or IEC 60958 since 1998). This is an output line that sends digitised audio data to a digital amplifier using a coaxial cable with RCA connectors at the ends..
  6. Finger, Robert A. 1992 'AES3-1992: The RevisedTwo-ChannelDigital Audio Interface', J.AudioEng.Soc., Vol.40, No. 3, 1992 March, p108
  7. Web site: SPDIF connections: Get connected, not confused . 2024-05-15.
  8. Web site: Interfacing AES3 & S/PDIF . 18 January 2011 . 2 . 2001 . Dennis Bohn . Rane Corporation.
  9. Digitalton - Schnittstelle für nichtlinear-PCM-codierte Audio-Bitströme unter Verwendung von IEC 60958 - Teil 1: Allgemeines (IEC 61937-1:2007 + A1:2011); Deutsche Fassung EN 61937-1:2007 + A1:2011
  10. Web site: FFmpeg: libavformat/spdif.h File Reference . ffmpeg.org.
  11. Web site: Representing Formats for IEC 61937 Transmissions - Win32 apps . learn.microsoft.com . en-us . 15 May 2023.
  12. Giorgio Pozzoli. "DIGITabilis: crash course on digital audio interfaces" tnt-audio.com.
  13. Chris Dunn, Malcolm J. Hawksford. "Is the AES/EBU/SPDIF Digital Audio Interface Flawed?" AES Convention 93, paper 3360.
  14. Web site: https://web.archive.org/web/20170701142216/http://www.audiocraftersguild.com/AandE/npt.on.jitter2.htm. 1 July 2017. Norman. Tracy. On Jitter, the S/PDIF Standard, and Audio DACs..
  15. Paul. Lesso. A High Performance S/PDIF Receiver. https://web.archive.org/web/20140604060307/http://www.wolfsonmicro.com/documents/uploads/misc/en/A_high_performance_SPDIF_receiver_Oct_2006.pdf. 4 June 2014. Audio Engineering Society. 2006. AES Convention 121, paper 6948