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