Imported Upstream version 1.0.28
[platform/upstream/alsa-utils.git] / alsactl / alsactl.1
1 .TH ALSACTL 1 "07 May 2014"
2 .SH NAME
3 alsactl \- advanced controls for ALSA soundcard driver
4
5 .SH SYNOPSIS
6
7 \fBalsactl\fP [\fIoptions\fP] [\fIstore\fP|\fIrestore\fP|\fIinit\fP] <card # or id or device>
8
9 \fBalsactl\fP \fImonitor\fP <card # or id>
10
11 .SH DESCRIPTION
12 \fBalsactl\fP is used to control advanced settings for the ALSA
13 soundcard drivers. It supports multiple soundcards. If your card has
14 features that you can't seem to control from a mixer application,
15 you have come to the right place.
16
17 .SH COMMANDS
18
19 \fIstore\fP saves the current driver state for the selected soundcard
20 to the configuration file.
21
22 \fIrestore\fP loads driver state for the selected soundcard from the
23 configuration file. If restoring fails (eventually partly), the init
24 action is called.
25
26 \fInrestore\fP is like \fIrestore\fP, but it notifies also the daemon
27 to do new rescan for available soundcards.
28
29 \fIinit\fP tries to initialize all devices to a default state. If device
30 is not known, error code 99 is returned.
31
32 \fIdaemon\fP manages to save periodically the sound state.
33
34 \fIrdaemon\fP like \fIdaemon\fP but restore the sound state at first.
35
36 \fIkill\fP notifies the daemon to do the specified operation (quit,
37 rescan, save_and_quit).
38
39 \fImonitor\fP is for monitoring the events received from the given
40 control device.
41
42 If no soundcards are specified, setup for all cards will be saved,
43 loaded or monitored.
44
45 .SH OPTIONS
46
47 .TP
48 \fI\-h, \-\-help\fP 
49 Help: show available flags and commands.
50
51 .TP
52 \fI\-d, \-\-debug\fP
53 Use debug mode: a bit more verbose.
54
55 .TP
56 \fI\-v, \-\-version\fP
57 Print alsactl version number.
58
59 .TP
60 \fI\-f, \-\-file\fP
61 Select the configuration file to use. The default is /var/lib/alsa/asound.state.
62
63 .TP
64 \fI\-l, \-\-lock\fP
65 Use the file locking to serialize the concurrent access to the state file (this
66 option is default for the global state file).
67
68 .TP
69 \fI\-L, \-\-no-lock\fP
70 Do not use the file locking to serialize the concurrent access to the state
71 file (including the global state file).
72
73 .TP
74 \fI\-O, \-\-lock-state-file\fP
75 Select the state lock file path.
76
77 .TP
78 \fI\-F, \-\-force\fP
79 Used with restore command.  Try to restore the matching control elements
80 as much as possible.  This option is set as default now.
81
82 .TP
83 \fI\-g, \-\-ignore\fP
84 Used with store and restore commands. Do not show 'No soundcards found'
85 and do not set an error exit code when soundcards are not installed.
86
87 .TP
88 \fI\-P, \-\-pedantic\fP
89 Used with restore command.  Don't restore mismatching control elements.
90 This option was the old default behavior.
91
92 .TP
93 \fI\-I, \-\-no\-init\-fallback\fP
94 Don't initialize cards if restore fails.  Since version 1.0.18,
95 \fBalsactl\fP tries to initialize the card with the restore operation
96 as default.  But this can cause incompatibility with the older version.
97 The caller may expect that the state won't be touched if no state file
98 exists.  This option takes the restore behavior back to the older
99 version by suppressing the initialization.
100
101 .TP
102 \fI\-r, \-\-runstate\fP
103 Save restore and init state to this file. The file will contain only errors.
104 Errors are appended with the soundcard id to the end of file.
105
106 .TP
107 \fI\-R, \-\-remove\fP
108 Remove runstate file at first.
109
110 .TP
111 \fI\-E, \-\-env\fP #=#
112 Set environment variable (useful for init action or you may override
113 ALSA_CONFIG_PATH to read different or optimized configuration - may be
114 useful for "boot" scripts).
115
116 .TP
117 \fI\-i, \-\-initfile\fP
118 The configuration file for init. By default, PREFIX/share/alsa/init/00main
119 is used.
120
121 .TP
122 \fI\-p, \-\-period\fP
123 The store period in seconds for the daemon command.
124
125 .TP
126 \fI\-e, \-\-pid-file\fP
127 The pathname to store the process-id file in the HDB UUCP format (ASCII).
128
129 .TP
130 \fI\-b, \-\-background\fP
131 Run the task in background.
132
133 .TP
134 \fI\-s, \-\-syslog\fP
135 Use syslog for messages.
136
137 .TP
138 \fI\-n, \-\-nice\fP
139 Set the process priority (see 'man nice')
140
141 .TP
142 \fI\-c, \-\-sched-idle\fP
143 Set the process scheduling policy to idle (SCHED_IDLE).
144
145 .SH FILES
146 \fI/var/lib/alsa/asound.state\fP (or whatever file you specify with the
147 \fB\-f\fP flag) is used to store current settings for your
148 soundcards. The settings include all the usual soundcard mixer
149 settings.  More importantly, alsactl is
150 capable of controlling other card-specific features that mixer apps
151 usually don't know about.
152
153 The configuration file is generated automatically by running
154 \fBalsactl store\fP. Editing the configuration file by hand may be
155 necessary for some soundcard features (e.g. enabling/disabling
156 automatic mic gain, digital output, joystick/game ports, some future MIDI
157 routing options, etc).
158
159 .SH SEE ALSO
160 \fB
161 amixer(1),
162 alsamixer(1),
163 aplay(1),
164 alsactl_init(7)
165 \fP
166
167 .SH BUGS 
168 None known.
169
170 .SH AUTHOR
171 \fBalsactl\fP is by Jaroslav Kysela <perex@perex.cz> and Abramo Bagnara
172 <abramo@alsa\-project.org>. This document is by Paul Winkler <zarmzarm@erols.com>.