From b74d30fb9f72eafb8d98f9faa4327ce1a66ff4b0 Mon Sep 17 00:00:00 2001 From: Yang Li Date: Wed, 16 Apr 2025 18:12:34 +0800 Subject: [PATCH] bass: remove the device of BIS source when modify operation. When the Client sends a modify operation and PA Sync is "Do not synchronize to PA", the BIS source information needs to be cleared. Fixes: https://github.com/bluez/bluez/issues/1145 --- profiles/audio/bass.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/profiles/audio/bass.c b/profiles/audio/bass.c index 46ac0f489..017a5aa75 100644 --- a/profiles/audio/bass.c +++ b/profiles/audio/bass.c @@ -1426,12 +1426,18 @@ static int handle_mod_src_req(struct bt_bcast_src *bcast_src, switch (sync_state) { case BT_BASS_SYNCHRONIZED_TO_PA: if (params->pa_sync == PA_SYNC_NO_SYNC) { + struct btd_adapter *adapter = + device_get_adapter(dg->device); + g_io_channel_shutdown(dg->io, TRUE, NULL); g_io_channel_unref(dg->io); dg->io = NULL; bt_bass_set_pa_sync(dg->src, BT_BASS_NOT_SYNCHRONIZED_TO_PA); + + /* Remove device of BIS source*/ + btd_adapter_remove_device(adapter, dg->device); } else { bass_update_bis_sync(dg, bcast_src); } -- 2.47.3