Audio Decoder Overview
11-7
Each audio frame in Dolby Digital, MPEG, and Linear PCM streams
starts with a sync word and contains a xed number of bytes; that is,
every Dolby Digital frame has the same number of bytes, every MPEG
Layer I frame has the same number of bytes, etc. Once instructed to
start, the audio decoder looks for the rst sync word and starts to decode
immediately after detecting it. However, the decoder does not go into “in
sync” state until it also detects the sync word in the following frame. Once
synchronized, the decoder loses synchronization only when it fails to
locate the sync word where it expects it to be in the next frame. When
this occurs, the decoder continues searching and sets the Audio Sync
Error Interrupt bit in Register 4 (
page 4-9). If this bit is not masked,
INTRn is asserted to the host. When the MPEG decoder successfully
nds three consecutive sync words in an MPEG stream (without a
multichannel extension), it sets the Audio Sync Recovery Interrupt bit and
asserts INTRn to the host. Similarly, when the Dolby Digital decoder
successfully nds the next sync word in a Dolby Digital stream, it also
sets the Audio Sync Recovery Interrupt bit and asserts INTRn to the
host. Each time a sync word is detected, the Audio Sync Code Detect
Interrupt bit in Register 1 (
page 4-4) is set and INTRn is asserted.
The decoders also detect CRC errors (corrupted audio data) and illegal
bit errors (invalid bitstream parameters). When either is encountered, the
decoders set the Audio CRC or Illegal Bit Error Interrupt bit in Register 4,
reset their internal counters and state machines, and start searching for
the next sync word.
If the host sets the Mute on Error bit in Register 358
(page 4-108), the
audio output is muted during any of the previous errors to avoid sending
out bad samples (noise) to the speaker(s). When the Audio Decoder
Module is stopped, the decoders stay in the idle state and the read and
write pointers of the Audio ES Channel Buffer are reset.
The three formatters take the encoded audio frames, including Musicam
multichannel extensions, from the Audio ES Channel Buffer, add a
preamble to them, and pad them out into S/P DIF bursts. The host can
elect to substitute its preambles for the default preambles in the MPEG
Formatter. Each formatter can run simultaneously with its decoder
counterpart. The formatters detect out-of-sync conditions with the
decoders and add pause bursts as necessary to resynchronize. The host
can substitute zeros for the pause bursts.