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:
parent
7bad55af50
commit
0496c7a0a0
1 changed files with 34 additions and 0 deletions
|
@ -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
|
Loading…
Reference in a new issue