Configuring module-loopback in pipewire.conf doesn't work
Version, Distribution, Desktop Environment
5497d2d9, Gentoo Linux, XFCE
Description of Problem
Configuring module-loopback using pipewire.conf instead of running pw-loopback results in strange behaviour.
How Reproducible
Every time.
Steps to Reproduce
Add the following to pipewire.conf and start pipewire.
context.modules = [
{ name = libpipewire-module-loopback
args = {
node.name = "flipped"
capture.props = {
node.description = "Flipped"
media.class = "Audio/Sink"
audio.position = "FL,FR,RL,RR,FC,LFE"
audio.channels = 6
}
playback.props = {
node.target = "mysink"
audio.position = "RR,FL,FR,FC,RL,LFE"
audio.channels = 6
stream.dont-remix = "true"
}
}
}
]
I based the above on the source for module-remap-sink
. It is equivalent to these:
pactl load-module module-remap-sink sink_name=flipped master=mysink channels=6 channel_map=front-left,front-right,rear-left,rear-right,front-center,lfe master_channel_map=rear-right,front-left,front-right,front-center,rear-left,lfe remix=no
pw-loopback --capture-props='media.class=Audio/Sink node.name=flipped audio.position=[FL FR RL RR FC LFE] audio.channels=6' --playback-props='audio.position=[RR FL FR FC RL LFE] node.target=mysink audio.channels=6'
Actual Results
Two "flipped" sinks appear in pavucontrol. When trying to use either the "flipped" sink or the "mysink" sink, playback just jams up, like it's stuck. Nothing is heard.
Expected Results
There should only be one "flipped" sink in pavucontrol, as you normally get when using pactl load-module
or pw-loopback
.
Additional Info
I compared the output of pw-cli dump
with the same when using pw-loopback
and they're practically identical.
pipewire.conf
id: 37
permissions: rwxm
type: PipeWire:Interface:Node/3
input ports: 6/64
output ports: 6/0
state: "suspended"
properties:
node.description = "Flipped"
media.class = "Audio/Sink"
audio.position = "FL,FR,RL,RR,FC,LFE"
audio.channels = "6"
node.name = "flipped"
node.group = "loopback-28"
node.virtual = "true"
media.name = "loopback capture"
stream.is-live = "true"
node.autoconnect = "true"
adapt.follower.node = ""
factory.id = "18"
audio.adapt.follower = ""
factory.mode = "merge"
library.name = "audioconvert/libspa-audioconvert"
object.id = "37"
client.id = "36"
params:
3 (Spa:Enum:ParamId:EnumFormat) r-
1 (Spa:Enum:ParamId:PropInfo) r-
2 (Spa:Enum:ParamId:Props) rw
4 (Spa:Enum:ParamId:Format) -w
10 (Spa:Enum:ParamId:EnumPortConfig) r-
11 (Spa:Enum:ParamId:PortConfig) rw
15 (Spa:Enum:ParamId:Latency) -w
id: 38
permissions: rwxm
type: PipeWire:Interface:Node/3
input ports: 0/0
output ports: 6/64
state: "suspended"
properties:
node.target = "mysink"
audio.position = "RR,FL,FR,FC,RL,LFE"
audio.channels = "6"
stream.dont-remix = "true"
node.name = "flipped"
node.group = "loopback-28"
media.name = "loopback playback"
stream.is-live = "true"
node.autoconnect = "true"
media.class = "Stream/Output/Audio"
adapt.follower.node = ""
factory.id = "18"
audio.adapt.follower = ""
factory.mode = "split"
library.name = "audioconvert/libspa-audioconvert"
object.id = "38"
client.id = "36"
pw-loopback
id: 61
permissions: rwxm
type: PipeWire:Interface:Node/3
input ports: 6/64
output ports: 6/0
state: "running"
properties:
media.class = "Audio/Sink"
node.name = "flipped"
audio.position = "[FL FR RL RR FC LFE]"
audio.channels = "6"
node.group = "pw-loopback-31968"
node.virtual = "true"
media.name = "loopback capture"
stream.is-live = "true"
node.autoconnect = "true"
adapt.follower.node = ""
factory.id = "7"
audio.adapt.follower = ""
factory.mode = "merge"
library.name = "audioconvert/libspa-audioconvert"
object.id = "61"
client.id = "62"
id: 65
permissions: rwxm
type: PipeWire:Interface:Node/3
input ports: 0/0
output ports: 6/64
state: "running"
properties:
audio.position = "[RR FL FR FC RL LFE]"
node.target = "mysink"
audio.channels = "6"
node.group = "pw-loopback-31968"
node.virtual = "true"
media.name = "loopback playback"
stream.is-live = "true"
node.name = "pw-loopback"
node.autoconnect = "true"
media.class = "Stream/Output/Audio"
adapt.follower.node = ""
factory.id = "7"
audio.adapt.follower = ""
factory.mode = "split"
library.name = "audioconvert/libspa-audioconvert"
object.id = "65"
client.id = "62"
params:
3 (Spa:Enum:ParamId:EnumFormat) r-
1 (Spa:Enum:ParamId:PropInfo) r-
2 (Spa:Enum:ParamId:Props) rw
4 (Spa:Enum:ParamId:Format) rw
10 (Spa:Enum:ParamId:EnumPortConfig) r-
11 (Spa:Enum:ParamId:PortConfig) rw
15 (Spa:Enum:ParamId:Latency) rw