pulse-cli-syntax(5)

πŸ“¦
version 17.0+r134+g77d25a1e6 Β· 2 versions
, in alpine 3.24, arch rolling, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ pulse-cli-syntax(5) β€” the File Formats Manual entry ✨

okay bestie, sit down, hydrate, and let me tell you about pulse-cli-syntax β€” it's the PulseAudio Command Line Interface Syntax, and it's literally the language PulseAudio speaks to you in. πŸ’–


🌸 SYNOPSIS 🌸

~/.config/pulse/default.pa

/etc/pulse/default.pa

/etc/pulse/system.pa

🫢 DESCRIPTION 🫢

So PulseAudio ships this adorable little command line language, right? It's used by config scripts, by the pacmd interactive shell, and by the modules module-cli and module-cli-protocol-{unix,tcp}. And the best part? Empty lines and lines that start with a hashmark (#) get silently ignored. No drama, no errors, just vibes. 🧚

Several commands are supported β€” we're gonna go through every single one, no skipping, periodt.

tiny but important note: any boolean argument can be given positively as 1, t, y, true, yes or on. And negatively as 0, f, n, false, no or off. Case is ignored. So yes bestie, YES, Yes and yes all slay the same. πŸ’…

🌈 GENERAL COMMANDS 🌈

  • help β€” shows a quick help on the commands available. it's giving "just tell me what's possible" and honestly? iconic.

⭐ STATUS COMMANDS ⭐

  • list-modules β€” shows all currently loaded modules, with their arguments. the whole roster, no gatekeeping.
  • list-cards β€” shows all currently registered cards.
  • list-sinks or list-sources β€” shows all currently registered sinks (resp. sources).
  • list-clients β€” shows all currently active clients.
  • list-sink-inputs or list-source-outputs β€” shows all currently active inputs to sinks a.k.a. playback streams (resp. outputs of sources a.k.a. recording streams). lowkey a mouthful but it's correct.
  • stat β€” shows some simple statistics about the allocated memory blocks and the space used by them.
  • info or ls or list β€” a combination of all the status commands described above. all three commands are synonyms, so pick whichever one matches your main character energy. πŸ‘‘

πŸŽ€ MODULE MANAGEMENT πŸŽ€

  • load-module name [arguments...] β€” loads a module specified by its name and arguments. for most modules it is OK to be loaded more than once. (yes, most. not all. read the fine print, bestie.)
  • unload-module index|name β€” unloads a module, specified either by its index in the module list or by its name.
  • describe-module name β€” gives information about a module specified by its name.

πŸ’œ VOLUME COMMANDS πŸ’œ

  • set-sink-volume|set-source-volume index|name volume β€” sets 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). 🫣 so yes, you can go past 100%, but it clips, and that's not cute.
  • set-sink-mute|set-source-mute index|name boolean β€” mutes or unmutes 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).
  • set-sink-input-volume|set-source-output-volume index volume β€” sets the volume of a sink input (resp. source output) specified by its index. the same volume rules apply as with set-sink-volume.
  • set-sink-input-mute|set-source-output-mute index boolean β€” mutes or unmutes a sink input (resp. source output) specified by its index. the same mute rules apply as with set-sink-mute.

πŸ¦‹ CONFIGURATION COMMANDS πŸ¦‹

  • set-default-sink|set-default-source index|name β€” makes 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.
also note: defaults may be overridden by various policy modules or by specific stream configurations. so don't come crying to me when something else steals the crown. πŸ’€
  • set-card-profile index|name profile-name β€” changes the profile of a card.
  • set-sink-port|set-source-port index|name port-name β€” changes the profile of a sink (resp. source).
  • set-port-latency-offset card-index|card-name port-name offset β€” changes the latency offset of a port belonging to the specified card.
  • suspend-sink|suspend-source name|index true|false β€” suspends or resumes 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. so like, it might free the device, or it might not β€” it's giving "it depends" and that's just the truth. πŸ™ˆ
  • suspend boolean β€” suspends all sinks and sources. all of them. every single one.

🌟 MOVING STREAMS 🌟

  • move-sink-input|move-source-output index sink-index|sink-name β€” moves sink input (resp. source output) to another sink (resp. source). relocation era. ✈️

πŸ“ PROPERTY LISTS πŸ“

  • update-sink-proplist|update-source-proplist index|name properties β€” updates the properties of a sink (resp. source) specified by name or index. the property is specified as e.g. device.description="My Preferred Name"
  • update-sink-input-proplist|update-source-output-proplist index properties β€” updates the properties of a sink input (resp. source output) specified by index. the properties are specified as above.

🧚 SAMPLE CACHE 🧚

  • list-samples β€” lists the contents of the sample cache.
  • play-sample name sink-index|sink-name β€” plays a sample cache entry to a sink.
  • remove-sample name β€” removes an entry from the sample cache.
  • load-sample name filename β€” loads an audio file to the sample cache.
  • load-sample-lazy name filename β€” creates a new entry in the sample cache, but doesn't load the sample immediately. the sample is loaded only when it is first used. after a certain idle time it is freed again. it's giving "I'll get to it when I get to it" energy and honestly, same.
  • load-sample-dir-lazy path β€” loads 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.

πŸ’€ KILLING CLIENTS/STREAMS πŸ’€

  • kill-client index β€” removes a client forcibly from the server. there is no protection against the client reconnecting immediately. so like, it can just walk right back in. no cap.
  • kill-sink-input|kill-source-output index β€” removes 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.

πŸ”₯ LOG COMMANDS πŸ”₯

  • set-log-level numeric-level β€” changes the log level.
  • set-log-meta boolean β€” shows source code location in log messages.
  • set-log-target target β€” changes the log target (null, auto, journal, syslog, stderr, file:PATH, newfile:PATH).
  • set-log-time boolean β€” shows timestamps in log messages.
  • set-log-backtrace num-frames β€” shows backtrace in log messages.

πŸ’– MISCELLANEOUS COMMANDS πŸ’–

  • play-file filename sink-index|sink-name β€” plays an audio file to a sink.
  • dump β€” dumps the daemon's current configuration in CLI commands.
  • dump-volumes β€” debug: shows the current state of all volumes.
  • shared β€” debug: shows shared properties.
  • send-message recipient message message_parameters β€” sends 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 β€” terminates the daemon. if you want to terminate a CLI connection ("log out") you might want to use ctrl+d. ⚠️ bestie, read that twice: exit kills the daemon, ctrl+d is just you leaving the chat. do not mix these up. 😭

πŸŽ€ META COMMANDS πŸŽ€

the extra directives

in addition to the commands described above, there are a few meta directives supported by the command line interpreter. these are the behind-the-scenes girlies. ✨

  • .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 β€” executes 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. so no conditional-ception, bestie. πŸ™…

πŸ‘‘ AUTHORS πŸ‘‘

the PulseAudio Developers <pulseaudio-discuss (at) lists (dot) freedesktop (dot) org>; PulseAudio is available from http://pulseaudio.org/


🌈 SEE ALSO 🌈

default.pa(5), pacmd(1), pulseaudio(1)


and that's the whole page, bestie β€” every flag, every argument, every warning, nothing left out. 🫢 this cutie came to you from the Manuals source, User section, pulse-cli-syntax(5), and yes, it's the same page you'd find at the bottom of the original β€” mwah. πŸ’…βœ¨