diff mbox series

[BlueZ,6/8] media: Check adapter CIS support to add BAP in SupportedUUIDs

Message ID 51806bcde7e2fe5a500023026d4ae68491c64bc2.1675103676.git.pav@iki.fi (mailing list archive)
State New, archived
Headers show
Series [BlueZ,1/8] doc: add MGMT setting for CIS features, remove Quality Report | expand

Commit Message

Pauli Virtanen Jan. 30, 2023, 6:37 p.m. UTC
Don't indicate BAP support in SupportedUUIDs, if adapter supports
neither CIS Central nor Peripheral.
---
 profiles/audio/media.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/profiles/audio/media.c b/profiles/audio/media.c
index fbb350889..d68085514 100644
--- a/profiles/audio/media.c
+++ b/profiles/audio/media.c
@@ -1259,6 +1259,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_cis_central_capable(adapter) &&
+	    !btd_adapter_cis_peripheral_capable(adapter))
+		return false;
+
 	return g_dbus_get_flags() & G_DBUS_FLAG_ENABLE_EXPERIMENTAL;
 }