Diff between 8e2425dc2b2553803157d4bee52261e2f4d1ae73 and 822037fe74503fe87c3dc0b11dc69f2e9efa2376

Changed Files

File Additions Deletions Status
src/shared/bap.c +9 -0 modified

Full Patch

diff --git a/src/shared/bap.c b/src/shared/bap.c
index bccbc73..40e1c97 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -6584,6 +6584,15 @@ static bool stream_io_disconnected(struct io *io, void *user_data)
 
 	DBG(stream->bap, "stream %p io disconnected", stream);
 
+	/* If the IO is for a broadcast sink has been disconnected both BIG Sync
+	 * and PA Sync have been lost so switch to idle state to cleanup the
+	 * stream.
+	 */
+	if (stream->lpac->type == BT_BAP_BCAST_SINK) {
+		stream_set_state(stream, BT_BAP_STREAM_STATE_IDLE);
+		return false;
+	}
+
 	if (stream->ep->state == BT_ASCS_ASE_STATE_RELEASING)
 		stream_set_state(stream, BT_BAP_STREAM_STATE_CONFIG);