Lines Matching refs:cp

166 	const struct btp_cap_discover_cmd *cp = cmd;  in btp_cap_discover()  local
172 conn = bt_conn_lookup_addr_le(BT_ID_DEFAULT, &cp->address); in btp_cap_discover()
233 const struct btp_cap_unicast_setup_ase_cmd *cp = cmd; in btp_cap_unicast_setup_ase() local
242 conn = bt_conn_lookup_addr_le(BT_ID_DEFAULT, &cp->address); in btp_cap_unicast_setup_ase()
251 qos.framing = cp->framing; in btp_cap_unicast_setup_ase()
252 qos.rtn = cp->retransmission_num; in btp_cap_unicast_setup_ase()
253 qos.sdu = sys_le16_to_cpu(cp->max_sdu); in btp_cap_unicast_setup_ase()
254 qos.latency = sys_le16_to_cpu(cp->max_transport_latency); in btp_cap_unicast_setup_ase()
255 qos.interval = sys_get_le24(cp->sdu_interval); in btp_cap_unicast_setup_ase()
256 qos.pd = sys_get_le24(cp->presentation_delay); in btp_cap_unicast_setup_ase()
259 codec_cfg.id = cp->coding_format; in btp_cap_unicast_setup_ase()
260 codec_cfg.vid = cp->vid; in btp_cap_unicast_setup_ase()
261 codec_cfg.cid = cp->cid; in btp_cap_unicast_setup_ase()
263 ltv_ptr = cp->ltvs; in btp_cap_unicast_setup_ase()
264 if (cp->cc_ltvs_len != 0) { in btp_cap_unicast_setup_ase()
265 codec_cfg.data_len = cp->cc_ltvs_len; in btp_cap_unicast_setup_ase()
266 memcpy(codec_cfg.data, ltv_ptr, cp->cc_ltvs_len); in btp_cap_unicast_setup_ase()
267 ltv_ptr += cp->cc_ltvs_len; in btp_cap_unicast_setup_ase()
270 if (cp->metadata_ltvs_len != 0) { in btp_cap_unicast_setup_ase()
271 codec_cfg.meta_len = cp->metadata_ltvs_len; in btp_cap_unicast_setup_ase()
272 memcpy(codec_cfg.meta, ltv_ptr, cp->metadata_ltvs_len); in btp_cap_unicast_setup_ase()
275 err = cap_unicast_setup_ase(conn, cp->ase_id, cp->cis_id, cp->cig_id, &codec_cfg, &qos); in btp_cap_unicast_setup_ase()
286 const struct btp_cap_unicast_audio_start_cmd *cp = cmd; in btp_cap_unicast_audio_start() local
293 err = btp_bap_unicast_group_create(cp->cig_id, &u_group); in btp_cap_unicast_audio_start()
312 if (!u_stream->in_use || u_stream->cig_id != cp->cig_id) { in btp_cap_unicast_audio_start()
325 start_param.type = cp->set_type; in btp_cap_unicast_audio_start()
344 const struct btp_cap_unicast_audio_update_cmd *cp = cmd; in btp_cap_unicast_audio_update() local
351 if (cp->stream_count == 0) { in btp_cap_unicast_audio_update()
355 data_ptr = cp->update_data; in btp_cap_unicast_audio_update()
356 for (size_t i = 0; i < cp->stream_count; i++) { in btp_cap_unicast_audio_update()
392 param.count = cp->stream_count; in btp_cap_unicast_audio_update()
413 const struct btp_cap_unicast_audio_stop_cmd *cp = cmd; in btp_cap_unicast_audio_stop() local
430 if (!u_stream->in_use || u_stream->cig_id != cp->cig_id) { in btp_cap_unicast_audio_stop()
441 param.release = (cp->flags & BTP_CAP_UNICAST_AUDIO_STOP_FLAG_RELEASE) != 0; in btp_cap_unicast_audio_stop()
464 const struct btp_cap_broadcast_source_setup_stream_cmd *cp = cmd; in btp_cap_broadcast_source_setup_stream() local
466 btp_bap_broadcast_local_source_get(cp->source_id); in btp_cap_broadcast_source_setup_stream()
474 stream->subgroup_id = cp->subgroup_id; in btp_cap_broadcast_source_setup_stream()
477 codec_cfg->id = cp->coding_format; in btp_cap_broadcast_source_setup_stream()
478 codec_cfg->vid = cp->vid; in btp_cap_broadcast_source_setup_stream()
479 codec_cfg->cid = cp->cid; in btp_cap_broadcast_source_setup_stream()
481 ltv_ptr = cp->ltvs; in btp_cap_broadcast_source_setup_stream()
482 if (cp->cc_ltvs_len != 0) { in btp_cap_broadcast_source_setup_stream()
483 codec_cfg->data_len = cp->cc_ltvs_len; in btp_cap_broadcast_source_setup_stream()
484 memcpy(codec_cfg->data, ltv_ptr, cp->cc_ltvs_len); in btp_cap_broadcast_source_setup_stream()
485 ltv_ptr += cp->cc_ltvs_len; in btp_cap_broadcast_source_setup_stream()
488 if (cp->metadata_ltvs_len != 0) { in btp_cap_broadcast_source_setup_stream()
489 codec_cfg->meta_len = cp->metadata_ltvs_len; in btp_cap_broadcast_source_setup_stream()
490 memcpy(codec_cfg->meta, ltv_ptr, cp->metadata_ltvs_len); in btp_cap_broadcast_source_setup_stream()
501 const struct btp_cap_broadcast_source_setup_subgroup_cmd *cp = cmd; in btp_cap_broadcast_source_setup_subgroup() local
503 btp_bap_broadcast_local_source_get(cp->source_id); in btp_cap_broadcast_source_setup_subgroup()
505 if (cp->subgroup_id >= sizeof(cap_subgroup_params)) { in btp_cap_broadcast_source_setup_subgroup()
509 cap_subgroup_params[cp->subgroup_id].codec_cfg = in btp_cap_broadcast_source_setup_subgroup()
510 &source->subgroup_codec_cfg[cp->subgroup_id]; in btp_cap_broadcast_source_setup_subgroup()
511 codec_cfg = cap_subgroup_params[cp->subgroup_id].codec_cfg; in btp_cap_broadcast_source_setup_subgroup()
513 codec_cfg->id = cp->coding_format; in btp_cap_broadcast_source_setup_subgroup()
514 codec_cfg->vid = cp->vid; in btp_cap_broadcast_source_setup_subgroup()
515 codec_cfg->cid = cp->cid; in btp_cap_broadcast_source_setup_subgroup()
517 ltv_ptr = cp->ltvs; in btp_cap_broadcast_source_setup_subgroup()
518 if (cp->cc_ltvs_len != 0) { in btp_cap_broadcast_source_setup_subgroup()
519 codec_cfg->data_len = cp->cc_ltvs_len; in btp_cap_broadcast_source_setup_subgroup()
520 memcpy(codec_cfg->data, ltv_ptr, cp->cc_ltvs_len); in btp_cap_broadcast_source_setup_subgroup()
521 ltv_ptr += cp->cc_ltvs_len; in btp_cap_broadcast_source_setup_subgroup()
524 if (cp->metadata_ltvs_len != 0) { in btp_cap_broadcast_source_setup_subgroup()
525 codec_cfg->meta_len = cp->metadata_ltvs_len; in btp_cap_broadcast_source_setup_subgroup()
526 memcpy(codec_cfg->meta, ltv_ptr, cp->metadata_ltvs_len); in btp_cap_broadcast_source_setup_subgroup()
605 const struct btp_cap_broadcast_source_setup_cmd *cp = cmd; in btp_cap_broadcast_source_setup() local
608 btp_bap_broadcast_local_source_get(cp->source_id); in btp_cap_broadcast_source_setup()
631 if (cp->flags & BTP_CAP_BROADCAST_SOURCE_SETUP_FLAG_SUBGROUP_CODEC) { in btp_cap_broadcast_source_setup()
656 qos->framing = cp->framing; in btp_cap_broadcast_source_setup()
657 qos->rtn = cp->retransmission_num; in btp_cap_broadcast_source_setup()
658 qos->sdu = sys_le16_to_cpu(cp->max_sdu); in btp_cap_broadcast_source_setup()
659 qos->latency = sys_le16_to_cpu(cp->max_transport_latency); in btp_cap_broadcast_source_setup()
660 qos->interval = sys_get_le24(cp->sdu_interval); in btp_cap_broadcast_source_setup()
661 qos->pd = sys_get_le24(cp->presentation_delay); in btp_cap_broadcast_source_setup()
666 create_param.encryption = cp->flags & BTP_CAP_BROADCAST_SOURCE_SETUP_FLAG_ENCRYPTION; in btp_cap_broadcast_source_setup()
667 memcpy(create_param.broadcast_code, cp->broadcast_code, sizeof(cp->broadcast_code)); in btp_cap_broadcast_source_setup()
694 const struct btp_cap_broadcast_source_release_cmd *cp = cmd; in btp_cap_broadcast_source_release() local
696 btp_bap_broadcast_local_source_get(cp->source_id); in btp_cap_broadcast_source_release()
769 const struct btp_cap_broadcast_source_start_cmd *cp = cmd; in btp_cap_broadcast_source_start() local
771 btp_bap_broadcast_local_source_get(cp->source_id); in btp_cap_broadcast_source_start()
794 const struct btp_cap_broadcast_source_stop_cmd *cp = cmd; in btp_cap_broadcast_source_stop() local
796 btp_bap_broadcast_local_source_get(cp->source_id); in btp_cap_broadcast_source_stop()
818 const struct btp_cap_broadcast_source_update_cmd *cp = cmd; in btp_cap_broadcast_source_update() local
820 btp_bap_broadcast_local_source_get(cp->source_id); in btp_cap_broadcast_source_update()
825 if (cp->metadata_ltvs_len == 0) { in btp_cap_broadcast_source_update()
829 err = bt_cap_initiator_broadcast_audio_update(source->cap_broadcast, cp->metadata_ltvs, in btp_cap_broadcast_source_update()
830 cp->metadata_ltvs_len); in btp_cap_broadcast_source_update()