Diff between ff07f10ee4da3d16b3be84c0acff231d2b152948 and 3db67f12c69e8914d3e47ff727b6d992ff31ccca

Changed Files

File Additions Deletions Status
lib/bluetooth.h +12 -0 modified
profiles/audio/bap.c +1 -1 modified

Full Patch

diff --git a/lib/bluetooth.h b/lib/bluetooth.h
index 32e5867..9b6b54d 100644
--- a/lib/bluetooth.h
+++ b/lib/bluetooth.h
@@ -154,6 +154,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 a561c44..f382b43 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;