bluez5: simplify codec switch code

Simplify codec switching code: determine what switch to perform
immediately in spa_bt_device_ensure_media_codec().

The previous code doing "fallback" switching to various codecs is not
useful, as A2DP generally disconnects on the first failure and all
remote endpoints disappear.

Add iteration over multiple endpoints, for reconfiguring both source and
sink directions at the same time.  This is in preparation of supporting
BAP reconfiguration (for A2DP there's usually only one direction
connected at a time).
This commit is contained in:
Pauli Virtanen 2024-06-30 16:28:54 +03:00 committed by Wim Taymans
parent a30d385636
commit 6e0970c14b
2 changed files with 343 additions and 363 deletions

View file

@ -475,7 +475,6 @@ static inline enum spa_bt_form_factor spa_bt_form_factor_from_class(uint32_t blu
return SPA_BT_FORM_FACTOR_UNKNOWN;
}
struct spa_bt_media_codec_switch;
struct spa_bt_transport;
struct spa_bt_device_events {