diff mbox series

[BlueZ,v1] shared/bap: Fix state transition of sink for disable operation

Message ID 20250228175048.3471469-1-luiz.dentz@gmail.com
State New
Headers show
Series [BlueZ,v1] shared/bap: Fix state transition of sink for disable operation | expand

Commit Message

Luiz Augusto von Dentz Feb. 28, 2025, 5:50 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

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 mbox series

Patch

diff --git a/src/shared/bap.c b/src/shared/bap.c
index f7e42fc15a81..208fc1bf2958 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);