Skip to content

Commit ba62c8d

Browse files
Thalleyaescolar
authored andcommitted
Bluetooth: BAP: Support setting different values per dir in CIG
The interval and latency for a CIG are set for each direction now, allowing applications to use e.g. 10ms for sink ASEs and 7.5ms for source ASEs. Signed-off-by: Emil Gydesen <[email protected]>
1 parent e00746f commit ba62c8d

File tree

5 files changed

+288
-81
lines changed

5 files changed

+288
-81
lines changed

include/zephyr/bluetooth/audio/bap.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,8 +1158,10 @@ struct bt_bap_unicast_group_param {
11581158
/**
11591159
* @brief Create audio unicast group.
11601160
*
1161-
* Create a new audio unicast group with one or more audio streams as a unicast client. Streams in
1162-
* a unicast group shall share the same interval, framing and latency (see @ref bt_audio_codec_qos).
1161+
* Create a new audio unicast group with one or more audio streams as a unicast client.
1162+
* All streams shall share the same framing.
1163+
* All streams in the same direction shall share the same interval and latency (see
1164+
* @ref bt_audio_codec_qos).
11631165
*
11641166
* @param[in] param The unicast group create parameters.
11651167
* @param[out] unicast_group Pointer to the unicast group created.

subsys/bluetooth/audio/bap_endpoint.h

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,27 @@ struct bt_bap_ep {
6464
struct bt_bap_broadcast_sink *broadcast_sink;
6565
};
6666

67+
struct bt_bap_unicast_group_cig_param {
68+
uint32_t c_to_p_interval;
69+
uint32_t p_to_c_interval;
70+
uint16_t c_to_p_latency;
71+
uint16_t p_to_c_latency;
72+
uint8_t framing;
73+
uint8_t packing;
74+
#if defined(CONFIG_BT_ISO_TEST_PARAMS)
75+
uint8_t c_to_p_ft;
76+
uint8_t p_to_c_ft;
77+
uint16_t iso_interval;
78+
#endif /* CONFIG_BT_ISO_TEST_PARAMS */
79+
};
80+
6781
struct bt_bap_unicast_group {
82+
/* Group-wide QoS used to create the CIG */
83+
struct bt_bap_unicast_group_cig_param cig_param;
84+
85+
/* Unicast group fields */
6886
uint8_t index;
6987
bool allocated;
70-
/* QoS used to create the CIG */
71-
const struct bt_audio_codec_qos *qos;
7288
struct bt_iso_cig *cig;
7389
/* The ISO API for CIG creation requires an array of pointers to ISO channels */
7490
struct bt_iso_chan *cis[UNICAST_GROUP_STREAM_CNT];

0 commit comments

Comments
 (0)