Link-factory can't find the output port
pipewire 0.3.58
I understand that pipewire
takes time to setup, only after that time all the nodes are ready for further configuration with pw-cli
or pw-link
commands. I want to set a link configuration with pipewire config files, preferably using link-factory
. Below are the outputs of pw-dump
for the link input and output nodes and the configuration I've came up with.
The link-input node:
{
"id": 35,
"type": "PipeWire:Interface:Node",
"version": 3,
"permissions": [ "r", "w", "x", "m" ],
"info": {
"max-input-ports": 65,
"max-output-ports": 0,
"change-mask": [ "input-ports", "output-ports", "state", "props", "params" ],
"n-input-ports": 1,
"n-output-ports": 1,
"state": "suspended",
"error": null,
"props": {
"node.name": "input.eg-amp",
"node.channels": 1,
"media.class": "Audio/Sink",
"audio.position": "[ MONO ]",
"node.description": "Example amplifier",
"node.group": "filter-chain-74674-28",
"node.link-group": "filter-chain-74674-28",
"node.virtual": true,
"media.name": "Example amplifier",
"stream.is-live": true,
"node.autoconnect": true,
"node.want-driver": true,
"adapt.follower.spa-node": "",
"object.register": false,
"factory.id": 18,
"clock.quantum-limit": 8192,
"factory.mode": "merge",
"audio.adapt.follower": "",
"library.name": "audioconvert/libspa-audioconvert",
"client.id": 34,
"object.id": 35,
"object.serial": 36
},
# and more
The link-output node
{
"id": 53,
"type": "PipeWire:Interface:Node",
"version": 3,
"permissions": [ "r", "w", "x", "m" ],
"info": {
"max-input-ports": 65,
"max-output-ports": 0,
"change-mask": [ "input-ports", "output-ports", "state", "props", "params" ],
"n-input-ports": 2,
"n-output-ports": 2,
"state": "suspended",
"error": null,
"props": {
"alsa.card": 0,
"alsa.card_name": "HDA Intel PCH",
"alsa.class": "generic",
"alsa.device": 0,
"alsa.driver_name": "snd_hda_intel",
"alsa.id": "ALC257 Analog",
"alsa.long_card_name": "HDA Intel PCH at 0x6053bc8000 irq 189",
"alsa.name": "ALC257 Analog",
"alsa.resolution_bits": 32,
"alsa.subclass": "generic-mix",
"alsa.subdevice": 0,
"alsa.subdevice_name": "subdevice #0",
"api.alsa.card.longname": "HDA Intel PCH at 0x6053bc8000 irq 189",
"api.alsa.card.name": "HDA Intel PCH",
"api.alsa.path": "hw:0,0",
"api.alsa.pcm.card": 0,
"api.alsa.pcm.stream": "playback",
"audio.channels": 2,
"audio.position": "AUX0,AUX1",
"card.profile.device": 1,
"clock.name": "api.alsa.0",
"device.api": "alsa",
"device.class": "sound",
"device.id": 48,
"device.profile.description": "Pro",
"device.profile.name": "pro-output-0",
"device.routes": 0,
"factory.name": "api.alsa.pcm.sink",
"media.class": "Audio/Sink",
"node.description": "Built-in Audio Pro",
"node.name": "alsa_output.pci-0000_00_1f.3.pro-output-0",
"node.nick": "HDA Intel PCH",
"node.pause-on-idle": false,
"object.path": "alsa:pcm:0:hw:0,0:playback",
"priority.driver": 1000,
"priority.session": 1000,
"factory.id": 18,
"clock.quantum-limit": 8192,
"client.id": 38,
"node.driver": true,
"factory.mode": "merge",
"audio.adapt.follower": "",
"library.name": "audioconvert/libspa-audioconvert",
"object.id": 53,
"object.serial": 54
},
# and more
Part of the config file in /etc/pipewire/
:
context.objects = [
{
factory = link-factory
args = {
link.input.node = "output.eg-amp"
link.input.port = "capture_MONO"
link.output.node = "alsa_output.pci-0000_00_1f.3.pro-output-0"
link.output.port = "playback_AUX0"
link.passive = true
}
}
]
This configuration always ends up with an error, similar to below:
pw.resource: link-factory: unknown output port playback_AUX0
pw.conf: can't create object from factory link-factory: Invalid argument
Can this even work or be repaired? Can pipewire links be configured right after the pipewire startup. It's important to note that one of the links is the filter-chain mentioned in the #issue2770
Thanks.