9 :Author: Antonio Ospite <ao2@ao2.it>
13 :Manual group: General Commands Manual
18 *alsaucm* <options> [command]
23 alsaucm (ALSA Use Case Manager) is a program to use the ALSA `Use Case
24 Interface`_ from the command line.
26 On complex sound cards, setting up audio routes is not trivial and mixer
27 settings can conflict one another preventing the audio card to work at all.
29 The ALSA Use Case Manager is a mechanism for controlling complex audio
30 hardware establishing a relationship between hardware configurations and
31 meaningful use cases that the end-user can relate with.
33 The use case manager can also be used to switch between use cases when
34 necessary, in a consistent way.
36 At a lower level, the use case manager works by configuring the sound card
37 ALSA kcontrols to change the hardware digital and analog audio routing to
38 match the requested device use case.
40 The use case manager kcontrol configurations are stored in easy to modify text
41 files. An audio use case can be defined by a **verb** and **device** parameter.
43 The verb describes the use case action i.e. a phone call, listening to music,
44 recording a conversation etc. The device describes the physical audio capture
45 and playback hardware i.e. headphones, phone handset, bluetooth headset, etc.
56 **-c**, **--card** `NAME`
59 **-i**, **--interactive**
62 **-b**, **--batch** `FILE`
63 batch mode (use ``'-'`` for the stdin input)
66 do not open first card found
74 valid names are sound card names as listed in ``/usr/share/alsa/ucm``.
77 reset sound card to default state.
86 list command, for items returning two entries (value+comment).
88 the value of the `IDENTIFIER` argument can can be:
90 - ``_verbs`` - get verb list (in pair verb+comment)
91 - ``_devices[/{verb}]`` - get list of supported devices (in pair device+comment)
92 - ``_modifiers[/{verb}]`` - get list of supported modifiers (in pair modifier+comment)
94 The forms without the trailing ``/{verb}`` are valid only after a specific
97 ``list1`` `IDENTIFIER`
98 list command, for lists returning one item per entry.
100 the value of the `IDENTIFIER` argument can vary depending on the context,
103 - ``TQ[/{verb}]`` - get list of Tone Quality identifiers
104 - ``_enadevs`` - get list of enabled devices
105 - ``_enamods`` - get list of enabled modifiers
106 - ``_supporteddevs/{modifier}|{device}[/{verb}]`` - list of supported devices
107 - ``_conflictingdevs/{modifier}|{device}[/{verb}]`` - list of conflicting devices
112 the value of the `IDENTIFIER` argument can can be:
114 - ``_verb`` - return current verb
115 - ``[=]{NAME}[/[{modifier}|{/device}][/{verb}]]`` (For valid NAMEs look at the
116 ALSA `Use Case Interface`_)
119 ``geti`` `IDENTIFIER`
122 the value of the `IDENTIFIER` argument can can be:
124 - ``_devstatus/{device}``
125 - ``_modtstaus/{device}``
127 ``set`` `IDENTIFIER` `VALUE`
130 The value of the `IDENTIFIER` argument can can be:
132 - ``_verb`` - set the verb to `VALUE`
133 - ``_enadev`` - enable the device specified by `VALUE`
134 - ``_disdev`` - disable the device specified by `VALUE`
135 - ``_swdev/{old_device}`` - switche device:
137 - disable `old_device` and then enable the device specified by
139 - if no device was enabled just return
141 - ``_enamod`` - enable the modifier specified by `VALUE`
142 - ``_dismod`` - disable the modifier specified by `VALUE`
143 - ``_swmod/{old_modifier}`` - switch modifier:
145 - disable `old_modifier` and then enable the modifier specified by
147 - if no modifier was enabled just return
149 Note that the identifiers referring to devices and modifiers are valid
150 only after setting a verb.
162 The master use case files for each supported sound card are in ``/usr/share/alsa/ucm``.
164 For example, the master use case file for the `Pandaboard` card is in
165 ``/usr/share/alsa/ucm/PandaBoard/PandaBoard.conf``, this file lists all the
166 supported use cases, e.g.
170 SectionUseCase."HiFi" {
172 Comment "Play HiFi quality Music."
177 Each use case defines a _verb, which is described in the file specified in
178 the ``File`` directive, like above.
180 The ``HiFi`` verb above is described in
181 ``/usr/share/alsa/ucm/PandaBoard/hifi``.
183 For more details on the syntax of UCM files, see the alsa-lib source code:
184 http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=src/ucm/parser.c
190 Some commands, like for instance ``list _devices``,
191 can only work after setting a ``_verb`` in the **same execution**, for
192 instance this sequence doesn't work:
196 # alsaucm -c bytcr-rt5640 set _verb HiFi
197 # alsaucm -c bytcr-rt5640 list _devices
200 However this command does:
204 # alsaucm -n -b - <<EOM
211 An example of setting the `Speaker` device for the `HiFi` verb of the
216 # alsaucm -n -b - <<EOM
228 * Use Case Interface: http://www.alsa-project.org/alsa-doc/alsa-lib/group__ucm.html
230 .. _Use Case Interface: http://www.alsa-project.org/alsa-doc/alsa-lib/group__ucm.html