ASoC Virtualization Driver Architecture#
The software architecture of the SoC ASoC Virtualization driver is comprised of:
Platform Driver —This driver is responsible for PCM registration and interfaces with the PCM driver. The ARM peripheral bus interface (ADMAIF) is implemented as a platform driver with PCM interfaces for playback/record. Although there are designated ADMAIF for the different Virtual Machines, the programming of the ADMAIF is done in the audio server. The platform driver talks to the ADMAIFs in the audio server using inter-virtual machine communication (IVC).
Codec Driver —Any driver that registers the
snd_soc_codec_driverstructure with the ASoC core can be viewed as the codec driver. The module must have at least one input and one output. The codec driver talks to the audio server via IVC to realize the necessary hardware acceleration in AHUB. The codec driver exposes the ALSA kernel controls (kcontrols) so that amixer can be used to connect the different AHUB modules in the audio server.Machine Driver —This driver connects one or more codec drivers and a PCM driver together for a given platform. The machine driver defines the snd_soc_dai_link structure and instantiates the sound card to populate the snd_soc_dai_link structure with appropriate CPU and CODEC DAIs.