mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2025-12-20 04:10:03 +01:00
config: refactor wireplumber's configuration
This commit is contained in:
parent
bb3a91bd36
commit
5dc250a961
20 changed files with 117 additions and 67 deletions
4
Makefile
4
Makefile
|
|
@ -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"
|
||||
7
src/config/00-default-input-audio.endpoint-link
Normal file
7
src/config/00-default-input-audio.endpoint-link
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[match-endpoint]
|
||||
priority = 0
|
||||
direction = "sink"
|
||||
media_class = "Stream/Input/Audio"
|
||||
|
||||
[endpoint-link]
|
||||
keep = false
|
||||
7
src/config/00-default-output-audio.endpoint-link
Normal file
7
src/config/00-default-output-audio.endpoint-link
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[match-endpoint]
|
||||
priority = 0
|
||||
direction = "source"
|
||||
media_class = "Stream/Output/Audio"
|
||||
|
||||
[endpoint-link]
|
||||
keep = false
|
||||
12
src/config/01-hw:0,0-audio-sink.endpoint
Normal file
12
src/config/01-hw:0,0-audio-sink.endpoint
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[match-node]
|
||||
priotity = 1
|
||||
properties = [
|
||||
{ name = "media.class", value = "Audio/Sink" },
|
||||
{ name = "api.alsa.path", value = "hw:0,0" },
|
||||
]
|
||||
|
||||
[endpoint]
|
||||
type = "pw-audio-softdsp-endpoint"
|
||||
direction = "sink"
|
||||
streams = "playback.streams"
|
||||
priority = 1
|
||||
12
src/config/01-hw:0,0-audio-source.endpoint
Normal file
12
src/config/01-hw:0,0-audio-source.endpoint
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[match-node]
|
||||
priotity = 1
|
||||
properties = [
|
||||
{ name = "media.class", value = "Audio/Source" },
|
||||
{ name = "api.alsa.path", value = "hw:0,0" },
|
||||
]
|
||||
|
||||
[endpoint]
|
||||
type = "pw-audio-softdsp-endpoint"
|
||||
direction = "source"
|
||||
streams = "capture.streams"
|
||||
priority = 1
|
||||
12
src/config/70-usb-audio-sink.endpoint
Normal file
12
src/config/70-usb-audio-sink.endpoint
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[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
|
||||
12
src/config/70-usb-audio-source.endpoint
Normal file
12
src/config/70-usb-audio-source.endpoint
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[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
|
||||
43
src/config/README.md
Normal file
43
src/config/README.md
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
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.
|
||||
3
src/config/capture.streams
Normal file
3
src/config/capture.streams
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[[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',
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
[match-endpoint]
|
||||
priority = 75
|
||||
direction = "sink"
|
||||
name = "bluealsa*"
|
||||
media_class = "Stream/Input/Audio"
|
||||
|
||||
[target-endpoint]
|
||||
media_class = "Audio/Source"
|
||||
stream = "Multimedia"
|
||||
properties = [
|
||||
{ name = "api.alsa.path", value = "hw:0,0" },
|
||||
]
|
||||
|
||||
[endpoint-link]
|
||||
keep = true
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
[match-endpoint]
|
||||
priority = 75
|
||||
direction = "source"
|
||||
name = "bluealsa*"
|
||||
media_class = "Stream/Output/Audio"
|
||||
|
||||
[target-endpoint]
|
||||
media_class = "Audio/Sink"
|
||||
stream = "Multimedia"
|
||||
properties = [
|
||||
{ name = "api.alsa.path", value = "hw:0,0" },
|
||||
]
|
||||
|
||||
[endpoint-link]
|
||||
keep = true
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
[match-endpoint]
|
||||
priority = 50
|
||||
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
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
[match-endpoint]
|
||||
priority = 50
|
||||
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
|
||||
Loading…
Add table
Reference in a new issue