NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
Sitara Linux Audio Driver Overview
Linux Software Developer's Guide | → | Linux Kernel | → | Audio | → | Audio Driver Overview |
ALSA Introduction[edit]
Software support for audio devices on Sitara devices is acheived through ALSA, which is the standard audio architecture for linux.
For comprehensive documentation on ALSA, please refer to the following web page:
ALSA SoC Architecture
[edit]
The ALSA System on Chip (ASoC) layer provides ALSA support for embedded processors and audio codecs. It is designed in a modular form so that different hardware components that commonly change in a system, such as audio codecs, can conveniently be removed or added.
The ASoC layer is divided into 3 different sections:
- Codec driver: The codec driver is platform independent and contains audio controls, audio interface capabilities, codec Dynamic Audio Power Management (DAPM) definition and codec IO functions. For example, the driver for the AIC310x codec is found in this area.
- Platform driver: The platform driver contains the audio dma engine and audio interface drivers (e.g. I2S, AC97, PCM) for that platform. The McASP driver for Sitara would fall into this category.
- Machine driver: The machine driver glues together the Platform and Codec drivers. It also handles any machine specific controls and audio events i.e. turning on an amp at start of playback.
Note that all 3 of these layers are often configured through the Device Tree for a specific board; hooks are provided that allow the codec, platform, and machine drivers to be configured in Device Tree as opposed to manually editing the driver source code. Although, modification of the driver source may still be necessary.
For a comprehensive overview of ASoC, please refer to this wiki:
Driver Location[edit]
The ALSA drivers that are specific to Sitara devices and external audio codecs are part of the ALSA SoC layer.
The linux kernel source in the SDK is found in the following directory:
ti-processor-sdk-linux-amXXXX-evm-YY.YY.YY.YY/board-support/linux-Z.Z.Z+.../
Where X is the device number, Y is the SDK version, and Z is the Linux kernel version.
In the top level linux kernel directory in the Sitara SDK, the source code for the ALSA SoC layer can be found here:
sound/soc/
- Codec driver: The source code the ASoC codecs is found here:
sound/soc/codecs
For reference, the source code for the AIC310x codec is found here:
sound/soc/codecs/tlv320aic3x.c
Link to source code: tlv320aic3x.c
- Platform driver: The source code for the Sitara McASP driver is located here:
sound/soc/davinci/davinci-mcasp.c
Link to source code: davinci-mcasp.c
- Machine driver: For Sitara devices, the machine driver is located here:
sound/soc/davinci/davinci-evm.c
Link to source code: davinci-evm.c