The Sony/Philips Digital Interface (S/PDIF) Tx Driver
i.MX51 EVK Linux Reference Manual
18-2
Freescale Semiconductor
18.1.1
Hardware Overview
The S/PDIF is composed of two parts:
•
The S/PDIF receiver extracts the audio data from each S/PDIF frame and places the data in the
S/PDIF Rx left and right FIFOs. The Channel Status and User Bits are also extracted from each
frame and placed in the corresponding registers. The S/PDIF receiver provides a bypass option for
direct transfer of the S/PDIF input signal to the S/PDIF transmitter.
•
For the S/PDIF transmitter, the audio data is provided by the processor through the SPDIFTxLeft
and SPDIFTxRight registers. The Channel Status bits are provided 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 generate module and
the sources are from outside of the S/PDIF block. For the S/PDIF receiver, it can recover the S/PDIF Rx
clock.
shows the clock structure of the S/PDIF transceiver. i.MX51 only has the S/PDIF
transmitter.
18.1.2
Software Overview
The S/PDIF driver is designed under Linux ALSA subsystem. It provides hardware access ability to
support the ALSA driver. The ALSA 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 default, up to 24-bit expandable support and the allowed sampling bit rates are 44.1, 48 or 32 KHz.
The capture input audio format can be linear PCM data or compressed data with 16-bit or 24-bit and the
allowed sampling bit rates are from 16 to 96 KHz. The driver provides the same interface for PCM and
compressed data transmission.
18.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 one channel per frame, and only
the 24 LSBs are valid
In the ALSA subsystem, the supported format is defined as S16_LE and S24_LE.
•
Two channels
•
Driver installation and information query
By default, the driver is built as a kernel module, run modprobe to install it:
#modprobe snd-spdif
After the module had been installed, the S/PDIF ALSA driver information can be exported to user
by /sys and /proc file system
— Get card ID and name
For example:
#cat /proc/asound/cards
Summary of Contents for i.MX51 EVK
Page 1: ...Part Number 924 76374 Rev 10 11 01 11 2010 i MX51 EVK Linux Reference Manual...
Page 14: ...i MX51 EVK Linux Reference Manual xiv Freescale Semiconductor...
Page 18: ...i MX51 EVK Linux Reference Manual xviii Freescale Semiconductor...
Page 24: ...i MX51 EVK Linux Reference Manual xxiv Freescale Semiconductor...
Page 38: ...Machine Specific Layer MSL i MX51 EVK Linux Reference Manual 2 8 Freescale Semiconductor...
Page 52: ...MC13892 Digitizer Driver i MX51 EVK Linux Reference Manual 5 4 Freescale Semiconductor...
Page 64: ...TV Encoder TVE Driver i MX51 EVK Linux Reference Manual 10 4 Freescale Semiconductor...
Page 82: ...Video for Linux Two V4L2 Driver i MX51 EVK Linux Reference Manual 12 8 Freescale Semiconductor...
Page 86: ...i MX5 Dual Display i MX51 EVK Linux Reference Manual 13 4 Freescale Semiconductor...
Page 100: ...X Windows Acceleration i MX51 EVK Linux Reference Manual 16 6 Freescale Semiconductor...
Page 118: ...Low Level Keypad Driver i MX51 EVK Linux Reference Manual 20 6 Freescale Semiconductor...
Page 134: ...Security Drivers i MX51 EVK Linux Reference Manual 22 10 Freescale Semiconductor...
Page 148: ...Inter IC I2C Driver i MX51 EVK Linux Reference Manual 24 4 Freescale Semiconductor...
Page 178: ...ARC USB Driver i MX51 EVK Linux Reference Manual 29 10 Freescale Semiconductor...
Page 194: ...OProfile i MX51 EVK Linux Reference Manual 33 6 Freescale Semiconductor...