1 --- alsa-utils-1.1.3/alsaucm/alsaucm.rst.orig 1970-01-01 01:00:00.000000000 +0100
2 +++ alsa-utils-1.1.3/alsaucm/alsaucm.rst 2017-01-21 19:55:20.071432145 +0100
10 +---------------------
12 +:Author: Antonio Ospite <ao2@ao2.it>
16 +:Manual group: General Commands Manual
21 +*alsaucm* <options> [command]
26 +alsaucm (ALSA Use Case Manager) is a program to use the ALSA `Use Case
27 +Interface`_ from the command line.
29 +On complex sound cards, setting up audio routes is not trivial and mixer
30 +settings can conflict one another preventing the audio card to work at all.
32 +The ALSA Use Case Manager is a mechanism for controlling complex audio
33 +hardware establishing a relationship between hardware configurations and
34 +meaningful use cases that the end-user can relate with.
36 +The use case manager can also be used to switch between use cases when
37 +necessary, in a consistent way.
39 +At a lower level, the use case manager works by configuring the sound card
40 +ALSA kcontrols to change the hardware digital and analog audio routing to
41 +match the requested device use case.
43 +The use case manager kcontrol configurations are stored in easy to modify text
44 +files. An audio use case can be defined by a **verb** and **device** parameter.
46 +The verb describes the use case action i.e. a phone call, listening to music,
47 +recording a conversation etc. The device describes the physical audio capture
48 +and playback hardware i.e. headphones, phone handset, bluetooth headset, etc.
59 + **-c**, **--card** `NAME`
62 + **-i**, **--interactive**
65 + **-b**, **--batch** `FILE`
66 + batch mode (use ``'-'`` for the stdin input)
68 + **-n**, **--no-open**
69 + do not open first card found
77 + valid names are sound card names as listed in ``/usr/share/alsa/ucm``.
80 + reset sound card to default state.
83 + reload configuration.
86 + list available cards.
88 + ``list`` `IDENTIFIER`
89 + list command, for items returning two entries (value+comment).
91 + the value of the `IDENTIFIER` argument can can be:
93 + - ``_verbs`` - get verb list (in pair verb+comment)
94 + - ``_devices[/{verb}]`` - get list of supported devices (in pair device+comment)
95 + - ``_modifiers[/{verb}]`` - get list of supported modifiers (in pair modifier+comment)
97 + The forms without the trailing ``/{verb}`` are valid only after a specific
100 + ``list1`` `IDENTIFIER`
101 + list command, for lists returning one item per entry.
103 + the value of the `IDENTIFIER` argument can vary depending on the context,
106 + - ``TQ[/{verb}]`` - get list of Tone Quality identifiers
107 + - ``_enadevs`` - get list of enabled devices
108 + - ``_enamods`` - get list of enabled modifiers
109 + - ``_supporteddevs/{modifier}|{device}[/{verb}]`` - list of supported devices
110 + - ``_conflictingdevs/{modifier}|{device}[/{verb}]`` - list of conflicting devices
112 + ``get`` `IDENTIFIER`
115 + the value of the `IDENTIFIER` argument can can be:
117 + - ``_verb`` - return current verb
118 + - ``[=]{NAME}[/[{modifier}|{/device}][/{verb}]]`` (For valid NAMEs look at the
119 + ALSA `Use Case Interface`_)
122 + ``geti`` `IDENTIFIER`
125 + the value of the `IDENTIFIER` argument can can be:
127 + - ``_devstatus/{device}``
128 + - ``_modtstaus/{device}``
130 + ``set`` `IDENTIFIER` `VALUE`
133 + The value of the `IDENTIFIER` argument can can be:
135 + - ``_verb`` - set the verb to `VALUE`
136 + - ``_enadev`` - enable the device specified by `VALUE`
137 + - ``_disdev`` - disable the device specified by `VALUE`
138 + - ``_swdev/{old_device}`` - switche device:
140 + - disable `old_device` and then enable the device specified by
142 + - if no device was enabled just return
144 + - ``_enamod`` - enable the modifier specified by `VALUE`
145 + - ``_dismod`` - disable the modifier specified by `VALUE`
146 + - ``_swmod/{old_modifier}`` - switch modifier:
148 + - disable `old_modifier` and then enable the modifier specified by
150 + - if no modifier was enabled just return
152 + Note that the identifiers referring to devices and modifiers are valid
153 + only after setting a verb.
165 +The master use case files for each supported sound card are in ``/usr/share/alsa/ucm``.
167 +For example, the master use case file for the `Pandaboard` card is in
168 +``/usr/share/alsa/ucm/PandaBoard/PandaBoard.conf``, this file lists all the
169 +supported use cases, e.g.
173 + SectionUseCase."HiFi" {
175 + Comment "Play HiFi quality Music."
180 +Each use case defines a _verb, which is described in the file specified in
181 +the ``File`` directive, like above.
183 +The ``HiFi`` verb above is described in
184 +``/usr/share/alsa/ucm/PandaBoard/hifi``.
186 +For more details on the syntax of UCM files, see the alsa-lib source code:
187 +http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=src/ucm/parser.c
193 +Some commands, like for instance ``list _devices``,
194 +can only work after setting a ``_verb`` in the **same execution**, for
195 +instance this sequence doesn't work:
199 + # alsaucm -c bytcr-rt5640 set _verb HiFi
200 + # alsaucm -c bytcr-rt5640 list _devices
203 +However this command does:
207 + # alsaucm -n -b - <<EOM
214 +An example of setting the `Speaker` device for the `HiFi` verb of the
215 +`bytcr-rt5640` card:
219 + # alsaucm -n -b - <<EOM
223 + set _enadev Speaker
231 +* Use Case Interface: http://www.alsa-project.org/alsa-doc/alsa-lib/group__ucm.html
233 +.. _Use Case Interface: http://www.alsa-project.org/alsa-doc/alsa-lib/group__ucm.html