[pulseaudio-commits] 2 commits - configure.ac man/default.pa.5.xml.in man/Makefile.am man/pacmd.1.xml.in man/pactl.1.xml.in man/pulse-cli-syntax.5.xml.in src/pulsecore
Colin Guthrie
colin at kemper.freedesktop.org
Tue Apr 10 02:18:20 PDT 2012
configure.ac | 1
man/Makefile.am | 3
man/default.pa.5.xml.in | 9 -
man/pacmd.1.xml.in | 11 +
man/pactl.1.xml.in | 7
man/pulse-cli-syntax.5.xml.in | 335 ++++++++++++++++++++++++++++++++++++++++++
src/pulsecore/cli-command.c | 142 ++++++++++++++---
7 files changed, 476 insertions(+), 32 deletions(-)
New commits:
commit 29e4b187a3dd3fd598d57ed6da88f4f67862cc33
Author: Colin Guthrie <colin at mageia.org>
Date: Thu Apr 5 11:52:24 2012 +0100
cli: Allow source-output volumes/mute to be set via CLI
This should have been done a long time ago but it brings symmetry to the API
diff --git a/man/pulse-cli-syntax.5.xml.in b/man/pulse-cli-syntax.5.xml.in
index 4f4e838..dffb4a9 100644
--- a/man/pulse-cli-syntax.5.xml.in
+++ b/man/pulse-cli-syntax.5.xml.in
@@ -129,14 +129,14 @@ USA.
</option>
<option>
- <p><opt>set-sink-input-volume</opt> <arg>index</arg> <arg>volume</arg></p>
- <optdesc><p>Set the volume of a sink input specified
+ <p><opt>set-sink-input-volume|set-source-output-volume</opt> <arg>index</arg> <arg>volume</arg></p>
+ <optdesc><p>Set the volume of a sink input (resp. source output) specified
by its index. The same volume rules apply as with set-sink-volume.</p></optdesc>
</option>
<option>
- <p><opt>set-sink-input-mute</opt> <arg>index</arg> <arg>boolean</arg></p>
- <optdesc><p>Mute or unmute a sink input specified
+ <p><opt>set-sink-input-mute|set-source-output-mute</opt> <arg>index</arg> <arg>boolean</arg></p>
+ <optdesc><p>Mute or unmute a sink input (resp. source output) specified
by its index. The same mute rules apply as with set-sink-mute.</p></optdesc>
</option>
</section>
diff --git a/src/pulsecore/cli-command.c b/src/pulsecore/cli-command.c
index fd265d5..53042c1 100644
--- a/src/pulsecore/cli-command.c
+++ b/src/pulsecore/cli-command.c
@@ -96,10 +96,12 @@ static int pa_cli_command_unload(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa
static int pa_cli_command_describe(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail);
static int pa_cli_command_sink_volume(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail);
static int pa_cli_command_sink_input_volume(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail);
+static int pa_cli_command_source_output_volume(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail);
static int pa_cli_command_source_volume(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail);
static int pa_cli_command_sink_mute(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail);
static int pa_cli_command_source_mute(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail);
static int pa_cli_command_sink_input_mute(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail);
+static int pa_cli_command_source_output_mute(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail);
static int pa_cli_command_sink_default(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail);
static int pa_cli_command_source_default(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail);
static int pa_cli_command_kill_client(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail);
@@ -155,7 +157,9 @@ static const struct command commands[] = {
{ "set-sink-mute", pa_cli_command_sink_mute, "Set the mute switch of a sink (args: index|name, bool)", 3},
{ "set-source-mute", pa_cli_command_source_mute, "Set the mute switch of a source (args: index|name, bool)", 3},
{ "set-sink-input-volume", pa_cli_command_sink_input_volume, "Set the volume of a sink input (args: index, volume)", 3},
+ { "set-source-output-volume",pa_cli_command_source_output_volume,"Set the volume of a source output (args: index, volume)", 3},
{ "set-sink-input-mute", pa_cli_command_sink_input_mute, "Set the mute switch of a sink input (args: index, bool)", 3},
+ { "set-source-output-mute", pa_cli_command_source_output_mute, "Set the mute switch of a source output (args: index, bool)", 3},
{ "set-default-sink", pa_cli_command_sink_default, "Set the default sink (args: index|name)", 2},
{ "set-default-source", pa_cli_command_source_default, "Set the default source (args: index|name)", 2},
{ "set-card-profile", pa_cli_command_card_profile, "Change the profile of a card (args: index|name, profile-name)", 3},
@@ -169,7 +173,7 @@ static const struct command commands[] = {
{ "update-sink-proplist", pa_cli_command_update_sink_proplist, "Update the properties of a sink (args: index|name, properties)", 3},
{ "update-source-proplist", pa_cli_command_update_source_proplist, "Update the properties of a source (args: index|name, properties)", 3},
{ "update-sink-input-proplist", pa_cli_command_update_sink_input_proplist, "Update the properties of a sink input (args: index, properties)", 3},
- { "update-source-output-proplist", pa_cli_command_update_source_output_proplist, "Update the properties of a source_output (args: index, properties)", 3},
+ { "update-source-output-proplist", pa_cli_command_update_source_output_proplist, "Update the properties of a source output (args: index, properties)", 3},
{ "list-samples", pa_cli_command_scache_list, "List all entries in the sample cache", 1},
{ "play-sample", pa_cli_command_scache_play, "Play a sample from the sample cache (args: name, sink|index)", 3},
{ "remove-sample", pa_cli_command_scache_remove, "Remove a sample from the sample cache (args: name)", 2},
@@ -637,6 +641,58 @@ static int pa_cli_command_source_volume(pa_core *c, pa_tokenizer *t, pa_strbuf *
return 0;
}
+static int pa_cli_command_source_output_volume(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail) {
+ const char *n, *v;
+ pa_source_output *so;
+ pa_volume_t volume;
+ pa_cvolume cvolume;
+ uint32_t idx;
+
+ pa_core_assert_ref(c);
+ pa_assert(t);
+ pa_assert(buf);
+ pa_assert(fail);
+
+ if (!(n = pa_tokenizer_get(t, 1))) {
+ pa_strbuf_puts(buf, "You need to specify a source output by its index.\n");
+ return -1;
+ }
+
+ if ((idx = parse_index(n)) == PA_IDXSET_INVALID) {
+ pa_strbuf_puts(buf, "Failed to parse index.\n");
+ return -1;
+ }
+
+ if (!(v = pa_tokenizer_get(t, 2))) {
+ pa_strbuf_puts(buf, "You need to specify a volume >= 0. (0 is muted, 0x10000 is normal volume)\n");
+ return -1;
+ }
+
+ if (pa_atou(v, &volume) < 0) {
+ pa_strbuf_puts(buf, "Failed to parse volume.\n");
+ return -1;
+ }
+
+ if (!PA_VOLUME_IS_VALID(volume)) {
+ pa_strbuf_puts(buf, "Volume outside permissible range.\n");
+ return -1;
+ }
+
+ if (!(so = pa_idxset_get_by_index(c->source_outputs, idx))) {
+ pa_strbuf_puts(buf, "No source output found with this index.\n");
+ return -1;
+ }
+
+ if (!so->volume_writable) {
+ pa_strbuf_puts(buf, "This source output's volume can't be changed.\n");
+ return -1;
+ }
+
+ pa_cvolume_set(&cvolume, 1, volume);
+ pa_source_output_set_volume(so, &cvolume, TRUE, TRUE);
+ return 0;
+}
+
static int pa_cli_command_sink_mute(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail) {
const char *n, *m;
pa_sink *sink;
@@ -905,6 +961,46 @@ static int pa_cli_command_sink_input_mute(pa_core *c, pa_tokenizer *t, pa_strbuf
return 0;
}
+static int pa_cli_command_source_output_mute(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail) {
+ const char *n, *v;
+ pa_source_output *so;
+ uint32_t idx;
+ int mute;
+
+ pa_core_assert_ref(c);
+ pa_assert(t);
+ pa_assert(buf);
+ pa_assert(fail);
+
+ if (!(n = pa_tokenizer_get(t, 1))) {
+ pa_strbuf_puts(buf, "You need to specify a source output by its index.\n");
+ return -1;
+ }
+
+ if ((idx = parse_index(n)) == PA_IDXSET_INVALID) {
+ pa_strbuf_puts(buf, "Failed to parse index.\n");
+ return -1;
+ }
+
+ if (!(v = pa_tokenizer_get(t, 2))) {
+ pa_strbuf_puts(buf, "You need to specify a mute switch setting (0/1).\n");
+ return -1;
+ }
+
+ if ((mute = pa_parse_boolean(v)) < 0) {
+ pa_strbuf_puts(buf, "Failed to parse mute switch.\n");
+ return -1;
+ }
+
+ if (!(so = pa_idxset_get_by_index(c->source_outputs, (uint32_t) idx))) {
+ pa_strbuf_puts(buf, "No source output found with this index.\n");
+ return -1;
+ }
+
+ pa_source_output_set_mute(so, mute, TRUE);
+ return 0;
+}
+
static int pa_cli_command_sink_default(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_bool_t *fail) {
const char *n;
pa_sink *s;
commit aa19646d34e57719ee87bb8c619ccc7d4ea4e9aa
Author: Colin Guthrie <colin at mageia.org>
Date: Thu Apr 5 11:41:18 2012 +0100
man: Document the cli inteface a little.
This just documents the cli interface syntax. Mostly a lift from
http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/CLI
with some minor editing and bringing up to date.
Also document a few undocumented commands.
Shuffle around the order in 'pacmd help' output to match the order
in the new docs for consistency.
https://bugs.freedesktop.org/show_bug.cgi?id=45029
diff --git a/configure.ac b/configure.ac
index 7bdd401..efcb753 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1330,6 +1330,7 @@ man/padsp.1.xml
man/pulse-daemon.conf.5.xml
man/pulse-client.conf.5.xml
man/default.pa.5.xml
+man/pulse-cli-syntax.5.xml
man/start-pulseaudio-kde.1.xml
man/start-pulseaudio-x11.1.xml
])
diff --git a/man/Makefile.am b/man/Makefile.am
index b27a9f2..d0cc8e7 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -31,6 +31,7 @@ noinst_DATA = \
pulse-daemon.conf.5.xml \
pulse-client.conf.5.xml \
default.pa.5.xml \
+ pulse-cli-syntax.5.xml \
start-pulseaudio-kde.1.xml \
start-pulseaudio-x11.1.xml
@@ -54,6 +55,7 @@ dist_man_MANS = \
pulse-daemon.conf.5 \
pulse-client.conf.5 \
default.pa.5 \
+ pulse-cli-syntax.5 \
start-pulseaudio-kde.1 \
start-pulseaudio-x11.1
@@ -78,6 +80,7 @@ EXTRA_DIST = \
pulse-daemon.conf.5.xml.in \
pulse-client.conf.5.xml.in \
default.pa.5.xml.in \
+ pulse-cli-syntax.5.xml.in \
start-pulseaudio-kde.1.xml.in \
start-pulseaudio-x11.1.xml.in \
xmltoman \
diff --git a/man/default.pa.5.xml.in b/man/default.pa.5.xml.in
index 1ec618d..fb5b2d2 100644
--- a/man/default.pa.5.xml.in
+++ b/man/default.pa.5.xml.in
@@ -34,7 +34,7 @@ USA.
<file>~/.pulse/default.pa</file> on startup, and when that file
doesn't exist <file>@PA_DEFAULT_CONFIG_DIR@/default.pa</file>. It
should contain directives in the PulseAudio CLI languages, as
- documented on <url href="http://pulseaudio.org/wiki/CLI"/>.</p>
+ documented in <manref name="pulse-cli-syntax" section="5"/>.</p>
<p>The same commands can also be entered during runtime in the <manref name="pacmd"
section="1"/> tool, allowing flexible runtime reconfiguration.</p>
@@ -47,9 +47,10 @@ USA.
<section name="See also">
<p>
- <manref name="pulse-daemon.conf" section="5"/>, <manref
- name="pulseaudio" section="1"/>, <manref name="pacmd"
- section="1"/>
+ <manref name="pulse-cli-syntax" section="5"/>,
+ <manref name="pulse-daemon.conf" section="5"/>,
+ <manref name="pulseaudio" section="1"/>,
+ <manref name="pacmd" section="1"/>
</p>
</section>
diff --git a/man/pacmd.1.xml.in b/man/pacmd.1.xml.in
index c20c016..079eb61 100644
--- a/man/pacmd.1.xml.in
+++ b/man/pacmd.1.xml.in
@@ -34,7 +34,11 @@ USA.
the commands also understood in the <file>default.pa</file>
configuration scripts.</p>
- <p>This program takes no command line options.</p>
+ <p>To exit the live shell, use ctrl+d. Note that the 'exit' command
+ inside the shell will tell the PulseAudio daemon itself to shutdown!</p>
+
+ <p>If any arguments are passed on the command line, they will be
+ passed into the live shell which will process the command and exit.</p>
</description>
<section name="Authors">
@@ -43,7 +47,10 @@ USA.
<section name="See also">
<p>
- <manref name="pulseaudio" section="1"/>, <manref name="pactl" section="1"/>, <manref name="default.pa" section="5"/>
+ <manref name="pulse-cli-syntax" section="5"/>,
+ <manref name="pulseaudio" section="1"/>,
+ <manref name="pactl" section="1"/>,
+ <manref name="default.pa" section="5"/>
</p>
</section>
diff --git a/man/pactl.1.xml.in b/man/pactl.1.xml.in
index 688ac38..86e7609 100644
--- a/man/pactl.1.xml.in
+++ b/man/pactl.1.xml.in
@@ -66,7 +66,7 @@ USA.
<section name="Commands">
<option>
- <p><opt>stat</opt> [short]</p>
+ <p><opt>stat</opt> [<arg>short</arg>]</p>
<optdesc><p>Dump a few statistics about the memory usage of the PulseAudio daemon. (Note: for backwards
compatibility, we also show the output of the <arg>info</arg> command. In order to only show
statistics, use the optional <arg>short</arg> argument. In a future version of PA we will
@@ -79,7 +79,7 @@ USA.
</option>
<option>
- <p><opt>list</opt> [short] [<arg>TYPE</arg>]</p>
+ <p><opt>list</opt> [<arg>short</arg>] [<arg>TYPE</arg>]</p>
<optdesc><p>Dump all currently loaded modules, available sinks, sources, streams, etc. <arg>TYPE</arg> must be one of:
modules, sinks, sources, sink-inputs, source-outputs, clients, samples, cards. If not specified, all info is listed. If
short is given, output is in a tabular format, for easy parsing by scripts.</p></optdesc>
@@ -243,7 +243,8 @@ USA.
<seealso>
<p>
- <manref name="pulseaudio" section="1"/>, <manref name="pacmd" section="1"/>
+ <manref name="pulseaudio" section="1"/>,
+ <manref name="pacmd" section="1"/>
</p>
</seealso>
diff --git a/man/pulse-cli-syntax.5.xml.in b/man/pulse-cli-syntax.5.xml.in
new file mode 100644
index 0000000..4f4e838
--- /dev/null
+++ b/man/pulse-cli-syntax.5.xml.in
@@ -0,0 +1,335 @@
+<?xml version="1.0"?><!--*-nxml-*-->
+<!DOCTYPE manpage SYSTEM "xmltoman.dtd">
+<?xml-stylesheet type="text/xsl" href="xmltoman.xsl" ?>
+
+<!--
+This file is part of PulseAudio.
+
+PulseAudio is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of the
+License, or (at your option) any later version.
+
+PulseAudio is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
+Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with PulseAudio; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+USA.
+-->
+
+<manpage name="pulse-cli-syntax" section="5" desc="PulseAudio Command Line Interface Syntax">
+
+ <synopsis>
+ <p><file>~/.pulse/default.pa</file></p>
+ <p><file>@PA_DEFAULT_CONFIG_DIR@/default.pa</file></p>
+ <p><file>@PA_DEFAULT_CONFIG_DIR@/system.pa</file></p>
+ </synopsis>
+
+ <description>
+ <p>
+ PulseAudio provides a simple command line language used by configuration
+ scripts and the pacmd interactive shell, and the modules module-cli and
+ module-cli-protocol-{unix,tcp}. Empty lines and lines beginning with a
+ hashmark (#) are silently ignored. Several commands are supported.
+ </p>
+
+ <p>
+ Note that any boolean arguments can be given positively as '1', 'on' or any
+ word starting with the letters 't' or 'y'. Likewise, negative values can be
+ given as '0', 'off' or any word starting with the letters 'f' or 'n'.
+ Case is ignored.
+ </p>
+ </description>
+
+ <section name="General Commands">
+
+ <option>
+ <p><opt>help</opt></p>
+ <optdesc><p>Show a quick help on the commands available.</p></optdesc>
+ </option>
+ </section>
+
+ <section name="Status_Commands">
+ <option>
+ <p><opt>list-modules</opt></p>
+ <optdesc><p>Show all currently loaded modules with their arguments.</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>list-cards</opt></p>
+ <optdesc><p>Show all currently registered cards</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>list-sinks</opt> or <opt>list-sources</opt></p>
+ <optdesc><p>Show all currently registered sinks (resp. sources).</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>list-clients</opt></p>
+ <optdesc><p>Show all currently active clients.</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>list-sink-inputs</opt> or <opt>list-source-outputs</opt></p>
+ <optdesc><p>Show all currently active inputs to sinks a.k.a. playback
+ streams (resp. outputs of sources a.k.a. recording streams).</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>stat</opt></p>
+ <optdesc><p>Show some simple statistics about the allocated memory blocks and the space used by them.</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>info</opt> or <opt>ls</opt> or <opt>list</opt></p>
+ <optdesc><p>A combination of all status commands described above (all
+ three commands are synonyms).</p></optdesc>
+ </option>
+ </section>
+
+ <section name="Module Management">
+ <option>
+ <p><opt>load-module</opt> <arg>name</arg> [<arg>arguments...</arg>]</p>
+ <optdesc><p>Load a module specified by its name and arguments. For most
+ modules it is OK to be loaded more than once.</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>unload-module</opt> <arg>index</arg></p>
+ <optdesc><p>Unload a module specified by its index in the module list as
+ returned by list-modules.</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>describe-module</opt> <arg>name</arg></p>
+ <optdesc><p>Give information about a module specified by its name.</p></optdesc>
+ </option>
+ </section>
+
+ <section name="Volume Commands">
+ <option>
+ <p><opt>set-sink-volume|set-source-volume</opt> <arg>index|name</arg> <arg>volume</arg></p>
+ <optdesc><p>Set the volume of the specified sink (resp. source). You may
+ specify the sink (resp. source) either by its index in the sink/source list
+ or by its name. The volume should be an integer value greater or equal than
+ 0 (muted). Volume 65536 (0x10000) is 'normal' volume a.k.a. 100%. Values
+ greater than this amplify the audio signal (with clipping).</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>set-sink-mute|set-source-mute</opt> <arg>index|name</arg> <arg>boolean</arg></p>
+ <optdesc><p>Mute or unmute the specified sink (resp. source). You may
+ specify the sink (resp. source) either by its index or by its name.
+ The mute value is either 0 (not muted) or 1 (muted).</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>set-sink-input-volume</opt> <arg>index</arg> <arg>volume</arg></p>
+ <optdesc><p>Set the volume of a sink input specified
+ by its index. The same volume rules apply as with set-sink-volume.</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>set-sink-input-mute</opt> <arg>index</arg> <arg>boolean</arg></p>
+ <optdesc><p>Mute or unmute a sink input specified
+ by its index. The same mute rules apply as with set-sink-mute.</p></optdesc>
+ </option>
+ </section>
+
+ <section name="Configuration Commands">
+ <option>
+ <p><opt>set-default-sink|set-default-source</opt> <arg>index|name</arg></p>
+ <optdesc><p>Make a sink (resp. source) the default. You may specify the
+ sink (resp. source) by its index in the sink (resp. source) list or by its
+ name.</p><p>Note that defaults may be overridden by various policy modules
+ or by specific stream configurations.</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>set-card-profile</opt> <arg>index|name</arg> <arg>profile-name</arg></p>
+ <optdesc><p>Change the profile of a card.</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>set-sink-port|set-source-port</opt> <arg>index|name</arg> <arg>port-name</arg></p>
+ <optdesc><p>Change the profile of a sink (resp. source).</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>suspend-sink|suspend-source</opt> <arg>index|name</arg> <arg>boolean</arg></p>
+ <optdesc><p>Suspend (i.e. disconnect from the underlying hardware) a sink
+ (resp. source).</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>suspend</opt> <arg>boolean</arg></p>
+ <optdesc><p>Suspend all sinks and sources.</p></optdesc>
+ </option>
+ </section>
+
+ <section name="Moving streams">
+ <option>
+ <p><opt>move-sink-input|move-source-output</opt> <arg>index</arg> <arg>sink-index|sink-name</arg></p>
+ <optdesc><p>Move sink input (resp. source output) to another sink
+ (resp. source).</p></optdesc>
+ </option>
+ </section>
+
+ <section name="Property lists">
+ <option>
+ <p><opt>update-sink-proplist|update-source-proplist</opt> <arg>index|name</arg> <arg>properties</arg></p>
+ <optdesc><p>Update the properties of a sink (resp. source) specified by
+ name or index. The property is specified as e.g. device.description="My
+ Preferred Name"</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>update-sink-input-proplist|update-source-output-proplist</opt> <arg>index</arg> <arg>properties</arg></p>
+ <optdesc><p>Update the properties of a sink input (resp. source output)
+ specified by index. The properties are specified as above.</p></optdesc>
+ </option>
+ </section>
+
+ <section name="Sample Cache">
+ <option>
+ <p><opt>list-samples</opt></p>
+ <optdesc><p>Lists the contents of the sample cache.</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>play-sample</opt> <arg>name</arg> <arg>sink-index|sink-name</arg></p>
+ <optdesc><p>Play a sample cache entry to a sink.</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>remove-sample</opt> <arg>name</arg></p>
+ <optdesc><p>Remove an entry from the sample cache.</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>load-sample</opt> <arg>name</arg> <arg>filename</arg></p>
+ <optdesc><p>Load an audio file to the sample cache.</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>load-sample-lazy</opt> <arg>name</arg> <arg>filename</arg></p>
+ <optdesc><p>Create a new entry in the sample cache, but don't load the
+ sample immediately. The sample is loaded only when it is first used.
+ After a certain idle time it is freed again.</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>load-sample-dir-lazy</opt> <arg>path</arg></p>
+ <optdesc><p>Load all entries in the specified directory into the sample
+ cache as lazy entries. A shell globbing expression (e.g. *.wav) may be
+ appended to the path of the directory to add.</p></optdesc>
+ </option>
+ </section>
+
+ <section name="Killing Clients/Streams">
+ <option>
+ <p><opt>kill-client</opt> <arg>index</arg></p>
+ <optdesc><p>Remove a client forcibly from the server. There is no protection
+ against the client reconnecting immediately.</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>kill-sink-input|kill-source-output</opt> <arg>index</arg></p>
+ <optdesc><p>Remove a sink input (resp. source output) forcibly from the
+ server. This will not remove the owning client or any other streams opened
+ by the same client from the server.</p></optdesc>
+ </option>
+ </section>
+
+ <section name="Log Commands">
+ <option>
+ <p><opt>set-log-level</opt> <arg>numeric-level</arg></p>
+ <optdesc><p>Change the log level.</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>set-log-meta</opt> <arg>boolean</arg></p>
+ <optdesc><p>Show source code location in log messages.</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>set-log-time</opt> <arg>boolean</arg></p>
+ <optdesc><p>Show timestamps in log messages.</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>set-log-backtrace</opt> <arg>num-frames</arg></p>
+ <optdesc><p>Show backtrace in log messages.</p></optdesc>
+ </option>
+ </section>
+
+ <section name="Miscellaneous Commands">
+ <option>
+ <p><opt>play-file</opt> <arg>filename</arg> <arg>sink-index|sink-name</arg></p>
+ <optdesc><p>Play an audio file to a sink.</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>dump</opt></p>
+ <optdesc><p>Dump the daemon's current configuration in CLI commands.</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>dump-volumes</opt></p>
+ <optdesc><p>Debug: Shows the current state of all volumes.</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>shared</opt></p>
+ <optdesc><p>Debug: Show shared properties.</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>exit</opt></p>
+ <optdesc><p>Terminate the daemon. If you want to terminate a CLI
+ connection ("log out") you might want to use ctrl+d</p></optdesc>
+ </option>
+ </section>
+
+ <section name="Meta Commands">
+ <p>
+ In addition the the commands described above there a few meta directives
+ supported by the command line interpreter.
+ </p>
+ <option>
+ <p><opt>.include</opt> <arg>filename|folder</arg></p>
+ <optdesc><p>Executes the commands from the specified script file or in all
+ of the *.pa file within the folder.</p></optdesc>
+ </option>
+ <option>
+ <p><opt>.fail</opt> and <opt>.nofail</opt></p>
+ <optdesc><p>Enable (resp. disable) that following failing commands will
+ cancel the execution of the current script file. This is a ignored when
+ used on the interactive command line.</p></optdesc>
+ </option>
+
+ <option>
+ <p><opt>.verbose</opt> and <opt>.noverbose</opt></p>
+ <optdesc><p>Enable (resp. disable) extra verbosity.</p></optdesc>
+ </option>
+ </section>
+
+ <section name="Authors">
+ <p>The PulseAudio Developers <@PACKAGE_BUGREPORT@>;
+ PulseAudio is available from <url href="@PACKAGE_URL@"/></p>
+ </section>
+
+ <section name="See also">
+ <p>
+ <manref name="default.pa" section="5"/>,
+ <manref name="pacmd" section="1"/>,
+ <manref name="pulseaudio" section="1"/>
+ </p>
+ </section>
+
+</manpage>
diff --git a/src/pulsecore/cli-command.c b/src/pulsecore/cli-command.c
index a43b7ca..fd265d5 100644
--- a/src/pulsecore/cli-command.c
+++ b/src/pulsecore/cli-command.c
@@ -135,15 +135,14 @@ static int pa_cli_command_dump_volumes(pa_core *c, pa_tokenizer *t, pa_strbuf *b
/* A method table for all available commands */
static const struct command commands[] = {
- { "exit", pa_cli_command_exit, "Terminate the daemon", 1 },
{ "help", pa_cli_command_help, "Show this help", 1 },
{ "list-modules", pa_cli_command_modules, "List loaded modules", 1 },
+ { "list-cards", pa_cli_command_cards, "List cards", 1 },
{ "list-sinks", pa_cli_command_sinks, "List loaded sinks", 1 },
{ "list-sources", pa_cli_command_sources, "List loaded sources", 1 },
{ "list-clients", pa_cli_command_clients, "List loaded clients", 1 },
{ "list-sink-inputs", pa_cli_command_sink_inputs, "List sink inputs", 1 },
{ "list-source-outputs", pa_cli_command_source_outputs, "List source outputs", 1 },
- { "list-cards", pa_cli_command_cards, "List cards", 1 },
{ "stat", pa_cli_command_stat, "Show memory block statistics", 1 },
{ "info", pa_cli_command_info, "Show comprehensive status", 1 },
{ "ls", pa_cli_command_info, NULL, 1 },
@@ -152,43 +151,44 @@ static const struct command commands[] = {
{ "unload-module", pa_cli_command_unload, "Unload a module (args: index)", 2},
{ "describe-module", pa_cli_command_describe, "Describe a module (arg: name)", 2},
{ "set-sink-volume", pa_cli_command_sink_volume, "Set the volume of a sink (args: index|name, volume)", 3},
- { "set-sink-input-volume", pa_cli_command_sink_input_volume, "Set the volume of a sink input (args: index, volume)", 3},
{ "set-source-volume", pa_cli_command_source_volume, "Set the volume of a source (args: index|name, volume)", 3},
{ "set-sink-mute", pa_cli_command_sink_mute, "Set the mute switch of a sink (args: index|name, bool)", 3},
- { "set-sink-input-mute", pa_cli_command_sink_input_mute, "Set the mute switch of a sink input (args: index, bool)", 3},
{ "set-source-mute", pa_cli_command_source_mute, "Set the mute switch of a source (args: index|name, bool)", 3},
+ { "set-sink-input-volume", pa_cli_command_sink_input_volume, "Set the volume of a sink input (args: index, volume)", 3},
+ { "set-sink-input-mute", pa_cli_command_sink_input_mute, "Set the mute switch of a sink input (args: index, bool)", 3},
+ { "set-default-sink", pa_cli_command_sink_default, "Set the default sink (args: index|name)", 2},
+ { "set-default-source", pa_cli_command_source_default, "Set the default source (args: index|name)", 2},
+ { "set-card-profile", pa_cli_command_card_profile, "Change the profile of a card (args: index|name, profile-name)", 3},
+ { "set-sink-port", pa_cli_command_sink_port, "Change the port of a sink (args: index|name, port-name)", 3},
+ { "set-source-port", pa_cli_command_source_port, "Change the port of a source (args: index|name, port-name)", 3},
+ { "suspend-sink", pa_cli_command_suspend_sink, "Suspend sink (args: index|name, bool)", 3},
+ { "suspend-source", pa_cli_command_suspend_source, "Suspend source (args: index|name, bool)", 3},
+ { "suspend", pa_cli_command_suspend, "Suspend all sinks and all sources (args: bool)", 2},
+ { "move-sink-input", pa_cli_command_move_sink_input, "Move sink input to another sink (args: index, sink)", 3},
+ { "move-source-output", pa_cli_command_move_source_output, "Move source output to another source (args: index, source)", 3},
{ "update-sink-proplist", pa_cli_command_update_sink_proplist, "Update the properties of a sink (args: index|name, properties)", 3},
{ "update-source-proplist", pa_cli_command_update_source_proplist, "Update the properties of a source (args: index|name, properties)", 3},
{ "update-sink-input-proplist", pa_cli_command_update_sink_input_proplist, "Update the properties of a sink input (args: index, properties)", 3},
{ "update-source-output-proplist", pa_cli_command_update_source_output_proplist, "Update the properties of a source_output (args: index, properties)", 3},
- { "set-default-sink", pa_cli_command_sink_default, "Set the default sink (args: index|name)", 2},
- { "set-default-source", pa_cli_command_source_default, "Set the default source (args: index|name)", 2},
- { "kill-client", pa_cli_command_kill_client, "Kill a client (args: index)", 2},
- { "kill-sink-input", pa_cli_command_kill_sink_input, "Kill a sink input (args: index)", 2},
- { "kill-source-output", pa_cli_command_kill_source_output, "Kill a source output (args: index)", 2},
{ "list-samples", pa_cli_command_scache_list, "List all entries in the sample cache", 1},
{ "play-sample", pa_cli_command_scache_play, "Play a sample from the sample cache (args: name, sink|index)", 3},
{ "remove-sample", pa_cli_command_scache_remove, "Remove a sample from the sample cache (args: name)", 2},
{ "load-sample", pa_cli_command_scache_load, "Load a sound file into the sample cache (args: name, filename)", 3},
{ "load-sample-lazy", pa_cli_command_scache_load, "Lazily load a sound file into the sample cache (args: name, filename)", 3},
{ "load-sample-dir-lazy", pa_cli_command_scache_load_dir, "Lazily load all files in a directory into the sample cache (args: pathname)", 2},
- { "play-file", pa_cli_command_play_file, "Play a sound file (args: filename, sink|index)", 3},
- { "dump", pa_cli_command_dump, "Dump daemon configuration", 1},
- { "shared", pa_cli_command_list_shared_props, NULL, 1},
- { "move-sink-input", pa_cli_command_move_sink_input, "Move sink input to another sink (args: index, sink)", 3},
- { "move-source-output", pa_cli_command_move_source_output, "Move source output to another source (args: index, source)", 3},
- { "vacuum", pa_cli_command_vacuum, NULL, 1},
- { "suspend-sink", pa_cli_command_suspend_sink, "Suspend sink (args: index|name, bool)", 3},
- { "suspend-source", pa_cli_command_suspend_source, "Suspend source (args: index|name, bool)", 3},
- { "suspend", pa_cli_command_suspend, "Suspend all sinks and all sources (args: bool)", 2},
- { "set-card-profile", pa_cli_command_card_profile, "Change the profile of a card (args: index, name)", 3},
- { "set-sink-port", pa_cli_command_sink_port, "Change the port of a sink (args: index, name)", 3},
- { "set-source-port", pa_cli_command_source_port, "Change the port of a source (args: index, name)", 3},
+ { "kill-client", pa_cli_command_kill_client, "Kill a client (args: index)", 2},
+ { "kill-sink-input", pa_cli_command_kill_sink_input, "Kill a sink input (args: index)", 2},
+ { "kill-source-output", pa_cli_command_kill_source_output, "Kill a source output (args: index)", 2},
{ "set-log-level", pa_cli_command_log_level, "Change the log level (args: numeric level)", 2},
{ "set-log-meta", pa_cli_command_log_meta, "Show source code location in log messages (args: bool)", 2},
{ "set-log-time", pa_cli_command_log_time, "Show timestamps in log messages (args: bool)", 2},
{ "set-log-backtrace", pa_cli_command_log_backtrace, "Show backtrace in log messages (args: frames)", 2},
- { "dump-volumes", pa_cli_command_dump_volumes, NULL, 1 },
+ { "play-file", pa_cli_command_play_file, "Play a sound file (args: filename, sink|index)", 3},
+ { "dump", pa_cli_command_dump, "Dump daemon configuration", 1},
+ { "dump-volumes", pa_cli_command_dump_volumes, "Debug: Show the state of all volumes", 1 },
+ { "shared", pa_cli_command_list_shared_props, "Debug: Show shared properties", 1},
+ { "exit", pa_cli_command_exit, "Terminate the daemon", 1 },
+ { "vacuum", pa_cli_command_vacuum, NULL, 1},
{ NULL, NULL, NULL, 0 }
};
More information about the pulseaudio-commits
mailing list