From fe7c6bcef95fbf17eab61e8a6329abe9a6b34857 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Sat, 9 Jul 2022 15:14:30 +0300 Subject: [PATCH] bluez5: volume changes from headset should be saved User changing volume via headset buttons should be treated on the same level as changing from desktop UI. Also initial headset volume should be considered saved (even though session managers currently ignore the initial route values on route restore). Mark route as saved on volume events. --- spa/plugins/bluez5/bluez5-device.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spa/plugins/bluez5/bluez5-device.c b/spa/plugins/bluez5/bluez5-device.c index fcf608700..c14974dfd 100644 --- a/spa/plugins/bluez5/bluez5-device.c +++ b/spa/plugins/bluez5/bluez5-device.c @@ -371,6 +371,12 @@ static bool node_update_volume_from_transport(struct node *node, bool reset) node_update_soft_volumes(node, t_volume->volume); + /* + * Consider volume changes from the headset as requested + * by the user, and to be saved by the SM. + */ + node->save = true; + return true; }