Skip to contentSkip to conversation

bap: Reset broadcast source stream when ISO io is lost

PATCH Superseded Simon Mikuda 2 participants 2 messages Nov 22 Bluetooth drivers

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bap: Reset broadcast source stream when ISO io is lost

When a broadcast source transport is released while its ISO connect is in flight, the late callback still moves the stream to STREAMING and the io closes right after. Nothing resets the stream, so every later Acquire() fails with "Request Acquire Reply Input/output error" and the broadcast shows as active with no BIG on air, until bluetoothd restarts.

Move such a stream back to CONFIG.

Steps to reproduce:
1. Start and stop a broadcast source (a PipeWire BAP broadcast sink node) a few times in quick succession.
2. The broadcast shows as active, but nothing is on air, and stopping and starting it again doesn't help until bluetoothd restarts.

Assisted-by Claude:claude-opus-5-5
---
 profiles/audio/bap.c | 7 +++++++
 1 file changed, 7 insertions(+)
profiles/audio/bap.c +7 -0
index 457ba5de8..0731e1f23 100644
@@ -2919,6 +2919,13 @@ static void setup_io_disconnected(int cond, void *user_data)
 
 	setup_io_close(setup, NULL);
 
+	if (bt_bap_pac_get_type(setup->ep->lpac) == BT_BAP_BCAST_SOURCE &&
+		bt_bap_stream_get_state(setup->stream) ==
+					BT_BAP_STREAM_STATE_STREAMING) {
+		DBG("stream %p: io lost while streaming", setup->stream);
+		bt_bap_stream_disable(setup->stream, false, NULL, NULL);
+	}
+
 	bap_update_cigs(setup->ep->data);
 }
 

base-commit: 1adfe662efeff12997df9ddd0960dbd0de9c8ea7

Signature · 1 line
2.43.0
#1 lore raw

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/series/1218593/

---Test result---

Test Summary:

CheckPatch                    PASS      0.38 seconds
GitLint                       PASS      0.27 seconds
BuildEll                      PASS      15.24 seconds
BluezMake                     PASS      202.91 seconds
MakeCheck                     PASS      3.41 seconds
MakeDistcheck                 PASS      113.84 seconds
CheckValgrind                 PASS      115.44 seconds
CheckSmatch                   PASS      219.95 seconds
bluezmakeextell               PASS      76.92 seconds
TestFunctional                PASS      998.31 seconds
IncrementalBuild              PASS      214.25 seconds
ScanBuild                     PASS      740.98 seconds

https://github.com/bluez/bluez/pull/2874

---
Regards,
Linux Bluetooth