bluez5: implement BAP ucast reconfiguration

Use SelectProperties() DBus API to reconfigure BAP unicast setup.

Add support to spa_bt_ensure_codec() to select whether to configure as
sink/source/duplex.
This commit is contained in:
Pauli Virtanen 2025-02-16 15:51:39 +02:00 committed by Wim Taymans
parent 592a97a7b0
commit 8795298f69
3 changed files with 223 additions and 56 deletions

View file

@ -1410,7 +1410,7 @@ static int set_profile(struct impl *this, uint32_t profile, enum spa_bluetooth_a
this->switching_codec = true;
ret = spa_bt_device_ensure_media_codec(this->bt_dev, codecs);
ret = spa_bt_device_ensure_media_codec(this->bt_dev, codecs, 0);
if (ret < 0) {
if (ret != -ENOTSUP)
spa_log_error(this->log, "failed to switch codec (%d), setting basic profile", ret);
@ -1563,6 +1563,9 @@ static void device_set_changed(void *userdata)
this->profile != DEVICE_PROFILE_ASHA)
return;
if (this->switching_codec)
return;
if (!device_set_needs_update(this)) {
spa_log_debug(this->log, "%p: device set not changed", this);
return;