Lines Matching refs:unicast_group

329 	if (ep->unicast_group != NULL) {  in unicast_client_ep_iso_connected()
330 ep->unicast_group->has_been_connected = true; in unicast_client_ep_iso_connected()
2310 static uint8_t unicast_group_get_cis_count(const struct bt_bap_unicast_group *unicast_group) in unicast_group_get_cis_count() argument
2314 for (size_t i = 0U; i < ARRAY_SIZE(unicast_group->cis); i++) { in unicast_group_get_cis_count()
2315 if (unicast_group->cis[i] == NULL) { in unicast_group_get_cis_count()
2726 static bool valid_unicast_group_stream_param(const struct bt_bap_unicast_group *unicast_group, in valid_unicast_group_stream_param() argument
2744 if (unicast_group != NULL && param->stream->group != unicast_group) { in valid_unicast_group_stream_param()
2745 LOG_DBG("stream %p not part of group %p (%p)", param->stream, unicast_group, in valid_unicast_group_stream_param()
2807 valid_group_stream_pair_param(const struct bt_bap_unicast_group *unicast_group, in valid_group_stream_pair_param() argument
2818 if (!valid_unicast_group_stream_param(unicast_group, pair_param->rx_param, in valid_group_stream_pair_param()
2825 if (!valid_unicast_group_stream_param(unicast_group, pair_param->tx_param, in valid_group_stream_pair_param()
2834 static bool valid_unicast_group_param(struct bt_bap_unicast_group *unicast_group, in valid_unicast_group_param() argument
2848 if (unicast_group != NULL) { in valid_unicast_group_param()
2849 const size_t group_cis_cnt = unicast_group_get_cis_count(unicast_group); in valid_unicast_group_param()
2860 if (!valid_group_stream_pair_param(unicast_group, &param->params[i])) { in valid_unicast_group_param()
2871 struct bt_bap_unicast_group *unicast_group; in bt_bap_unicast_group_create() local
2882 unicast_group = unicast_group_alloc(); in bt_bap_unicast_group_create()
2883 if (unicast_group == NULL) { in bt_bap_unicast_group_create()
2889 unicast_group_free(unicast_group); in bt_bap_unicast_group_create()
2899 unicast_group->cig_param.packing = param->packing; in bt_bap_unicast_group_create()
2901 unicast_group->cig_param.c_to_p_ft = param->c_to_p_ft; in bt_bap_unicast_group_create()
2902 unicast_group->cig_param.p_to_c_ft = param->p_to_c_ft; in bt_bap_unicast_group_create()
2903 unicast_group->cig_param.iso_interval = param->iso_interval; in bt_bap_unicast_group_create()
2906 err = unicast_group_add_stream_pair(unicast_group, stream_param); in bt_bap_unicast_group_create()
2909 unicast_group_free(unicast_group); in bt_bap_unicast_group_create()
2915 err = bt_audio_cig_create(unicast_group); in bt_bap_unicast_group_create()
2918 unicast_group_free(unicast_group); in bt_bap_unicast_group_create()
2923 *out_unicast_group = unicast_group; in bt_bap_unicast_group_create()
2928 int bt_bap_unicast_group_reconfig(struct bt_bap_unicast_group *unicast_group, in bt_bap_unicast_group_reconfig() argument
2941 CHECKIF(unicast_group == NULL) { in bt_bap_unicast_group_reconfig()
2946 if (unicast_group->has_been_connected) { in bt_bap_unicast_group_reconfig()
2951 if (!valid_unicast_group_param(unicast_group, param)) { in bt_bap_unicast_group_reconfig()
2959 SYS_SLIST_FOR_EACH_CONTAINER(&unicast_group->streams, tmp_stream, _node) { in bt_bap_unicast_group_reconfig()
2969 memcpy(&cig_param_backup, &unicast_group->cig_param, sizeof(cig_param_backup)); in bt_bap_unicast_group_reconfig()
2978 unicast_group_set_iso_stream_param(unicast_group, rx_param->stream->bap_iso, in bt_bap_unicast_group_reconfig()
2983 unicast_group_set_iso_stream_param(unicast_group, tx_param->stream->bap_iso, in bt_bap_unicast_group_reconfig()
2989 err = bt_audio_cig_reconfigure(unicast_group); in bt_bap_unicast_group_reconfig()
2994 memcpy(&unicast_group->cig_param, &cig_param_backup, sizeof(cig_param_backup)); in bt_bap_unicast_group_reconfig()
2996 SYS_SLIST_FOR_EACH_CONTAINER(&unicast_group->streams, tmp_stream, _node) { in bt_bap_unicast_group_reconfig()
3013 int bt_bap_unicast_group_add_streams(struct bt_bap_unicast_group *unicast_group, in bt_bap_unicast_group_add_streams() argument
3023 CHECKIF(unicast_group == NULL) in bt_bap_unicast_group_add_streams()
3029 if (unicast_group->has_been_connected) { in bt_bap_unicast_group_add_streams()
3047 SYS_SLIST_FOR_EACH_CONTAINER(&unicast_group->streams, tmp_stream, _node) { in bt_bap_unicast_group_add_streams()
3058 if (!valid_group_stream_pair_param(unicast_group, &params[i])) { in bt_bap_unicast_group_add_streams()
3066 cig = unicast_group->cig; in bt_bap_unicast_group_add_streams()
3082 err = unicast_group_add_stream_pair(unicast_group, stream_param); in bt_bap_unicast_group_add_streams()
3089 err = bt_audio_cig_reconfigure(unicast_group); in bt_bap_unicast_group_add_streams()
3100 unicast_group_del_stream_pair(unicast_group, &params[num_added]); in bt_bap_unicast_group_add_streams()
3106 int bt_bap_unicast_group_delete(struct bt_bap_unicast_group *unicast_group) in bt_bap_unicast_group_delete() argument
3110 CHECKIF(unicast_group == NULL) in bt_bap_unicast_group_delete()
3116 SYS_SLIST_FOR_EACH_CONTAINER(&unicast_group->streams, stream, _node) { in bt_bap_unicast_group_delete()
3126 if (unicast_group->cig != NULL) { in bt_bap_unicast_group_delete()
3127 const int err = unicast_client_cig_terminate(unicast_group); in bt_bap_unicast_group_delete()
3136 unicast_group_free(unicast_group); in bt_bap_unicast_group_delete()