mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
conf: remove client-rt.conf
We now automatically move non-rt clients into non-rt threads so the client-rt.conf is obsolete. Move the module-rt in client.conf and add conditions to disable modules. Transparently load client.conf in case applications still specify client-rt.conf. Custon configuration in the client-rt.conf.d/ should be moved to client.conf.d/
This commit is contained in:
parent
b952cfbe38
commit
24bcacc619
13 changed files with 75 additions and 193 deletions
|
|
@ -18,18 +18,6 @@ The PipeWire client configuration file.
|
||||||
|
|
||||||
*$XDG_CONFIG_HOME/pipewire/client.conf.d/*
|
*$XDG_CONFIG_HOME/pipewire/client.conf.d/*
|
||||||
|
|
||||||
*$XDG_CONFIG_HOME/pipewire/client-rt.conf*
|
|
||||||
|
|
||||||
*$(PIPEWIRE_CONFIG_DIR)/client-rt.conf*
|
|
||||||
|
|
||||||
*$(PIPEWIRE_CONFDATADIR)/client-rt.conf*
|
|
||||||
|
|
||||||
*$(PIPEWIRE_CONFDATADIR)/client-rt.conf.d/*
|
|
||||||
|
|
||||||
*$(PIPEWIRE_CONFIG_DIR)/client-rt.conf.d/*
|
|
||||||
|
|
||||||
*$XDG_CONFIG_HOME/pipewire/client-rt.conf.d/*
|
|
||||||
|
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
|
|
||||||
Configuration for PipeWire native clients, and for PipeWire's ALSA
|
Configuration for PipeWire native clients, and for PipeWire's ALSA
|
||||||
|
|
@ -38,9 +26,6 @@ plugin.
|
||||||
A PipeWire native client program selects the default config to load,
|
A PipeWire native client program selects the default config to load,
|
||||||
and if nothing is specified, it usually loads `client.conf`.
|
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 \ref page_man_pw-cat_1 "pw-cat(1)".
|
|
||||||
|
|
||||||
The configuration file format and lookup logic is the same as for \ref page_man_pipewire_conf_5 "pipewire.conf(5)".
|
The configuration file format and lookup logic is the same as for \ref page_man_pipewire_conf_5 "pipewire.conf(5)".
|
||||||
|
|
||||||
Drop-in configuration files `client.conf.d/*.conf` can be used, and are recommended.
|
Drop-in configuration files `client.conf.d/*.conf` can be used, and are recommended.
|
||||||
|
|
@ -148,7 +133,7 @@ An `alsa.properties` section can be added to configure client applications
|
||||||
that connect via the PipeWire ALSA plugin.
|
that connect via the PipeWire ALSA plugin.
|
||||||
|
|
||||||
```css
|
```css
|
||||||
# ~/.config/pipewire/client-rt.conf.d/custom.conf
|
# ~/.config/pipewire/client.conf.d/custom.conf
|
||||||
|
|
||||||
alsa.properties = {
|
alsa.properties = {
|
||||||
#alsa.deny = false
|
#alsa.deny = false
|
||||||
|
|
@ -193,7 +178,7 @@ set any of the above ALSA properties or any of the `stream.properties`.
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```css
|
```css
|
||||||
# ~/.config/pipewire/client-rt.conf.d/custom.conf
|
# ~/.config/pipewire/client.conf.d/custom.conf
|
||||||
|
|
||||||
alsa.rules = [
|
alsa.rules = [
|
||||||
{ matches = [ { application.process.binary = "resolve" } ]
|
{ matches = [ { application.process.binary = "resolve" } ]
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
@SECREF@ pipewire-pulse.conf
|
@SECREF@ pipewire-pulse.conf
|
||||||
|
|
||||||
\ref page_man_pipewire-client_conf_5 "client.conf, client-rt.conf"
|
\ref page_man_pipewire-client_conf_5 "client.conf"
|
||||||
|
|
||||||
@SECREF@ client.conf
|
@SECREF@ client.conf
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1344,7 +1344,6 @@ SND_CTL_PLUGIN_DEFINE_FUNC(pipewire)
|
||||||
ctl->context = pw_context_new(loop,
|
ctl->context = pw_context_new(loop,
|
||||||
pw_properties_new(
|
pw_properties_new(
|
||||||
PW_KEY_CLIENT_API, "alsa",
|
PW_KEY_CLIENT_API, "alsa",
|
||||||
PW_KEY_CONFIG_NAME, "client-rt.conf",
|
|
||||||
NULL),
|
NULL),
|
||||||
0);
|
0);
|
||||||
if (ctl->context == NULL) {
|
if (ctl->context == NULL) {
|
||||||
|
|
|
||||||
|
|
@ -1288,7 +1288,6 @@ static int snd_pcm_pipewire_open(snd_pcm_t **pcmp,
|
||||||
pw->system = loop->system;
|
pw->system = loop->system;
|
||||||
if ((pw->context = pw_context_new(loop,
|
if ((pw->context = pw_context_new(loop,
|
||||||
pw_properties_new(
|
pw_properties_new(
|
||||||
PW_KEY_CONFIG_NAME, "client-rt.conf",
|
|
||||||
PW_KEY_CLIENT_API, "alsa",
|
PW_KEY_CLIENT_API, "alsa",
|
||||||
NULL),
|
NULL),
|
||||||
0)) == NULL) {
|
0)) == NULL) {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
# Enables upmixing
|
|
||||||
stream.properties = {
|
|
||||||
channelmix.upmix = true
|
|
||||||
channelmix.upmix-method = psd # none, simple
|
|
||||||
channelmix.lfe-cutoff = 150
|
|
||||||
channelmix.fc-cutoff = 12000
|
|
||||||
channelmix.rear-delay = 12.0
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
conf_files = [
|
|
||||||
'20-upmix.conf',
|
|
||||||
]
|
|
||||||
|
|
||||||
foreach c : conf_files
|
|
||||||
res = configure_file(input : '@0@.in'.format(c),
|
|
||||||
output : c,
|
|
||||||
configuration : conf_config,
|
|
||||||
install_dir : pipewire_confdatadir / 'client-rt.conf.avail')
|
|
||||||
test(f'validate-json-client-rt-@c@', spa_json_dump_exe, args : res)
|
|
||||||
endforeach
|
|
||||||
|
|
||||||
|
|
@ -1,136 +0,0 @@
|
||||||
# Real-time Client config file for PipeWire version @VERSION@ #
|
|
||||||
#
|
|
||||||
# Copy and edit this file in @PIPEWIRE_CONFIG_DIR@ for system-wide changes
|
|
||||||
# or in ~/.config/pipewire for local changes.
|
|
||||||
#
|
|
||||||
# It is also possible to place a file with an updated section in
|
|
||||||
# @PIPEWIRE_CONFIG_DIR@/client-rt.conf.d/ for system-wide changes or in
|
|
||||||
# ~/.config/pipewire/client-rt.conf.d/ for local changes.
|
|
||||||
#
|
|
||||||
|
|
||||||
context.properties = {
|
|
||||||
## Configure properties in the system.
|
|
||||||
#mem.warn-mlock = false
|
|
||||||
#mem.allow-mlock = true
|
|
||||||
#mem.mlock-all = false
|
|
||||||
log.level = 0
|
|
||||||
|
|
||||||
#default.clock.quantum-limit = 8192
|
|
||||||
}
|
|
||||||
|
|
||||||
context.spa-libs = {
|
|
||||||
#<factory-name regex> = <library-name>
|
|
||||||
#
|
|
||||||
# Used to find spa factory names. It maps an spa factory name
|
|
||||||
# regular expression to a library name that should contain
|
|
||||||
# that factory.
|
|
||||||
#
|
|
||||||
audio.convert.* = audioconvert/libspa-audioconvert
|
|
||||||
support.* = support/libspa-support
|
|
||||||
}
|
|
||||||
|
|
||||||
context.modules = [
|
|
||||||
#{ name = <module-name>
|
|
||||||
# ( args = { <key> = <value> ... } )
|
|
||||||
# ( flags = [ ( ifexists ) ( nofail ) ] )
|
|
||||||
# ( condition = [ { <key> = <value> ... } ... ] )
|
|
||||||
#}
|
|
||||||
#
|
|
||||||
# Loads a module with the given parameters.
|
|
||||||
# If ifexists is given, the module is ignored when it is not found.
|
|
||||||
# If nofail is given, module initialization failures are ignored.
|
|
||||||
#
|
|
||||||
# Uses realtime scheduling to boost the audio thread priorities
|
|
||||||
{ name = libpipewire-module-rt
|
|
||||||
args = {
|
|
||||||
#rt.prio = @rtprio_client@
|
|
||||||
#rt.time.soft = -1
|
|
||||||
#rt.time.hard = -1
|
|
||||||
}
|
|
||||||
flags = [ ifexists nofail ]
|
|
||||||
}
|
|
||||||
|
|
||||||
# The native communication protocol.
|
|
||||||
{ name = libpipewire-module-protocol-native }
|
|
||||||
|
|
||||||
# Allows creating nodes that run in the context of the
|
|
||||||
# client. Is used by all clients that want to provide
|
|
||||||
# data to PipeWire.
|
|
||||||
{ name = libpipewire-module-client-node }
|
|
||||||
|
|
||||||
# Allows creating devices that run in the context of the
|
|
||||||
# client. Is used by the session manager.
|
|
||||||
{ name = libpipewire-module-client-device }
|
|
||||||
|
|
||||||
# Makes a factory for wrapping nodes in an adapter with a
|
|
||||||
# converter and resampler.
|
|
||||||
{ name = libpipewire-module-adapter }
|
|
||||||
|
|
||||||
# Allows applications to create metadata objects. It creates
|
|
||||||
# a factory for Metadata objects.
|
|
||||||
{ name = libpipewire-module-metadata }
|
|
||||||
|
|
||||||
# Provides factories to make session manager objects.
|
|
||||||
{ name = libpipewire-module-session-manager }
|
|
||||||
]
|
|
||||||
|
|
||||||
filter.properties = {
|
|
||||||
#node.latency = 1024/48000
|
|
||||||
}
|
|
||||||
|
|
||||||
stream.properties = {
|
|
||||||
#node.latency = 1024/48000
|
|
||||||
#node.autoconnect = true
|
|
||||||
#resample.quality = 4
|
|
||||||
#channelmix.normalize = false
|
|
||||||
#channelmix.mix-lfe = true
|
|
||||||
#channelmix.upmix = true
|
|
||||||
#channelmix.upmix-method = psd # none, simple
|
|
||||||
#channelmix.lfe-cutoff = 150
|
|
||||||
#channelmix.fc-cutoff = 12000
|
|
||||||
#channelmix.rear-delay = 12.0
|
|
||||||
#channelmix.stereo-widen = 0.0
|
|
||||||
#channelmix.hilbert-taps = 0
|
|
||||||
#dither.noise = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
stream.rules = [
|
|
||||||
{ matches = [
|
|
||||||
{
|
|
||||||
# all keys must match the value. ! negates. ~ starts regex.
|
|
||||||
#application.name = "pw-cat"
|
|
||||||
#node.name = "~Google Chrome$"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
actions = {
|
|
||||||
update-props = {
|
|
||||||
#node.latency = 512/48000
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
alsa.properties = {
|
|
||||||
#alsa.deny = false
|
|
||||||
# ALSA params take a single value, an array [] of values
|
|
||||||
# or a range { min=.. max=... }
|
|
||||||
#alsa.access = [ MMAP_INTERLEAVED MMAP_NONINTERLEAVED RW_INTERLEAVED RW_NONINTERLEAVED ]
|
|
||||||
#alsa.format = [ FLOAT S32 S24 S24_3 S16 U8 ]
|
|
||||||
#alsa.rate = { min=1 max=384000 } # or [ 44100 48000 .. ]
|
|
||||||
#alsa.channels = { min=1 max=64 } # or [ 2 4 6 .. ]
|
|
||||||
#alsa.period-bytes = { min=128 max=2097152 } # or [ 128 256 1024 .. ]
|
|
||||||
#alsa.buffer-bytes = { min=256 max=4194304 } # or [ 256 512 4096 .. ]
|
|
||||||
|
|
||||||
#alsa.volume-method = cubic # linear, cubic
|
|
||||||
}
|
|
||||||
|
|
||||||
# client specific properties
|
|
||||||
alsa.rules = [
|
|
||||||
{ matches = [ { application.process.binary = "resolve" } ]
|
|
||||||
actions = {
|
|
||||||
update-props = {
|
|
||||||
alsa.buffer-bytes = 131072
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
@ -41,6 +41,16 @@ context.modules = [
|
||||||
# If ifexists is given, the module is ignored when it is not found.
|
# If ifexists is given, the module is ignored when it is not found.
|
||||||
# If nofail is given, module initialization failures are ignored.
|
# If nofail is given, module initialization failures are ignored.
|
||||||
#
|
#
|
||||||
|
# Uses realtime scheduling to boost the audio thread priorities
|
||||||
|
{ name = libpipewire-module-rt
|
||||||
|
args = {
|
||||||
|
#rt.prio = @rtprio_client@
|
||||||
|
#rt.time.soft = -1
|
||||||
|
#rt.time.hard = -1
|
||||||
|
}
|
||||||
|
flags = [ ifexists nofail ]
|
||||||
|
condition = [ { module.rt = !false } ]
|
||||||
|
}
|
||||||
|
|
||||||
# The native communication protocol.
|
# The native communication protocol.
|
||||||
{ name = libpipewire-module-protocol-native }
|
{ name = libpipewire-module-protocol-native }
|
||||||
|
|
@ -48,22 +58,32 @@ context.modules = [
|
||||||
# Allows creating nodes that run in the context of the
|
# Allows creating nodes that run in the context of the
|
||||||
# client. Is used by all clients that want to provide
|
# client. Is used by all clients that want to provide
|
||||||
# data to PipeWire.
|
# data to PipeWire.
|
||||||
{ name = libpipewire-module-client-node }
|
{ name = libpipewire-module-client-node
|
||||||
|
condition = [ { module.client-node = !false } ]
|
||||||
|
}
|
||||||
|
|
||||||
# Allows creating devices that run in the context of the
|
# Allows creating devices that run in the context of the
|
||||||
# client. Is used by the session manager.
|
# client. Is used by the session manager.
|
||||||
{ name = libpipewire-module-client-device }
|
{ name = libpipewire-module-client-device
|
||||||
|
condition = [ { module.client-device = !false } ]
|
||||||
|
}
|
||||||
|
|
||||||
# Makes a factory for wrapping nodes in an adapter with a
|
# Makes a factory for wrapping nodes in an adapter with a
|
||||||
# converter and resampler.
|
# converter and resampler.
|
||||||
{ name = libpipewire-module-adapter }
|
{ name = libpipewire-module-adapter
|
||||||
|
condition = [ { module.adapter = !false } ]
|
||||||
|
}
|
||||||
|
|
||||||
# Allows applications to create metadata objects. It creates
|
# Allows applications to create metadata objects. It creates
|
||||||
# a factory for Metadata objects.
|
# a factory for Metadata objects.
|
||||||
{ name = libpipewire-module-metadata }
|
{ name = libpipewire-module-metadata
|
||||||
|
condition = [ { module.metadata = !false } ]
|
||||||
|
}
|
||||||
|
|
||||||
# Provides factories to make session manager objects.
|
# Provides factories to make session manager objects.
|
||||||
{ name = libpipewire-module-session-manager }
|
{ name = libpipewire-module-session-manager
|
||||||
|
condition = [ { module.session-manager = !false } ]
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
filter.properties = {
|
filter.properties = {
|
||||||
|
|
@ -85,3 +105,44 @@ stream.properties = {
|
||||||
#channelmix.hilbert-taps = 0
|
#channelmix.hilbert-taps = 0
|
||||||
#dither.noise = 0
|
#dither.noise = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stream.rules = [
|
||||||
|
{ matches = [
|
||||||
|
{
|
||||||
|
# all keys must match the value. ! negates. ~ starts regex.
|
||||||
|
#application.name = "pw-cat"
|
||||||
|
#node.name = "~Google Chrome$"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
actions = {
|
||||||
|
update-props = {
|
||||||
|
#node.latency = 512/48000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
alsa.properties = {
|
||||||
|
#alsa.deny = false
|
||||||
|
# ALSA params take a single value, an array [] of values
|
||||||
|
# or a range { min=.. max=... }
|
||||||
|
#alsa.access = [ MMAP_INTERLEAVED MMAP_NONINTERLEAVED RW_INTERLEAVED RW_NONINTERLEAVED ]
|
||||||
|
#alsa.format = [ FLOAT S32 S24 S24_3 S16 U8 ]
|
||||||
|
#alsa.rate = { min=1 max=384000 } # or [ 44100 48000 .. ]
|
||||||
|
#alsa.channels = { min=1 max=64 } # or [ 2 4 6 .. ]
|
||||||
|
#alsa.period-bytes = { min=128 max=2097152 } # or [ 128 256 1024 .. ]
|
||||||
|
#alsa.buffer-bytes = { min=256 max=4194304 } # or [ 256 512 4096 .. ]
|
||||||
|
|
||||||
|
#alsa.volume-method = cubic # linear, cubic
|
||||||
|
}
|
||||||
|
|
||||||
|
# client specific properties
|
||||||
|
alsa.rules = [
|
||||||
|
{ matches = [ { application.process.binary = "resolve" } ]
|
||||||
|
actions = {
|
||||||
|
update-props = {
|
||||||
|
alsa.buffer-bytes = 131072
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,6 @@ endif
|
||||||
conf_files = [
|
conf_files = [
|
||||||
'pipewire.conf',
|
'pipewire.conf',
|
||||||
'client.conf',
|
'client.conf',
|
||||||
'client-rt.conf',
|
|
||||||
'filter-chain.conf',
|
'filter-chain.conf',
|
||||||
'jack.conf',
|
'jack.conf',
|
||||||
'minimal.conf',
|
'minimal.conf',
|
||||||
|
|
@ -95,7 +94,6 @@ test('validate-json-pipewire-uninstalled.conf', spa_json_dump_exe, args : res)
|
||||||
conf_avail_folders = [
|
conf_avail_folders = [
|
||||||
'pipewire.conf.avail',
|
'pipewire.conf.avail',
|
||||||
'client.conf.avail',
|
'client.conf.avail',
|
||||||
'client-rt.conf.avail',
|
|
||||||
'pipewire-pulse.conf.avail',
|
'pipewire-pulse.conf.avail',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,6 @@ int main(int argc, char *argv[])
|
||||||
* the data.
|
* the data.
|
||||||
*/
|
*/
|
||||||
props = pw_properties_new(PW_KEY_MEDIA_TYPE, "Audio",
|
props = pw_properties_new(PW_KEY_MEDIA_TYPE, "Audio",
|
||||||
PW_KEY_CONFIG_NAME, "client-rt.conf",
|
|
||||||
PW_KEY_MEDIA_CATEGORY, "Capture",
|
PW_KEY_MEDIA_CATEGORY, "Capture",
|
||||||
PW_KEY_MEDIA_ROLE, "Music",
|
PW_KEY_MEDIA_ROLE, "Music",
|
||||||
NULL);
|
NULL);
|
||||||
|
|
|
||||||
|
|
@ -53,10 +53,7 @@ int main(int argc, char *argv[])
|
||||||
pw_loop_add_signal(pw_main_loop_get_loop(data.loop), SIGINT, do_quit, &data);
|
pw_loop_add_signal(pw_main_loop_get_loop(data.loop), SIGINT, do_quit, &data);
|
||||||
pw_loop_add_signal(pw_main_loop_get_loop(data.loop), SIGTERM, do_quit, &data);
|
pw_loop_add_signal(pw_main_loop_get_loop(data.loop), SIGTERM, do_quit, &data);
|
||||||
|
|
||||||
data.context = pw_context_new(pw_main_loop_get_loop(data.loop),
|
data.context = pw_context_new(pw_main_loop_get_loop(data.loop), NULL, 0);
|
||||||
pw_properties_new(
|
|
||||||
PW_KEY_CONFIG_NAME, "client-rt.conf",
|
|
||||||
NULL), 0);
|
|
||||||
|
|
||||||
pw_context_load_module(data.context, "libpipewire-module-spa-node-factory", NULL, NULL);
|
pw_context_load_module(data.context, "libpipewire-module-spa-node-factory", NULL, NULL);
|
||||||
pw_context_load_module(data.context, "libpipewire-module-link-factory", NULL, NULL);
|
pw_context_load_module(data.context, "libpipewire-module-link-factory", NULL, NULL);
|
||||||
|
|
|
||||||
|
|
@ -1200,6 +1200,10 @@ int pw_conf_load_conf_for_context(struct pw_properties *props, struct pw_propert
|
||||||
conf_name = getenv("PIPEWIRE_CONFIG_NAME");
|
conf_name = getenv("PIPEWIRE_CONFIG_NAME");
|
||||||
if ((res = try_load_conf(conf_prefix, conf_name, conf)) < 0) {
|
if ((res = try_load_conf(conf_prefix, conf_name, conf)) < 0) {
|
||||||
conf_name = pw_properties_get(props, PW_KEY_CONFIG_NAME);
|
conf_name = pw_properties_get(props, PW_KEY_CONFIG_NAME);
|
||||||
|
if (spa_streq(conf_name, "client-rt.conf")) {
|
||||||
|
pw_log_warn("setting config.name to client-rt.conf is deprecated, using client.conf");
|
||||||
|
conf_name = NULL;
|
||||||
|
}
|
||||||
if (conf_name == NULL)
|
if (conf_name == NULL)
|
||||||
conf_name = "client.conf";
|
conf_name = "client.conf";
|
||||||
else if (!valid_conf_name(conf_name)) {
|
else if (!valid_conf_name(conf_name)) {
|
||||||
|
|
|
||||||
|
|
@ -1857,11 +1857,7 @@ int main(int argc, char *argv[])
|
||||||
pw_loop_add_signal(l, SIGINT, do_quit, &data);
|
pw_loop_add_signal(l, SIGINT, do_quit, &data);
|
||||||
pw_loop_add_signal(l, SIGTERM, do_quit, &data);
|
pw_loop_add_signal(l, SIGTERM, do_quit, &data);
|
||||||
|
|
||||||
data.context = pw_context_new(l,
|
data.context = pw_context_new(l, NULL, 0);
|
||||||
pw_properties_new(
|
|
||||||
PW_KEY_CONFIG_NAME, "client-rt.conf",
|
|
||||||
NULL),
|
|
||||||
0);
|
|
||||||
if (!data.context) {
|
if (!data.context) {
|
||||||
fprintf(stderr, "error: pw_context_new() failed: %m\n");
|
fprintf(stderr, "error: pw_context_new() failed: %m\n");
|
||||||
goto error_no_context;
|
goto error_no_context;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue