This patch adds an initial implementation of the BAP Broadcast Assistant role. The core implementation resides in the BASS plugin (the BAP Broadcast Assistant is a BASS Client). The BAP plugin implements the callback to probe Broadcast Sources and parse the BASE. Information about each detected stream is notified to the BASS plugin, which will compare stream audio capabilities with the capabilities supported by the peer Scan Delegator (discovered by reading the Sink PAC characteristic). For each match, the BASS plugin registers a MediaAssistant DBus object. The MediaAssistant methods will be implemented in a following patch. This patch also introduces the assistant submenu in bluetoothctl, to enumerate MediaAssistant objects as they are created. Commands that the user can call on a MediaAssistant object will be implemented in a following patch. Below is a bluetoothctl log which demonstrates a Broadcast Assistant connecting to a Scan Delegator, scanning a Broadcast Source and enumerating MediaAssistant objects: client/bluetoothctl [bluetooth]# [CHG] Controller 00:60:37:31:7E:3F Pairable: yes [bluetooth]# AdvertisementMonitor path registered [bluetooth]# scan on [bluetooth]# [NEW] Device 00:60:37:94:A6:A3 00-60-37-94-A6-A3 [bluetooth]# connect 00:60:37:94:A6:A3 Attempting to connect to 00:60:37:94:A6:A3 [CHG] Device 00:60:37:94:A6:A3 Connected: yes [00-60-37-94-A6-A3]# Connection successful [00-60-37-94-A6-A3]# [NEW] Device 15:65:78:B6:52:F6 15-65-78-B6-52-F6 [00-60-37-94-A6-A3]# [NEW] Assistant /org/bluez/hci0/src_15_65_78_B6_52_F6/dev_00_60_37_94_A6_A3/bis1 [00-60-37-94-A6-A3]# [NEW] Assistant /org/bluez/hci0/src_15_65_78_B6_52_F6/dev_00_60_37_94_A6_A3/bis2 [00-60-37-94-A6-A3]# scan off [00-60-37-94-A6-A3]# Diovery stopped [00-60-37-94-A6-A3]# disconnect Attempting to disconnect from 00:60:37:94:A6:A3 [00-60-37-94-A6-A3]# Successful disconnected [CHG] Device 00:60:37:94:A6:A3 Connected: no [bluetooth]# [DEL] Assistant /org/bluez/hci0/src_15_65_78_B6_52_F6/dev_00_60_37_94_A6_A3/bis1 [bluetooth]# [DEL] Assistant /org/bluez/hci0/src_15_65_78_B6_52_F6/dev_00_60_37_94_A6_A3/bis2 Iulia Tanasescu (10): shared/bap: Add separate API to merge caps shared/bap: Update bt_bap_verify_bis to receive caps shared/bap: Remove unused param from bt_bap_verify_bis shared/bap: Allow checking bis caps against peer caps shared/bap: Append bcast sink pacs to Sink PAC char bap: Add API to get bt_bap matching device shared/bass: Add API to get GATT client reference bass: Register MediaAssistant objects bap: Notify scanned BISes to BASS client: Add assistant submenu Makefile.plugins | 4 +- Makefile.tools | 3 +- client/assistant.c | 164 +++++++++++++++++++++++++++ client/assistant.h | 13 +++ client/main.c | 5 +- profiles/audio/bap.c | 40 ++++++- profiles/audio/bap.h | 10 ++ profiles/audio/bass.c | 257 ++++++++++++++++++++++++++++++++++++++++++ profiles/audio/bass.h | 13 +++ src/shared/bap.c | 59 ++++++---- src/shared/bap.h | 9 +- src/shared/bass.c | 8 ++ src/shared/bass.h | 1 + unit/test-bap.c | 13 +-- 14 files changed, 555 insertions(+), 44 deletions(-) create mode 100644 client/assistant.c create mode 100644 client/assistant.h create mode 100644 profiles/audio/bap.h create mode 100644 profiles/audio/bass.h base-commit: 73266377b0185c56c921b8cece257df428612d73 -- 2.39.2