Advanced Linux Sound Architecture (ALSA) System on a Chip (ASoC) Sound Driver
i.MX51 EVK Linux Reference Manual
Freescale Semiconductor
17-5
The SGTL5000 codec is registered as an I
2
C client when the module initializes. The APIs are exported to
the upper layer by the structure
snd_soc_dai_ops
. The
io_probe
routine initializes the codec hardware to
the desired state.
Headphone insertion/removal can be detected through a MCU interrupt signal. The driver reports the event
to user space through sysfs.
17.5
Software Operation
The following sections describe the hardware operation of the ASoC driver.
17.5.1
Sound Card Registration
The codecs have the same registration sequence:
1. The codec driver registers the codec driver, DAI driver, and their operation functions
2. The platform driver registers the PCM driver, CPU DAI driver and their operation functions,
preallocates buffers for PCM components and sets playback and capture operations as applicable
3. The machine layer creates the DAI link between codec and CPU registers the sound card and PCM
devices
17.5.2
Device Open
The ALSA driver:
•
Allocates a free substream for the operation to be performed
•
Opens the low level hardware device
•
Assigns the hardware capabilities to ALSA runtime information. (the runtime structure contains all
the hardware, DMA, and software capabilities of an opened substream)
•
Configures DMA read or write channel for operation
•
Configures CPU DAI and codec DAI interface.
•
Configures codec hardware
•
Triggers the transfer
After triggering for the first time, the subsequent DMA read/write operations are configured by the DMA
callback.
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...