Mobile and Embedded Linux Solutions

Home / Labs / ALSA Use Case Manager

Modern mobile devices are increasingly required to provide a rich set of audio functionality required by todays applications. This richer functionality places additional requirements on the audio hardware and leads to further complexity. Example: a modern Linux phone could have as much as 80 bespoke ALSA audio controls to manage different use cases.

The ALSA scenario or use case manager is a LGPL library designed to allow high level control of audio scenarios or use cases in sound device hardware. It is intended to be used by applications to quickly and easily change the hardware audio use case or scenario of a device in a generic and portable manner.

This library is not meant to replace gstreamer, PulseAudio or a sound server, but is meant to work in tandem with such audio software.

Features

The ALSA scenario manager provides the following features.

  • Consistent and simple C API. The library provides simple and consistent methods to change scenario or use case and thus make applications more portable across different devices.
  • Ability to change any ALSA audio control type. This includes signal gain and signal routing (through mixers and muxes).
  • Gain and mixer aliasing. Different scenarios may use different hardware gain controls (e.g. some hardware has different hardware gain controls for headphone and speaker volumes) . The library can alias controls so that the correct volume control is updated no matter what use case is in operation.
    • Source Code

      The ALSA scenario library is still work in progress. Latest release is version 0.1 and is tagged in git here. Development is discussed on the ALSA development mailing list and on IRC channel #alsa-soc on freenode.net.