Combine Stream, stream.rules, matches: How do you match a sink's monitor?
- PipeWire version: pipewire, Compiled with libpipewire 1.0.0, Linked with libpipewire 1.0.0
- Distribution and distribution version: Arch Linux
- Desktop Environment: GNOME on Wayland
- Kernel version: 6.6.6-arch1-1
Description of Problem:
Tl;dr What is the node.name
of an audio sink's monitor?
I have an audio source source_ec
and an audio sink sink_fx
.
With module-combine-stream
I want to mix together, and provide as new source source_main
source_ec
- The monitor of
sink_fx
My shot at something that grabs both these sources and combines them so far is this:
context.modules = [
# Main source
# Virtual source that supplies these sources mixed together
# - source_ec (Echo-cancelled source)
# - sink_fx.monitor (Monitor of the audio effects sink)
{ name = libpipewire-module-combine-stream
args = {
combine.mode = source
node.name = source_main
node.description = "Main source (record from here)"
combine.props = {
audio.position = [ FL FR ]
}
stream.rules = [
{ matches = [
{ node.name = "source_ec"
media.class = "Audio/Source"
}
]
actions = {
create-stream {
# Nothing, channel map is identical
}
}
}
{ matches = [
{ # TODO Not effective, find out how to match monitors
node.name = "sink_fx.monitor"
media.class = "Audio/Source"
}
]
actions = {
create-stream {
# Nothing, channel map is identical
}
}
}
]
}
}
]
The problem
source_ec
is grabbed all right, but sink_fx.monitor
is not.
I suspect that appending .monitor
to a sink's node name is not quite correct, but I could not find out what the node name should be here.
My current workaround is to manually add the missing connections in Helvum afterwards, which works without issue:
So, what is the node.name
of an audio sink's monitor?
How Reproducible:
Well, always.
Steps to Reproduce:
- Have a
source_ec
audio source and asink_fx
audio sink - Create a world-readable
/etc/pipewire/pipewire.conf.d/main-source.conf
file with the content shown above -
systemctl --user restart
bothpipewire.service
andpipewire-pulse.service
- Look at the result in Helvum and notice that the channel connections from the monitor channels of
sink_fx
are missing