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 Use Case Manager (UCM) is a LGPL library designed to allow high level control of audio use cases in sound device hardware. It is intended to be used by applications to quickly and easily change the hardware audio use case 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 Use Case Manager (UCM) provides the following features.
Source Code
ALSA Use Case Manager (UCM) has been released in alsa-lib 1.0.24.
UCM abstracts sound card mixer controls into high level use case verbs like “phone call” or “music”.
UCM stores the mixer settings per use case in configuration files, the files contain information like:
Look at alsa-lib/include/use-case.h to get a more detailed description.
Compiling alsa-lib and alsa-utils
To get the UCM it is needed the rls 1.0.24 or later
Running the UCM
The UCM needs at lest two files to work, they are:
– master sound card file
– at least one use case file.
The following files has been used to test the UCM. HDA-Intel.conf is the master sound card file and hifi is the HiFi UCM verb config. After create your configuration files, copy them to /usr/share/alsa/ucm/
Basic commands
– Start UCM on interactive mode
$alsaucm -c HDA-Intel -i
– List verbs availables per card
$alsaucm -c HDA-Intel list _verbs
– To set a verb
$alsaucm -c HDA-Intel set _verb HiFi
– List devices (only after set verb)
$alsaucm -c HDA-Intel list _devices
– List modifiers (only after set verb)
$alsaucm -c HDA-Intel list _modifiers
It is possible to use a batch file to execute several UCM commands
$alsaucm -b test.batch
Development is discussed on the ALSA development mailing list and on IRC channel #alsa-soc on freenode.net.