pulse-cli-syntax - PulseAudio Command Line Interface Syntax
~/.config/pulse/default.pa
/etc/pulse/default.pa
/etc/pulse/system.pa
PulseAudio provides a simple command line language used by
configuration scripts, 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.
Note that any boolean arguments can be given positively as '1',
't', 'y', 'true', 'yes' or 'on'. Likewise, negative values can be given as
'0', 'f', 'n', 'false', 'no' or 'off'. Case is ignored.
- help
- Show a quick help on the commands available.
- set-default-sink|set-default-source
index|name
- 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. Use
the special name @NONE@ to unset the user defined default sink or source.
In this case, pulseaudio will return to the default sink or source
selection based on priority.
Note that defaults may be overridden by various policy modules
or by specific stream configurations.
- set-card-profile
index|name profile-name
- Change the profile of a card.
- set-sink-port|set-source-port
index|name port-name
- Change the profile of a sink (resp. source).
- set-port-latency-offset
card-index|card-name port-name offset
- Change the latency offset of a port belonging to the specified card
- suspend-sink|suspend-source
name|index true|false
- Suspend or resume the specified sink or source (which may be specified
either by its name or index), depending whether true (suspend) or false
(resume) is passed as last argument. Suspending a sink will pause all
playback and suspending a source will pause all capturing. Depending on
the module implementing the sink or source this might have the effect that
the underlying device is closed, making it available for other
applications to use. The exact behaviour depends on the module.
- suspend
boolean
- Suspend all sinks and sources.
- kill-client
index
- Remove a client forcibly from the server. There is no protection against
the client reconnecting immediately.
- kill-sink-input|kill-source-output
index
- 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.
- play-file
filename sink-index|sink-name
- Play an audio file to a sink.
- dump
- Dump the daemon's current configuration in CLI commands.
- dump-volumes
- Debug: Shows the current state of all volumes.
- shared
- Debug: Show shared properties.
- send-message
recipient message message_parameters
- Send a message to the specified recipient object. If applicable an
additional string containing message parameters can be specified. A string
is returned as a response to the message. For available messages see
https://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/doc/messaging_api.txt.
- exit
- Terminate the daemon. If you want to terminate a CLI connection ("log
out") you might want to use ctrl+d
In addition to the commands described above there are a few meta
directives supported by the command line interpreter.
- .include filename|folder
- Executes the commands from the specified script file or in all of the *.pa
files within the folder.
- .fail and .nofail
- Enable (resp. disable) that following failing commands will cancel the
execution of the current script file. This is ignored when used on the
interactive command line.
- .ifexists filename
- Execute the subsequent block of commands only if the specified file
exists. Typically filename indicates a module. Relative paths are
resolved using the module directory as the base. By using an absolute
path, the existence of other files can be checked as well.
- .else and .endif
- A block of commands is delimited by an .else or .endif meta
command. Nesting conditional commands is not supported.
The PulseAudio Developers <pulseaudio-discuss (at) lists (dot)
freedesktop (dot) org>; PulseAudio is available from
http://pulseaudio.org/
default.pa(5), pacmd(1), pulseaudio(1)