bluez5: rate limit BlueZ SetConfiguration calls

A2DP profile may disappear if several SetConfiguration events occur too
rapidly. Rate limit these calls when switching codecs.

This resolves failures if e.g. the session manager attempts to set the
profile immediately after the device is created, which previously might
cause a failure.
This commit is contained in:
Pauli Virtanen 2021-02-10 01:14:58 +02:00
parent 22625fb658
commit cc43b2f601
2 changed files with 156 additions and 21 deletions

View file

@ -473,6 +473,8 @@ struct spa_bt_device {
* under same device. So it's safe to cache activation info here. */
bool a2dp_volume_active[2];
uint64_t last_bluez_action_time;
struct spa_hook_list listener_list;
bool added;