mbox series

[BlueZ,00/10] Initial implementation of BAP Broadcast Assistant

Message ID 20240716142207.4298-1-iulia.tanasescu@nxp.com
Headers show
Series Initial implementation of BAP Broadcast Assistant | expand

Message

Iulia Tanasescu July 16, 2024, 2:21 p.m. UTC
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

Comments

patchwork-bot+bluetooth@kernel.org July 18, 2024, 6:30 p.m. UTC | #1
Hello:

This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Tue, 16 Jul 2024 17:21:57 +0300 you wrote:
> 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).
> 
> [...]

Here is the summary with links:
  - [BlueZ,01/10] shared/bap: Add separate API to merge caps
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=caa4202a7ee3
  - [BlueZ,02/10] shared/bap: Update bt_bap_verify_bis to receive caps
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=679349fbc9f2
  - [BlueZ,03/10] shared/bap: Remove unused param from bt_bap_verify_bis
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=bbcf4891cd46
  - [BlueZ,04/10] shared/bap: Allow checking bis caps against peer caps
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=662aee4357f8
  - [BlueZ,05/10] shared/bap: Append bcast sink pacs to Sink PAC char
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=2c98c478863e
  - [BlueZ,06/10] bap: Add API to get bt_bap matching device
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=f16391348810
  - [BlueZ,07/10] shared/bass: Add API to get GATT client reference
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=88bf423eb525
  - [BlueZ,08/10] bass: Register MediaAssistant objects
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=77e4c0976c0d
  - [BlueZ,09/10] bap: Notify scanned BISes to BASS
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=22779f0bce61
  - [BlueZ,10/10] client: Add assistant submenu
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=a3f9970f7a8b

You are awesome, thank you!