wireplumber: Fix default volume of USB PnP microphone

Taken from upstream
https://gitlab.freedesktop.org/pipewire/wireplumber/-/blob/master/src/config/main.lua.d/40-stream-defaults.lua
This commit is contained in:
Sanchayan Maity 2023-10-17 17:06:40 +05:30
parent 7bad55af50
commit 0496c7a0a0
Signed by: sanchayanmaity
GPG Key ID: 6F6A0609C12038F3
1 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,34 @@
stream_defaults = {}
stream_defaults.enabled = true
stream_defaults.properties = {
["restore-props"] = true,
["restore-target"] = true,
["default-channel-volume"] = 0.9,
}
stream_defaults.rules = {
{
matches = {
{
{ "node.nick", "matches", "USB PnP Audio Device" },
},
},
apply_properties = {
["state.restore-props"] = false,
["state.restore-target"] = false,
["state.default-channel-volume"] = 0.9,
},
},
}
function stream_defaults.enable()
if stream_defaults.enabled == false then
return
end
load_script("restore-stream.lua", {
properties = stream_defaults.properties,
rules = stream_defaults.rules,
})
end