Lines Matching full:cis
405 /* The peripheral does not have the concept of a CIG, so once a CIS in bt_iso_chan_disconnected()
1075 /* A CIS peripheral is not allowed to disconnect a CIS in the connecting state - It in bt_iso_chan_disconnect()
1076 * has to wait for a CIS Established event in bt_iso_chan_disconnect()
1289 * event before this event, and in which case we do not expect to find the CIS in hci_le_cis_established()
1323 * event before this event, and in which case we do not expect to find the CIS in hci_le_cis_established_v2()
1502 LOG_DBG("acl_handle %u cis_handle %u cig_id %u cis %u", acl_handle, cis_handle, evt->cig_id, in hci_le_cis_req()
1533 LOG_ERR("Failed to reject CIS"); in hci_le_cis_req()
1656 /* Remove both directions for CIS*/ in bt_iso_remove_data_path()
1753 /* Program the cis parameters */ in hci_le_set_cig_params()
1755 struct bt_iso_chan *cis = param->cis_channels[i]; in hci_le_set_cig_params() local
1756 struct bt_iso_chan_qos *qos = cis->qos; in hci_le_set_cig_params()
1762 cis_param->cis_id = cis->iso->iso.cis_id; in hci_le_set_cig_params()
1843 /* Program the cis parameters */ in hci_le_set_cig_test_params()
1845 const struct bt_iso_chan *cis = param->cis_channels[i]; in hci_le_set_cig_test_params() local
1846 const struct bt_iso_chan_qos *qos = cis->qos; in hci_le_set_cig_test_params()
1852 cis_param->cis_id = cis->iso->iso.cis_id; in hci_le_set_cig_test_params()
1906 /* Check if any of the CIS contain any test-param-only values */ in is_advanced_cig_param()
1908 const struct bt_iso_chan *cis = param->cis_channels[i]; in is_advanced_cig_param() local
1909 const struct bt_iso_chan_qos *qos = cis->qos; in is_advanced_cig_param()
1962 static bool cis_is_in_cig(const struct bt_iso_cig *cig, const struct bt_iso_chan *cis) in cis_is_in_cig() argument
1964 if (cig == NULL || cis == NULL || cis->iso == NULL) { in cis_is_in_cig()
1968 return cig->id == cis->iso->iso.cig_id; in cis_is_in_cig()
1974 struct bt_iso_chan *cis = param->cis_channels[i]; in cig_init_cis() local
1976 if (cis->iso == NULL) { in cig_init_cis()
1979 cis->iso = iso_new(); in cig_init_cis()
1980 if (cis->iso == NULL) { in cig_init_cis()
1981 LOG_ERR("Unable to allocate CIS connection"); in cig_init_cis()
1984 iso_conn = &cis->iso->iso; in cig_init_cis()
1990 bt_iso_chan_add(cis->iso, cis); in cig_init_cis()
1992 sys_slist_append(&cig->cis_channels, &cis->node); in cig_init_cis()
2001 struct bt_iso_chan *cis, *tmp; in cleanup_cig() local
2003 SYS_SLIST_FOR_EACH_CONTAINER_SAFE(&cig->cis_channels, cis, tmp, node) { in cleanup_cig()
2004 if (cis->iso != NULL) { in cleanup_cig()
2005 bt_conn_unref(cis->iso); in cleanup_cig()
2006 cis->iso = NULL; in cleanup_cig()
2009 sys_slist_remove(&cig->cis_channels, NULL, &cis->node); in cleanup_cig()
2026 struct bt_iso_chan *cis = param->cis_channels[i]; in valid_cig_param() local
2028 if (cis == NULL) { in valid_cig_param()
2033 if (cis->qos == NULL) { in valid_cig_param()
2038 if (cis->iso != NULL && !cis_is_in_cig(cig, cis)) { in valid_cig_param()
2039 LOG_DBG("cis_channels[%u]: already allocated to CIG %p", i, get_cig(cis)); in valid_cig_param()
2043 if (!valid_chan_qos(cis->qos, advanced)) { in valid_cig_param()
2049 if (cis == param->cis_channels[j]) { in valid_cig_param()
2050 LOG_DBG("ISO %p duplicated at index %u and %u", cis, i, j); in valid_cig_param()
2055 if (cis->qos->rx != NULL && cis->qos->rx->sdu != 0U) { in valid_cig_param()
2059 if (cis->qos->tx != NULL && cis->qos->tx->sdu != 0U) { in valid_cig_param()
2140 struct bt_iso_chan *cis; in bt_iso_cig_create() local
2163 LOG_DBG("NULL CIS channels"); in bt_iso_cig_create()
2168 LOG_DBG("Invalid number of CIS %u", param->num_cis); in bt_iso_cig_create()
2189 LOG_DBG("Could not init CIS %d", err); in bt_iso_cig_create()
2220 SYS_SLIST_FOR_EACH_CONTAINER(&cig->cis_channels, cis, node) { in bt_iso_cig_create()
2224 cis->iso->handle = sys_le16_to_cpu(handle); in bt_iso_cig_create()
2236 struct bt_iso_chan *cis, *tmp; in restore_cig() local
2238 SYS_SLIST_FOR_EACH_CONTAINER_SAFE(&cig->cis_channels, cis, tmp, node) { in restore_cig()
2240 * of CIS that was previously added before in restore_cig()
2243 if (cis->iso != NULL && cis->iso->iso.cis_id >= existing_num_cis) { in restore_cig()
2244 bt_conn_unref(cis->iso); in restore_cig()
2245 cis->iso = NULL; in restore_cig()
2247 sys_slist_remove(&cig->cis_channels, NULL, &cis->node); in restore_cig()
2290 LOG_DBG("Could not init CIS %d", err); in bt_iso_cig_reconfigure()
2332 struct bt_iso_chan *cis = param->cis_channels[i]; in bt_iso_cig_reconfigure() local
2335 cis->iso->handle = sys_le16_to_cpu(handle); in bt_iso_cig_reconfigure()
2460 struct bt_hci_cis *cis; in hci_le_create_cis() local
2464 buf = bt_hci_cmd_create(BT_HCI_OP_LE_CREATE_CIS, sizeof(*req) + sizeof(*cis) * count); in hci_le_create_cis()
2473 /* Program the cis parameters */ in hci_le_create_cis()
2481 cis = net_buf_add(buf, sizeof(*cis)); in hci_le_create_cis()
2483 memset(cis, 0, sizeof(*cis)); in hci_le_create_cis()
2485 cis->cis_handle = sys_cpu_to_le16(param[i].iso_chan->iso->handle); in hci_le_create_cis()
2486 cis->acl_handle = sys_cpu_to_le16(param[i].acl->handle); in hci_le_create_cis()
2490 /* If all CIS are pending for security, do nothing, in hci_le_create_cis()
2629 LOG_DBG("Failed to initiate security for all CIS: %d", err); in bt_iso_chan_connect()
2923 /* Check if any of the CIS contain any test-param-only values */ in is_advanced_big_param()
3564 struct bt_iso_chan *cis; in bt_iso_reset() local
3566 /* Disconnect any connected CIS and call the callback in bt_iso_reset()
3571 SYS_SLIST_FOR_EACH_CONTAINER(&cig->cis_channels, cis, node) { in bt_iso_reset()
3572 if (cis->state != BT_ISO_STATE_DISCONNECTED) { in bt_iso_reset()
3573 bt_iso_chan_set_state(cis, BT_ISO_STATE_DISCONNECTED); in bt_iso_reset()
3574 bt_iso_cleanup_acl(cis->iso); in bt_iso_reset()
3575 if (cis->ops != NULL && cis->ops->disconnected != NULL) { in bt_iso_reset()
3576 cis->ops->disconnected(cis, BT_HCI_ERR_UNSPECIFIED); in bt_iso_reset()