S/PDIF—Sony/Philips Digital Interface
Symphony DSP56724/DSP56725 Multi-Core Audio Processors, Rev. 0
Freescale Semiconductor
18-23
transmitter clock source can be divided down as needed using Txclk_DF. The S/PDIF transmitter output
can be chosen from either the S/PDIF transmitter block, directly from the S/PDIF receiver (via the output
multiplexer), or disabled.
The S/PDIF transmitter generates a S/PDIF output bitstream in IEC958 biphase mark format, consisting
of audio data, channel status and user bits.
18.4.1
Audio Data Transmission
Audio data for the S/PDIF transmitter is provided by the processor via the SPDIFTxLeft and
SPDIFTxRight registers. They send audio data to the left and right TX FIFOs. The Tx FIFOs are 6-deep
and 24-bits wide (equal to the audio data width).
a) S/PDIF Transmitter Data Registers—Behavior on Overrun, Underrun
The S/PDIF Data Transmit registers (SPDIFTxLeft and SPDIFTxRight) have different FIFOs
for the left and right channels. As a result, there is always the possibility that the left and right
FIFOs may go out of sync due to FIFO underruns and overruns that affect only one part (left
or right) of any FIFO. To prevent this from happening, there are two mechanisms to prevent
mismatch between the FIFOs.
If the S/PDIF Tx FIFO underruns, for example on the right half of the FIFO, no sample leaves
that FIFO (because it was already empty). Special hardware will make sure that the next sample
read from the left FIFO will not leave the FIFO (no read strobe will be generated). If the
underrun occurs on the left half of the FIFO, then the next read strobe to the right FIFO is
blocked.
b) S/PDIF Transmitter Data Registers—Automatic Resynchronization of FIFOs
Section 18.3.1, “Audio Data Reception
c) SPDIFTxLeft and SPDIFTxRight Details
Three exceptions are associated with the S/PDIF Tx FIFOs:
– Empty
– Under/Overrun
– Resync
When the Empty condition is set for the DSP Core data output registers, the DSP Core should
write data to the FIFO, before underrun occurs. For example, when Empty is set and 6 samples
need to be written, it is acceptable for the software
– to write the first 6 samples from the LEFT address, followed by 6 samples from the RIGHT
address,
– or to write 1 sample from the LEFT address, followed by 1 sample from the RIGHT address
repeated 6 times.
The LEFT address should be written before the RIGHT address. The implementation of all data
out FIFOs is a double FIFO, one FIFO for the left and one FIFO for the right. Empty is set when
both FIFOs are empty. Underrun and Overrun are set when one of the FIFOs are underrun or
overrun. Resync is set when the hardware resynchronizes left and right FIFOs.