Skip to content

Cover a BAP stream to a coordinated set

Luiz Augusto von Dentz linux-bluetooth 1 version Applied

Status from this message: This series was applied to bluetooth/bluez.git (master)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 2 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/11shared/bass: add a ready callbacksrc/shared/bass.c src/shared/bass.h+113 -02 replies
2/11bass: wait for the session to be ready before pushing a sourceprofiles/audio/bass.c+109 -150 replies
3/11test: functional: report what a test is waiting fortest/functional/conftest.py+201 -00 replies
4/11test: functional: answer the notification registered by the victimtest/functional/test_avrcp.py+13 -00 replies
5/11doc: describe the BAP coordinated set test casesdoc/functional-bap.rst+101 -00 replies
6/11emulator: use the handle of the receiving sideemulator/btdev.c+64 -200 replies
7/11emulator: allow the maximum number of CIS of a CIGemulator/btdev.c+4 -10 replies
8/11device: keep the long term key of both rolessrc/device.c+35 -100 replies
9/11client: allow a capability with the auto agentclient/agent.c client/main.c doc/bluetoothctl.rst+28 -60 replies
10/11test: functional: fail as soon as an operation failstest/functional/test_bap.py+24 -30 replies
11/11test: functional: add the BAP coordinated set testsclient/scripts/bap-sink-lc3-left.bt client/scripts/bap-sink-lc3-right.bt doc/functional-bap.rst +1 more+309 -180 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH BlueZ v1 00/11] Cover a BAP stream to a coordinated set

From: Luiz Augusto von Dentz <[email protected]>

These add the functional test cases for a BAP unicast stereo stream to a coordinated set of two acceptors, one taking the left channel and one the right, which is what a pair of earbuds does, together with the fixes they turned out to need.

Covering a set takes three hosts talking to each other, which the emulator does not get right: every device assigns its own connection handles, but the events and the data delivered to the peer carried the handle of the sender, so everything beyond the first link referred to a handle the receiving side knows nothing about and was dropped. It is invisible with two devices, as both sides then assign the same handles, and it is what kept the second member of the set from exchanging anything at all. A CIG was also limited to three CIS, one less than a stereo stream to a set of two needs.

Encrypting the SIRK gave a value the initiator was unable to decrypt, so the set was resolved under a SIRK that is not the one the members were configured with: LE legacy pairing distributes one long term key per role, and only the last one to arrive was kept, so the two sides did not necessarily encrypt and decrypt with the same key.

The auto agent registers with no capability, which is KeyboardDisplay, so a peer may well choose the entry of a passkey, a method the auto agent has no answer for: the pairing then only completes once the request times out, as a failure. A capability can now be given after the name, e.g. auto:NoInputNoOutput, to pair Just Works instead.

The first two patches are a fix of their own, for a source pushed to a BASS session before it is ready, and the rest of the test changes make a failure easier to tell: a test now fails as soon as an operation does, instead of waiting for its timeout, and reports what it is waiting for while it waits.

The tests pass with "make check-functional", on their own as well as alongside the others.

Luiz Augusto von Dentz (11):
shared/bass: add a ready callback
bass: wait for the session to be ready before pushing a source
test: functional: report what a test is waiting for
test: functional: answer the notification registered by the victim
doc: describe the BAP coordinated set test cases
emulator: use the handle of the receiving side
emulator: allow the maximum number of CIS of a CIG
device: keep the long term key of both roles
client: allow a capability with the auto agent
test: functional: fail as soon as an operation fails
test: functional: add the BAP coordinated set tests

 client/agent.c                       |  14 +-
 client/main.c                        |  14 +-
 client/scripts/bap-sink-lc3-left.bt  |  30 ++++
 client/scripts/bap-sink-lc3-right.bt |  30 ++++
 doc/bluetoothctl.rst                 |   6 +-
 doc/functional-bap.rst               | 111 ++++++++++++
 emulator/btdev.c                     |  89 +++++++---
 profiles/audio/bass.c                | 124 +++++++++++--
 src/device.c                         |  45 +++--
 src/shared/bass.c                    | 107 +++++++++++
 src/shared/bass.h                    |   6 +
 test/functional/conftest.py          | 201 +++++++++++++++++++++
 test/functional/test_avrcp.py        |  13 ++
 test/functional/test_bap.py          | 256 ++++++++++++++++++++++++++-
 14 files changed, 987 insertions(+), 59 deletions(-)
 create mode 100644 client/scripts/bap-sink-lc3-left.bt
 create mode 100644 client/scripts/bap-sink-lc3-right.bt
Signature · 1 line
2.55.0