[bluez/bluez] 0d49b7: org.bluez.MediaEndpoint: removing BAP streams with...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  Branch: refs/heads/959452
  Home:   https://github.com/bluez/bluez
  Commit: 0d49b7b52e337aa7c321f3be54be3d1a624c1910
      https://github.com/bluez/bluez/commit/0d49b7b52e337aa7c321f3be54be3d1a624c1910
  Author: Pauli Virtanen <pav@xxxxxx>
  Date:   2025-05-04 (Sun, 04 May 2025)

  Changed paths:
    M doc/org.bluez.MediaEndpoint.rst

  Log Message:
  -----------
  org.bluez.MediaEndpoint: removing BAP streams with ClearConfiguration

Allow user to remove specific streams by calling
ClearConfiguration(transport_path) on the endpoint.  If the path is the
endpoint path instead, clear all streams associated with the endpoint.


  Commit: 1a2bba8fd9ba5b4eb04429f3ff0f27eef6bcdd02
      https://github.com/bluez/bluez/commit/1a2bba8fd9ba5b4eb04429f3ff0f27eef6bcdd02
  Author: Pauli Virtanen <pav@xxxxxx>
  Date:   2025-05-04 (Sun, 04 May 2025)

  Changed paths:
    M doc/org.bluez.MediaEndpoint.rst

  Log Message:
  -----------
  org.bluez.MediaEndpoint: add client role Reconfigure

Add a simple way for the sound server to reconfigure a BAP unicast
endpoint, by calling org.bluez.MediaEndpoint.Reconfigure().

This shall destroy all streams of the endpoint, and restart the
SelectProperties() configuration flow from the beginning.

Since it may be necessary to reconfigure multiple endpoints at once to
correctly make bidirectional CIS, add Defer argument to just mark eps
for configuration.

In future, org.bluez.MediaEndpoint.SetConfiguration() could be changed
to handle unicast in the same way as broadcast: only create streams.
This allows sound server to have full control over stream configuration
itself, and not rely on bt_bap_select().


  Commit: 31d5af8edb59a17d063ab7aaad4f333201a39ae3
      https://github.com/bluez/bluez/commit/31d5af8edb59a17d063ab7aaad4f333201a39ae3
  Author: Pauli Virtanen <pav@xxxxxx>
  Date:   2025-05-04 (Sun, 04 May 2025)

  Changed paths:
    M src/shared/bap.c

  Log Message:
  -----------
  shared/bap: bap_abort_stream_req() should cancel also current req

After bap_abort_stream_req() no req callbacks for stream shall be
called, so it has to fail also the currently in-flight request.


  Commit: ba48521f82aea25c7435ce6efa0f996c2122828b
      https://github.com/bluez/bluez/commit/ba48521f82aea25c7435ce6efa0f996c2122828b
  Author: Pauli Virtanen <pav@xxxxxx>
  Date:   2025-05-04 (Sun, 04 May 2025)

  Changed paths:
    M src/shared/bap.c
    M src/shared/bap.h

  Log Message:
  -----------
  shared/bap: fix ucast client ASE usage

The ucast client stream design has issues:

* Assuming lpac & rpac pair uniquely identifies a stream.  False for
  AC6(i) and other multi-stream configs.

* No way for ASE in Config state be configured with different codec.

* Assuming ASE enters idle state at end of stream life cycle.  False for
  some devices like Sony headsets, which always cache codec config so
  RELEASING -> CONFIG always, never RELEASING -> IDLE, so ASE never go
  IDLE again.

* Assuming Unicast Client upper layer always creates streams for all
  non-idle ASEs.  False, as when switching between duplex & sink-only
  modes, only some streams shall be used regardless of whether Server is
  caching config or not.

In practice, these currently prevent reconfiguring ASEs on devices which
cache codec config, and multi-stream configs work only accidentally (and
fail if server does Config codec itself, like some devices do).

Minimally fixed design for Unicast Client streams:

Streams correspond 1-to-1 to ASEs in non-IDLE state.

Track explicitly which streams upper level is using:

- bt_bap_stream_new() always makes new stream with client_active=true
- bt_bap_stream_discard() releases stream and marks client_active=false

Streams (ASEs) with no active client may be reused when upper level asks
for a new stream.

Streams with no active client may have their lpac changed.  The
need_reconfig state is a bit ugly, but not really avoidable.

Streams with no active client shall be ignored when constructing
bidirectional CIS pairs.

Streams shall clear transport and detach io on RELEASING. (cf BAP v1.0.2
§5.6.6). Also unlink them since QoS is gone at that point.

