SPDIF,严谨的写法应该是S/PDIF,是SONY/PHILIPS Digital Interface,
SONY/PHILIPS 数字音频接口的缩写简称。SPDIF是一个数字信号的传递规范,同轴和光纤只是SPDIF信号的两种不同传输载体。同轴采用电的方式传播,光纤采用光的方式传播。一般来讲,近距离传输推荐使用同轴,因为光纤需要进行二次光电信号转换。长距离传输推荐光纤,避免因距离产生信号衰竭。
RS232C串口:RS-232C标准(协议)的全称是EIA-RS-232C标准,其中EIA(Electronic Industry Association)代表美国电子工业协会,RS(ecommeded standard)代表推荐标准,232是标识号,C代表RS232的最新一次修改(1969),在这之前,有RS232B、RS232A。。它规定连接电缆和机械、电气特性、信号功能及传送过程。常用物理标准还有有EIARS-232-C、EIARS-422-A、EIARS-423A、EIARS-485.这里只介绍EIARS-232-C(简称232,RS232)。计算机输入输出接口,是最为常见的串行接口,RS-232C规标准接口有25条线,4条数据线、11条控制线、3条定时线、7条备用和未定义线,常用的只有9根,常用于与25-pin D-sub端口一同使用,其最大传输速率为20kbps,线缆最长为15米。RS232C端口被用于将计算机信号输入控制LED显示屏。
USB是英文Universal Serial Bus的缩写,中文含义是“通用串行总线”。它是一种应用在PC领域的新型接口技术。早在1995年,就已经有PC机带有USB接口了,但由于缺乏软件及硬件设备的支持,这些PC机的USB接口都闲置未用。1998年后,随着微软在Windows 98中内置了对USB接口的支持模块,加上USB设备的日渐增多,USB接口才逐步走进了实用阶段。
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. Several interfaces exist to perform such tasks, from which one has grown to the audio standard worldwide: IEC958 1989-03 (consumer Part) from the EBU. In Japan an作者: fumsga 时间: 2012-2-1 11:31
equivalent EIAJ CP-340 1987-9 is standard.
Characteristics
Standard IEC958 "Digital audio interface" from EBU (European Broadcasting Union) details:
Audio format : linear 16 bit default, up to 24 bit expandable
Allowed sampling frequencies (Fs) of the audio:
44.1kHz from CD
48 kHz from DAT
32 kHz from DSR
One way communication: from a transmitter to a receiver.
Control information:
V (validity) bit : indicates if audio sample is valid.
U (user) bit : user free coding i.e. running time song, track number.
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:
Cable: 75ohm +/-5% (l<10m) or 75ohm +/-35% (l>10m)
Line driver:
Zout: 75ohm +/-20% (100kHz .. 6Mhz)
Vout: 0.4Vpp .. 0.6Vpp, <0.05Vdc (75ohm terminated)
Line receiver:
Zin: 75ohm +/-5%
Vin: 0.2Vpp .. 0.6Vpp
The interface
IEC958 is a newer standard which supersedes AES/EBU and also S-PDIF. The S/PDIF interface (IEC-958) 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.
Here is a short comparision table of AES/EBU and S/PDIF interfaces:
AES/EBU S/PDIF (IEC-958)
Cabling 110 ohm shileded TP 75 ohm coaxial or fiber
Connector 3-pin XLR RCA (or BNC)
Signal level 3..10V 0.5..1V
Modulation biphase-mark-code biphase-mark-code
Subcode information ASCII ID text SCMS copy protection info
Max. Resolution 24 bits 20 bits (24 bit optional)
NOTE: AES/EBU also exists in 75 ohm/BNC version (AES-3id-1995 standard). 75 ohm BNC version of AES/EBU is very electrically similar to 75 ohm coaxial S/PDIF shown above.
The electrical characteristics of AES/EBU are based on on RS-422, so basically any differential RS-422 chip will do as the receiver and transmitter chips. S/PDIF coaxial interface is not specificaly based on any other standard I know of (but is quite similar in signal levels and bandwidth requrements to some video signals).
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.
Note on HDR-2 (2 pin header) interface used in some PC products:
Many modern PC CD-ROM drives and some soundcards (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 travelling inside the computer (the normal output driver system and input amplifiers can be avoided). The downnside 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
IEC958 was named IEC60958 at 1998. IEC60958 (The S/PDIF) can carry normal audio and IEC61937 datastreams. IEC61937 datastreams can contain multichannel sound like MPEG2, AC3 or DTS. When IEC61937 datastrams are transferred, the bits which normally carry audio samples are replaced with the databits from the datastream 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 IEC61937 just look at those header bits to determine what to do with the received data.
Cabling details
S/PDIF (IEC-958) uses 75 ohm coaxial cable and RCA connectors. 75 ohm 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 ohm coaxial cable.
AES/EBU-interface uses the well known symmetrical connections with transformer isolation and an output impedance of 110 ohm. 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 ohm to 90 ohm 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 ohm 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 trasmitted 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 fiberoptic 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:
1. 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-recoders, DAT tape decs 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.
2. 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.
S/PDIF signals
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:
The output impedance is standard 75 ohm, 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 ohm coaxial cable (a good video accessory cable works also as good S/PDIF cable).
The Coding Format
The digital signal is coded using作者: fumsga 时间: 2012-2-1 11:31
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.
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 databits 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 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" ...
Channelstatus and subcode information
In each block, 384 bits of channelstatus 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-3 controlbits:
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)
bit 2: copy-protection. Copying is allowed
when this bit is set.
bit 3: is set when pre-emphasis is used.
4-7 0 (reserved)
9-15 catagory-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 ohm 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/P-DIF 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/P-DIF 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/P-DIF land.
The big problem comes in the fact that MANY products out there are VERY picky about what they see in the bits, and even though a given signal may fall within the letter of the 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 cna 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 958-interface
There are 2 implementations of IEC 958: consumer and professional. Those are referred in standard as IEC958 Types I and II. IEC958 professional format is same as AES/EBU but is carried over same type of coaxial or optical interface as consumer S/PDIF. IEC958 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 IEC958 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
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 considrably tighter. A draft AES/EBU standard specifies the D/A converter clock at 1 ns jitte; 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
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.
Remeber 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作者: fumsga 时间: 2012-2-1 11:31
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.
How to do different conversions using the circuit below
Here are some ideas how to make the most common conversions using the circits described below. Note: there is no guarantee that the information in this or the circuit are correct (they are believed to be correct but note tested by the author).
AES/EBU to S/PDIF: There is complete circuit for this
S/PDIF to AES/EBU: There is complete circuit for this
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. To build an dapter you need two parts connected after each other.
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 slected 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
AES out: 2-------330 ohm-----+------------- SPDIF in
|
3--+ 91 ohm
| |
1--+------+---------+-------------
|
-
ground
The idea for this circuit is taken from articles posted to Usenet News.
If you are looking for a professional components for 110 ohm to 75 ohm interconnection then check Canare web site where they have 110 OHM-75 OHM IMPEDANCE TRANSFORMERS.
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 levle 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 conversision 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 connet 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 caoxial 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
参考三:SPDIF接口的几个误区
错误一:S/PDIF的同轴是数字接口,光纤是模拟接口,同轴到光纤要经过数模转换,所以光纤的音质比同轴差。
其实同轴和光纤都是数字接口,上面跑的都是数字信号,只不过同轴用高低电平表示1和0,光纤用有光无光表示1和0。同轴到光纤只需要经过电光转换,不需要数模转换,不会对音质产生损伤。转换来转换去也不会有变化,这就是数字信号的好处。