























After doing a lot of research, learning the rudiments of lua scripting, and a lot of trial and error, I've come up with a solution. It's my sincere hope that this post will help others figure out their pipewire woes as they transition over from PulseAudio and Jack to this promising, but less well-documented system. Here it goes...
First off, I copied the following sample configs to my local directory (make sure to create the directory under ~/.config/wireplumber/main.lua.d first):
cp /usr/share/wireplumber/main.lua.d/30-alsa-monitor.lua ~/.config/wireplumber/main.lua.d/
cp /usr/share/wireplumber/main.lua.d/50-alsa-config.lua ~/.config/wireplumber/main.lua.d/Open ~/.config/wireplumber/main.lua.d/50-alsa-config.lua in a text editor and make the following changes to audio.channels and audio.position properties in order to flip the order of the L & R audio channels across all devices:
~/.config/wireplumber/main.lua.d/50-alsa-config.lua
...
matches = {
{
-- Matches all sources.
{ "node.name", "matches", "alsa_input.*" },
},
{
-- Matches all sinks.
{ "node.name", "matches", "alsa_output.*" },
},
},
apply_properties = {
...
["audio.channels"] = 2,
...
["audio.position"] = "FR,FL",
...In order commit these changes, assuming pipewire and wireplumber are both running on user-level systemd, save these changes and run the following command:
systemctl --user --now wireplumberNow, when you test your headphones or speakers through whichever audio device system setting app you use to configure your audio devices, you should notice that the front left and front right channels have switched around.
If you have, say, a multichannel audio interface (check out this page to find out how to get your audio interface alsa input/output device name) that you want to create special settings for, you can do so by creating under the same main.lua.d directory a file with the following contents:
~/.config/wireplumber/main.lua.d/51-alsa-multichannelAudioInterface.lua
rule = {
matches = {
{
{ "node.name", "matches", "alsa_input.usb-audio-interface" },
},
{
{ "node.name", "matches", "alsa_output.usb-audio-interface" },
},
},
apply_properties = {
["audio.channels"] = 4,
["audio.format"] = "S32LE",
["audio.rate"] = 48000,
["audio.position"] = "FR,FL,RR,RL",
["api.alsa.period-size"] = 128,
["api.alsa.period-num"] = 3,
},
}
table.insert(alsa_monitor.rules, rule)The above code will not only reverse the order of the channels, but also sets the number of channels, the audio bit rate, sample rate, period size, and period number to a default that you may use when running a DAW through pipewire-jack.
Remember to run `systemctl --user --now wireplumber` to set these changes into action.
If anyone finds something wrong with these configs, or can find a better way of getting these sorts of settings into play, kindly add to this thread. For now, I shall mark this is SOLVED.
Last edited by haigioli (2023-04-17 02:30:34)
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。