This Page describes Xilinx ALSA platfrom driver based on ASoC framework. All the work was based on Linux operator system which is composed of ZYNQ+MPSoC,I2S and video FMC codec audio chips.The I2S bus is used to transmit the audio data. ASoC audio driver architecture has the characteristics of high code re-usability. The Page is also describes machine driver, codec driver and platform driver on ASoC architecture to implement voice recording and playback. At the same time, this work used ALSA command and user programming to verify practicability of the audio driver.

In the current Linux kernel, ALSA architecture has replaced OSS architecture and become the default schema of the audio driver module. ASoC architecture provides more excellent ALSA support in embedded audio system. Therefore, this is designed each module of audio driver in hardware and in software, and verified it.


Embedded audio hardware system mainly includes CPU(ZYNQ+MPSoC) and I2s, video FMC card which supports audio information processing, audio codecs and audio input/output devices (AUDIO-IN /speaker, etc.). Figure 1 is the hardware framework of audio driver.
ASoC Layers.png

Audio driver is divided into three parts:
1. platform driver : Platform driver is only related to the SoC platform and it concerns how CPU works. (sound/soc/xilinx/xlnx_audioss.c)
2. codec driver and : Codec driver is independent from platform. Codec driver and platform driver cannot work in isolation (Linux dummy codec is used).
3. machine driver : Machine driver is responsible for the binding of codec driver and platform driver to finish audio information processing.(sound/soc/xilinx/xlnx_snd_card.c)

SoC core layer is above ASoC driver, and it is a traditional ALSA driver.

Design of Audio Driver

Audio driver is involved in a number of important structures, each of which is represented by the structure as shown in the table below. Later in this paper, it will introduce the specific implementation of these structures and the relationship between each other.

Design of Machine Driver

The work of machine driver is to handle machine specific controls and audio events. In addition, it is also responsible for the coupling with platform driver and codec driver. Machine driver is the beginning of all ASoC, the main work of this part can be divided into platform device registration and platform driver registration.(xlnx_iis.c)

Design of Codec Driver

This driver is using Linux default Codec Dummy driver.

Design of Platform Driver

Platform driver transmits audio data by DMA, and transmits to the codec by dai of CPU side. It has two important structures: snd_soc_platform_driver and snd_soc_dai_driver. The former is responsible for DMA data management, and the latter is responsible for the parameter configuration of dai.(xlnx_audioss.c)

Related Links