]> git.alsa-project.org Git - alsa-utils.git/commitdiff
alsactl: add 'clean' cmd to help, improve man page
authorJaroslav Kysela <perex@perex.cz>
Sun, 7 Mar 2021 19:18:12 +0000 (20:18 +0100)
committerJaroslav Kysela <perex@perex.cz>
Sun, 7 Mar 2021 19:18:12 +0000 (20:18 +0100)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
alsactl/alsactl.1
alsactl/alsactl.c

index 5452ef599556178db86fed0e201b62c81243ac7f..0bd6c1bb95ab32910c212ddb36381b3fd973d53f 100644 (file)
@@ -8,6 +8,8 @@ alsactl \- advanced controls for ALSA soundcard driver
 
 \fBalsactl\fP \fImonitor\fP <card # or id>
 
+\fBalsactl\fP [\fIclean\fP] <card # or id or device> [[control identifiers]]
+
 .SH DESCRIPTION
 \fBalsactl\fP is used to control advanced settings for the ALSA
 soundcard drivers. It supports multiple soundcards. If your card has
@@ -16,37 +18,67 @@ you have come to the right place.
 
 .SH COMMANDS
 
-\fIstore\fP saves the current driver state for the selected soundcard
+.SS Introduction
+
+The \fI<card>\fP argument is optional. If no soundcards are specified,
+setup for all cards will be saved, loaded or monitored.
+
+.SS store <card>
+
+This command saves the current driver state for the selected soundcard
 to the configuration file.
 
-\fIrestore\fP loads driver state for the selected soundcard from the
+.SS restore <card>
+
+This command loads driver state for the selected soundcard from the
 configuration file. If restoring fails (eventually partly), the init
 action is called.
 
-\fInrestore\fP is like \fIrestore\fP, but it notifies also the daemon
+.SS nrestore <card>
+
+This command is like \fIrestore\fP, but it notifies also the daemon
 to do new rescan for available soundcards.
 
-\fIinit\fP tries to initialize all devices to a default state. If device
+.SS init <card>
+
+This command tries to initialize all devices to a default state. If device
 is not known, error code 99 is returned.
 
-\fIdaemon\fP manages to save periodically the sound state.
+.SS daemon
+
+This command manages to save periodically the sound state.
 
-\fIrdaemon\fP like \fIdaemon\fP but restore the sound state at first.
+.SS rdaemon
 
-\fIkill\fP notifies the daemon to do the specified operation (quit,
+This command is like \fIdaemon\fP but restore the sound state at first.
+
+.SS kill <cmd>
+
+This command notifies the daemon to do the specified operation (quit,
 rescan, save_and_quit).
 
-\fImonitor\fP is for monitoring the events received from the given
+.SS monitor <card>
+
+This command is for monitoring the events received from the given
 control device.
 
-\fIclean\fP clean the controls created by applications.
+.SS clean <card> [filter]
+
+This command cleans the controls created by applications.
+
+The optional element identifiers are accepted as a filter. One extra
+argument is parsed as an element identifiers.
+
+\fIExample:\fP alsactl clean 0 "name='PCM'" "name='Mic Phantom'"
+
+.SS dump-state
 
-\fIdump-state\fP dump the current state (all cards).
+This command dumps the current state (all cards) to stdout.
 
-\fIdump-cfg\fP dump the current configuration (all cards, hooks are evaluated).
+.SS dump-cfg
 
-If no soundcards are specified, setup for all cards will be saved,
-loaded or monitored.
+This command dumps the current configuration (all cards) to stdout.
+Note that the configuration hooks are evaluated.
 
 .SH OPTIONS
 
index 3a6f79d29349a99575df154b13674ca49f6d9a71..446365aedfd6c71ae53f11bb8296b0959f23507f 100644 (file)
@@ -110,6 +110,7 @@ static struct arg args[] = {
 { CARDCMD, "rdaemon", "like daemon but do the state restore at first" },
 { KILLCMD, "kill", "notify daemon to quit, rescan or save_and_quit" },
 { CARDCMD, "monitor", "monitor control events" },
+{ CARDCMD, "clean", "clean application controls" },
 { EMPCMD, "dump-state", "dump the state (for all cards)" },
 { EMPCMD, "dump-cfg", "dump the configuration (expanded, for all cards)" },
 { 0, NULL, NULL }