This makes Wireplumber (the new audio routing engine for Pipewire, used by default in Ubuntu 22.10) route all voice streams from Firefox, e.g. during video calls (identified by their media.name
being "AudioCallbackDriver") to another sink than the default (e.g. your headphones).
- Copy the
41-firefox-callback.lua
to~/.config/wireplumber/main.lua.d/
and adapt thetarget
value to your needs (pactl list sinks
) - Copy
/usr/share/wireplumber/scripts/restore-stream.lua
to~/.config/wireplumber/scripts/restore-stream.lua
- Apply the
restore-stream.lua.patch
to that copy
The patch is neccessary because by default Wireplumber would ignore the target stream prop and always use the one from the file (~/.local/state/wireplumber/restore-stream
). And even if it did use the stream prop, it would then save it to the restore-stream, but only matching Firefox and hence errornously redirecting e.g. music output from Firefox to your headphones, too.
Have you considered a PR into https://gitlab.freedesktop.org/pipewire/wireplumber ?