through the corresponding registers. The S/PDIF transmitter generates a S/PDIF
output bitstream in the biphase mark format (IEC958), which consists of audio data,
channel status and user bits.
In the S/PDIF transmitter, the IEC958 biphase bit stream is generated on both edges of
the S/PDIF Transmit clock. The S/PDIF Transmit clock is generated by the S/PDIF
internal clock dividers and the sources are from outside of the S/PDIF block. The S/PDIF
receiver can recover the S/PDIF Rx clock from the S/PDIF stream.
shows the
clock structure of the S/PDIF transceiver.
27.1.3 Software Overview
The S/PDIF driver is designed at the ALSA System on Chip (ASoC) layer. The ASoC
driver for S/PDIF provides one playback device for Tx and one capture device for Rx.
The playback output audio format can be linear PCM data or compressed data with 16-
bit, 20-bit, and 24-bit audio. The allowed sampling bit rates are 44.1, 48 and 32 KHz. The
capture input audio format can be linear PCM data or compressed 24-bit data and the
allowed sampling bit rates are from 16 to 96 KHz. The driver provides the same interface
for PCM and compressed data transmission.
27.1.4 ASoC layer
The ASoC layer divides audio drivers for embedded platforms into separated layers that
can be reused. ASoC divides an audio driver into a codec driver, a machine layer, a DAI
(digital audio interface) layer, and a platform layer. The Linux kernel documentation has
some concise description of these layers in linux/Documentation/sound/alsa/soc. In the
case of the S/PDIF driver, you can reuse the platform layer (imx-pcm-dma-mx2.c) that is
used by the ssi stereo codec driver.
27.2 S/PDIF Tx Driver
The S/PDIF Tx driver supports the following features:
• 32, 44.1 and 48 KHz sample rates.
• Signed 16 and 24-bit little Endian sample format. Due to S/PDIF SDMA feature, the
24-bit output sample file must have 32-bits in each channel per frame. Only the 24
LSBs are valid.
• In the ALSA subsystem, the supported format is defined as S16_LE and S24_LE.
Chapter 27 The Sony/Philips Digital Interface (S/PDIF) Driver
i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013
Freescale Semiconductor, Inc.
199