summaryrefslogtreecommitdiff
path: root/profiles
diff options
context:
space:
mode:
authorPauli Virtanen <pav@iki.fi>2023-02-11 10:53:51 +0000
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2023-02-13 13:53:50 -0800
commitf2a29899297aa55307fe12521dca637f9080f683 (patch)
treee8376955224e7154ac22d06ba71ca78fe3364e33 /profiles
parent94af45bc09a79443322e8f8bbbe0e7875856188f (diff)
downloadbluez-f2a29899297aa55307fe12521dca637f9080f683.tar.gz
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.
Diffstat (limited to 'profiles')
-rw-r--r--profiles/audio/media.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/profiles/audio/media.c b/profiles/audio/media.c
index 3eb038cb7..479a11db9 100644
--- a/profiles/audio/media.c
+++ b/profiles/audio/media.c
@@ -23,6 +23,7 @@
#include "lib/bluetooth.h"
#include "lib/sdp.h"
#include "lib/uuid.h"
+#include "lib/mgmt.h"
#include "gdbus/gdbus.h"
@@ -1284,6 +1285,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;
}