This should do the trick:
context.modules = [
{ name = libpipewire-module-loopback
args = {
node.name = mono-filter
node.description = "Mono Mixdown Filter"
capture.props = {
audio.position = [ MONO ]
media.class = Audio/Sink
filter.smart = true
filter.smart.name = mono-filter
}
playback.props = {
node.passive = true
audio.position = [ MONO ]
}
}
}
]
Sorry it took me so long to get back to you. It seemed like this might only work on some devices which is pretty limiting, but I’ve tested it across a bunch of different hardware and I think it should work OK for just about everyone.
Nerdy detail: I was concerned that this would only work on devices which have a mono profile, but it’s actually doing the channel conversion in the node before the device, the device will keep the channel map from the Profile.
The one exception is for devices which use the ‘Pro Audio’ Profile. In that case, it’ll stay mono, but just route that to the first channel on the device (AUX 0) Since there’s a native mono-to-mono connection to be had it doesn’t do any remapping.
This is common to all mono streams being sent to Pro Audio devices, so they probably want to solve that problem in general and separately to this, so I won’t hijack this thread with that topic other than to say: Setup a loopback with ports named as per standard stereo/surround devices ( FL, FR, C, LFE, etc)
For actual mono-capable devices it’ll use that and should sound fine.
Hope that helps @Stuart_Luscombe and I’m terribly sorry that my short-sighted testing regime didn’t catch my error and wasted your time.
Oh no! I hadn’t clicked ‘send’
Man I just can’t win today!
Speaking of bad testing process… After I did this for you, I restored my config and… it didn’t work! Restored the entire system from yesterday when it was working…Nothing! Power cycled everything, restored again, you name it, nothing! What the heck?! I ended up spending the next 5 hours troubleshooting my extremely complex pipewire installation, to no avail…
Then I finally figured out that it wasn’t pipewire that was broken - it’s *KDE’s Sound Settings ‘Test’ Button. It’s crashing pipewire. Probably broken since 6.3.5, but I just noticed today.
I share this embarrassing tale of woe so that:
a) others can learn from my mistake in not testing it by another means and trusting that one method (which admittedly has never failed me in years, but that’s why it’s a strong lesson)
b) you won’t try to use that button to test this!
Good luck, and again, apologies for the delays.