Bluetooth: ISO: Add advanced unicast ISO parameters
Add support for setting advanced unicast ISO parameters using the ISO test commands. This allows the host to set ISO parameters that the controller normally would handle. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
parent
588f6acbd5
commit
63aca8d868
3 changed files with 341 additions and 17 deletions
|
@ -49,6 +49,10 @@ extern "C" {
|
|||
#define BT_ISO_SDU_INTERVAL_MIN 0x0000FFU
|
||||
/** Maximum interval value in microseconds */
|
||||
#define BT_ISO_SDU_INTERVAL_MAX 0x0FFFFFU
|
||||
/** Minimum ISO interval (N * 1.25 ms) */
|
||||
#define BT_ISO_ISO_INTERVAL_MIN 0x0004U
|
||||
/** Maximum ISO interval (N * 1.25 ms) */
|
||||
#define BT_ISO_ISO_INTERVAL_MAX 0x0C80U
|
||||
/** Minimum latency value in milliseconds */
|
||||
#define BT_ISO_LATENCY_MIN 0x0005
|
||||
/** Maximum latency value in milliseconds */
|
||||
|
@ -63,8 +67,28 @@ extern "C" {
|
|||
#define BT_ISO_FRAMING_FRAMED 0x01
|
||||
/** Maximum number of isochronous channels in a single group */
|
||||
#define BT_ISO_MAX_GROUP_ISO_COUNT 0x1F
|
||||
/** Minimum SDU size */
|
||||
#define BT_ISO_MIN_SDU 0x0001
|
||||
/** Maximum SDU size */
|
||||
#define BT_ISO_MAX_SDU 0x0FFF
|
||||
/** Minimum PDU size */
|
||||
#define BT_ISO_CONNECTED_PDU_MIN 0x0000U
|
||||
/** Minimum PDU size */
|
||||
#define BT_ISO_BROADCAST_PDU_MIN 0x0001U
|
||||
/** Maximum PDU size */
|
||||
#define BT_ISO_PDU_MAX 0x00FBU
|
||||
/** Minimum burst number */
|
||||
#define BT_ISO_BN_MIN 0x01U
|
||||
/** Maximum burst number */
|
||||
#define BT_ISO_BN_MAX 0x0FU
|
||||
/** Minimum flush timeout */
|
||||
#define BT_ISO_FT_MIN 0x01U
|
||||
/** Maximum flush timeout */
|
||||
#define BT_ISO_FT_MAX 0xFFU
|
||||
/** Minimum number of subevents */
|
||||
#define BT_ISO_NSE_MIN 0x01U
|
||||
/** Maximum number of subevents */
|
||||
#define BT_ISO_NSE_MAX 0x1FU
|
||||
/** Minimum BIG sync timeout value (N * 10 ms) */
|
||||
#define BT_ISO_SYNC_TIMEOUT_MIN 0x000A
|
||||
/** Maximum BIG sync timeout value (N * 10 ms) */
|
||||
|
@ -154,7 +178,10 @@ struct bt_iso_chan_io_qos {
|
|||
* Setting BT_GAP_LE_PHY_NONE is invalid.
|
||||
*/
|
||||
uint8_t phy;
|
||||
/** Channel Retransmission Number. */
|
||||
/** @brief Channel Retransmission Number.
|
||||
*
|
||||
* This value is ignored if any advanced ISO parameters are set.
|
||||
*/
|
||||
uint8_t rtn;
|
||||
/** @brief Channel data path reference
|
||||
*
|
||||
|
@ -162,6 +189,27 @@ struct bt_iso_chan_io_qos {
|
|||
* to BT_ISO_DATA_PATH_HCI).
|
||||
*/
|
||||
struct bt_iso_chan_path *path;
|
||||
|
||||
#if defined(CONFIG_BT_ISO_ADVANCED)
|
||||
/** @brief Maximum PDU size
|
||||
*
|
||||
* Maximum size, in octets, of the payload from link layer to link
|
||||
* layer.
|
||||
*
|
||||
* Value range @ref BT_ISO_CONNECTED_PDU_MIN to @ref BT_ISO_PDU_MAX for
|
||||
* connected ISO.
|
||||
*
|
||||
* Value range @ref BT_ISO_BROADCAST_PDU_MIN to @ref BT_ISO_PDU_MAX for
|
||||
* broadcast ISO.
|
||||
*/
|
||||
uint16_t max_pdu;
|
||||
|
||||
/** @brief Burst number
|
||||
*
|
||||
* Value range @ref BT_ISO_BN_MIN to @ref BT_ISO_BN_MAX.
|
||||
*/
|
||||
uint8_t burst_number;
|
||||
#endif /* CONFIG_BT_ISO_ADVANCED */
|
||||
};
|
||||
|
||||
/** @brief ISO Channel QoS structure. */
|
||||
|
@ -182,6 +230,16 @@ struct bt_iso_chan_qos {
|
|||
* isochronous transmitter.
|
||||
*/
|
||||
struct bt_iso_chan_io_qos *tx;
|
||||
|
||||
#if defined(CONFIG_BT_ISO_ADVANCED)
|
||||
/** @brief Number of subevents
|
||||
*
|
||||
* Maximum number of subevents in each CIS or BIS event.
|
||||
*
|
||||
* Value range @ref BT_ISO_NSE_MIN to @ref BT_ISO_NSE_MAX.
|
||||
*/
|
||||
uint8_t num_subevents;
|
||||
#endif /* CONFIG_BT_ISO_ADVANCED */
|
||||
};
|
||||
|
||||
/** @brief ISO Channel Data Path structure. */
|
||||
|
@ -276,6 +334,8 @@ struct bt_iso_cig_param {
|
|||
/** @brief Channel Latency in ms.
|
||||
*
|
||||
* Value range BT_ISO_LATENCY_MIN - BT_ISO_LATENCY_MAX.
|
||||
*
|
||||
* This value is ignored if any advanced ISO parameters are set.
|
||||
*/
|
||||
uint16_t latency;
|
||||
|
||||
|
@ -300,6 +360,36 @@ struct bt_iso_cig_param {
|
|||
* BT_ISO_FRAMING_FRAMED for framed.
|
||||
*/
|
||||
uint8_t framing;
|
||||
|
||||
#if defined(CONFIG_BT_ISO_ADVANCED)
|
||||
/** @brief Central to Peripheral flush timeout
|
||||
*
|
||||
* The flush timeout in multiples of ISO_Interval for each payload sent
|
||||
* from the Central to Peripheral.
|
||||
*
|
||||
* Value range from @ref BT_ISO_FT_MIN to @ref BT_ISO_FT_MAX
|
||||
*/
|
||||
uint8_t c_to_p_ft;
|
||||
|
||||
/** @brief Peripheral to Central flush timeout
|
||||
*
|
||||
* The flush timeout in multiples of ISO_Interval for each payload sent
|
||||
* from the Peripheral to Central.
|
||||
*
|
||||
* Value range from @ref BT_ISO_FT_MIN to @ref BT_ISO_FT_MAX.
|
||||
*/
|
||||
uint8_t p_to_c_ft;
|
||||
|
||||
/** @brief ISO interval
|
||||
*
|
||||
* Time between consecutive CIS anchor points.
|
||||
*
|
||||
* Value range from @ref BT_ISO_ISO_INTERVAL_MIN to
|
||||
* @ref BT_ISO_ISO_INTERVAL_MAX.
|
||||
*/
|
||||
uint16_t iso_interval;
|
||||
#endif /* CONFIG_BT_ISO_ADVANCED */
|
||||
|
||||
};
|
||||
|
||||
/** ISO connection parameters structure */
|
||||
|
|
|
@ -114,6 +114,14 @@ config BT_ISO_RX_MTU
|
|||
help
|
||||
Maximum MTU for Isochronous channels RX buffers.
|
||||
|
||||
config BT_ISO_ADVANCED
|
||||
bool "Advanced ISO parameters"
|
||||
help
|
||||
Enabling advanced ISO parameters will allow the use of the ISO test
|
||||
parameters for creating a CIG or a BIG. These test parameters were
|
||||
intended for testing, but can be used to allow the host to set more
|
||||
settings that are otherwise usually controlled by the controller.
|
||||
|
||||
if BT_ISO_UNICAST
|
||||
|
||||
config BT_ISO_MAX_CIG
|
||||
|
|
|
@ -815,21 +815,55 @@ int bt_iso_chan_send(struct bt_iso_chan *chan, struct net_buf *buf,
|
|||
|
||||
#if defined(CONFIG_BT_ISO_CENTRAL) || defined(CONFIG_BT_ISO_BROADCASTER)
|
||||
static bool valid_chan_io_qos(const struct bt_iso_chan_io_qos *io_qos,
|
||||
bool is_tx)
|
||||
bool is_tx, bool is_broadcast, bool advanced)
|
||||
{
|
||||
const size_t max_mtu = (is_tx ? CONFIG_BT_ISO_TX_MTU : CONFIG_BT_ISO_RX_MTU);
|
||||
const size_t max_sdu = MIN(max_mtu, BT_ISO_MAX_SDU);
|
||||
|
||||
if (io_qos->sdu > max_sdu) {
|
||||
LOG_DBG("sdu (%u) shall be smaller than %zu", io_qos->sdu, max_sdu);
|
||||
LOG_DBG("sdu (%u) shall be smaller or equal to %zu", io_qos->sdu, max_sdu);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (io_qos->phy > BT_GAP_LE_PHY_CODED) {
|
||||
LOG_DBG("Invalid phy %u", io_qos->phy);
|
||||
if (!IN_RANGE(io_qos->phy, BT_GAP_LE_PHY_1M, BT_GAP_LE_PHY_CODED)) {
|
||||
LOG_DBG("Invalid PHY %u", io_qos->phy);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_BT_ISO_ADVANCED)
|
||||
if (advanced) {
|
||||
if (IS_ENABLED(CONFIG_BT_ISO_BROADCASTER) && is_broadcast) {
|
||||
if (!IN_RANGE(io_qos->max_pdu,
|
||||
BT_ISO_BROADCAST_PDU_MIN,
|
||||
BT_ISO_PDU_MAX)) {
|
||||
LOG_DBG("Invalid PDU %u", io_qos->max_pdu);
|
||||
|
||||
return false;
|
||||
}
|
||||
} else if (IS_ENABLED(CONFIG_BT_ISO_CENTRAL)) {
|
||||
if (!IN_RANGE(io_qos->max_pdu,
|
||||
BT_ISO_CONNECTED_PDU_MIN,
|
||||
BT_ISO_PDU_MAX)) {
|
||||
LOG_DBG("Invalid PDU %u", io_qos->max_pdu);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!IN_RANGE(io_qos->burst_number,
|
||||
BT_ISO_BN_MIN,
|
||||
BT_ISO_BN_MAX)) {
|
||||
LOG_DBG("Invalid BN %u", io_qos->burst_number);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#else
|
||||
ARG_UNUSED(advanced);
|
||||
#endif /* CONFIG_BT_ISO_ADVANCED */
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif /* CONFIG_BT_ISO_CENTRAL || CONFIG_BT_ISO_BROADCASTER */
|
||||
|
@ -1399,10 +1433,19 @@ static void bt_iso_remove_data_path(struct bt_conn *iso)
|
|||
}
|
||||
}
|
||||
|
||||
static bool valid_chan_qos(const struct bt_iso_chan_qos *qos)
|
||||
static bool valid_chan_qos(const struct bt_iso_chan_qos *qos, bool advanced)
|
||||
{
|
||||
#if defined(CONFIG_BT_ISO_ADVANCED)
|
||||
if (advanced &&
|
||||
!IN_RANGE(qos->num_subevents, BT_ISO_NSE_MIN, BT_ISO_NSE_MAX)) {
|
||||
LOG_DBG("Invalid NSE: %u", qos->num_subevents);
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif /* CONFIG_BT_ISO_ADVANCED */
|
||||
|
||||
if (qos->rx != NULL) {
|
||||
if (!valid_chan_io_qos(qos->rx, false)) {
|
||||
if (!valid_chan_io_qos(qos->rx, false, false, advanced)) {
|
||||
LOG_DBG("Invalid rx qos");
|
||||
return false;
|
||||
}
|
||||
|
@ -1412,7 +1455,7 @@ static bool valid_chan_qos(const struct bt_iso_chan_qos *qos)
|
|||
}
|
||||
|
||||
if (qos->tx != NULL) {
|
||||
if (!valid_chan_io_qos(qos->tx, true)) {
|
||||
if (!valid_chan_io_qos(qos->tx, true, false, advanced)) {
|
||||
LOG_DBG("Invalid tx qos");
|
||||
return false;
|
||||
}
|
||||
|
@ -1526,6 +1569,138 @@ static struct net_buf *hci_le_set_cig_params(const struct bt_iso_cig *cig,
|
|||
return rsp;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_BT_ISO_ADVANCED)
|
||||
static struct net_buf *hci_le_set_cig_test_params(const struct bt_iso_cig *cig,
|
||||
const struct bt_iso_cig_param *param)
|
||||
{
|
||||
struct bt_hci_cp_le_set_cig_params_test *req;
|
||||
struct bt_hci_cis_params_test *cis_param;
|
||||
struct net_buf *buf;
|
||||
struct net_buf *rsp;
|
||||
int err;
|
||||
|
||||
buf = bt_hci_cmd_create(BT_HCI_OP_LE_SET_CIG_PARAMS_TEST,
|
||||
sizeof(*req) + sizeof(*cis_param) * param->num_cis);
|
||||
if (!buf) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
req = net_buf_add(buf, sizeof(*req));
|
||||
|
||||
memset(req, 0, sizeof(*req));
|
||||
|
||||
req->cig_id = cig->id;
|
||||
sys_put_le24(param->interval, req->c_interval);
|
||||
sys_put_le24(param->interval, req->p_interval);
|
||||
|
||||
req->c_ft = param->c_to_p_ft;
|
||||
req->p_ft = param->p_to_c_ft;
|
||||
req->iso_interval = sys_cpu_to_le16(param->iso_interval);
|
||||
req->sca = param->sca;
|
||||
req->packing = param->packing;
|
||||
req->framing = param->framing;
|
||||
req->num_cis = param->num_cis;
|
||||
|
||||
LOG_DBG("id %u, SDU interval %u, c_ft %u, p_ft %u, iso_interval %u, "
|
||||
"sca %u, packing %u, framing %u, num_cis %u",
|
||||
cig->id, param->interval, param->c_to_p_ft, param->p_to_c_ft,
|
||||
param->iso_interval, param->sca, param->packing,
|
||||
param->framing, param->num_cis);
|
||||
|
||||
/* Program the cis parameters */
|
||||
for (uint8_t i = 0U; i < param->num_cis; i++) {
|
||||
const struct bt_iso_chan *cis = param->cis_channels[i];
|
||||
const struct bt_iso_chan_qos *qos = cis->qos;
|
||||
|
||||
cis_param = net_buf_add(buf, sizeof(*cis_param));
|
||||
|
||||
memset(cis_param, 0, sizeof(*cis_param));
|
||||
|
||||
cis_param->cis_id = cis->iso->iso.cis_id;
|
||||
cis_param->nse = qos->num_subevents;
|
||||
|
||||
if (!qos->tx && !qos->rx) {
|
||||
LOG_ERR("Both TX and RX QoS are disabled");
|
||||
net_buf_unref(buf);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!qos->tx) {
|
||||
/* Use RX PHY if TX is not set (disabled)
|
||||
* to avoid setting invalid values
|
||||
*/
|
||||
cis_param->c_phy = qos->rx->phy;
|
||||
} else {
|
||||
cis_param->c_sdu = sys_cpu_to_le16(qos->tx->sdu);
|
||||
cis_param->c_pdu = sys_cpu_to_le16(qos->tx->max_pdu);
|
||||
cis_param->c_phy = qos->tx->phy;
|
||||
cis_param->c_bn = qos->tx->burst_number;
|
||||
}
|
||||
|
||||
if (!qos->rx) {
|
||||
/* Use TX PHY if RX is not set (disabled)
|
||||
* to avoid setting invalid values
|
||||
*/
|
||||
cis_param->p_phy = qos->tx->phy;
|
||||
} else {
|
||||
cis_param->p_sdu = sys_cpu_to_le16(qos->rx->sdu);
|
||||
cis_param->p_pdu = sys_cpu_to_le16(qos->rx->max_pdu);
|
||||
cis_param->p_phy = qos->rx->phy;
|
||||
cis_param->p_bn = qos->rx->burst_number;
|
||||
}
|
||||
|
||||
LOG_DBG("[%d]: id %u, nse %u c_sdu %u, p_sdu %u, c_pdu %u, "
|
||||
"p_pdu %u, c_phy %u, p_phy %u, c_bn %u, p_bn %u",
|
||||
i, cis_param->cis_id, cis_param->nse, cis_param->c_sdu,
|
||||
cis_param->p_sdu, cis_param->c_pdu, cis_param->p_pdu,
|
||||
cis_param->c_phy, cis_param->p_phy, cis_param->c_bn,
|
||||
cis_param->p_bn);
|
||||
}
|
||||
|
||||
err = bt_hci_cmd_send_sync(BT_HCI_OP_LE_SET_CIG_PARAMS_TEST, buf, &rsp);
|
||||
if (err) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return rsp;
|
||||
}
|
||||
|
||||
static bool is_advanced_cig_param(const struct bt_iso_cig_param *param)
|
||||
{
|
||||
if (param->c_to_p_ft != 0U ||
|
||||
param->p_to_c_ft != 0U ||
|
||||
param->iso_interval != 0U) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Check if any of the CIS contain any test-param-only values */
|
||||
for (uint8_t i = 0U; i < param->num_cis; i++) {
|
||||
const struct bt_iso_chan *cis = param->cis_channels[i];
|
||||
const struct bt_iso_chan_qos *qos = cis->qos;
|
||||
|
||||
if (qos->num_subevents > 0U) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (qos->tx != NULL) {
|
||||
if (qos->tx->max_pdu > 0U ||
|
||||
qos->tx->burst_number > 0U) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (qos->rx != NULL) {
|
||||
if (qos->rx->max_pdu > 0U ||
|
||||
qos->rx->burst_number > 0U) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif /* CONFIG_BT_ISO_ADVANCED */
|
||||
|
||||
static struct bt_iso_cig *get_cig(const struct bt_iso_chan *iso_chan)
|
||||
{
|
||||
if (iso_chan->iso == NULL) {
|
||||
|
@ -1607,7 +1782,7 @@ static void cleanup_cig(struct bt_iso_cig *cig)
|
|||
memset(cig, 0, sizeof(*cig));
|
||||
}
|
||||
|
||||
static bool valid_cig_param(const struct bt_iso_cig_param *param)
|
||||
static bool valid_cig_param(const struct bt_iso_cig_param *param, bool advanced)
|
||||
{
|
||||
if (param == NULL) {
|
||||
return false;
|
||||
|
@ -1626,7 +1801,7 @@ static bool valid_cig_param(const struct bt_iso_cig_param *param)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!valid_chan_qos(cis->qos)) {
|
||||
if (!valid_chan_qos(cis->qos, advanced)) {
|
||||
LOG_DBG("cis_channels[%d]: Invalid QOS", i);
|
||||
return false;
|
||||
}
|
||||
|
@ -1664,12 +1839,39 @@ static bool valid_cig_param(const struct bt_iso_cig_param *param)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (param->latency < BT_ISO_LATENCY_MIN ||
|
||||
param->latency > BT_ISO_LATENCY_MAX) {
|
||||
if (!advanced &&
|
||||
(param->latency < BT_ISO_LATENCY_MIN ||
|
||||
param->latency > BT_ISO_LATENCY_MAX)) {
|
||||
LOG_DBG("Invalid latency: %u", param->latency);
|
||||
return false;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_BT_ISO_ADVANCED)
|
||||
if (advanced) {
|
||||
if (!IN_RANGE(param->c_to_p_ft, BT_ISO_FT_MIN, BT_ISO_FT_MAX)) {
|
||||
LOG_DBG("Invalid Central to Peripheral FT %u",
|
||||
param->c_to_p_ft);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!IN_RANGE(param->p_to_c_ft, BT_ISO_FT_MIN, BT_ISO_FT_MAX)) {
|
||||
LOG_DBG("Invalid Peripheral to Central FT %u",
|
||||
param->p_to_c_ft);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!IN_RANGE(param->iso_interval,
|
||||
BT_ISO_ISO_INTERVAL_MIN,
|
||||
BT_ISO_ISO_INTERVAL_MAX)) {
|
||||
LOG_DBG("Invalid ISO interval %u", param->iso_interval);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_BT_ISO_ADVANCED */
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1681,6 +1883,7 @@ int bt_iso_cig_create(const struct bt_iso_cig_param *param,
|
|||
struct bt_iso_cig *cig;
|
||||
struct bt_hci_rp_le_set_cig_params *cig_rsp;
|
||||
struct bt_iso_chan *cis;
|
||||
bool advanced = false;
|
||||
int i;
|
||||
|
||||
CHECKIF(out_cig == NULL) {
|
||||
|
@ -1706,7 +1909,11 @@ int bt_iso_cig_create(const struct bt_iso_cig_param *param,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
CHECKIF(!valid_cig_param(param)) {
|
||||
#if defined(CONFIG_BT_ISO_ADVANCED)
|
||||
advanced = is_advanced_cig_param(param);
|
||||
#endif /* CONFIG_BT_ISO_ADVANCED */
|
||||
|
||||
CHECKIF(!valid_cig_param(param, advanced)) {
|
||||
LOG_DBG("Invalid CIG params");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -1724,7 +1931,14 @@ int bt_iso_cig_create(const struct bt_iso_cig_param *param,
|
|||
return err;
|
||||
}
|
||||
|
||||
rsp = hci_le_set_cig_params(cig, param);
|
||||
if (!advanced) {
|
||||
rsp = hci_le_set_cig_params(cig, param);
|
||||
#if defined(CONFIG_BT_ISO_ADVANCED)
|
||||
} else {
|
||||
rsp = hci_le_set_cig_test_params(cig, param);
|
||||
#endif /* CONFIG_BT_ISO_ADVANCED */
|
||||
}
|
||||
|
||||
if (rsp == NULL) {
|
||||
LOG_WRN("Unexpected response to hci_le_set_cig_params");
|
||||
err = -EIO;
|
||||
|
@ -1785,6 +1999,7 @@ int bt_iso_cig_reconfigure(struct bt_iso_cig *cig,
|
|||
struct bt_hci_rp_le_set_cig_params *cig_rsp;
|
||||
uint8_t existing_num_cis;
|
||||
struct bt_iso_chan *cis;
|
||||
bool advanced = false;
|
||||
struct net_buf *rsp;
|
||||
int err;
|
||||
int i;
|
||||
|
@ -1799,7 +2014,11 @@ int bt_iso_cig_reconfigure(struct bt_iso_cig *cig,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
CHECKIF(!valid_cig_param(param)) {
|
||||
#if defined(CONFIG_BT_ISO_ADVANCED)
|
||||
advanced = is_advanced_cig_param(param);
|
||||
#endif /* CONFIG_BT_ISO_ADVANCED */
|
||||
|
||||
CHECKIF(!valid_cig_param(param, advanced)) {
|
||||
LOG_DBG("Invalid CIG params");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -1825,7 +2044,14 @@ int bt_iso_cig_reconfigure(struct bt_iso_cig *cig,
|
|||
return err;
|
||||
}
|
||||
|
||||
rsp = hci_le_set_cig_params(cig, param);
|
||||
if (!advanced) {
|
||||
rsp = hci_le_set_cig_params(cig, param);
|
||||
#if defined(CONFIG_BT_ISO_ADVANCED)
|
||||
} else {
|
||||
rsp = hci_le_set_cig_test_params(cig, param);
|
||||
#endif /* CONFIG_BT_ISO_ADVANCED */
|
||||
}
|
||||
|
||||
if (rsp == NULL) {
|
||||
LOG_WRN("Unexpected response to hci_le_set_cig_params");
|
||||
err = -EIO;
|
||||
|
@ -2375,7 +2601,7 @@ int bt_iso_big_create(struct bt_le_ext_adv *padv, struct bt_iso_big_create_param
|
|||
}
|
||||
|
||||
CHECKIF(bis->qos->tx == NULL ||
|
||||
!valid_chan_io_qos(bis->qos->tx, true)) {
|
||||
!valid_chan_io_qos(bis->qos->tx, true, true, false)) {
|
||||
LOG_DBG("bis_channels[%u]: Invalid QOS", i);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue