PipeWire 1.2.5
|
The PipeWire client configuration file.
$XDG_CONFIG_HOME/pipewire/client.conf
/etc/pipewire/client.conf
/usr/share/pipewire/client.conf
/usr/share/pipewire/client.conf.d/
/etc/pipewire/client.conf.d/
$XDG_CONFIG_HOME/pipewire/client.conf.d/
$XDG_CONFIG_HOME/pipewire/client-rt.conf
/etc/pipewire/client-rt.conf
/usr/share/pipewire/client-rt.conf
/usr/share/pipewire/client-rt.conf.d/
/etc/pipewire/client-rt.conf.d/
$XDG_CONFIG_HOME/pipewire/client-rt.conf.d/
Configuration for PipeWire native clients, and for PipeWire's ALSA plugin.
A PipeWire native client program selects the default config to load, and if nothing is specified, it usually loads client.conf
.
The ALSA plugin uses the client-rt.conf
file, as do some PipeWire native clients such as pw-cat(1).
The configuration file format and lookup logic is the same as for pipewire.conf(5).
Drop-in configuration files client.conf.d/*.conf
can be used, and are recommended. See pipewire.conf(5).
In addition, the PipeWire context configuration sections may also be specified, see pipewire.conf(5).
The client configuration files contain a stream.properties section that configures the options for client streams:
Some of the properties refer to different aspects of the stream:
These contain properties to identify the node or to display the node in a GUI application.
en_GB
audio-x-mp3
The classifying properties of a node are use for routing the signal to its destination and for configuring the settings.
What kind of processing is done with the media. Possible values include:
The Use case of the media. Possible values include:
The media class is to classify the stream function. Possible values include:
The session manager assigns special meaning to the nodes based on the media.class. Sink or Source classes are used as targets for Stream classes, etc..
When this node is active, the quantum of the graph is locked and not allowed to change automatically. It can still be changed forcibly with metadata or when a node forces a quantum.
JACK clients use this property to avoid unexpected quantum changes.
While the node is active, force a quantum in the graph. The last node to be activated with this property wins.
A value of 0 unforces the quantum.
When the node is active, force a specific sample rate on the graph. The last node to activate with this property wins.
A RATE of 0 means to force the rate in node.rate
denominator.
When the node is active, it will always be joined with a driver node, even when nothing is linked to the node. Setting this property to true also implies node.want-driver = true.
This is the default for JACK nodes, that always need their process callback called.
When the node is not linked anymore, it becomes idle. Normally idle nodes keep processing and are suspended by the session manager after some timeout. It is possible to immediately pause a node when idle with this property.
When the session manager does not suspend nodes (or when there is no session manager), the node.suspend-on-idle property can be used instead.
Add the node to a specific loop name or loop class. By default the node is added to the data.rt loop class. You can make more specific data loops and then assign the nodes to those.
Other well known names are main-loop.0 and the main node.loop.class which runs the node data processing in the main loop.
When the node has a target configured and the target is destroyed, destroy the node as well. This property also inhibits that the node is moved to another sink/source.
Note that if a stream should appear/disappear in sync with the target, a session manager (WirePlumber) script should be written instead.
This is a passive node and so it should not keep sinks/sources busy. This property makes the session manager create passive links to the sink/sources. If the node is not otherwise linked (via a non-passive link), the node and the sink it is linked to are idle (and eventually suspended).
This is used for filter nodes that sit in front of sinks/sources and need to suspend together with the sink/source.
An audio stream (and also audio device nodes) contain an audio adapter that can perform, sample format, sample rate and channel mixing operations.
The merger is used as the input for a sink device node or a capture stream. It takes the various channels and merges them into a single stream for further processing.
The merger will also provide the monitor ports of the input channels and can apply a software volume on the monitor signal.
Source, sinks, capture and playback streams contain a high quality adaptive resampler. It uses sinc based resampling with linear interpolation of filter banks to perform arbitrary resample factors. The resampler is activated in the following cases:
PipeWire performs most of the sample conversions and resampling in the client (Or in the case of the PulseAudio server, in the pipewire-pulse server that creates the streams). This ensures all the conversions are offloaded to the clients and the server can deal with one single format for performance reasons.
Below is an explanation of the options that can be tuned in the sample converter.
The quality of the resampler. from 0 to 14, the default is 4.
Increasing the quality will result in better cutoff and less aliasing at the expense of (much) more CPU consumption. The default quality of 4 has been selected as a good compromise between quality and performance with no artifacts that are well below the audible range.
See Infinite Wave for a comparison of the performance.
Source, sinks, capture and playback streams can apply channel mixing on the incoming signal.
Normally the channel mixer is not used for devices, the device channels are usually exposed as they are. This policy is usually enforced by the session manager, so we refer to its documentation there.
Playback and capture streams are usually configured to the channel layout of the sink/source they connect to and will thus perform channel mixing.
The channel mixer also implements a software volume. This volume adjustment is performed on the original channel layout. ex: A stereo playback stream that is up-mixed to 5.1 has 2 a left an right volume control.
Makes sure that during such mixing & resampling original 0 dB level is preserved, so nothing sounds wildly quieter/louder.
While this options prevents clipping, it can in some cases produce too low volume. Increase the volume in that case or disable normalization.
Enables up-mixing of the front center (FC) when the target has a FC channel. The sum of the stereo channels is used and an optional lowpass filter can be used (see channelmix.fc-cutoff
).
Also enabled up-mixing of LFE when channelmix.lfe-cutoff
is set to something else than 0 and the target has an LFE channel. The LFE channel is produced by adding the stereo channels.
If channelmix.upmix
is true, the up-mixing of the rear channels is also enabled and controlled with the channelmix-upmix-method
property.
3 methods are provided to produce the rear channels in a surround sound:
Apply a lowpass filter to the front center frequency. The value is expressed in Hz.
Since the front center contains the dialogs, a typical cutoff frequency is 12000 Hz.
This option is only active when the up-mix is enabled.
Apply a delay in milliseconds when up-mixing the rear channels. This improves specialization of the sound. A typical delay of 12 milliseconds is the default.
This is only active when the psd
up-mix method is used.
Subtracts some of the front center signal from the stereo channels. This moves the dialogs more to the center speaker and leaves the ambient sound in the stereo channels.
This is only active when up-mix is enabled and a Front Center channel is mixed.
This option will apply a 90 degree phase shift to the rear channels to improve specialization. Taps needs to be between 15 and 255 with more accurate results (and more CPU consumption) for higher values.
This is only active when the psd
up-mix method is used.
This option will add N bits of random data to the signal. When no dither.method is specified, the random data will flip between [-(1<<(N-1)), 0] every 1024 samples. With a dither.method, the dither noise is amplified with 1<<(N-1) bits.
This can be used to keep some amplifiers alive during silent periods. One or two bits of noise is usually enough, otherwise the noise will become audible. This is usually used together with session.suspend-timeout-seconds
to disable suspend in the session manager.
Note that PipeWire uses floating point operations with 24 bits precission for all of the audio processing. Conversion to 24 bits integer sample formats is lossless and conversion to 32 bits integer sample formats are simply padded with 0 bits at the end. This means that the dither noise is always only in the 24 most significant bits.
Optional dithering can be done on the quantized output signal.
There are 6 modes available:
Dithering is only useful for conversion to a format with less than 24 bits and will be disabled otherwise.
Streams and also most device nodes can be configured in a certain format with properties.
Forces an audio format on the node. This is the format used internally in the node because the graph processing format is always float 32.
Valid formats include: S16, S32, F32, F64, S16LE, S16BE, ...
You can add match rules, see pipewire(1) to set properties for certain streams and filters.
stream.rules
and filter.rules
provides an update-props
action that takes an object with properties that are updated on the node object of the stream and filter.
Add a stream.rules
or filter.rules
section in the config file like this:
Will set the node.name of Firefox to "My Name".
An alsa.properties
section can be added to configure ALSA specific client config.
cubic
and linear
. The default is to use cubic
.It is possible to set ALSA client specific properties by using Match rules, see pipewire(1). You can set any of the above ALSA properties or any of the stream.properties
.
See pipewire(1) for common environment variables. Many of these also apply to client applications.
The environment variables also influence ALSA applications that are using PipeWire's ALSA plugin.
This can be an object with properties from alsa.properties
or stream.properties
that will be used to construct the client and streams.
For example:
Starts aplay with custom properties.
Instructs the ALSA client to link to a particular sink or source object.serial
or node.name
.
For example:
Makes aplay play on the give audio sink.
The PipeWire Developers <https://gitlab.freedesktop.org/pipewire/pipewire/issues>; PipeWire is available from <https://pipewire.org>
libpipewire-module-protocol-pulse(7), pipewire.conf(5), pipewire-pulse(1), pipewire-pulse-modules(7)