From: Iulia Tanasescu <iulia.tanasescu@nxp.com>
To: linux-bluetooth@vger.kernel.org
Cc: claudia.rosu@nxp.com, mihai-octavian.urzica@nxp.com,
andrei.istodorescu@nxp.com, luiz.dentz@gmail.com,
Iulia Tanasescu <iulia.tanasescu@nxp.com>
Subject: [PATCH BlueZ 1/3] lib: Add BT_ISO_SYNC_FACTOR
Date: Fri, 13 Dec 2024 13:31:11 +0200 [thread overview]
Message-ID: <20241213113113.64818-2-iulia.tanasescu@nxp.com> (raw)
In-Reply-To: <20241213113113.64818-1-iulia.tanasescu@nxp.com>
This defines the default sync factor value to be used by ISO Broadcasters.
---
lib/bluetooth.h | 12 ++++++++++++
profiles/audio/bap.c | 2 +-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/lib/bluetooth.h b/lib/bluetooth.h
index 073ed875d..ea9adb83b 100644
--- a/lib/bluetooth.h
+++ b/lib/bluetooth.h
@@ -153,6 +153,18 @@ struct bt_voice {
#define BT_ISO_SYNC_TIMEOUT 0x07d0 /* 20 secs */
+/* For an ISO Broadcaster, this value is used to compute
+ * the desired Periodic Advertising Interval as a function
+ * of SDU interval, based on the formula:
+ *
+ * PA_Interval = SDU_Interval * sync_factor
+ *
+ * This is useful for adjusting how frequent to send PA
+ * announcements for Broadcast Sinks to discover, depending
+ * on scenario.
+ */
+#define BT_ISO_SYNC_FACTOR 0x01
+
#define BT_ISO_QOS_GROUP_UNSET 0xff
#define BT_ISO_QOS_STREAM_UNSET 0xff
diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index a561c446a..f382b43a5 100644
--- a/profiles/audio/bap.c
+++ b/profiles/audio/bap.c
@@ -847,7 +847,7 @@ static struct bap_setup *setup_new(struct bap_ep *ep)
/* Mark BIG and BIS to be auto assigned */
setup->qos.bcast.big = BT_ISO_QOS_BIG_UNSET;
setup->qos.bcast.bis = BT_ISO_QOS_BIS_UNSET;
- setup->qos.bcast.sync_factor = 0x01;
+ setup->qos.bcast.sync_factor = BT_ISO_SYNC_FACTOR;
setup->qos.bcast.sync_timeout = BT_ISO_SYNC_TIMEOUT;
setup->qos.bcast.timeout = BT_ISO_SYNC_TIMEOUT;
setup->qos_parser = setup_parse_bcast_qos;
--
2.43.0
next prev parent reply other threads:[~2024-12-13 11:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-13 11:31 [PATCH BlueZ 0/3] client/player: Make QoS sync_factor configurable Iulia Tanasescu
2024-12-13 11:31 ` Iulia Tanasescu [this message]
2024-12-13 12:35 ` bluez.test.bot
2024-12-13 11:31 ` [PATCH BlueZ 2/3] " Iulia Tanasescu
2024-12-13 11:31 ` [PATCH BlueZ 3/3] bap: Do not allow BIS QoS mismatch Iulia Tanasescu
2024-12-16 21:50 ` [PATCH BlueZ 0/3] client/player: Make QoS sync_factor configurable patchwork-bot+bluetooth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241213113113.64818-2-iulia.tanasescu@nxp.com \
--to=iulia.tanasescu@nxp.com \
--cc=andrei.istodorescu@nxp.com \
--cc=claudia.rosu@nxp.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=mihai-octavian.urzica@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.