Skip to content

Commit

Permalink
bluetooth: Add BT_ISO_SYNC_TIMEOUT
Browse files Browse the repository at this point in the history
This defines BT_ISO_SYNC_TIMEOUT(20 sec) which shall be considered the
default sync_timeout and make all instance previously hardcoding a
value to use it.
  • Loading branch information
Vudentz committed Mar 8, 2024
1 parent 19f8fcd commit aa7a814
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions lib/bluetooth.h
Expand Up @@ -150,6 +150,8 @@ struct bt_voice {
#define BT_ISO_QOS_BIG_UNSET 0xff
#define BT_ISO_QOS_BIS_UNSET 0xff

#define BT_ISO_SYNC_TIMEOUT 0x07d0 /* 20 secs */

#define BT_ISO_QOS_GROUP_UNSET 0xff
#define BT_ISO_QOS_STREAM_UNSET 0xff

Expand Down
6 changes: 3 additions & 3 deletions profiles/audio/bap.c
Expand Up @@ -138,7 +138,7 @@ static struct bt_iso_qos bap_sink_pa_qos = {
.bcast = {
.options = 0x00,
.skip = 0x0000,
.sync_timeout = 0x4000,
.sync_timeout = BT_ISO_SYNC_TIMEOUT,
.sync_cte_type = 0x00,
/* TODO: The following parameters are not needed for PA Sync.
* They will be removed when the kernel checks will be removed.
Expand All @@ -148,8 +148,8 @@ static struct bt_iso_qos bap_sink_pa_qos = {
.encryption = 0x00,
.bcode = {0x00},
.mse = 0x00,
.timeout = 0x4000,
.sync_factor = 0x07,
.timeout = BT_ISO_SYNC_TIMEOUT,
.sync_factor = 0x07,
.packing = 0x00,
.framing = 0x00,
.in = {
Expand Down
4 changes: 2 additions & 2 deletions src/shared/bass.c
Expand Up @@ -111,10 +111,10 @@ static struct bt_iso_qos default_qos = {
.bcode = {0x00},
.options = 0x00,
.skip = 0x0000,
.sync_timeout = 0x4000,
.sync_timeout = BT_ISO_SYNC_TIMEOUT,
.sync_cte_type = 0x00,
.mse = 0x00,
.timeout = 0x4000,
.timeout = BT_ISO_SYNC_TIMEOUT,
}
};

Expand Down
4 changes: 2 additions & 2 deletions tools/iso-tester.c
Expand Up @@ -264,10 +264,10 @@
.bcode = _bcode, \
.options = 0x00, \
.skip = 0x0000, \
.sync_timeout = 0x4000, \
.sync_timeout = BT_ISO_SYNC_TIMEOUT, \
.sync_cte_type = 0x00, \
.mse = 0x00, \
.timeout = 0x4000, \
.timeout = BT_ISO_SYNC_TIMEOUT, \
}, \
}

Expand Down

0 comments on commit aa7a814

Please sign in to comment.