50 AN115REV2
The DAO can operate as a master or a slave. As a
master, the DAO drives both LRCLK and SCLK.
LRCLK and SCLK will be divided down from
MCLK. When the DAO is configured in slave
mode, LRCLK and SCLK are inputs. If the DAO is
a slave, then MCLK is a don’t care as an input. The
DAO can also be configured to drive MCLK,
LRCLK, and SCLK when the internal PLL is
enabled.
5.2.3 Parallel Delivery of Data
This section covers parallel delivery of digital au-
dio data. The low level read and write formats are
identical to those discussed in S ection 2.2 “Parallel
Host Communication” -- page 17.
It should be noted that when switching between
PCM and compressed data delivery using the par-
allel data delivery, a new download, soft reset or
application restart must be sent along with a FIFO
configuration message for the appropriate data type
(along with any other required hardware configura-
tion messages).
5.2.3.1 PCM Data Write in Parallel Host
Mode
Writing to the PCM audio data register entails a
slightly different protocol than when writing
control information. The MFC bit in the Host
Control Register is an indicator of the PCM FIFO
level. The MFC bit remains low until the FIFO
threshold has been reached.
The PCMRST bit of the CONTROL register pro-
vides absolute software/hardware synchronization
by initializing the input channel to uniquely recog-
nize the first write to the byte-wide PCMDATA
port. Toggling PCMRST high and low informs the
DSP that the next sample read from the PCMDA-
TA port is the first sample of the left channel. In
this fashion, the CS492X can translate successive
byte writes into a variable number of channels with
a variable PCM sample size. In the most simple
case, the CS492X can receive stereo 8-bit PCM one
byte at a time with the internal DSP assigning the
first 8-bit write (after PCMRS T) to the le ft channel
and the second 8-bit write to the right channel. For
24-bit PCM, it assigns the first three 8-bit writes
(after PCMRST) to the left channel and the next
three writes to the right channel. Before starting
PCM transfer, or to initiate a new PCM transfer, the
PCMRST bit must be toggled as described above to
insure data integrity.
Data must be delivered t o the CS492X in blocks of
data. The block size is set through a hardware
configuration message. Before each block is
delivered, the host should check the MFC bit. If the
MFC bit is low, then the host can deliver a block of
data one byte at a time. If the MFC bit is high, no
more data should be sent to the CS492X. Once the
MFC bit has gone low again, the host may send
another block of PCM a udio data. The MFC bit is
FIFO level sensitive. In other words, it ma y change
during the transfer of a block. The host should
complete the block transfer and ignore the MFC bit
until the block transfer is complete.
The generic function ‘Read_Byte_*()’ is used in
the following example as a generalized reference to
either Read_Byte_MOT() or Read_Byte_INT(),
and ‘Write_Byte_*()’ is a generic reference to
Write_Byte_MOT() or Write_Byte_INT(). Figure
38 shows the sequence for writing one block of
PCM data when the device is in parallel host mode.
The protocol presented in the flow diagram on the
following page will now be described in detail.
1) The host first reads the Host Control Register
(A[1:0] = 01b) in order to determine the state of
the input FIFOs.
2) In order to determine whether the CS492X is
ready to ac cept another block of da ta, the host
must check the MFC bit of the Host Control
Register (bit 4). If MFC is high, then the DSP is
not prepared to accept a new block of data, and
the host should poll the Host Control Register
again. If MF C is l ow, then the host ma y write a