Detailed description of S/pdif interface specifications

Source: Internet
Author: User

S/pdif (Sony/Philips digital interface format) is a digital audio transmission interface, which is commonly used for optical fiber and coaxial output, audio signal output value decoder, output results with high fidelity are widely used in data transmission (Digital theatre system) and Dolby Digital.

S/pdif is basically a home version that uses the AEs/EBU (also known as aes3) professional digital interface as a reference and makes some minor changes, you can use hardware with lower costs to transmit digital signals. In order to customize a unified interface specification, the IEC 60958 standard specification is used to replace AEs/EBU and S/pdif specifications. IEC 60958 defines three main types:

  • IEC 60958 type 1 balanced-three-wire transmission, using 110 ohm impedance cables and XLR connectors for professional use
  • IEC 60958 type 2 unbalanced-use the copper axis with 75 ohm impedance and the RCA connector for general use
  • IEC 60958 type 2 optical-optical fiber transmission and f05 optical fiber connectors are also used in general applications.

In fact, IEC 60958 is sometimes referred to as iec958, While IEC 60958 type 1 is the AEs/EBU (or aes3) interface, While IEC 60958 type 2 is the S/pdif interface, while the IEC 60958 type 2 connector specification uses the RCA or optical fiber connector, however, in recent years, some professional devices using S/pdif have switched to BNC connectors with 75 ohm on the same axis for better transmission quality. The following table compares AEs/EBU with S/pdif.

 

Encoding method used by iec958

Iec958 uses biphase mark code (BMC) When transmitting data. It is a phase modulation (Phase Modulation) encoding method, it is the encoding method for mixing clock signals and data signals for transmission.

The principle is to use a clock frequency that is twice the bit rate as the benchmark and split the original one-bit data into two parts, when the data is 1, the first potential (0-> 1 or 1-> 0) is changed to 10 or 01 in the clock cycle, when the data is 0, the potential is not changed to 11 or 00. At the same time, the level starting with each bit must be different from the ending level of the previous bit so that the receiver can determine the boundary of each bit, as shown in.

Iec958 communication protocol architecture

S/pdif and AES/EBU are mainly used to transmit PCM signals, such as 48 khz DAT and 44.1khz CD. However, they are also used to transmit compressed multi-channel signals.

Shows the architecture of the standard two-channel signal transmission architecture. The above is a block consisting of 192 frames ). Each frame stores a set of sample signals of two channels, which are divided into two channels: Channel A and channel B. Each group of samples consists of a sub frame, which contains two sub frames. The sub frame data length is 32 bits, which contains the preamble and auxiliary data (Aux. data, audio data, and the information and check code of the four digits. That is to say, a sub frame is 32 bits, which is 4 bytes. A frame is 8 bytes, and a block is 192x8 = 1536 bytes, each block can pass a total of 192 dual-channel samples.

Sub-Frame

To understand the data structure of iec958, we need to first understand the detailed structure of the sub frame. A sub frame is divided into several parts, as shown in. First, we will list the following table:

The 0-3 header code (preamble) is used to indicate the beginning of a sub frame. There are three types, the sub frame is Channel A, channel B, or the starting sub frame (Channel A) of a block ).

4-7 auxiliary data (Aux. data) the original block is designed to transmit information that users add on their own. However, it is common to use this block when the audio data exceeds 20-bit sampling, these four bits are used to store more sampling bits. For example, when 24-bit data is to be transferred, they are used to store the last four bits of audio data.

8-27 audio data stores the actual sampling data. The length is 20 bits and is transmitted in LSB-preferred mode. When the sampling is less than 20 bits, the unused LSB bits must be set to zero. For example, when we want to transmit 16 bits of data, we only use 12-27 BITs (where the LSB is 12 bits ), the 8-11 bit is zero.

28 (validity bit) This bit sets whether the data in this sub frame is correct. If it is set to 0, the data in this sub frame is correctly received, if this bit is 1, the receiving end should ignore this group of sub frames. For example, if a sample cannot be read when the CD turntable reads the CD data, the valid bit in the sub frame representing the sample group is set to 1.

29 user bit (User bit) this bit is defined by the user. Each group of samples transmits one bit until the 192 groups of samples are passed and constitute a 192 bit information, two channels each have a set of 192-bit user information.

Channel status bit: this bit is the same as the user bit. Each group of samples transmits one bit, the last two channels form a 192-bit channel status ). The status information of the 192-bit channel is divided into two different structures: professional and consumer. It is determined by the first bit and then the professional mode when set to 1, if it is set to 0, then it is in consumer mode.

31 The same-bit check bit (parity bit) is used to identify whether an error occurs when there are odd digits. It is a simple error check method, this section uses the even-bit parity check (even parity check ).

Preamble Definition

As mentioned above, the header code (preamble) is used to indicate the beginning of a sub frame. Three main configurations, x, y, and z, indicate different meanings, X indicates that the sub frame and Y of Channel A are transmitted. In this case, channel B is transmitted, while Z is special. In this case, Channel A is transmitted, it is the starting sub frame of a block, as shown in.

The data value in the Table above is the data value that is added to the front of the entire sub frame after the other data in the sub frame is encoded by BMC. Therefore, the total number is eight codes, represents the time sequence of four digits. In addition, in addition to three types of configuration, X, Y, and Z, the preceding table lists another set of values that are opposite to the original data direction, which group of values to use depends on the most tail level of the previous Group of sub frames. When the current group of sub frames is at the lowest level of 0, use the value in the column on the left, if the value is 1, use the column on the right. In this way, the acceptor can process the data correctly.

In a block, when preamble is configured as Z, it represents the starting point of a block, as shown in.

Structure of channel status

As described above, each group of sub frames has a channel status bit. A block has 192 sets of frames, which can constitute a 192-bit channel status structure ), the two channels each have a set of 192-bit user information. The 192-bit channel status structure has two different structures, which are determined by the first bit. When the first bit is 0, the table generally uses the consumer structure, the first digit is the professional structure of the table in the era of 1, which is the following two structural charts.

  • Consumer channel status Structure)

  • Professional channel status Structure)

In actual use, the above two charts can only be used as reference, because the channel status structure has many different versions, so far, many different devices in the world have different versions, and some devices even ignore the state of not processing channels. For example, there are many devices that do not process content protection information or sampling frequency information in general household versions... And so on. Therefore, this article does not describe the detailed definitions in the channel status. If you are interested, you can refer to iec60958, aes3... And other technical documents.

References

Http://www.diyzone.net/print.php? SID = 1, 1148

Http://www.hardwarebook.info/S/PDIF

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.