Commit 5dc250a9 authored by George Kiagiadakis's avatar George Kiagiadakis
Browse files

config: refactor wireplumber's configuration

parent bb3a91bd
......@@ -12,8 +12,8 @@ clean:
run: all
WIREPLUMBER_MODULE_DIR=build/modules \
WIREPLUMBER_CONFIG_FILE=src/wireplumber.conf \
WIREPLUMBER_CONFIG_DIR=src/wireplumber \
WIREPLUMBER_CONFIG_FILE=src/config/wireplumber.conf \
WIREPLUMBER_CONFIG_DIR=src/config \
$(DBG) ./build/src/wireplumber
test: all
......
......@@ -5,6 +5,6 @@ properties = [
]
[endpoint]
direction = "sink"
type = "pw-audio-softdsp-endpoint"
streams = "default.streams"
direction = "sink"
streams = "playback.streams"
......@@ -5,6 +5,6 @@ properties = [
]
[endpoint]
direction = "source"
type = "pw-audio-softdsp-endpoint"
streams = "default.streams"
direction = "source"
streams = "capture.streams"
[match-endpoint]
priority = 50
priority = 0
direction = "sink"
media_class = "Stream/Input/Audio"
[target-endpoint]
media_class = "Audio/Source"
properties = [
{ name = "api.alsa.path", value = "hw:0,0" },
]
[endpoint-link]
keep = false
[match-endpoint]
priority = 50
priority = 0
direction = "source"
media_class = "Stream/Output/Audio"
[target-endpoint]
media_class = "Audio/Sink"
properties = [
{ name = "api.alsa.path", value = "hw:0,0" },
]
[endpoint-link]
keep = false
[match-endpoint]
priority = 75
direction = "sink"
name = "bluealsa*"
media_class = "Stream/Input/Audio"
[target-endpoint]
media_class = "Audio/Source"
stream = "Multimedia"
[match-node]
priotity = 1
properties = [
{ name = "media.class", value = "Audio/Sink" },
{ name = "api.alsa.path", value = "hw:0,0" },
]
[endpoint-link]
keep = true
[endpoint]
type = "pw-audio-softdsp-endpoint"
direction = "sink"
streams = "playback.streams"
priority = 1
[match-endpoint]
priority = 75
direction = "source"
name = "bluealsa*"
media_class = "Stream/Output/Audio"
[target-endpoint]
media_class = "Audio/Sink"
stream = "Multimedia"
[match-node]
priotity = 1
properties = [
{ name = "media.class", value = "Audio/Source" },
{ name = "api.alsa.path", value = "hw:0,0" },
]
[endpoint-link]
keep = true
[endpoint]
type = "pw-audio-softdsp-endpoint"
direction = "source"
streams = "capture.streams"
priority = 1
[match-node]
priotity = 70
properties = [
{ name = "media.class", value = "Audio/Sink" },
{ name = "api.alsa.card.driver", value = "USB-Audio" },
]
[endpoint]
type = "pw-audio-softdsp-endpoint"
direction = "sink"
streams = "playback.streams"
priority = 70
[match-node]
priotity = 70
properties = [
{ name = "media.class", value = "Audio/Source" },
{ name = "api.alsa.card.driver", value = "USB-Audio" },
]
[endpoint]
type = "pw-audio-softdsp-endpoint"
direction = "source"
streams = "capture.streams"
priority = 70
WirePlumber Configuration
===
This directory contains WirePlumber's configuration files.
There are 4 kinds of files:
* `wireplumber.conf`
This file lists the modules that are being loaded by WirePlumber.
* `*.endpoint` files
These files contain rules to create endpoints when WirePlumber detects
new nodes in the pipewire graph. They are TOML v0.5 files.
The `00-stream-*.endpoint` files contain rules to create endpoints for the
nodes of the client applications that connect to pipewire. You should not
change or remove those unless you know what you are doing.
The rest of the `.endpoint` files contain rules to create endpoints for
ALSA device nodes.
TODO: more info
* `*.endpoint-link` files
These files contain rules to link endpoints with each other. They are part
of the policy module.
* `*.streams` files
These files contain a list of streams and their priorities.
The names of the streams are used to create streams on new endpoints.
In order to use a specific list of streams for a specific endpoint,
the relevant `.endpoint` file that contains the creation rule for that
endpoint must reference the `.streams` file.
The stream priorities are being interpreted by the policy module to apply
restrictions on which app can use the device at a given time.
The `media.role` of the application's stream is matched against the names
of the streams when applying policy.
[[streams]]
name = "Capture"
priority = 1
......@@ -3,12 +3,10 @@ wp_sources = [
]
wireplumber_config_file = join_paths(wireplumber_config_dir, 'wireplumber.conf')
install_data('wireplumber.conf',
install_dir: wireplumber_config_dir
)
install_subdir('wireplumber',
install_dir: wireplumber_config_dir
install_subdir('config',
install_dir: wireplumber_config_dir,
strip_directory : true
)
executable('wireplumber',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment