AN22 Application Note - 6 7 Fs: Sample Frequency 0 0 Not indicated. Receiver default to 48 kHz and manual override or auto set enabled 0 1 48 kHz. Man. override or auto disabled 1

Embed Size (px)

Text of AN22 Application Note - 6 7 Fs: Sample Frequency 0 0 Not indicated. Receiver default to 48 kHz and...

  • 1

    Copyright Cirrus Logic, Inc. 1998(All Rights Reserved)

    Cirrus Logic, Inc.Crystal Semiconductor Products DivisionP.O. Box 17847, Austin, Texas 78760(512) 445 7222 FAX: (512) 445 7581http://www.crystal.com

    AN22

    Application Note

    OVERVIEW OF DIGITAL AUDIO INTERFACE DATA STRUCTURESClif Sanchez & Roger Taylor

    The following information is provided for conve-nience, but by no means constitutes the entire spec-ification. Also included is information from theIEC958 and the new AES3-199x and TC84 docu-ments. The AES3-199x and TC84 documents havenot received approval as of the printing of this datasheet. To guarantee conformance, a copy of the ac-tual specification should be obtained from the Au-dio Engineering Society or ANSI (ANSIS4.40-1985) for the AES3 document, and the Inter-national Electrotechnical Commission for theIEC958 document.

    The AES/EBU interface is a means for seriallycommunicating digital audio data through a singletransmission line. It provides two channels for au-dio data, a method for communicating control in-formation, and some error detection capabilities.

    The control information is transmitted as one bitper sample and accumulates in a block structure.The data is biphase encoded, which enables the re-ceiver to extract a clock from the data. Coding vio-lations, defined as preambles, are used to identifysample and block boundaries.

    Frames Sub-frames and Blocks

    An audio sample is placed in a structure known asa sub-frame. The sub-frame, shown in Figure 1,consists of 4 bits of preamble, 4 bits of auxiliarydata, 20 bits of audio data, 3 bits called validity, us-er, and channel status, and a parity bit. The pream-ble contains biphase coding violations andidentifies the start of a sub-frame. The audio sam-ple word length can vary up to 24 bits and is trans-mitted LSB first. If the word length is greater than20 bits, the sample occupies both the audio and

    FEB 98AN22REV2

  • AN22

    2 AN22REV2

    auxiliary data fields. If it is 20 bits or less, the aux-iliary field can be used for other applications suchas voice. The parity bit generates even parity andcan detect an odd number of transmission errors inthe sub-frame. The validity bit, when low, indicatesthe audio sample is fit for conversion to analog.The user and channel status bits are sent once persample and, when accumulated over a number ofsamples, define a block of data. The user bit chan-nel is undefined and available to the user for anypurpose. The channel status bit conveys, over anentire block, important information about the audiodata and transmission link. Each of the two audiochannels has its own channel status data with ablock structure that repeats every 192 samples.

    As shown in Figure 2, two consecutive sub-framesare defined as a frame, containing channels A andB, and 192 frames define a block. The preamblesthat identify the start of a sub-frame are differentfor each of the two channels with another uniqueone identifying the beginning of a channel statusblock.

    Modulation and Preambles

    The data is transmitted with biphase-mark encod-ing to minimize the DC component and to allowclock recovery from the data. As illustrated inFigure 3, the 1s in the data have transitions in thecenter, and the 0s do not, after biphase-mark en-coding. Also, the biphase-mark data switches po-larity at every data bit boundary. Since the value ofthe data bit is determined by whether there is a tran-sition in the center of the bit, the actual polarity ofthe signal is irrelevant.

    Each sub-frame starts with a preamble. This allowsa receiver to lock on to the data within onesub-frame. There are three defined preambles: one

    Aux Data

    0 3 4 7

    LSB

    8

    Audio DataPreamble

    28 29 30 31

    V U C PMSB

    27bitSub-frame

    Validity

    User Data

    Channel Status Data

    Parity Bit

    Figure 1. Sub-frame Format

    Channel AZ Channel BYChannel AX Channel BY Channel AX Channel BY X

    Sub-frame Sub-frame

    Start of Channel Status Block

    Frame 0Frame 191 Frame 1

    Preambles

    Figure 2. Frame/Block Format

    1 0 1 1 0 0 1 1 0 1 0 1

    Clock(2 times bit rate)

    Data

    Biphase-MarkData

    1 0 0 0 1 1

    Figure 3. Biphase-Mark Encoding

  • AN22

    AN22REV2 3

    for each channel and one to indicate the beginningof a channel status block (which is also channelA).To distinguish the preambles from arbitrary datapatterns, the preambles contain two biphase-markviolations. Biphase-mark data is required to transi-tion at every bit period, but each preamble violatesthat requirement twice. In Figure 3 each bit bound-ary, indicated by the dashed lines, contains a tran-sition in the biphase data. Each preamble shown in

    Figure 4 has two bit boundaries with no transition,which enables the receiver to recognize the data asa preamble.

    Table 1. Preambles

    Biphase Patterns ChannelX 11100010 or 00011101 Ch. AY 11100100 or 00011011 Ch. BZ 11101000 or 00010111 Ch. A & C.S. Block Start

    Preamble X

    Preamble Y

    Preamble Z

    1 1 1 0 1 0 0 0

    1 1 1 0 0 0 1 0

    1 1 1 0 0 1 0 0

    Figure 4. Preamble Forms

    0

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    11

    12

    13

    14

    15

    16

    17

    18

    19

    20

    21

    22

    23 Cyclic redundancy check character

    Reliability flags

    Time of day code

    (32-bit binary)

    Local sample address code

    (32-bit binary)

    Alphanumeric channel destination data

    Alphanumeric channel origin data

    Reserved

    0 1 2 3 4 5 6 7byte/bit

    blockbit

    7

    15

    2331

    39

    55

    87

    119

    151

    183

    191

    PRO=1 Audio Emphasis Lock Fs

    Channel Mode User Bit Management

    AUX Use Word Length Reserved

    47

    ReservedReference

    Reserved

    Reserved

    Figure 5. Professional Channel Status Block Structure

  • AN22

    4 AN22REV2

    Table 1 lists the preamble biphase-mark data pat-terns and what each designates. Since bi-phase-mark encoding is not polarity conscious,both phases are shown in the table. Preambles "X"and "Y" indicate a sub-frame containingchannels A and B respectively. Preamble "Z" re-places preamble "X" once every 192 frames to in-dicate the start of a channel status block.

    There are two channel status blocks, one forchannel A and one for channel B. Since there are192 frames in a block, each channel has a channelstatus block 192 bits long. These 192 channel sta-tus bits in a block can be arranged as 24 bytes. Theblocks have one of two formats, professional orconsumer. The first bit of the channel status blockdefines the format with 0 indicating consumer and1 indicating professional.

    Channel Status Block - Professional Format

    Setting the first bit of channel status high desig-nates the professional or broadcast format. Thechannel status block structure for the professionalformat is illustrated in Figure 5 and shows bit 0 ofbyte 0, PRO, to contain a one. Tables 2 and 3 listthe bits in each byte and their meaning. The areasdesignated "reserved" in the figures and tables, arecurrently not specified and must be set to 0 whentransmitting. Most of the professional format datawas obtained from the AES3-1985 document, andinformation from AES3-199x. Since the AES spec-ification is currently being updated, the accuracy ofthis data is not guaranteed.

    BYTE 0bit 0 PRO = 1

    0 Consumer use of channel status block1 Professional use of channel status block

    bit 1 Audio0 Normal Audio1 Non-Audio

    bits 2 3 4 Encoded audio signal emphasis0 0 0 Emphasis not indicated. Receiver

    defaults to no emphasis with manual override enabled

    1 0 0 None. Rec. manual override disabled1 1 0 50/15 S. Rec. manual override disabled1 1 1 CCITT J.17 . Rec. man. override disabledX X X All other states of bits 2-4 are reserved

    bit 5 Lock: Source Sample Frequency0 Locked - default1 Unlocked

    bits 6 7 Fs: Sample Frequency0 0 Not indicated. Receiver default to 48 kHz

    and manual override or auto set enabled0 1 48 kHz. Man. override or auto disabled1 0 44.1 kHz. Man. override or auto disabled1 1 32 kHz. Man. override or auto disabled

    BYTE 1bits 0 1 2 3 Channel Mode

    0 0 0 0 Mode not indicated. Receiver default to 2-channel mode. Manual override enabled

    0 0 0 1 Two-channels. Man. override disabled0 0 1 0 Single channel. Man. override disabled0 0 1 1 Primary/Secondary (Ch. A is primary)

    Manual override disabled0 1 0 0 Stereophonic. (Ch. A is left)

    Manual override disabled.0 1 0 1 Reserved for user defined application0 1 1 0 Reserved for user defined application1 1 1 1 Vector to byte 3. ReservedX X X X All other states of bits 0-3 are reserved.

    bits 4 5 6 7 User bits management 0 0 0 0 Default, no user info indicated0 0 0 1 192 bit block structure

    Preamble Z starts block0 0 1 0 Reserved0 0 1 1 User defined applicationX X X X All other states of bits 4-7 are reserved.

    Table 2. Professional Channel Status bytes 0-1.

  • AN22

    AN22REV2 5

    BYTE 2bits 0 1 2 AUX: Use of auxiliary sample bits

    0 0 0 Not defined. Maximum audio word lengthis 20 bits

    0 0 1 Used for main audio. Maximum audioword length is 24 bits

    0 1 0 Single coordination signal. Max. audioword length is 20 bits

    0 1 1 User defined applicationX X X All other states of bits 4-7 are reserved.

    bits3 4 5

    Source word lengthMax. audio based on bits 0-2 aboveMax audio 24 bits Max audio 20 bits

    0 0 0 Not Indicated Not Indicated (default)

    0 0 1 23 bits 19 bits0 1 0 22 bits 18 bits0 1 1 20 bits 16 bits1 0 1 24 bits 20 bitsX X X All other states of bits 3-5 are reserved

    bits 6 7X X Reserved