Open Thalley opened 4 months ago
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.
Describe the bug
bt_cap_initiator_unicast_audio_stop
has been implemented to release a stream, and when the stream goes into the idle or codec configured state (as per ASCS) then the next stream is released.Several remote platforms does not allow fully releasing a stream that still connected to a CIS, such as the case where 2 streams (sink and source) share a single ASE. This behavior is based on the following test from BAP:
And the text
So by the BAP spec, it's clearly hinted (and somewhat required) that the CIS is terminated as part of releasing a stream, which is not what we do when we release streams as part of
bt_cap_initiator_unicast_audio_stop
.The CAP spec allows the initiator to use either disable or release for the unicast audio stop procedure:
So the issue may be fixed by simply using
disable
instead ofrelease
. This would also fix another issue which is that once a stream goes from e.g. enabling -> codec configured, then it cannot go back into QoS Configured, as the BAP spec requires all streams in the CIG to be QoS Configured at the same time, which is not possible if one is in the e.g. streaming state and the other in the Codec Configured state.To Reproduce Cannot be locally produced in Zephyr as we allow it (unless rejected by the application). Information about the products that does not allow it cannot be disclosed either, as this was found during a Bluetooth SIG UPF event.
Expected behavior The
bt_cap_initiator_unicast_audio_stop
should use thedisable
operation instead of therelease
. We then either need to add an additionalbt_cap_initiator_unicast_audio_release
to allow for releasing streams that do not have a CIS, or dorelease
afterdisable
for streams that can be released. This could be part of thestop
parameters so it can be controlled by the application.In the end the result should be that we never attempt to release a stream that will end up in the
releasing
state because the CIS cannot be disconnected.The
bt_cap_initiator_unicast_audio_start
also need to be updated to support streams in other states, such as QoS Configured (the resulting state ofdisable
) so it's possible to dobt_cap_initiator_unicast_audio_start
after abt_cap_initiator_unicast_audio_stop
.Impact It can be worked around by the application by using the BAP API, but that is less than ideal, and from a CAP perspective this is can be a showstopper.
Logs and console output N/A
Environment (please complete the following information):
Additional context N/A