|
给你三个参考资料看一下,第二个是英文的* P A7 B, ] U8 s% c
参考一:部分传输接口
& l, M2 v! w1 i; j+ e' y$ ~VGA输入接口:VGA 接口采用非对称分布的15pin 连接方式,其工作原理:是将显存内以数字格式存储的图像( 帧) 信号在RAMDAC 里经过模拟调制成模拟高频信号,然后再输出到等离子成像,这样VGA信号在输入端(LED显示屏内) ,就不必像其它视频信号那样还要经过矩阵解码电路的换算。从前面的视频成像原理可知VGA的视频传输过程是最短的,所以VGA 接口拥有许多的优点,如无串扰无电路合成分离损耗等。
" _7 G( q1 r: E3 \& [
/ d$ D& y7 z" ]- l( IDVI输入接口:DVI接口主要用于与具有数字显示输出功能的计算机显卡相连接,显示计算机的RGB信号。DVI(Digital Visual Interface)数字显示接口,是由1998年9月,在Intel开发者论坛上成立的数字显示工作小组(Digital Display Working Group简称DDWG),所制定的数字显示接口标准。
2 b( ?/ ]$ f9 M# uDVI数字端子比标准VGA端子信号要好,数字接口保证了全部内容采用数字格式传输,保证了主机到监视器的传输过程中数据的完整性(无干扰信号引入),可以得到更清晰的图像。
0 i5 i3 y* j* f/ j8 `1 P& s' E5 G2 B
标准视频输入(RCA)接口:也称AV 接口,通常都是成对的白色的音频接口和黄色的视频接口,它通常采用RCA(俗称莲花头)进行连接,使用时只需要将带莲花头的标准AV 线缆与相应接口连接起来即可。AV接口实现了音频和视频的分离传输,这就避免了因为音/视频混合干扰而导致的图像质量下降,但由于AV 接口传输的仍然是一种亮度/色度(Y/C)混合的视频信号,仍然需要显示设备对其进行亮/ 色分离和色度解码才能成像,这种先混合再分离的过程必然会造成色彩信号的损失,色度信号和亮度信号也会有很大的机会相互干扰从而影响最终输出的图像质量。AV还具有一定生命力,但由于它本身Y/C混合这一不可克服的缺点因此无法在一些追求视觉极限的场合中使用。 8 q2 o* h4 A3 d, |& t
1 `; P! B( X- T" U9 `
S视频输入:S-Video具体英文全称叫Separate Video,为了达到更好的视频效果,人们开始探求一种更快捷优秀清晰度更高的视频传输方式,这就是当前如日中天的S-Video(也称二分量视频接口),Separate Video 的意义就是将Video 信号分开传送,也就是在AV接口的基础上将色度信号C 和亮度信号Y进行分离,再分别以不同的通道进行传输,它出现并发展于上世纪90年代后期通常采用标准的4芯(不含音效) 或者扩展的7芯( 含音效)。带S-Video接口的显卡和视频设备( 譬如模拟视频采集/ 编辑卡电视机和准专业级监视器电视卡/电视盒及视频投影设备等) 当前已经比较普遍,同AV 接口相比由于它不再进行Y/C混合传输因此也就无需再进行亮色分离和解码工作,而且使用各自独立的传输通道在很大程度上避免了视频设备内信号串扰而产生的图像失真,极大地提高了图像的清晰度,但S-Video 仍要将两路色差信号(Cr Cb)混合为一路色度信号C,进行传输然后再在显示设备内解码为Cb 和Cr 进行处理,这样多少仍会带来一定信号损失而产生失真(这种失真很小但在严格的广播级视频设备下进行测试时仍能发现) ,而且由于Cr Cb 的混合导致色度信号的带宽也有一定的限制,所以S -Video 虽然已经比较优秀但离完美还相去甚远,S-Video虽不是最好的,但考虑到目前的市场状况和综合成本等其它因素,它还是应用最普遍的视频接口。
, w8 {, g4 I- ^5 B' K8 a6 |' ]- {
视频色差输入接口:目前可以在一些专业级视频工作站/编辑卡专业级视频设备或高档影碟机等家电上看到有YUV YCbCr Y/B-Y/B-Y等标记的接口标识,虽然其标记方法和接头外形各异但都是指的同一种接口色差端口( 也称分量视频接口) 。它通常采用YPbPr 和YCbCr两种标识,前者表示逐行扫描色差输出,后者表示隔行扫描色差输出。由上述关系可知,我们只需知道Y Cr Cb的值就能够得到G 的值( 即第四个等式不是必要的),所以在视频输出和颜色处理过程中就统一忽略绿色差Cg 而只保留Y Cr Cb ,这便是色差输出的基本定义。作为S-Video的进阶产品色差输出将S-Video传输的色度信号C分解为色差Cr和Cb,这样就避免了两路色差混合解码并再次分离的过程,也保持了色度通道的最大带宽,只需要经过反矩阵解码电路就可以还原为RGB三原色信号而成像,这就最大限度地缩短了视频源到显示器成像之间的视频信号通道,避免了因繁琐的传输过程所带来的图像失真,所以色差输出的接口方式是目前各种视频输出接口中最好的一种。
' z, t, b# m/ K+ s) r0 @9 l. {: E. Z# N! N, y
HDMI接口:HDMI是基于DVI(Digital Visual Interface)制定的,可以看作是DVI的强化与延伸,两者可以兼容。HDMI在保持高品质的情况下能够以数码形式传输未经压缩的高分辨率视频和多声道音频数据,最高数据传输速度为5Gbps。HDMI能够支持所有的ATSC HDTV标准,不仅可以满足目前最高画质1080p的分辨率,还能支持DVD Audio等最先进的数字音频格式,支持八声道96kHz或立体声192kHz数码音频传送,而且只用一条HDMI线连接,免除数码音频接线。同时HDMI标准所具备的额外空间可以应用在日后升级的音视频格式中。与DVI相比HDMI接口的体积更小而且可同时传输音频及视频信号。DVI的线缆长度不能超过8米否则将影响画面质量,而HDMI基本没有线缆的长度限制。只要一条HDMI缆线,就可以取代最多13条模拟传输线,能有效解决家庭娱乐系统背后连线杂乱纠结的问题。HDMI可搭配宽带数字内容保护(High-bandwidth Digital Content Protection;HDCP),以防止具著作权的影音内容遭到未经授权的复制。正是由于HDMI内嵌HDCP内容保护机制,所以对好莱坞具有特别的吸引力。HDMI规格包含针对消费电子用的Type A连接器和PC用的Type B连接器两种,相信不久HDMI将会被PC业界采用。
: D) k, Y5 l- V( Y. L
! o8 h& l# v$ j" h- s8 eBNC 端口:通常用于工作站和同轴电缆连接的连接器,标准专业视频设备输入、输出端口。BNC电缆有5个连接头用于接收红、绿、蓝、水平同步和垂直同步信号。BNC接头有别于普通15针D-SUB标准接头的特殊显示器接口。由R、G、B三原色信号及行同步、场同步五个独立信号接头组成。主要用于连接工作站等对扫描频率要求很高的系统。BNC接头可以隔绝视频输入信号,使信号相互间干扰减少,且信号频宽较普通D-SUB大,可达到最佳信号响应效果。 % u# k" ^, l* @. ^0 O. w
! m) p: m$ }7 f- u- B9 b0 }7 I
RS232C串口:RS-232C标准(协议)的全称是EIA-RS-232C标准,其中EIA(Electronic Industry Association)代表美国电子工业协会,RS(ecommeded standard)代表推荐标准,232是标识号,C代表RS232的最新一次修改(1969),在这之前,有RS232B、RS232A。。它规定连接电缆和机械、电气特性、信号功能及传送过程。常用物理标准还有有EIA�RS-232-C、EIA�RS-422-A、EIA�RS-423A、EIA�RS-485.这里只介绍EIA�RS-232-C(简称232,RS232)。计算机输入输出接口,是最为常见的串行接口,RS-232C规标准接口有25条线,4条数据线、11条控制线、3条定时线、7条备用和未定义线,常用的只有9根,常用于与25-pin D-sub端口一同使用,其最大传输速率为20kbps,线缆最长为15米。RS232C端口被用于将计算机信号输入控制LED显示屏。
4 P1 E2 {& \- {+ z( T
1 ~6 c! A, u% O5 _- \, D* q5 bAV接口
9 i+ n6 P1 G1 Q; \$ L( H% ?! `" Q% b4 t- H1 a: a6 c1 J$ f. d
AV接口又称(RCARCA)可以算是TV的改进型接口,外观方面有了很大不同。分为了3条线,分别为:音频接口(红色与白色线,组成左右声道)和视频接口(黄色)。 - b1 T5 }9 D5 y+ K
+ x# o. J% Q8 Y5 H7 F+ i
由于AV输出仍然是将亮度与色度混合的视频信号,所以依旧需要显示设备进行亮度和色彩分离,并且解码才能成像。这样的做法必然对画质会造成损失,所以AV接口的画质依然不能让人满意。在连接方面非常的简单,只需将3种颜色的AV线与电视端的3种颜色的接口对应连接即可。
" b! O5 v$ Z% {9 H, d3 T+ Q: M总体来说,AV接口实现了音频和视频的分离传输,在成像方面可以避免音频与视频互相干扰而导致的画质下降。AV接口在电视与DVD连接中使用的比较广,是每台电视必备的接口之一。 " f2 A( X& |* q
7 } d, `! j: g
USB接口 / l% K: s" U: ^5 H& G
7 Q9 Y$ h/ i: RUSB是英文Universal Serial Bus的缩写,中文含义是“通用串行总线”。它是一种应用在PC领域的新型接口技术。早在1995年,就已经有PC机带有USB接口了,但由于缺乏软件及硬件设备的支持,这些PC机的USB接口都闲置未用。1998年后,随着微软在Windows 98中内置了对USB接口的支持模块,加上USB设备的日渐增多,USB接口才逐步走进了实用阶段。
3 j$ S1 n: g9 \" y7 w+ B8 X( w. m1 o# K( ]$ t& F" D
这几年,随着大量支持USB的个人电脑的普及,USB逐步成为PC机的标准接口已经是大势所趋。在主机(host)端,最新推出的PC机几乎100%支持USB;而在外设(device)端,使用USB接口的设备也与日俱增,例如数码相机、扫描仪、游戏杆、磁带和软驱、图像设备、打印机、键盘、鼠标等等。 8 g# Y M( B: E
Z' f- e+ |1 ? i
USB设备之所以会被大量应用,主要具有以下优点:
6 D* a- Q0 V) y3 K5 |4 H' C) d5 E1 s& |! Y7 I5 [0 v- b
1、可以热插拔。这就让用户在使用外接设备时,不需要重复“关机à将并口或串口电缆接上à再开机”这样的动作,而是直接在PC开机时,就可以将USB电缆插上使用。 k8 ? e7 h& F) Z! {, P
8 A1 E4 x3 \7 Y# e4 |
2、携带方便。USB设备大多以“小、轻、薄”见长,对用户来说,同样20G的硬盘,USB硬盘比IDE硬盘要轻一半的重量,在想要随身携带大量数据时,当然USB硬盘会是首要之选了。 # X5 \* H, H) D) f9 s
6 f3 W5 Y) S% V1 p% x3、标准统一。大家常见的是IDE接口的硬盘,串口的鼠标键盘,并口的打印机扫描仪,可是有了USB之后,这些应用外设统统可以用同样的标准与PC连接,这时就有了USB硬盘、USB鼠标、USB打印机,等等。
! u) v; _7 t, a0 ]9 T$ o+ m
2 `. l- x% D; U9 t/ I0 W$ E8 w$ e4、可以连接多个设备。USB在PC上往往具有多个接口,可以同时连接几个设备,如果接上一个有4个端口的USB HUB时,就可以再连上4个USB设备,以此类推,尽可以连下去,将你家的设备都同时连在一台PC上而不会有任何问题(注:最高可连接至127个设备)。 1 Y; s2 w l! a v9 f; I1 G* |5 T
参考二:SPDIF接口7 d! P( {$ a7 x8 A' L L* Z
SPDIF
d! i! Z4 q- d7 o3 x6 w9 C& x% F2 y8 }, p
History5 @+ O4 S. f2 C' o! [% e
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 equivalent EIAJ CP-340 1987-9 is standard.
/ R& g3 W# x* G: F4 j
' k, E4 O$ P3 c9 d
, ~7 |3 V3 R' ~, R4 f& F3 e4 a& Y9 ECharacteristics
& C+ x" q$ T' X! n3 VStandard IEC958 "Digital audio interface" from EBU (European Broadcasting Union) details:
' r- n* W9 n0 k; Z, W/ f( J
0 ^. @' k# J; ]. B t. p3 C# \1 bAudio format : linear 16 bit default, up to 24 bit expandable
" m' A8 ^0 A) G4 o. l8 oAllowed sampling frequencies (Fs) of the audio:
. Y( L& L7 u* W# U( Y# l* `44.1kHz from CD ! }; S9 r' V/ F( x8 f4 }+ \6 S, y
48 kHz from DAT $ v9 `4 R3 q h) h' |
32 kHz from DSR
& }3 m) I; E! l$ X7 U( V, H6 j! I5 \One way communication: from a transmitter to a receiver.
% f; {" K' ~, B& t9 n j: I4 dControl information: 2 z1 g5 ?5 d0 Z5 M
V (validity) bit : indicates if audio sample is valid.
% Y$ j% J) Q) n9 hU (user) bit : user free coding i.e. running time song, track number.
: g; b% B* n9 J" lC (channel status) bit : emphasis, sampling rate and copy permit.
, T5 j& M1 J8 n# X* @, fP (parity) bit : error detection bit to check for good reception. 8 [0 N4 E: ~4 H% p, F
Coding format: biphase mark except the headers (preambles), for sync purposes. % g9 M" i: C# @6 q, \$ y7 ~$ k, U) c
Bandwidth occupation : 100kHz up to 6Mhz (no DC!) & F7 _5 e6 A# {- Q" S" b
Signal bitrate is 2.8Mhz (Fs=44.1kHz), 2Mhz (Fs=32kHz) and 3.1Mhz (Fs=48kHz).
0 Z7 }5 G$ a, u0 Y) B. e5 N7 NPhysical connection:
; m: c( T. W8 QCable: 75ohm +/-5% (l<10m) or 75ohm +/-35% (l>10m) - I, {! m* s1 R& W
Line driver:
6 Q2 W& a9 }/ Y5 h& G L' hZout: 75ohm +/-20% (100kHz .. 6Mhz) ' Q, A$ n$ P g7 O' N
Vout: 0.4Vpp .. 0.6Vpp, <0.05Vdc (75ohm terminated) ! G( t: s& S2 H/ k' ~
Line receiver:
, t# [( k( P! ?8 ?Zin: 75ohm +/-5% 5 C2 t9 @1 h$ G' F9 k; u0 E
Vin: 0.2Vpp .. 0.6Vpp
8 W( @! ]0 v/ L9 c6 A( F
4 s* t& \' }9 ^2 A; J& }The interface1 h/ l- ?+ f! C# P5 R8 F
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.
/ P: z) X' D! k+ o$ y% E4 y: k+ L$ F6 W# z' O+ Z- ^$ g
Here is a short comparision table of AES/EBU and S/PDIF interfaces:
. Z% E; g/ E$ P) J [8 [/ t ^; ?: R1 k: t. x C& W( u1 m" |. f
AES/EBU S/PDIF (IEC-958); n1 h! {: u8 l0 K* t1 e& f5 F
( p" r5 M( p' Y( |+ d- T# ACabling 110 ohm shileded TP 75 ohm coaxial or fiber
- h: n2 k# B3 r! nConnector 3-pin XLR RCA (or BNC)0 f9 j$ K Q) I7 e. y9 x- ~
Signal level 3..10V 0.5..1V
; ?- Z4 m6 f5 \! a1 ]' M) MModulation biphase-mark-code biphase-mark-code: S; d7 D& b% L8 U. |2 F
Subcode information ASCII ID text SCMS copy protection info3 j e/ f- G7 I) _/ T. d5 ?
Max. Resolution 24 bits 20 bits (24 bit optional)
m$ h6 T8 B# o4 A& e
6 U" L/ F/ d7 o# I8 m. sNOTE: 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. 1 Z) p) Z2 D" Z$ f, Z* [
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). - @7 }1 I: M# c1 f0 ?
0 \0 v9 A) D z! ?6 q& Z8 F8 X4 h: V0 m lBoth 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.
. O Y, ]: p4 u/ t2 Z& |- \
( ?, k3 W0 T3 q# _) ~& nNote on HDR-2 (2 pin header) interface used in some PC products:
9 `8 [, l$ ^* [7 yMany 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. 3 w7 m& z* x: c
3 B- c2 ]$ C; }% m6 f/ l a0 o; u" v3 |
Multi channel audio and S/PDIF$ h! y8 P4 |* B/ s
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). # \4 \# _2 R, T! _; M, c& `) E
1 v/ f8 d8 _% N8 g% L6 _# |" YThe equipments which can handle both normal audio and IEC61937 just look at those header bits to determine what to do with the received data. ' a3 p" B7 t5 ^, W, i- \
/ M5 m* J# p8 O, y& ]
5 b- e0 k/ k$ {6 LCabling details% _. v1 j( ^$ r, q6 e# _
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. : E7 y& ~; `9 b" i, z
% P* o& b9 k' X, c$ j6 eAES/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. & d' a% y: F* y0 b1 Y# I; {
& n z# H" t6 T. E
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).
+ A0 W- v8 Y( ~
- n& l1 o# k P
- s2 F8 O# Z5 `2 I9 X) @* xWhat can make difference in the sound of digital signal ?, m* o$ U! N' l7 F% G1 B( {6 N
There are two things which can cause differences between the sound of digital interfaces: 8 i/ M x: T6 K6 x( b6 J$ [6 ~
& t& @, M9 ^( J3 S: [9 ?- {& Y- C. `. F8 ^
1. Jitter (clock phase noise)
9 Y- D5 Z$ p# j1 K7 n* w" YThis 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. - o8 l5 e( G! b7 i# W
8 ]9 J8 M. K" g/ d" I- |% _/ ]
" N, [7 O$ Q+ o, ^
2. Errors2 w; J0 f( u) ^
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. 0 f0 S9 [" L/ j% O
& D( X! |/ q& _6 F* v" s- d
$ ]: y1 Y$ k# Z6 s) J" gS/PDIF signals/ ?9 N/ k! P. j) p _
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. ; Q1 B3 b' ?$ Z: a8 ], n$ Q
$ ^* w [5 l8 a& C/ W
For each sample, two 32-bit words are transmitted, which results in a bit-rate of:
7 f# U3 l1 Y6 `- w# \* P2 Z I6 ~1 m; F( Y9 v6 @8 m1 `9 v
2.8224 Mbit/s (44.1 kHz samplingrate, CD, DAT)+ `5 W2 x r. E
3.072 Mbit/s (48 kHz sampling rate, DAT)& K, `6 |8 m; ~, U3 {( v
2.048 Mbit/s (32 kHz sampling rate, for satellite purposes)
- K9 t: c' u1 D8 B3 K$ F+ s: _
6 z3 j, I! l% V: r) S7 cThe 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). 0 e) F5 S7 M( y1 c( k/ a
: x& r* h& U) g$ C1 b- R4 M% h$ ]The Coding Format4 N& F* l+ }! h- v
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.
. @8 u* O& M1 o7 y ~( |% c# n' s$ `) v
_ _ _ _ _ _ _ _ _ _ _ _. m! M6 R, \! z e
| | | | | | | | | | | | | | | | | | | | | | | |
* y: d0 \" N3 K; B \' l$ n: yclock 0 ___ _| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_3 G/ d }" H: T5 L" K z6 n/ `
+ k8 y! m p9 T ___ _______ ___ ___! x U5 ^ s1 o( p! S# v( g/ o
| | | | | | | |0 z/ v& J4 m& S* q0 S/ x
data 0 ___ _| |_______| |___| |_______| |___: a+ P. E6 k: x1 x
signal 1 0 0 1 1 0 1 0 0 1 0- `/ R( N5 R8 O
$ D, J* [. }+ `+ J r _ ___ _ _ ___ _ ___ _) l. c$ W+ N2 j
Biphase | | | | | | | | | | | | | | | |( y0 n9 f ~" ~( s
Mark 0 ___ | | | | | | | | | | | | | | | |* O- d% ?- L9 `4 g" N3 ^/ |8 M
signal | | | | | | | | | | | | | | | |
. e0 r4 f2 [ F" I; F _| |_| |___| |_| |_| |_| |___| |_| |___
; p5 L4 c- Z8 |3 f) b3 W e8 l. c- M& I2 g4 M+ T6 m
cells 1 0 1 1 0 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 07 K2 ^% F$ F2 Z
# u/ V- Y! y; ^. d) k% j
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.
7 G6 A4 S: E) U" V1 [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).
, C* [. _; y& T3 b- V& z2 `9 B* V; v- x! q8 ^ B3 ~+ ^2 G
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):
+ J' {' q& F5 a9 F4 P, q- v
+ t: c1 l0 I% B; F7 K Preamble cell-order cell-order9 l. u$ K) D! R; S
(last cell "0") (last cell "1")
5 M k0 \, m# t8 R) W! K: P( q, c ----------------------------------------------
) m7 a& X9 T9 X. z) U. z "B" 11101000 00010111
! r+ L( ^7 M: t y4 y "M" 11100010 00011101
4 {7 T- O/ u T1 n4 S6 j0 E "W" 11100100 00011011
* D. \! h; d; W" b" ]! b3 D" @. J
Preamble B: Marks a word containing data for channel A (left)
! `$ ?$ O& l/ L& C1 K G at the start of the data-block.' I! [/ l& ?- C; H) m0 H, J
( F6 ~ C& U& |& |: ^Preamble M: Marks a word with data for channel A that isn't
. k/ B' F. F0 H- S7 e at the start of the data-block.
4 b% v; N3 g& m
8 Y. u u' S7 H! cPreamble W: Marks a word containing data for channel B. H, B- U- {# T8 ]! [6 S
(right, for stereo). When using more than 2
' j7 [ B6 C, e* Z' O channels, this could also be any other channel
. g% C9 x0 a% V) f' i0 f* E (except for A).
" Z9 K3 ?; U6 w# U; R I
, O- T& a1 D% aWord and Block Formats$ {9 M% n6 e, R% b1 i# d
Every sample is transmitted as a 32-bit word (subframe). These bits are used as follows:
) ?+ ]# V! X9 c* A9 z
1 d5 K- s- s0 ] bits meaning' P. v: l7 U- Z% K
----------------------------------------------------------
! x# p* k3 K' q1 ^$ `, k( J 0-3 Preamble (see above; special structure)5 |5 R& `9 @ \7 ^- i* x3 a
7 A' [3 r9 d. E M
4-7 Auxillary-audio-databits5 M# O! R* _0 `( Z
& x. q+ R3 z w/ ]) r
8-27 Sample
2 x; v1 P$ w% [8 K* ? ` (A 24-bit sample can be used (using bits 4-27).
; G4 P% Q7 t# f5 }* z. _ A CD-player uses only 16 bits, so only bits
3 Q' S [) N0 l( y0 s 13 (LSB) to 27 (MSB) are used. Bits 4-12 are6 X' P5 f8 n+ ~
set to 0).
8 I5 C: @$ x7 k0 b" _& S1 F
9 x9 `, X& i( j& O2 \( T 28 Validity
- a9 a, G" W" H5 R3 p (When this bit is set, the sample should not5 r; h; Y- W4 W* T
be used by the receiver. A CD-player uses; [$ N" G2 z" q4 C. Q0 z2 o
the 'error-flag' to set this bit).
7 S& Y8 f$ t* t3 ^: a1 t/ Q6 x2 b
- b# n2 z9 v( K* Q3 A/ _8 r* q5 R; J 29 Subcode-data
l* P2 C( m4 a6 Y6 m# f
# l3 @* W6 m' l) w% k4 z% O, Q! w, d" t 30 Channel-status-information
5 F! K" J3 b+ I( D# s. q T }( Q: g r$ |& T
31 Parity (bit 0-3 are not included)' {" L. \& R* @6 J/ s, M( g
# o* J1 R% q9 T" O3 T! {+ [
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": ) p' u) b! M4 _. I6 X9 u8 Q- k
"M" Ch.1 "W" Ch.2 "B" Ch.1 "W" Ch.2 "M" Ch.1 "W" Ch.2 "M" ...9 T3 F/ u5 O) o: |
7 |! M; B& n6 h& p6 e| ||_ sub __|_ sub _|| |
" c- v; s' n) ^| || || |4 Z w( ~, X% Q( L6 e
|__ Frame 191 ___||__ Frame 0 ___||__ Frame 1 ____|' g% }& |$ q* l/ R
3 _6 L% r3 C6 h |; w6 e3 Z6 J' z% @/ J4 ?! b
block-start
5 v) h: f6 Z# h. y9 r& G1 s* ]1 Z! U2 E% ^. \7 Y4 f1 A5 y$ e2 y
Channelstatus and subcode information5 m" }* n; h' r( p. F& a. y2 n; S* W
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: 9 o/ T/ G) H. L$ H6 {0 O; O
* H; I8 n7 p5 Y- g bit meaning1 I! X' l( L; k: V) v2 K
-------------------------------------------------------------; {" l; ~0 X1 g! J" G6 J2 G
0-3 controlbits:: V5 }7 t+ e# x& g* o
/ L- n. F+ F( y5 Y
bit 0: 0 (is set to 1 during 4 channel transmission)
Q3 x& |3 b: p8 i/ @8 \ bit 1: 0=Digital audio, 1=Non-audio (reserved to be 0 on old S/PDIF specs)
) y% m$ j' ~* g5 I( { bit 2: copy-protection. Copying is allowed8 c7 [0 D% ?; d$ i
when this bit is set.
/ \# L* K, v( R+ M bit 3: is set when pre-emphasis is used.
" R0 D, X! ~% ~8 J" R" m6 z1 w3 Y D( e. a' b9 b) e: o( E( W/ _
4-7 0 (reserved)
# P9 C( n+ e3 t7 @. W9 E, q& _" I# V/ p9 [6 n5 F
9-15 catagory-code:% T+ z% o2 n! D9 [' [
S1 \" K. U' _0 d% `" v
0 = common 2-channel format
* w9 x3 r5 U0 Q1 k 1 = 2-channel CD-format
4 p* s* U: p# f, R" } (set by a CD-player when a subcode is7 K0 ]( L; N# r2 o1 D4 G
transmitted)
. V3 O y, ?1 Z5 o* z, ] 2 = 2-channel PCM-encoder-decoder format& h/ j6 Z7 H+ P/ c- }
3 A- f0 O# {* S
others are not used$ [/ _" M* R) O$ U/ y+ N$ z
& L8 f% W# ?- l% x: n6 g
19-191 0 (reserved)
Q) ~2 W) S. V5 O! |( h' ]0 e* v1 Z6 [1 [ w
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
& l1 \3 K1 p% M, z* N' e1 k4 a6 @- }3 P3 l+ K' F/ w0 r
Electrical Interface
( t, F/ p. o4 f: w) mThe 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. ( ?. e8 P Q, d& l; c0 ]$ o4 U- [& S- g
/ H- @5 P0 Z8 F. i, u
( L2 w5 g' E9 f
& o3 |" _: k8 N--------------------------------------------------------------------------------
6 q# Y! h3 v2 W" R+ Z2 k
/ e4 g) `6 y6 C! ]9 t& VConverting between AES/EBU and S/PDIF interfaces
0 M$ X) F; Q$ X3 Y$ Y* P" fThere are differences in the electrical characteristics of AES/EBU and S/PDIF interfaces:
. i6 m* P/ E! a+ E! I. e6 D8 z! |: e5 N+ { @# w! c& \* Y" Y
AES/EBU uses a balanced differential line based on XLR connectors and the signal levels are 5 volts
2 x3 Y& y5 |6 [% C9 B( `( mS/P-DIF uses a coaxial unbalanced line with RCA connectors and the signal levels are around 0.5 volts 0 Q; d* `; |( n
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.
) S' U, i2 U8 VBut 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.
3 F% [9 W3 B M4 ~# z4 |
Y7 l* a v* v F3 `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.
5 J3 |0 Q/ a5 s2 M& D
" W+ ^( A1 V, B% X u7 X& A0 R7 W$ C+ S0 g+ ]* T2 E# f4 `* z
What are different types of IEC 958-interface( c9 m& m# a5 h+ x: G+ g
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).
& `% Q8 q% N$ _3 M; [. f: L
( W! P u! e# u! o3 ]0 ^, W# N
/ ~) B4 e3 W8 j8 \Jitter specifications of AES/EBU interface
+ {( R L. F% b* P$ E5 W2 CThe 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.
3 h. d7 C# i5 ~1 D( y3 f1 q
3 P( l; K0 Q9 ]
. \7 q- U/ P1 d$ `) aConversion circuits
{" l9 [+ k4 b1 l& a0 fHere 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. * \% v6 u/ M( p' a3 U$ G4 o
$ Y3 D( ]4 s- d4 W9 lRemeber 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. . k1 W- W6 P5 G+ B/ t! {
* K. I7 o$ \( a" s) R6 B
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.
8 G8 e9 s# c3 D, B$ v; N$ V; q$ o, h; y$ q# w2 x8 S
* B z* R( Y% D! M. Y) MHow to do different conversions using the circuit below% y" t4 D" ]5 |: a6 ~) j
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).
; F: `) d3 G+ ^2 z, T$ A" ]9 X2 [, q+ F: E% |; J* {/ m
AES/EBU to S/PDIF: There is complete circuit for this 8 w% C8 z( x, ?, L0 n
S/PDIF to AES/EBU: There is complete circuit for this
0 w, e$ Q+ K) ~5 K1 S5 @S/PDIF to optical: S/PDIF coax input circuit followed with optical TOSLINK output
% ]3 x3 }1 K- R' A nOptical to S/ODIF: Optical TOSLINK receiver followed with S/PDIF output buffer circuit 5 T, ~ O8 G, W9 u0 T0 t0 \
CD-ROM digital output to normal S/PDIF: S/PDIF output buffer circuit does this 9 ^2 z3 e* ?; ^; p( A6 O
CD-ROM digital output to optical: Connect optical TOSLINK output circuit to CD-ROM output
7 q, d `2 |. z$ XFor 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.
% U) r$ ]3 M0 @0 OFirst 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) $ f) i d7 L+ b' w. Z& v
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)
( @& `, c7 Q; B, Z; j' V( ~* cAfter 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.
- ~6 g; {, F6 U: l: U6 r/ N/ `# ~3 t9 m c! C1 K. \& Q
AES/EBU to S/PDIF signal level converter; `% O6 p* s. |
AES out: 2-------330 ohm-----+------------- SPDIF in
- Q2 M' c2 J- A+ H. ?1 U |7 m& g$ k$ G& v5 P$ J/ \, o7 W4 o
3--+ 91 ohm
" ^+ H) u4 E' j) Y0 m5 n9 g | |
4 y& q" h* S; y( a; s; _ 1--+------+---------+-------------
( f0 q2 k* z+ \0 n' u |
2 {) b- Q: B9 E3 ?, y" ~# G! l4 ? -& ~0 h5 b1 y o( f* v
ground; ~+ g* k- L- R" q5 z
4 L% r+ w+ r" M& t) GThe idea for this circuit is taken from articles posted to Usenet News.
1 i S/ t# J u7 @
F" g* n7 z% a! ^2 A& oIf 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.
- G$ M# x2 t# z# e5 Q ?5 N. D2 q1 h3 W
( s# s$ j) [9 j
S/PDIF to AES/EBU
* q) q/ V& a0 p0 E, j, @ _" `" k4 `7 r# g6 V
+ 5 volt | \\* n( y5 r- [/ _) Q" s
SPDIF out: | +-| O-+
! ~+ w! D' ^. N# }+ ~: A% b _ +--4,7k-+ | |_/ |
! q2 U5 A" j* S# D, [$ |- B6 i2 L, u( ` diode ^ | _ | _ | _ |
& q4 G- J% ]3 G P/ H 10 u (+) | | | \\ | | \\ | | \\ | 100 n" b0 @ i* s; R1 L& q
O--+--+-||-+--------+-+-| O--+--+-| O-+-| O-+-120 r-||-+----+-- 25 [4 _! w5 B6 I# |6 x' R4 j* B
| | | | |_/ | | |_/ |_/ | |& l/ k* J5 b; D/ g& @9 r
| +-||-+ 100n _ 2,2k | 1 k |8 G7 e' {, ?; B1 ~( D s
75r ^ diode | | IC | | AES in+ ?* W' H. ` E2 B
| | --- | --- |. I& {2 {4 X Z( M4 I
--- --- | _ 220r& g; b: T4 t2 }7 i) f0 @
| | \\ 100 n |1 p) }4 w# m: n2 a& I7 p
+--+---| O---+--120 r-||-+---+--- 3
2 z* l4 z& r+ q: n Diode = 1N914 or 1N4148 | |_/ | |
7 e+ b" R* Z2 Y | _ | 1 k +--- 1% k6 f% Q& H8 y
| | \\ | | |
) o& q2 U5 D/ V( F! u IC = 74HC04 or CMOS 4049 +---| O---+ --- ---
4 Z' \1 k5 h6 Y- M/ J |_/
( u% C( Y2 l9 K! b+ E7 _0 e
& O$ m3 U9 Q# y5 qThe idea for this circuit is taken from articles posted to Usenet News. 5 K. ^+ l* G' {/ S
4 H# L5 ]1 ^6 c, c6 x
. I# u% `9 K3 b! ~ _' M0 n7 o5 y% J' [--------------------------------------------------------------------------------
& f$ y7 ^5 a2 U5 X& A6 N% `) a- e! [7 p; ~1 Q6 E. \
S/PDIF conversion circuit building blocks2 A; L( \6 R% l! n3 D
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. 5 U' q7 U& r4 x3 r9 K
$ `% j- V( [% G2 FHere are tips for building a conversision circuits for different uses:
% X, M( I5 R3 H& b C% C1 G0 D5 d1 E8 C }/ X7 @
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.
" a8 \5 G1 V2 aOptical S/PDIF to coaxial: Select one optical S/PDIF input circuit and connet it's TTL output to any coaxial S/PDIF output circuit. ) R R- |2 \& n! U' C" `
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.
1 @5 k8 q+ d1 T! dFor other conversion needs do a little thinking and you should find quite easily the answer what blocks to connect to each other q+ Y1 y! A' X- }. `
参考三:SPDIF接口的几个误区
; |. F: ], e; d错误一:S/PDIF的同轴是数字接口,光纤是模拟接口,同轴到光纤要经过数模转换,所以光纤的音质比同轴差。% |4 X. z `# E7 c7 Q" w
其实同轴和光纤都是数字接口,上面跑的都是数字信号,只不过同轴用高低电平表示1和0,光纤用有光无光表示1和0。同轴到光纤只需要经过电光转换,不需要数模转换,不会对音质产生损伤。转换来转换去也不会有变化,这就是数字信号的好处。
4 K% ] K" R# g; [5 B" r1 {: l" Z0 n9 n" O; `
错误二:光纤比同轴的传输距离长。8 ?. f0 o+ ]( V- {% h
根据推荐的文章描述,同轴的传输距离可以达到10~15米,而光纤反而只有不到10米,大家没想到吧。为什么呢?确实,电信设备用光纤可以把信号传几十上百公里,所以大家直观的感觉是光纤肯定传得远。但是电信设备用的可是激光,而S/PDIF的光纤(学名是TOSLINK)用的是普通的发光二极管,差了十万八千里。要是S/PDIF也改用激光,那传上几公里也不成问题。只是一个激光的光模块就要几百块RMB,发光二极管顶多几块钱,厂家会选哪个呢?, n$ l( s4 Z9 }* X q L4 ~
7 Y( p! Y0 G% T+ R错误三:越好的同轴电缆音质越好,用普通AV线充当同轴电缆会损伤音质。# K4 b- m5 o- Q2 o/ B) ^5 ~
这个观点和第一个观点错在一处。对于数字信号来说,只要是满足标准规定的电缆音质都一样,超过标准规定的电缆对音质没有提升。其实标准对于同轴电缆的要求并不高,10米之内的电缆阻抗在75ohm +/-5%范围的都可以,10米以上的更是放宽到75ohm +/-35%,一般的AV电缆完全满足要求,实在没必要买发烧级的同轴线。. t7 a" G/ v- C2 e- Z! F5 S
' g5 n0 H/ K, A. N, x
错误四:如果声卡、主板没有同轴、光纤接口,但是有S/PDIF插针,那只需要自己从插针引线,直接焊上个同轴插座或者发光二极管,就能DIY出同轴、光纤接口。6 ] J9 X: ~% i
这个观点不但错误,而且危险。根据标准,S/PDIF的同轴接口工作电压最大是0.5+/-0.1V,也就是最大不超过0.6V。而声卡、主板上的S/PDIF插针的电压是普通的TTL信号,最大电压是5V,是前者的10倍!要是把这个信号直接接到同轴插座上,再连到你的功放上,我不保证你的功放一定会烧坏,但机会很大。& J7 ~ g w+ l# c! Y: S
插针直接接发光二极管的危险要小一些,牺牲的只是小小的发光二极管。因为发光二极管的工作电流很小,主板插针供应的电流太大,至少要串联个电阻才行。 |
|