alsaucm(1)
alsaucm(1) β ALSA Use Case Manager ποΈβ¨
okay bestie, welcome to the General Commands Manual entry for alsaucm(1). this is the ALSA Use Case Manager, and it's literally your command-line bestie for making complex sound cards behave. no cap, it's giving βaudio routing but make it understandableβ energy. π
π Name π
alsaucm β ALSA Use Case Manager. short, iconic, to the point. π«Ά
β¨ SYNOPSIS β¨
alsaucm <options> [command]
π¦ DESCRIPTION π¦
okay so alsaucm (the ALSA Use Case Manager) is a program for using the ALSA Use Case Interface (http://www.alsa-project.org/alsa-doc/alsa-lib/group__ucm.html) from the command line. yes, the command line. where the magic happens. β¨
On complex sound cards, setting up audio routes is not trivial, and mixer settings can conflict with one another β which can prevent the audio card from working at all. π not the vibe.
The ALSA Use Case Manager is a mechanism for controlling complex audio hardware by establishing a relationship between hardware configurations and meaningful use cases that the end-user can relate to. it's basically matchmaking, but for hardware and vibes. π
The use case manager can also be used to switch between use cases when necessary, in a consistent way. slay. π
At a lower level, the use case manager works by configuring the sound card ALSA kcontrols to change the hardware digital and analog audio routing to match the requested device use case. yes, it's touching the kcontrols. respect. ποΈ
The use case manager kcontrol configurations are stored in easy to modify text files. An audio use case can be defined by a verb and device parameter. two little params, one cute pair. π
The verb describes the use case action i.e. a phone call, listening to music, recording a conversation, etc. The device describes the physical audio capture and playback hardware i.e. headphones, phone handset, bluetooth headset, etc. periodt. π
π OPTIONS π
Available options: π
-h,--helpβ this help. like, the help you need. β¨-c,--card NAMEβ open cardNAME. choose your card, bestie. π³-i,--interactiveβ interactive mode. tap in, live. π¬-b,--batch FILEβ batch mode (use'-'for the stdin input). yes, use'-'for the stdin input. π-n,--no-openβ do not open first card found. respect the boundaries. π
Available commands: π
open NAMEβ open cardNAME. valid names are sound card names as listed in/usr/share/alsa/ucm. πresetβ reset sound card to default state. factory reset but for audio. πreloadβ reload configuration. refresh, bestie. πΈlistcardsβ list available cards. show me the lineup. πlist IDENTIFIERβ list command, for items returning two entries (value+comment). the value of theIDENTIFIERargument can be:_verbsβ get verb list (in pair verb+comment)_devices[/{verb}]β get list of supported devices (in pair device+comment)_modifiers[/{verb}]β get list of supported modifiers (in pair modifier+comment)
The forms without the trailing /{verb} are valid only after a specific verb has been set. π₯
list1 IDENTIFIERβ list command, for lists returning one item per entry. the value of theIDENTIFIERargument can vary depending on the context, it can be:TQ[/{verb}]β get list of Tone Quality identifiers_enadevsβ get list of enabled devices_enamodsβ get list of enabled modifiers_supporteddevs/{modifier}|{device}[/{verb}]β list of supported devices_conflictingdevs/{modifier}|{device}[/{verb}]β list of conflicting devices
get IDENTIFIERβ get string value. the value of theIDENTIFIERargument can be:_verbβ return current verb[=]{NAME}[/[{modifier}|{/device}][/{verb}]]β (For valid NAMEs look at the ALSA Use Case Interface (http://www.alsa-project.org/alsa-doc/alsa-lib/group__ucm.html))
geti IDENTIFIERβ get integer value. the value of theIDENTIFIERargument can be:_devstatus/{device}_modstatus/{device}
set IDENTIFIER VALUEβ set string value. The value of theIDENTIFIERargument can be:_verbβ set the verb toVALUE_enadevβ enable the device specified byVALUE_disdevβ disable the device specified byVALUE_swdev/{old_device}β switch device:- disable
old_deviceand then enable the device specified byVALUE - if no device was enabled just return
- disable
_enamodβ enable the modifier specified byVALUE_dismodβ disable the modifier specified byVALUE_swmod/{old_modifier}β switch modifier:- disable
old_modifierand then enable the modifier specified byVALUE - if no modifier was enabled just return
- disable
Note that the identifiers referring to devices and modifiers are valid only after setting a verb. π«Ά
h,helpβ helpq,quitβ quit
π FILES π
The master use case files for each supported sound card are in /usr/share/alsa/ucm. π
For example, the master use case file for the Pandaboard card is in /usr/share/alsa/ucm/PandaBoard/PandaBoard.conf, this file lists all the supported use cases, e.g.
SectionUseCase."HiFi" {
File "hifi"
Comment "Play HiFi quality Music."
}
...
Each use case defines a _verb, which is described in the file specified in the File directive, like above. π
The HiFi verb above is described in /usr/share/alsa/ucm/PandaBoard/hifi. yes, same name, different file, iconic. β¨
For more details on the syntax of UCM files, see the alsa-lib source code: http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=src/ucm/parser.c
π EXAMPLES OF USE π
Some commands, like for instance list _devices, can only work after setting a _verb in the same execution, for instance this sequence doesn't work:
# alsaucm -c bytcr-rt5640 set _verb HiFi
# alsaucm -c bytcr-rt5640 list _devices
However this command does:
# alsaucm -n -b - <<EOM
open bytcr-rt5640
set _verb HiFi
list _devices
EOM
An example of setting the Speaker device for the HiFi verb of the bytcr-rt5640 card:
# alsaucm -n -b - <<EOM
open bytcr-rt5640
reset
set _verb HiFi
set _enadev Speaker
EOM
π§ SEE ALSO π§
- Use Case Interface:
http://www.alsa-project.org/alsa-doc/alsa-lib/group__ucm.html
π BUGS π
None known. π iconic, honestly.
πΈ Author πΈ
Antonio Ospite <ao2@ao2.it>
π Copyright π
GPLv2+
okay that's the whole alsaucm(1) page! mwah π β from the General Commands Manual, dated 2016-09-22, for alsaucm(1). byeee bestie! π«Άβ¨
π¦ where this page comes from
- arch rolling: alsa-utils 1.2.16-1 Β· GPL-2.0-or-later
- fedora 44: alsa-ucm-utils 1.2.15.2-3.fc44 Β· GPL-2.0-or-later
- fedora 44: alsa-ucm-utils 1.2.16-1.fc44 Β· GPL-2.0-or-later
- ubuntu resolute: alsa-utils 1.2.15.2-1ubuntu1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms