Parent: 2f853e4d86d887a37750ae09c91f59344df5a5e7
Author: Pauli Virtanen <pav@iki.fi>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2025-06-09 18:54:00
Tree: eded9f0ba30da06f52ac4da3bf1f8ac2a786d9ee
shared/bap: add client ASE reuse and upper level stream locking Change ucast client stream design so that: * upper level locks streams to indicate which ones it is using * unused streams are reused when upper level wants a new stream * only locked streams are used for bidi CIS linking * streams (still) correspond 1-to-1 to non-idle ASEs This fixes some issues: * bap_ucast_stream_new() could pick a stream upper level is already using if lpac & rpac match (can occur with multi-stream AC 6(ii) etc) * Avoids assuming ASE enters idle state at end of stream life cycle. This is 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. * Allows reconfiguring an ASE with different codec in this case. * Allows upper level to only QoS some of the streams. Reconfiguring ASE in QOS/CONFIG state with different codec here results to need_reconfig=true state, where ASE and stream configs do not match, and upper level needs to do bt_bap_stream_config() to sync them.
Diffstat
| M | src/shared/bap.c | | | 133 | ++++++++++++++++++++++++++++++++++++++++- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| M | src/shared/bap.h | | | 3 | +++ |
2 files changed, 89 insertions(+), 47 deletions(-)