Skip to content

BAP stream reconfiguration

Pauli Virtanen linux-bluetooth 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest10 patches 2 repliesIn review
  2. v1 RFC9 patches 8 repliesSuperseded

Changes in v3 from the cover letter

- Add bt_bap_stream_lock(), instead of bt_bap_stream_discard()

- Separate commit for "detach on RELEASING"

- Move "bap: do not try QoS before links are updated" first, as it makes sense standalone

- Add "bap: don't show error when releasing stream"

- Add "bap: delay QoS & IO creation if CIG is busy or setups configuring"

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10bap: do not try QoS before links are updated & io createdprofiles/audio/bap.c+49 -331 reply
2/10shared/bap: detach ucast io on RELEASING and unlink streamssrc/shared/bap.c+33 -20 replies
3/10shared/bap: add client ASE reuse and upper level stream lockingsrc/shared/bap.c src/shared/bap.h+89 -470 replies
4/10bap: lock streams when usedprofiles/audio/bap.c+20 -10 replies
5/10bap: add ready callback for setup configurationprofiles/audio/bap.c+112 -670 replies
6/10bap: support removing streams with ClearConfiguration()profiles/audio/bap.c profiles/audio/transport.c profiles/audio/transport.h+185 -170 replies
7/10bap: add callback at the end of ucast client select/configprofiles/audio/bap.c+133 -390 replies
8/10bap: implement Reconfigure()profiles/audio/bap.c+146 -50 replies
9/10bap: don't show error when releasing streamprofiles/audio/transport.c+2 -10 replies
10/10bap: delay QoS & IO creation if CIG is busy or setups configuringprofiles/audio/bap.c+285 -1090 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH BlueZ v3 00/10] BAP stream reconfiguration

Implement ClearConfiguration() and Reconfigure() for BAP unicast MediaEndpoints.

v3:

- Add bt_bap_stream_lock(), instead of bt_bap_stream_discard()

- Separate commit for "detach on RELEASING"

- Move "bap: do not try QoS before links are updated" first, as it makes sense standalone

- Add "bap: don't show error when releasing stream"

- Add "bap: delay QoS & IO creation if CIG is busy or setups configuring"

This reworks the unicast stream creation/QoS/CIG activation logic, to avoid doing operations that are impossible due to CIG state machine rules, or lead to ID conflicts.

Unicast tested manually on:

- Sony Linkbuds S: switching between AC 6(ii), 8(ii), 11(ii)
- Earfun Air Pro 3: switching between AC 6(i), 11(i)

with corresponding Pipewire branch
https://gitlab.freedesktop.org/pvir/pipewire/-/commits/bap-codec-switch-select

Some more testing is probably warranted.

Broadcast has not been tested.

Pauli Virtanen (10):
bap: do not try QoS before links are updated & io created shared/bap: detach ucast io on RELEASING and unlink streams shared/bap: add client ASE reuse and upper level stream locking
bap: lock streams when used
bap: add ready callback for setup configuration
bap: support removing streams with ClearConfiguration()
bap: add callback at the end of ucast client select/config
bap: implement Reconfigure()
bap: don't show error when releasing stream
bap: delay QoS & IO creation if CIG is busy or setups configuring

 profiles/audio/bap.c       | 1085 ++++++++++++++++++++++++++++--------
 profiles/audio/transport.c |   20 +-
 profiles/audio/transport.h |    1 +
 src/shared/bap.c           |  168 ++++--
 src/shared/bap.h           |    3 +
 5 files changed, 1005 insertions(+), 272 deletions(-)
Signature · 1 line
2.49.0