bluez5: set initial profile based on what's connected at startup

Set initial device profile according to what's connected at startup,
rather than having media-session try to set it to A2DP (and fail, if the
profile was not connected, resulting to startup in null profile).

This avoids making a codec switch at device startup (we'll stay with
what BlueZ autoconnected us to, usually the previously used codec).
This commit is contained in:
Pauli Virtanen 2021-02-10 21:30:15 +02:00 committed by Wim Taymans
parent 3c0821775f
commit beaec3d003
2 changed files with 37 additions and 1 deletions

View file

@ -377,7 +377,6 @@ static void device_update(void *data)
&device->device_listener,
&bluez5_device_events, device);
set_profile(device, 1);
sm_object_sync_update(&device->sdevice->obj);
}