Le 2024-08-15 à 09 h 43, Marc Lavallée a écrit :
It looks like the parameters can also be provided by
the pipewire config.
Indeed, it seems to work.
I made a copy of the pipewire config (~/.config/pipewire/pipewire.conf)
I disabled dbus and added autoloading of the jack-tunnel module:
support.dbus = false
module.jackdbus-detect = false
module.jack-tunnel = true
I added a config file: ~/.config/pipewire/pipewire.conf.d/jack-tunnel.conf
Its content is based on what is in the source code of the module:
context.modules = [
{ name = libpipewire-module-jack-tunnel
args = {
#jack.library = libjack.so.0
#jack.server = null
jack.client-name = MyPipeWireTunnel
#jack.connect = true
#tunnel.mode = duplex
#midi.ports = 0
#audio.channels = 2
#audio.position = [ FL FR ]
source.props = {
# extra sink properties
}
sink.props = {
# extra sink properties
}
}
}
]
So I only changed the client name to see if my custom config is being used.
Then I restarted pipewire. The jack sinks are present in pipewire, and
also the pipewire jack clients. With 2 channels (stereo).
jack_lsp is reporting:
MyPipeWireTunnel:playback_FL
MyPipeWireTunnel:playback_FR
MyPipeWireTunnel:playback_0
MyPipeWireTunnel:capture_FL
MyPipeWireTunnel:capture_FR
MyPipeWireTunnel:capture_0
The jack server was started automatically by pipewire, even if I
disabled jackdbus in /usr/share/dbus-1/services/org.jackaudio.service (I
commented out the last line: # Exec=/usr/bin/jackdbus auto)
Pipewire used ~/.jackdrc to start jackd. If this file is not present,
pipewire don't work, so there's now a dependency between pipewire and
jack; pipewire is actually waiting for a ~/.jackdrc file, so once it's
created by QJackCtl, pipewire starts.
I hope it helps!
Marc