Streams shall have transport only for >= QOS state.  (Server streams
work differently, which makes sense since upper level cannot acquire
them before they are pending.)


  Commit: 108fca0463ffe61e2722aa8230409ffd67d99ffc
      https://github.com/bluez/bluez/commit/108fca0463ffe61e2722aa8230409ffd67d99ffc
  Author: Pauli Virtanen <pav@xxxxxx>
  Date:   2025-05-04 (Sun, 04 May 2025)

  Changed paths:
    M profiles/audio/bap.c

  Log Message:
  -----------
  bap: discard stream when no longer in use

Indicate to lower layer that the stream will not be used any more.


  Commit: 526a8a3bbd2c7975f97419a0c125f40d2d50816b
      https://github.com/bluez/bluez/commit/526a8a3bbd2c7975f97419a0c125f40d2d50816b
  Author: Pauli Virtanen <pav@xxxxxx>
  Date:   2025-05-04 (Sun, 04 May 2025)

  Changed paths:
    M profiles/audio/bap.c

  Log Message:
  -----------
  bap: do not try QoS before links are updated & io created

In setup config, QoS must be done after corresponding bap_state
callback, because stream links are updated only at that point.  If the
ASE was in CONFIG state before reconfiguration, this gets done in wrong
order.

Track explicitly that bap_state() is done after bt_bap_stream_config(),
before proceeding to QoS.


  Commit: 06fad072cc121feb3d225e09ff3c91a115ffe52d
      https://github.com/bluez/bluez/commit/06fad072cc121feb3d225e09ff3c91a115ffe52d
  Author: Pauli Virtanen <pav@xxxxxx>
  Date:   2025-05-04 (Sun, 04 May 2025)

  Changed paths:
    M profiles/audio/bap.c

  Log Message:
  -----------
  bap: add ready callback for setup configuration

Operations like SetConfiguration need to wait until setup configuration
finishes. Abstract this to a setup_config() callback emitted on QoS
completion or failure, instead of hardcoding DBus reply.


  Commit: 0d8fa7cda8b46df482fb09dc792f25ab5a89cf9d
      https://github.com/bluez/bluez/commit/0d8fa7cda8b46df482fb09dc792f25ab5a89cf9d
  Author: Pauli Virtanen <pav@xxxxxx>
  Date:   2025-05-04 (Sun, 04 May 2025)

  Changed paths:
    M profiles/audio/bap.c
    M profiles/audio/transport.c
    M profiles/audio/transport.h

  Log Message:
  -----------
  bap: support removing streams with ClearConfiguration()

Implement removing streams via ClearConfiguration().


  Commit: 5390d89c2ff888e07e92664c3be843ca16c2232f
      https://github.com/bluez/bluez/commit/5390d89c2ff888e07e92664c3be843ca16c2232f
  Author: Pauli Virtanen <pav@xxxxxx>
  Date:   2025-05-04 (Sun, 04 May 2025)

  Changed paths:
    M profiles/audio/bap.c

  Log Message:
  -----------
  bap: add callback at the end of ucast client select/config

Restructure pac_select() and add a callback that is called when all
setups reach QoS.


  Commit: 03ca2dc546f8d5114b7ab71c64802e3834c955ab
      https://github.com/bluez/bluez/commit/03ca2dc546f8d5114b7ab71c64802e3834c955ab
  Author: Pauli Virtanen <pav@xxxxxx>
  Date:   2025-05-04 (Sun, 04 May 2025)

  Changed paths:
    M profiles/audio/bap.c

  Log Message:
  -----------
  bap: implement Reconfigure()

Add Reconfigure() on a BAP unicast endpoint, which triggers its
reconfiguration or marks it for reconfiguration.

First, all associated streams are closed. After that, endpoints marked
for reconfiguration are reconfigured using the same flow as in the
initial configuration.


  Commit: df2813147498eb7dc7ed82978c6e16a8421c1337
      https://github.com/bluez/bluez/commit/df2813147498eb7dc7ed82978c6e16a8421c1337
  Author: Pauli Virtanen <pav@xxxxxx>
  Date:   2025-05-04 (Sun, 04 May 2025)

  Changed paths:
    M profiles/audio/bap.c

  Log Message:
  -----------
  bap: delay recreating IO after ongoing configuration

Delay creating IO if setup reconfiguration is ongoing.

TODO: this is not fully right, also new stream QoS should be delayed if
CIG is active, so that it doesn't get assigned into a new CIG which
controllers may not support


Compare: https://github.com/bluez/bluez/compare/0d49b7b52e33%5E...df2813147498

To unsubscribe from these emails, change your notification settings at https://github.com/bluez/bluez/settings/notifications





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux