1ALSACTL(1) General Commands Manual ALSACTL(1)
2
3
4
6 alsactl - advanced controls for ALSA soundcard driver
7
8
10 alsactl [options] [store|restore|init] <card # or id or device>
11
12 alsactl monitor <card # or id>
13
14 alsactl [clean] <card # or id or device> [[control identifiers]]
15
16
18 alsactl is used to control advanced settings for the ALSA soundcard
19 drivers. It supports multiple soundcards. If your card has features
20 that you can't seem to control from a mixer application, you have come
21 to the right place.
22
23
25 Introduction
26 The <card> argument is optional. If no soundcards are specified, setup
27 for all cards will be saved, loaded or monitored.
28
29
30 store <card>
31 This command saves the current driver state for the selected soundcard
32 to the configuration file.
33
34
35 restore <card>
36 This command loads driver state for the selected soundcard from the
37 configuration file. If restoring fails (eventually partly), the init
38 action is called.
39
40
41 nrestore <card>
42 This command is like restore, but it notifies also the daemon to do new
43 rescan for available soundcards.
44
45
46 init <card>
47 This command tries to initialize all devices to a default state. If de‐
48 vice is not known, error code 99 is returned.
49
50
51 daemon
52 This command manages to save periodically the sound state.
53
54
55 rdaemon
56 This command is like daemon but restore the sound state at first.
57
58
59 kill <cmd>
60 This command notifies the daemon to do the specified operation (quit,
61 rescan, save_and_quit).
62
63
64 monitor <card>
65 This command is for monitoring the events received from the given con‐
66 trol device.
67
68
69 clean <card> [filter]
70 This command cleans the controls created by applications.
71
72 The optional element identifiers are accepted as a filter. One extra
73 argument is parsed as an element identifiers.
74
75 Example: alsactl clean 0 "name='PCM'" "name='Mic Phantom'"
76
77
78 dump-state
79 This command dumps the current state (all cards) to stdout.
80
81
82 dump-cfg
83 This command dumps the current configuration (all cards) to stdout.
84 Note that the configuration hooks are evaluated.
85
86
88 -h, --help
89 Help: show available flags and commands.
90
91
92 -d, --debug
93 Use debug mode: a bit more verbose.
94
95
96 -v, --version
97 Print alsactl version number.
98
99
100 -f, --file
101 Select the configuration file to use. The default is
102 /var/lib/alsa/asound.state.
103
104
105 -a, --config-dir
106 Select the boot / hotplug ALSA configuration directory to use.
107 The default is /var/lib/alsa.
108
109
110 -l, --lock
111 Use the file locking to serialize the concurrent access to the
112 state file (this option is default for the global state file).
113
114
115 -L, --no-lock
116 Do not use the file locking to serialize the concurrent access
117 to the state file (including the global state file).
118
119
120 -O, --lock-state-file
121 Select the state lock file path.
122
123
124 -F, --force
125 Used with restore command. Try to restore the matching control
126 elements as much as possible. This option is set as default
127 now.
128
129
130 -g, --ignore
131 Used with store, restore and init commands. Do not show 'No
132 soundcards found' and do not set an error exit code when sound‐
133 cards are not installed.
134
135
136 -P, --pedantic
137 Used with restore command. Don't restore mismatching control
138 elements. This option was the old default behavior.
139
140
141 -I, --no-init-fallback
142 Don't initialize cards if restore fails. Since version 1.0.18,
143 alsactl tries to initialize the card with the restore operation
144 as default. But this can cause incompatibility with the older
145 version. The caller may expect that the state won't be touched
146 if no state file exists. This option takes the restore behavior
147 back to the older version by suppressing the initialization.
148
149
150 -r, --runstate
151 Save restore and init state to this file. The file will contain
152 only errors. Errors are appended with the soundcard id to the
153 end of file.
154
155
156 -R, --remove
157 Remove runstate file at first.
158
159
160 -E, --env #=#
161 Set environment variable (useful for init action or you may
162 override ALSA_CONFIG_PATH to read different or optimized config‐
163 uration - may be useful for "boot" scripts).
164
165
166 -i, --initfile
167 The configuration file for init. By default, PRE‐
168 FIX/share/alsa/init/00main is used.
169
170
171 -p, --period
172 The store period in seconds for the daemon command.
173
174
175 -e, --pid-file
176 The pathname to store the process-id file in the HDB UUCP format
177 (ASCII).
178
179
180 -b, --background
181 Run the task in background.
182
183
184 -s, --syslog
185 Use syslog for messages.
186
187
188 -n, --nice
189 Set the process priority (see 'man nice')
190
191
192 -c, --sched-idle
193 Set the process scheduling policy to idle (SCHED_IDLE).
194
195
196 -D, --ucm-defaults
197 Execute also the 'defaults' section from the UCM configuration.
198 The standard behaviour is to execute only 'once' section.
199
200
201 -U, --no-ucm
202 Skip the UCM init even if available. It may be useful for the
203 test the legacy init configuration.
204
205
207 /var/lib/alsa/asound.state (or whatever file you specify with the -f
208 flag) is used to store current settings for your soundcards. The set‐
209 tings include all the usual soundcard mixer settings. More impor‐
210 tantly, alsactl is capable of controlling other card-specific features
211 that mixer apps usually don't know about.
212
213 The configuration file is generated automatically by running alsactl
214 store. Editing the configuration file by hand may be necessary for some
215 soundcard features (e.g. enabling/disabling automatic mic gain, digital
216 output, joystick/game ports, some future MIDI routing options, etc).
217
218
220 amixer(1), alsamixer(1), aplay(1), alsactl_init(7)
221
222
224 None known.
225
226
228 alsactl is by Jaroslav Kysela <perex@perex.cz> and Abramo Bagnara
229 <abramo@alsa-project.org>. This document is by Paul Winkler
230 <zarmzarm@erols.com>.
231
232
233
234 07 May 2014 ALSACTL(1)