Parent: 1d3907561f8e67a71b378ecfd2c770a5fc1766d5
Author: Pauli Virtanen <pav@iki.fi>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2025-06-09 19:37:52
Tree: 2949aa4612d769b7ab357159cd17c0c4b8154024
bap: delay QoS & IO creation if CIG is busy or setups configuring Unicast Client IO creation / activation should be done synchronously for whole adapter, as active CIG has to be removed before it can be reconfigured (Core v6.0 Sec 4.5.14.3). Some adapters support only one active CIG. Move related logic to bap_update_cig*() which does QoS and IO creation as needed by current state. If CIG is active or setups are being configured or closed, delay transitions to QoS and IO recreation until that completes. Also delay activating CIG (= enabling CIS) until setups have finished readying or closing. Operations are delayed within the same CIG, with the exception that streams with unassigned CIG delay every CIG. This is because such streams are likely meant to go to some existing CIG, so we must wait them to be configurable before asking kernel to assign IDs. Fixes race conditions: * setup starts readying while CIG is active * CIG is activated while a setup is readying * new stream creates IO before old stream IO is recreated These result to kernel assigning new streams to a different CIG (problematic on controllers that can do only one) or CIS ID conflicts.
Diffstat
| M | profiles/audio/bap.c | | | 346 | ++++++++++++++++++++++++++++++++++++++++- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
1 files changed, 261 insertions(+), 85 deletions(-)