01.08.2013 Views

Chapter 22 Multichannel Audio Serial Port (McASP).pdf

Chapter 22 Multichannel Audio Serial Port (McASP).pdf

Chapter 22 Multichannel Audio Serial Port (McASP).pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Functional Description www.ti.com<br />

<strong>22</strong>.3.3.2.3 Frame Format<br />

An S/PDIF frame is composed of two subframes (Figure <strong>22</strong>-13). For linear coded audio applications, the<br />

rate of frame transmission normally corresponds exactly to the source sampling frequency f s. The S/PDIF<br />

format clock rate is therefore 128 × f s (128 = 32 cells/subframe × 2 clocks/cell × 2 subframes/sample). For<br />

example, for an S/PDIF stream at a 192 kHz sampling frequency, the serial clock is<br />

128 × 192 kHz = 24.58 MHz.<br />

In 2-channel operation mode, the samples taken from both channels are transmitted by time multiplexing<br />

in consecutive subframes. Both subframes contain valid data. The first subframe (left or A channel in<br />

stereophonic operation and primary channel in monophonic operation) normally starts with preamble M.<br />

However, the preamble of the first subframe changes to preamble B once every 192 frames to identify the<br />

start of the block structure used to organize the channel status information. The second subframe (right or<br />

B channel in stereophonic operation and secondary channel in monophonic operation) always starts with<br />

preamble W.<br />

In single-channel operation mode in a professional application, the frame format is the same as in the 2channel<br />

mode. Data is carried in the first subframe and may be duplicated in the second subframe. If the<br />

second subframe is not carrying duplicate data, cell 28 (validity bit) is set to logical 1.<br />

X Y Z Y X Y X<br />

M Channel<br />

1<br />

Frame 191<br />

<strong>22</strong>.3.4 Definition of Terms<br />

Figure <strong>22</strong>-13. S/PDIF Frame Format<br />

Channel<br />

W W<br />

2<br />

Channel<br />

Channel<br />

B<br />

1<br />

2<br />

Subframe 1<br />

Frame 0<br />

Subframe 2<br />

Channel Channel<br />

M W<br />

M<br />

1<br />

2<br />

Frame 1<br />

The serial bit stream transmitted or received by the <strong>McASP</strong> is a long sequence of 1s and 0s, either output<br />

or input on one of the audio transmit/receive pins (AXRn). However, the sequence has a hierarchical<br />

organization that can be described in terms of frames of data, slots, words, and bits.<br />

A basic synchronous serial interface consists of three important components: clock, frame sync, and data.<br />

Figure <strong>22</strong>-14 shows two of the three basic components—the clock (ACLK) and the data (AXRn).<br />

Figure <strong>22</strong>-14 does not specify whether the clock is for transmit (ACLKX) or receive (ACLKR) because the<br />

definitions of terms apply to both receive and transmit interfaces. In operation, the transmitter uses ACLKX<br />

as the serial clock, and the receiver uses ACLKR as the serial clock. Optionally, the receiver can use<br />

ACLKX as the serial clock when the transmitter and receiver of the <strong>McASP</strong> are configured to operate<br />

synchronously.<br />

Bit A bit is the smallest entity in the serial data stream. The beginning and end of each bit is marked by an edge of the<br />

serial clock. The duration of a bit is a serial clock period. A 1 is represented by a logic high on the AXRn pin for the<br />

entire duration of the bit. A 0 is represented by a logic low on the AXRn pin for the entire duration of the bit.<br />

Word A word is a group of bits that make up the data being transferred between the processor and the external device.<br />

Figure <strong>22</strong>-14 shows an 8-bit word.<br />

Slot A slot consists of the bits that make up the word, and may consist of additional bits used to pad the word to a<br />

convenient number of bits for the interface between the processor and the external device. In Figure <strong>22</strong>-14, the<br />

audio data consists of only 8 bits of useful data (8-bit word), but it is padded with 4 zeros (12-bit slot) to satisfy the<br />

desired protocol in interfacing to an external device. Within a slot, the bits may be shifted in/out of the <strong>McASP</strong> on the<br />

AXRn pin either MSB or LSB first. When the word size is smaller than the slot size, the word may be aligned to the<br />

left (beginning) of the slot or to the right (end) of the slot. The additional bits in the slot not belonging to the word<br />

may be padded with 0, 1, or with one of the bits (the MSB or the LSB typically) from the data word. These options<br />

are shown in Figure <strong>22</strong>-15.<br />

3938 <strong>Multichannel</strong> <strong>Audio</strong> <strong>Serial</strong> <strong>Port</strong> (<strong>McASP</strong>) SPRUH73E–October 2011–Revised May 2012<br />

Submit Documentation Feedback<br />

Copyright © 2011–2012, Texas Instruments Incorporated

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!