bluez5: endpoint can be used only by one device at a time

AVDTP (v1.3 Sec 5.3) has a limitation that a local SEP (on the same
adapter) can be connected to at most one remote SEP. Trying to do have
it connected to multiple remotes either fails or causes misbehavior
later on.

Skip SetConfigure the same local endpoint for multiple remote ones in
codec switch. BlueZ observes this restriction in SelectConfiguration,
so also it won't try to do invalid configurations.

In BlueZ 5.64, the SetConfiguration calls succeed, but subsequent
transport acquires will fail. (Likely already the SetConfiguration DBus
call should fail.)

This all has the consequence, with the current approach to the
codec=endpoint correspondence, that if multiple devices are connected to
the same adapter, they currently have to use different codecs.
This commit is contained in:
Pauli Virtanen 2022-05-26 12:44:07 +03:00 committed by Wim Taymans
parent 85ca67b927
commit ca18b8b733
2 changed files with 18 additions and 0 deletions

View file

@ -574,6 +574,7 @@ struct spa_bt_transport {
unsigned int codec;
void *configuration;
int configuration_len;
char *endpoint_path;
uint32_t n_channels;
uint32_t channels[64];