* [PATCH BlueZ 0/1] bass: Add support for selecting multiple transports @ 2025-03-25 15:52 Iulia Tanasescu 2025-03-25 15:52 ` [PATCH BlueZ 1/1] " Iulia Tanasescu 2025-03-26 15:10 ` [PATCH BlueZ 0/1] " patchwork-bot+bluetooth 0 siblings, 2 replies; 4+ messages in thread From: Iulia Tanasescu @ 2025-03-25 15:52 UTC (permalink / raw) To: linux-bluetooth Cc: claudia.rosu, mihai-octavian.urzica, andrei.istodorescu, luiz.dentz, Iulia Tanasescu This adds support for the BAP Scan Delegator to select multiple transports added by a Broadcast Assistant and to acquire them one by one to receive the streams. This provides a fix for https://github.com/bluez/bluez/issues/1139 Iulia Tanasescu (1): bass: Add support for selecting multiple transports profiles/audio/bass.c | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) -- 2.43.0 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH BlueZ 1/1] bass: Add support for selecting multiple transports 2025-03-25 15:52 [PATCH BlueZ 0/1] bass: Add support for selecting multiple transports Iulia Tanasescu @ 2025-03-25 15:52 ` Iulia Tanasescu 2025-03-25 17:14 ` bluez.test.bot 2025-03-26 15:10 ` [PATCH BlueZ 0/1] " patchwork-bot+bluetooth 1 sibling, 1 reply; 4+ messages in thread From: Iulia Tanasescu @ 2025-03-25 15:52 UTC (permalink / raw) To: linux-bluetooth Cc: claudia.rosu, mihai-octavian.urzica, andrei.istodorescu, luiz.dentz, Iulia Tanasescu This adds support for the BAP Scan Delegator to select multiple transports added by a Broadcast Assistant and to acquire them one by one to receive the streams. Fixes: https://github.com/bluez/bluez/issues/1139 --- profiles/audio/bass.c | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/profiles/audio/bass.c b/profiles/audio/bass.c index d299791c8..c36f43277 100644 --- a/profiles/audio/bass.c +++ b/profiles/audio/bass.c @@ -297,25 +297,15 @@ static bool link_io_unset(const void *data, const void *match_data) return !bt_bap_stream_get_io(link); } -static bool setup_find_enabling(const void *data, const void *match_data) -{ - const struct bass_setup *setup = data; - - return (bt_bap_stream_get_state(setup->stream) == - BT_BAP_STREAM_STATE_ENABLING); -} - static void connect_cb(GIOChannel *io, GError *err, void *user_data) { - struct bass_delegator *dg = user_data; - struct bass_setup *setup; + struct bass_setup *setup = user_data; struct bt_bap_stream *stream; struct queue *links; int fd; DBG(""); - setup = queue_find(dg->setups, setup_find_enabling, NULL); if (!setup || !setup->stream) return; @@ -333,6 +323,15 @@ static void connect_cb(GIOChannel *io, GError *err, void *user_data) } } +static bool link_enabled(const void *data, const void *match_data) +{ + struct bt_bap_stream *stream = (struct bt_bap_stream *)data; + uint8_t state = bt_bap_stream_get_state(stream); + + return ((state == BT_BAP_STREAM_STATE_ENABLING) || + bt_bap_stream_get_io(stream)); +} + static void bap_state_changed(struct bt_bap_stream *stream, uint8_t old_state, uint8_t new_state, void *user_data) { @@ -358,6 +357,23 @@ static void bap_state_changed(struct bt_bap_stream *stream, uint8_t old_state, switch (new_state) { case BT_BAP_STREAM_STATE_ENABLING: + links = bt_bap_stream_io_get_links(stream); + + if (bt_bap_stream_get_io(stream) || + queue_find(links, link_enabled, NULL)) + /* The first enabled link will create and set fds + * for all links. + * + * If the stream io has already been set, the stream + * will automatically be started once all state_changed + * callbacks are notified. + * + * If there is any other linked stream that has already + * been enabled, the stream fd will be set once it is + * notified from kernel and the stream will be started. + */ + break; + iso_bc_addr.bc_bdaddr_type = btd_device_get_bdaddr_type(dg->device); memcpy(&iso_bc_addr.bc_bdaddr, device_get_address(dg->device), @@ -365,8 +381,6 @@ static void bap_state_changed(struct bt_bap_stream *stream, uint8_t old_state, append_stream(stream, &iso_bc_addr); - links = bt_bap_stream_io_get_links(stream); - queue_foreach(links, append_stream, &iso_bc_addr); bt_bap_qos_to_iso_qos(bap_qos, &qos); @@ -380,7 +394,7 @@ static void bap_state_changed(struct bt_bap_stream *stream, uint8_t old_state, } if (!bt_io_bcast_accept(dg->io, - connect_cb, dg, NULL, &gerr, + connect_cb, setup, NULL, &gerr, BT_IO_OPT_ISO_BC_NUM_BIS, iso_bc_addr.bc_num_bis, BT_IO_OPT_ISO_BC_BIS, iso_bc_addr.bc_bis, BT_IO_OPT_INVALID)) { -- 2.43.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: bass: Add support for selecting multiple transports 2025-03-25 15:52 ` [PATCH BlueZ 1/1] " Iulia Tanasescu @ 2025-03-25 17:14 ` bluez.test.bot 0 siblings, 0 replies; 4+ messages in thread From: bluez.test.bot @ 2025-03-25 17:14 UTC (permalink / raw) To: linux-bluetooth, iulia.tanasescu [-- Attachment #1: Type: text/plain, Size: 1260 bytes --] 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/project/bluetooth/list/?series=947208 ---Test result--- Test Summary: CheckPatch PENDING 0.20 seconds GitLint PENDING 0.25 seconds BuildEll PASS 20.74 seconds BluezMake PASS 1491.75 seconds MakeCheck PASS 13.29 seconds MakeDistcheck PASS 159.23 seconds CheckValgrind PASS 215.50 seconds CheckSmatch PASS 285.34 seconds bluezmakeextell PASS 98.71 seconds IncrementalBuild PENDING 0.30 seconds ScanBuild PASS 875.13 seconds Details ############################## Test: CheckPatch - PENDING Desc: Run checkpatch.pl script Output: ############################## Test: GitLint - PENDING Desc: Run gitlint Output: ############################## Test: IncrementalBuild - PENDING Desc: Incremental build with the patches in the series Output: --- Regards, Linux Bluetooth ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH BlueZ 0/1] bass: Add support for selecting multiple transports 2025-03-25 15:52 [PATCH BlueZ 0/1] bass: Add support for selecting multiple transports Iulia Tanasescu 2025-03-25 15:52 ` [PATCH BlueZ 1/1] " Iulia Tanasescu @ 2025-03-26 15:10 ` patchwork-bot+bluetooth 1 sibling, 0 replies; 4+ messages in thread From: patchwork-bot+bluetooth @ 2025-03-26 15:10 UTC (permalink / raw) To: Iulia Tanasescu Cc: linux-bluetooth, claudia.rosu, mihai-octavian.urzica, andrei.istodorescu, luiz.dentz Hello: This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>: On Tue, 25 Mar 2025 17:52:10 +0200 you wrote: > This adds support for the BAP Scan Delegator to select multiple transports > added by a Broadcast Assistant and to acquire them one by one to receive > the streams. > > This provides a fix for https://github.com/bluez/bluez/issues/1139 > > Iulia Tanasescu (1): > bass: Add support for selecting multiple transports > > [...] Here is the summary with links: - [BlueZ,1/1] bass: Add support for selecting multiple transports https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=de22ef2bac4a You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-03-26 15:09 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-03-25 15:52 [PATCH BlueZ 0/1] bass: Add support for selecting multiple transports Iulia Tanasescu 2025-03-25 15:52 ` [PATCH BlueZ 1/1] " Iulia Tanasescu 2025-03-25 17:14 ` bluez.test.bot 2025-03-26 15:10 ` [PATCH BlueZ 0/1] " patchwork-bot+bluetooth
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.