mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2025-12-20 05:20:05 +01:00
state-routes: Don't save routes that are not available
If the user changed the volume on a ACP 'Headphones' route to a value different than 100%, and then unplugs the jack headset, the ACP 'Headphones' route becomes unavailable with volume set to 100% and the save flag not cleared. Since the save flag is not cleared when the ACP 'Headphones' route becomes unavailable, WirePlumber will save it with 100% volume, overriding the previous volume value set by the user. This is not ideal because the volume will be restored to 100% by WirePlumber when plugging back the headset. This change fixes this by never saving routes that are not available.
This commit is contained in:
parent
ebd6d49a81
commit
ea6f24e861
1 changed files with 1 additions and 1 deletions
|
|
@ -251,7 +251,7 @@ store_or_restore_routes_hook = AsyncEventHook {
|
|||
Json.Object { index = route_info.index }:to_string ()
|
||||
push_select_routes = true
|
||||
|
||||
elseif route.save and route.props then
|
||||
elseif route.available ~= "no" and route.save and route.props then
|
||||
-- just save route properties
|
||||
log:info (device,
|
||||
string.format ("storing route(%s) props of device(%s)",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue