Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ] shared/bap: Transition ASE to QoS Configured on CIS loss
@ 2026-06-09 21:11 Simon Mikuda
  2026-06-09 22:15 ` Pauli Virtanen
  2026-06-09 23:02 ` [BlueZ] " bluez.test.bot
  0 siblings, 2 replies; 3+ messages in thread
From: Simon Mikuda @ 2026-06-09 21:11 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Simon Mikuda

stream_io_disconnected() only handled the Releasing state, leaving
Enabling, Streaming and Disabling ASEs stuck when the CIS was lost
unexpectedly. The ASE shall autonomously move to QoS Configured on loss
of the CIS and notify the peer; add that transition.

Fixes PTS test BAP/USR/SCC/BV-167-C
---
 src/shared/bap.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/shared/bap.c b/src/shared/bap.c
index deb85b264..350ed53d9 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -6779,6 +6779,14 @@ static bool stream_io_disconnected(struct io *io, void *user_data)
 	if (stream->ep->state == BT_ASCS_ASE_STATE_RELEASING)
 		stream_set_state(stream, BT_BAP_STREAM_STATE_CONFIG);
 
+	/* On loss of the CIS the ASE shall autonomously transition to QoS
+	 * Configured and notify the peer.
+	 */
+	if (stream->ep->state == BT_ASCS_ASE_STATE_STREAMING ||
+			stream->ep->state == BT_ASCS_ASE_STATE_ENABLING ||
+			stream->ep->state == BT_ASCS_ASE_STATE_DISABLING)
+		stream_set_state(stream, BT_BAP_STREAM_STATE_QOS);
+
 	bt_bap_stream_set_io(stream, -1);
 	return false;
 }
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-06-09 23:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-09 21:11 [PATCH BlueZ] shared/bap: Transition ASE to QoS Configured on CIS loss Simon Mikuda
2026-06-09 22:15 ` Pauli Virtanen
2026-06-09 23:02 ` [BlueZ] " bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox