From d3541f4cd01d7c75d0ae2d288b09f517e4322cbb Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Sat, 11 Feb 2023 10:53:51 +0000 Subject: [PATCH] media: Check adapter CIS support to add BAP in SupportedUUIDs Don't indicate BAP support in SupportedUUIDs, if adapter supports neither CIS Central nor Peripheral. --- profiles/audio/media.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/profiles/audio/media.c b/profiles/audio/media.c index 66263cb..ee14ccc 100644 --- a/profiles/audio/media.c +++ b/profiles/audio/media.c @@ -22,6 +22,7 @@ #include "lib/bluetooth.h" #include "lib/sdp.h" #include "lib/uuid.h" +#include "lib/mgmt.h" #include "gdbus/gdbus.h" @@ -1495,6 +1496,10 @@ static bool experimental_endpoint_supported(struct btd_adapter *adapter) if (!btd_adapter_has_exp_feature(adapter, EXP_FEAT_ISO_SOCKET)) return false; + if (!btd_adapter_has_settings(adapter, MGMT_SETTING_CIS_CENTRAL | + MGMT_SETTING_CIS_PERIPHERAL)) + return false; + return g_dbus_get_flags() & G_DBUS_FLAG_ENABLE_EXPERIMENTAL; } -- 2.7.4