From 9efc138e98080e1e3f27e56c30cf289e014d5302 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Fri, 28 Feb 2025 12:40:26 -0500 Subject: [PATCH] shared/bap: Fix state transition of sink for disable operation This fixes a regression introduced by 173045553c15 ("bap: Fix not generating releasing state") where the Disable operation no long caused the transition to QoS configured for Sink, as per ASCS spec Table 3.2: ASE state machine transitions that state transition is required. --- src/shared/bap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shared/bap.c b/src/shared/bap.c index f7e42fc15..208fc1bf2 100644 --- a/src/shared/bap.c +++ b/src/shared/bap.c @@ -1965,6 +1965,9 @@ static uint8_t stream_disable(struct bt_bap_stream *stream, struct iovec *rsp) /* Sink can autonomously transit to QOS while source needs to go to * Disabling until BT_ASCS_STOP is received. */ + if (stream->ep->dir == BT_BAP_SINK) + stream_set_state(stream, BT_BAP_STREAM_STATE_QOS); + if (stream->ep->dir == BT_BAP_SOURCE) stream_set_state(stream, BT_BAP_STREAM_STATE_DISABLING); -- 2.47.3