Skip to content

Commit

Permalink
Bluetooth: ascs: Handle CIS disconnection in non-releasing state
Browse files Browse the repository at this point in the history
Unbind ISO when goint to idle state if there's still reference kept.
It may happen that we get CIS disconnection being in non-releasing
state, so we have to handle that case. This fixes regression that was
introduced in 3fa4569.

Signed-off-by: Mariusz Skamra <[email protected]>
  • Loading branch information
MariuszSkamra authored and carlescufi committed Nov 7, 2022
1 parent 44d9f2c commit 9054435
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions subsys/bluetooth/audio/ascs.c
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,9 @@ static void ase_process(struct k_work *work)
if (ep_state == BT_AUDIO_EP_STATE_RELEASING) {
if (ep->iso == NULL ||
ep->iso->chan.state == BT_ISO_STATE_DISCONNECTED) {
if (ep->iso != NULL) {
bt_audio_iso_unbind_ep(ep->iso, ep);
}
bt_audio_stream_detach(stream);
ascs_ep_set_state(ep, BT_AUDIO_EP_STATE_IDLE);
} else {
Expand Down

0 comments on commit 9054435

Please sign in to comment.