mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-16 08:56:45 -05:00
bluez5: autoconnect device profiles on startup
Auto-connect all paired & trusted devices on startup. Since devices that already connected or powering off would reject the connecting requests, it should be fine with this behavior. Also reconnect remaining profiles if only partial profiles are connected.
This commit is contained in:
parent
4112b34f4d
commit
34c9f24d2a
5 changed files with 168 additions and 86 deletions
|
|
@ -1504,7 +1504,15 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
this->bt_dev->settings = filter_bluez_device_setting(this, info);
|
||||
if (info) {
|
||||
int profiles;
|
||||
this->bt_dev->settings = filter_bluez_device_setting(this, info);
|
||||
if ((str = spa_dict_lookup(info, "bluez5.reconnect-profiles")) != NULL)
|
||||
profiles = spa_bt_profiles_from_json_array(str);
|
||||
if (str == NULL || profiles < 0)
|
||||
profiles = SPA_BT_PROFILE_NULL;
|
||||
this->bt_dev->reconnect_profiles = profiles;
|
||||
}
|
||||
|
||||
this->device.iface = SPA_INTERFACE_INIT(
|
||||
SPA_TYPE_INTERFACE_Device,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue