Filter Chain volume control doesn't accept notify ports as input
- PipeWire version (
pipewire --version
): 0.3.82 - Distribution and distribution version (
PRETTY_NAME
from/etc/os-release
): Fedora Linux 38 (Workstation Edition) - Desktop Environment: GNOME 44.5
- Kernel version (
uname -r
): 6.5.6-200.fc38.x86_64
Description of Problem:
When trying to use a notify port in the filter chain volume control (as per [1]), the filter chain can't be loaded. It fails with the error:
mod.filter-chain: unknown control port <node>:<port>
This would be useful to dynamically adapt volumes based on a meter reading.
Referencing a control port (which is static) seems to work fine.
How Reproducible:
Create the following filter chain:
context.modules = [
{ name = libpipewire-module-filter-chain
args = {
node.description = "Adaptive Audio"
media.name = "Adaptive Audio"
filter.graph = {
nodes = [
{
name = meter
type = lv2
label = meter
plugin = "http://gareus.org/oss/lv2/meters#EBUmono"
}
{
name = microphone_IN_MONO
type = builtin
label = copy
}
{
name = tts_IN_FL
type = builtin
label = copy
}
{
name = tts_IN_FR
type = builtin
label = copy
}
{
name = tts_OUT_FL
type = builtin
label = copy
}
{
name = tts_OUT_FR
type = builtin
label = copy
}
]
links = [
# Feed the microphone input into the meter
{ output = "microphone_IN_MONO:Out" input = "meter:in" }
{ output = "tts_IN_FL:Out" input = "tts_OUT_FL:In" }
{ output = "tts_IN_FR:Out" input = "tts_OUT_FR:In" }
]
playback.volumes = [
{ control = "meter:level1" min = 0.2 max = 0.9 }
]
}
}
}
]
The goal of this filter chain is to adjust the playback volume based on the ambient noise level recorded by a microphone.
This fails with the error
mod.filter-chain: unknown control port meter:level1
When chaning the control port reference in playback.volumes from meter:level1 to meter:ref, the configuration can be loaded as it is a control port. My conclusion is that we can't feed notify ports into the playback.volume configuration.
Steps to Reproduce:
On Fedora 38:
- Install Pipewire and some LV2 Plugins:
dnf install lv2-x42-plugins pipewire
- Create above configuration file in
$HOME/.config/pipewire/filter-chain.conf.d
- Load filter chain:
systemctl start --user filter-chain
- check error message in logs:
journalctl --user -u filter-chain
Actual Results:
Filter Chain can't be loaded:
mod.filter-chain: unknown control port meter:level1
Expected Results:
Filter chain loads when a notification port is hooked up to a volume control