* [PATCH BlueZ 0/1] bap: Wait for BIG Info report event before creating streams
@ 2024-07-09 8:59 Vlad Pruteanu
2024-07-09 8:59 ` [PATCH BlueZ 1/1] " Vlad Pruteanu
2024-07-09 19:03 ` [PATCH BlueZ 0/1] " patchwork-bot+bluetooth
0 siblings, 2 replies; 4+ messages in thread
From: Vlad Pruteanu @ 2024-07-09 8:59 UTC (permalink / raw)
To: linux-bluetooth
Cc: mihai-octavian.urzica, iulia.tanasescu, andrei.istodorescu,
luiz.dentz, Vlad Pruteanu
This makes it so that stream for each BIS is created after BIG
Info report is received. This ensures that when the stream is
created the encryption field is correctly set.
Vlad Pruteanu (1):
bap: Wait for BIG Info report event before creating streams
profiles/audio/bap.c | 27 ++++++++++++++++++++++++---
1 file changed, 24 insertions(+), 3 deletions(-)
--
2.40.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH BlueZ 1/1] bap: Wait for BIG Info report event before creating streams
2024-07-09 8:59 [PATCH BlueZ 0/1] bap: Wait for BIG Info report event before creating streams Vlad Pruteanu
@ 2024-07-09 8:59 ` Vlad Pruteanu
2024-07-09 10:40 ` bluez.test.bot
2024-07-09 19:03 ` [PATCH BlueZ 0/1] " patchwork-bot+bluetooth
1 sibling, 1 reply; 4+ messages in thread
From: Vlad Pruteanu @ 2024-07-09 8:59 UTC (permalink / raw)
To: linux-bluetooth
Cc: mihai-octavian.urzica, iulia.tanasescu, andrei.istodorescu,
luiz.dentz, Vlad Pruteanu
This makes it so that stream for each BIS is created after BIG
Info report is received. This ensures that when the stream is
created the encryption field is correctly set.
---
profiles/audio/bap.c | 27 ++++++++++++++++++++++++---
1 file changed, 24 insertions(+), 3 deletions(-)
diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index e82a25382..afa938091 100644
--- a/profiles/audio/bap.c
+++ b/profiles/audio/bap.c
@@ -134,6 +134,7 @@ struct bap_bcast_pa_req {
struct btd_service *service;
struct bap_setup *setup;
} data;
+ unsigned int io_id; /* io_id for BIG Info watch */
};
static struct queue *sessions;
@@ -1220,7 +1221,8 @@ fail:
return ret;
}
-static void iso_pa_sync_confirm_cb(GIOChannel *io, void *user_data)
+static gboolean big_info_report_cb(GIOChannel *io, GIOCondition cond,
+ gpointer user_data)
{
GError *err = NULL;
struct bap_bcast_pa_req *req = user_data;
@@ -1228,7 +1230,7 @@ static void iso_pa_sync_confirm_cb(GIOChannel *io, void *user_data)
struct bt_iso_base base;
struct bt_iso_qos qos;
- DBG("PA Sync done");
+ DBG("BIG Info received");
bt_io_get(io, &err,
BT_IO_OPT_BASE, &base,
@@ -1238,7 +1240,8 @@ static void iso_pa_sync_confirm_cb(GIOChannel *io, void *user_data)
error("%s", err->message);
g_error_free(err);
g_io_channel_shutdown(io, TRUE, NULL);
- return;
+ req->io_id = 0;
+ return FALSE;
}
/* Close the io and remove the queue request for another PA Sync */
@@ -1255,7 +1258,21 @@ static void iso_pa_sync_confirm_cb(GIOChannel *io, void *user_data)
service_set_connecting(req->data.service);
queue_remove(data->adapter->bcast_pa_requests, req);
+ req->io_id = 0;
free(req);
+
+ return FALSE;
+}
+
+static void iso_pa_sync_confirm_cb(GIOChannel *io, void *user_data)
+{
+ struct bap_bcast_pa_req *req = user_data;
+ /* PA Sync was established, wait for BIG Info report so that the
+ * encryption flag is also available.
+ */
+ DBG("PA Sync done");
+ req->io_id = g_io_add_watch(io, G_IO_OUT, big_info_report_cb,
+ user_data);
}
static bool match_data_bap_data(const void *data, const void *match_data)
@@ -3177,6 +3194,10 @@ static void bap_bcast_remove(struct btd_service *service)
*/
req = queue_remove_if(data->adapter->bcast_pa_requests,
match_service, service);
+ if (req->io_id) {
+ g_source_remove(req->io_id);
+ req->io_id = 0;
+ }
free(req);
bap_data_remove(data);
--
2.40.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: bap: Wait for BIG Info report event before creating streams
2024-07-09 8:59 ` [PATCH BlueZ 1/1] " Vlad Pruteanu
@ 2024-07-09 10:40 ` bluez.test.bot
0 siblings, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2024-07-09 10:40 UTC (permalink / raw)
To: linux-bluetooth, vlad.pruteanu
[-- Attachment #1: Type: text/plain, Size: 948 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=869563
---Test result---
Test Summary:
CheckPatch PASS 0.50 seconds
GitLint PASS 0.31 seconds
BuildEll PASS 24.49 seconds
BluezMake PASS 1679.28 seconds
MakeCheck PASS 12.94 seconds
MakeDistcheck PASS 176.35 seconds
CheckValgrind PASS 250.71 seconds
CheckSmatch PASS 351.87 seconds
bluezmakeextell PASS 119.10 seconds
IncrementalBuild PASS 1444.30 seconds
ScanBuild PASS 998.47 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH BlueZ 0/1] bap: Wait for BIG Info report event before creating streams
2024-07-09 8:59 [PATCH BlueZ 0/1] bap: Wait for BIG Info report event before creating streams Vlad Pruteanu
2024-07-09 8:59 ` [PATCH BlueZ 1/1] " Vlad Pruteanu
@ 2024-07-09 19:03 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+bluetooth @ 2024-07-09 19:03 UTC (permalink / raw)
To: Vlad Pruteanu
Cc: linux-bluetooth, mihai-octavian.urzica, iulia.tanasescu,
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, 9 Jul 2024 11:59:02 +0300 you wrote:
> This makes it so that stream for each BIS is created after BIG
> Info report is received. This ensures that when the stream is
> created the encryption field is correctly set.
>
> Vlad Pruteanu (1):
> bap: Wait for BIG Info report event before creating streams
>
> [...]
Here is the summary with links:
- [BlueZ,1/1] bap: Wait for BIG Info report event before creating streams
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=2748c60a2c6b
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:[~2024-07-09 19:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-09 8:59 [PATCH BlueZ 0/1] bap: Wait for BIG Info report event before creating streams Vlad Pruteanu
2024-07-09 8:59 ` [PATCH BlueZ 1/1] " Vlad Pruteanu
2024-07-09 10:40 ` bluez.test.bot
2024-07-09 19:03 ` [PATCH BlueZ 0/1] " 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;
as well as URLs for NNTP newsgroup(s).