ALSA topology

From AlsaProject
Revision as of 01:04, 10 November 2016 by Mengdonglin (talk | contribs)
Jump to navigation Jump to search

ALSA Topology provides a method for audio drivers to load their mixers, routing, PCMs and capabilities from user space at runtime without changing any driver source code. The intention is to write the driver once and do the differentiation in topology.

Why we need topology?

Current audio drivers typically hard code topology information in the driver sources: This tightly couples the audio driver to the development board making it time consuming to modify a driver to work on a different devices. The driver is also tightly coupled to the DSP firmware version meaning extra care is needed to keep the driver and firmware version in sync. New firmware features also mean driver updates.

The ALSA topology project removes the need for re-writing or porting audio drivers to different devices or different firmwares: Drivers have no hard coded topology data meaning a single driver can be used on different devices by updating the topology data from the file system. Firmware updates can be pushed without having to update the drivers. The new firmware just needs to include an updated topology file describing the update.

Topology Architecture

Topology.png

User space

Provide a tool & library to generate a binary file that describes the internal topology of a customer firmware, e.g. for an ADSP in SOC or 3rd party codec. Please check source files of alsa-lib in directory src/topology.

Kernel

Provide generic support to import the topology info from user space to ASoC framework and generate different audio components for the sound card.

Topology Objects

Topology objects can be loaded from the user space include controls, widgets, routes, PCMs and configurations for physical DAI & DAI links,

Topology-objects.png