From 12fb9ab831795acc928985dde00a4bec942a5fe7 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Wed, 11 Feb 2026 18:53:32 +0200 Subject: [PATCH] bluez5: use correct A2DP profile in codec switch We can only switch within currently connected A2DP profiles, as generally remote endpoints are available only for the connected ones. --- spa/plugins/bluez5/bluez5-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spa/plugins/bluez5/bluez5-device.c b/spa/plugins/bluez5/bluez5-device.c index a63361146..fc659f655 100644 --- a/spa/plugins/bluez5/bluez5-device.c +++ b/spa/plugins/bluez5/bluez5-device.c @@ -1485,7 +1485,7 @@ static int set_profile(struct impl *this, uint32_t profile, enum spa_bluetooth_a profiles = this->bt_dev->profiles & SPA_BT_PROFILE_BAP_DUPLEX; break; case DEVICE_PROFILE_A2DP: - profiles = this->bt_dev->profiles & SPA_BT_PROFILE_A2DP_DUPLEX; + profiles = this->bt_dev->connected_profiles & SPA_BT_PROFILE_A2DP_DUPLEX; break; default: profiles = 0;