sunrat wrote: ↑Fri Sep 20, 2024 1:35 pmI've been wondering why we need pavucontrol to set profile in PW too. From a post at reddit this was suggested:
Put something like:
Code: Select all
monitor.alsa.rules = [ { matches = [ { node.name = "YOUR_DEVICE_NAME_AS_SHOWN_BY_'wpctl status'" } ] actions = { update-props = { device.profile = "pro-audio" } } } ]
in
~/.config/wireplumber/wireplumber.conf.d/51-set-profile.conf
I can't test it as I don't have a "Pro Audio" sound card.
Note also from Pipewire FAQ section on the Pro Audio profile:This profile is meant to be used on audio cards with:
Code: Select all
More than 8 channels for input or output. Channel assignment is probably wrong for these cards. Cards with many instruments connected to each input. It makes sense to handle each channel as a separate unrelated stream. Output Cards with many unrelated outputs, like speakers on the first 2 channels, headphones on the second channel-pair, additional speakers on the other channels.
For consumer cards with stereo or surround configurations, it does not make sense to use this Profile.
That does work, that's essentially what I did before I read that you can simply select it in pavucontrol.. AV Linux comes with a lua_example.txt file pre-populated in ~/.config/wireplumber/ just in case:
Code: Select all
#Setting up a device not recognized correctly for the PipeWire "Pro Audio" profile.
1. Get your Device ID from 'wpctl status' (Focusrite Clarett used as example).
$ wpctl status
Audio
├─ Devices:
│ 107. Clarett+ 2Pre [alsa]
2. Get your ALSA Device name.
$ wpctl inspect 107 | grep device.name
* device.name = "alsa_card.usb-Focusrite_Clarett__2Pre_00004281-00"
3. In this folder create a text file called "51-my-alsa-config.lua" with this content and place your ALSA Device name where indicated.
table.insert(alsa_monitor.rules, {
matches = {
-- ORed
{
{ "device.name", "matches", "< Place ALSA Device name here between quotes>" },
},
},
apply_properties = {
["device.profile"] = "pro-audio",
},
})