public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v1] bass: Fix attempting to create multiple assistant for the same stream
@ 2025-12-05 14:49 Luiz Augusto von Dentz
  2025-12-05 16:04 ` [BlueZ,v1] " bluez.test.bot
  2025-12-05 20:10 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2025-12-05 14:49 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

bt_bap_stream may change from streaming -> streaming when updating its
metadata in which case bis_src_handler would be called multiple times
for the same stream causing it to fail at g_dbus_register_interface, to
fix this adds a check if the state is already streaming then it must
have been handle already so it safe to skip calling bt_bap_parse_base.
---
 profiles/audio/bass.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/profiles/audio/bass.c b/profiles/audio/bass.c
index 20c37323bb0e..031f527be9f5 100644
--- a/profiles/audio/bass.c
+++ b/profiles/audio/bass.c
@@ -1274,6 +1274,10 @@ static void bap_state_src_changed(struct bt_bap_stream *stream,
 		data->stream = NULL;
 		break;
 	case BT_BAP_STREAM_STATE_STREAMING:
+		/* If already streaming don't attempt to parse it again */
+		if (old_state == new_state)
+			break;
+
 		base = bt_bap_stream_get_base(stream);
 		if (!base) {
 			error("Unable to read BASE of stream %p", stream);
-- 
2.52.0


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

end of thread, other threads:[~2025-12-05 20:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-05 14:49 [PATCH BlueZ v1] bass: Fix attempting to create multiple assistant for the same stream Luiz Augusto von Dentz
2025-12-05 16:04 ` [BlueZ,v1] " bluez.test.bot
2025-12-05 20:10 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth

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