1ALSACTL(1)                  General Commands Manual                 ALSACTL(1)
2
3
4

NAME

6       alsactl - advanced controls for ALSA soundcard driver
7
8

SYNOPSIS

10       alsactl [options] [store|restore|init] <card # or id or device>
11
12       alsactl monitor <card # or id>
13
14       alsactl info <card # or id>
15
16       alsactl [clean] <card # or id or device> [[control identifiers]]
17
18

DESCRIPTION

20       alsactl  is  used  to  control advanced settings for the ALSA soundcard
21       drivers. It supports multiple soundcards. If  your  card  has  features
22       that  you can't seem to control from a mixer application, you have come
23       to the right place.
24
25

COMMANDS

27   Introduction
28       The <card> argument is optional. If no soundcards are specified,  setup
29       for all cards will be saved, loaded or monitored.
30
31
32   store <card>
33       This  command saves the current driver state for the selected soundcard
34       to the configuration file.
35
36
37   restore <card>
38       This command loads driver state for the  selected  soundcard  from  the
39       configuration  file.  If  restoring fails (eventually partly), the init
40       action is called.
41
42
43   nrestore <card>
44       This command is like restore, but it notifies also the daemon to do new
45       rescan for available soundcards.
46
47
48   init <card>
49       This command tries to initialize all devices to a default state. If de‐
50       vice is not known, error code 99 is returned.
51
52
53   daemon
54       This command manages to save periodically the sound state.
55
56
57   rdaemon
58       This command is like daemon but restore the sound state at first.
59
60
61   kill <cmd>
62       This command notifies the daemon to do the specified  operation  (quit,
63       rescan, save_and_quit).
64
65
66   monitor <card>
67       This  command is for monitoring the events received from the given con‐
68       trol device.
69
70
71   info <card>
72       This command shows the general information in the YAML format collected
73       from the given control device (sound card).
74
75
76   clean <card> [filter]
77       This command cleans the controls created by applications.
78
79       The  optional  element  identifiers are accepted as a filter. One extra
80       argument is parsed as an element identifiers.
81
82       Example: alsactl clean 0 "name='PCM'" "name='Mic Phantom'"
83
84
85   dump-state
86       This command dumps the current state (all cards) to stdout.
87
88
89   dump-cfg
90       This command dumps the current configuration  (all  cards)  to  stdout.
91       Note that the configuration hooks are evaluated.
92
93

OPTIONS

95       -h, --help
96              Help: show available flags and commands.
97
98
99       -d, --debug
100              Use debug mode: a bit more verbose.
101
102
103       -v, --version
104              Print alsactl version number.
105
106
107       -f, --file
108              Select   the   configuration   file   to  use.  The  default  is
109              /var/lib/alsa/asound.state.
110
111
112       -a, --config-dir
113              Select the boot / hotplug ALSA configuration directory  to  use.
114              The default is /var/lib/alsa.
115
116
117       -l, --lock
118              Use  the  file locking to serialize the concurrent access to the
119              state file (this option is default for the global state file).
120
121
122       -L, --no-lock
123              Do not use the file locking to serialize the  concurrent  access
124              to the state file (including the global state file).
125
126
127       -O, --lock-state-file
128              Select the state lock file path.
129
130
131       -F, --force
132              Used  with restore command.  Try to restore the matching control
133              elements as much as possible.  This option  is  set  as  default
134              now.
135
136
137       -g, --ignore
138              Used  with  store,  restore  and  init commands. Do not show 'No
139              soundcards found' and do not set an error exit code when  sound‐
140              cards are not installed.
141
142
143       -P, --pedantic
144              Used  with  restore  command.  Don't restore mismatching control
145              elements.  This option was the old default behavior.
146
147
148       -I, --no-init-fallback
149              Don't initialize cards if restore fails.  Since version  1.0.18,
150              alsactl  tries to initialize the card with the restore operation
151              as default.  But this can cause incompatibility with  the  older
152              version.   The caller may expect that the state won't be touched
153              if no state file exists.  This option takes the restore behavior
154              back to the older version by suppressing the initialization.
155
156
157       -r, --runstate
158              Save  restore and init state to this file. The file will contain
159              only errors.  Errors are appended with the soundcard id  to  the
160              end of file.
161
162
163       -R, --remove
164              Remove runstate file at first.
165
166
167       -E, --env #=#
168              Set  environment  variable  (useful  for  init action or you may
169              override ALSA_CONFIG_PATH to read different or optimized config‐
170              uration - may be useful for "boot" scripts).
171
172
173       -i, --initfile
174              The    configuration   file   for   init.   By   default,   PRE‐
175              FIX/share/alsa/init/00main is used.
176
177
178       -p, --period
179              The store period in seconds for the daemon command.
180
181
182       -e, --pid-file
183              The pathname to store the process-id file in the HDB UUCP format
184              (ASCII).
185
186
187       -b, --background
188              Run the task in background.
189
190
191       -s, --syslog
192              Use syslog for messages.
193
194
195       -n, --nice
196              Set the process priority (see 'man nice')
197
198
199       -c, --sched-idle
200              Set the process scheduling policy to idle (SCHED_IDLE).
201
202
203       -D, --ucm-defaults
204              Execute  also the 'defaults' section from the UCM configuration.
205              The standard behaviour is to execute only 'once' section.
206
207
208       -U, --no-ucm
209              Skip the UCM init even if available. It may be  useful  for  the
210              test the legacy init configuration.
211
212

FILES

214       /var/lib/alsa/asound.state  (or  whatever  file you specify with the -f
215       flag) is used to store current settings for your soundcards.  The  set‐
216       tings  include  all  the  usual  soundcard mixer settings.  More impor‐
217       tantly, alsactl is capable of controlling other card-specific  features
218       that mixer apps usually don't know about.
219
220       The  configuration  file  is generated automatically by running alsactl
221       store. Editing the configuration file by hand may be necessary for some
222       soundcard features (e.g. enabling/disabling automatic mic gain, digital
223       output, joystick/game ports, some future MIDI routing options, etc).
224
225

SEE ALSO

227        amixer(1), alsamixer(1), aplay(1), alsactl_init(7)
228
229

BUGS

231       None known.
232
233

AUTHOR

235       alsactl is by  Jaroslav  Kysela  <perex@perex.cz>  and  Abramo  Bagnara
236       <abramo@alsa-project.org>.   This   document   is   by   Paul   Winkler
237       <zarmzarm@erols.com>.
238
239
240
241                                  07 May 2014                       ALSACTL(1)
Impressum