Home
last modified time | relevance | path

Searched refs:codec_cfg (Results 1 – 25 of 67) sorted by relevance

123

/Zephyr-Core-3.7.0/tests/bsim/bluetooth/audio/src/
Dbap_common.c73 void print_codec_cfg(const struct bt_audio_codec_cfg *codec_cfg) in print_codec_cfg() argument
75 printk("codec_cfg ID 0x%02x cid 0x%04x vid 0x%04x count %u\n", codec_cfg->id, in print_codec_cfg()
76 codec_cfg->cid, codec_cfg->vid, codec_cfg->data_len); in print_codec_cfg()
78 if (codec_cfg->id == BT_HCI_CODING_FORMAT_LC3) { in print_codec_cfg()
79 print_ltv_array("data", codec_cfg->data, codec_cfg->data_len); in print_codec_cfg()
82 print_hex(codec_cfg->data, codec_cfg->data_len); in print_codec_cfg()
86 print_ltv_array("meta", codec_cfg->meta, codec_cfg->meta_len); in print_codec_cfg()
100 memcpy(&stream->codec_cfg, &named_preset->preset.codec_cfg, sizeof(stream->codec_cfg)); in copy_unicast_stream_preset()
Dbap_common.h46 struct bt_audio_codec_cfg codec_cfg; member
57 void print_codec_cfg(const struct bt_audio_codec_cfg *codec_cfg);
Dbap_broadcast_source_test.c69 const struct bt_audio_codec_cfg *codec_cfg = stream->codec_cfg; in validate_stream_codec_cfg() local
70 const struct bt_audio_codec_cfg *exp_codec_cfg = &preset_16_1_1.codec_cfg; in validate_stream_codec_cfg()
79 ret = bt_audio_codec_cfg_get_freq(codec_cfg); in validate_stream_codec_cfg()
96 ret = bt_audio_codec_cfg_get_frame_dur(codec_cfg); in validate_stream_codec_cfg()
116 ret = bt_audio_codec_cfg_get_chan_allocation(codec_cfg, &chan_allocation, false); in validate_stream_codec_cfg()
137 ret = bt_audio_codec_cfg_get_octets_per_frame(codec_cfg); in validate_stream_codec_cfg()
153 ret = bt_audio_codec_cfg_get_frame_blocks_per_sdu(codec_cfg, false); in validate_stream_codec_cfg()
294 subgroup_params[i].codec_cfg = &preset_16_1_1.codec_cfg; in setup_broadcast_source()
437 subgroup_params[i].codec_cfg = &preset_16_1_1.codec_cfg; in test_broadcast_source_reconfig()
/Zephyr-Core-3.7.0/subsys/bluetooth/audio/
Dcodec.c282 struct bt_audio_codec_cfg *codec_cfg) in init_net_buf_simple_from_codec_cfg() argument
284 buf->__buf = codec_cfg->data; in init_net_buf_simple_from_codec_cfg()
285 buf->data = codec_cfg->data; in init_net_buf_simple_from_codec_cfg()
286 buf->size = sizeof(codec_cfg->data); in init_net_buf_simple_from_codec_cfg()
287 buf->len = codec_cfg->data_len; in init_net_buf_simple_from_codec_cfg()
290 int bt_audio_codec_cfg_get_val(const struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_get_val() argument
301 CHECKIF(codec_cfg == NULL) { in bt_audio_codec_cfg_get_val()
313 err = bt_audio_data_parse(codec_cfg->data, codec_cfg->data_len, parse_cb, &param); in bt_audio_codec_cfg_get_val()
326 int bt_audio_codec_cfg_set_val(struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_set_val() argument
333 CHECKIF(codec_cfg == NULL) { in bt_audio_codec_cfg_set_val()
[all …]
Dbap_broadcast_source.c45 struct bt_audio_codec_cfg *codec_cfg; member
294 struct bt_audio_codec_cfg *codec_cfg, in broadcast_source_setup_stream() argument
317 bt_bap_iso_configure_data_path(ep, codec_cfg); in broadcast_source_setup_stream()
324 bt_bap_stream_attach(NULL, stream, ep, codec_cfg); in broadcast_source_setup_stream()
336 const struct bt_audio_codec_cfg *codec_cfg; in encode_base_subgroup() local
345 codec_cfg = subgroup->codec_cfg; in encode_base_subgroup()
348 net_buf_simple_add_u8(buf, codec_cfg->id); in encode_base_subgroup()
349 net_buf_simple_add_le16(buf, codec_cfg->cid); in encode_base_subgroup()
350 net_buf_simple_add_le16(buf, codec_cfg->vid); in encode_base_subgroup()
352 net_buf_simple_add_u8(buf, codec_cfg->data_len); in encode_base_subgroup()
[all …]
Dbap_stream.c80 struct bt_audio_codec_cfg *codec_cfg) in bt_bap_stream_attach() argument
82 LOG_DBG("conn %p stream %p ep %p codec_cfg %p", (void *)conn, stream, ep, codec_cfg); in bt_bap_stream_attach()
91 stream->codec_cfg = codec_cfg; in bt_bap_stream_attach()
222 bool bt_audio_valid_codec_cfg(const struct bt_audio_codec_cfg *codec_cfg) in bt_audio_valid_codec_cfg() argument
224 if (codec_cfg == NULL) { in bt_audio_valid_codec_cfg()
229 if (codec_cfg->id == BT_HCI_CODING_FORMAT_LC3) { in bt_audio_valid_codec_cfg()
230 if (codec_cfg->cid != 0U) { in bt_audio_valid_codec_cfg()
231 LOG_DBG("codec_cfg->cid (%u) is invalid", codec_cfg->cid); in bt_audio_valid_codec_cfg()
235 if (codec_cfg->vid != 0U) { in bt_audio_valid_codec_cfg()
236 LOG_DBG("codec_cfg->vid (%u) is invalid", codec_cfg->vid); in bt_audio_valid_codec_cfg()
[all …]
Dbap_unicast_server.c74 const struct bt_audio_codec_cfg *codec_cfg) in bt_bap_unicast_server_reconfig() argument
85 err = unicast_server_cb->reconfig(stream, ep->dir, codec_cfg, &ep->qos_pref, &rsp); in bt_bap_unicast_server_reconfig()
94 (void)memcpy(&ep->codec_cfg, codec_cfg, sizeof(*codec_cfg)); in bt_bap_unicast_server_reconfig()
130 if (meta_len > sizeof(ep->codec_cfg.meta)) { in bt_bap_unicast_server_metadata()
147 (void)memcpy(ep->codec_cfg.meta, meta, meta_len); in bt_bap_unicast_server_metadata()
164 struct bt_audio_codec_cfg *codec_cfg, in bt_bap_unicast_server_config_ase() argument
167 return bt_ascs_config_ase(conn, stream, codec_cfg, qos_pref); in bt_bap_unicast_server_config_ase()
Dbap_base.c445 struct bt_audio_codec_cfg *codec_cfg) in bt_bap_base_subgroup_codec_to_codec_cfg() argument
458 CHECKIF(codec_cfg == NULL) { in bt_bap_base_subgroup_codec_to_codec_cfg()
468 codec_cfg->id = codec_id.id; in bt_bap_base_subgroup_codec_to_codec_cfg()
469 codec_cfg->cid = codec_id.cid; in bt_bap_base_subgroup_codec_to_codec_cfg()
470 codec_cfg->vid = codec_id.vid; in bt_bap_base_subgroup_codec_to_codec_cfg()
475 if (ltv_len > ARRAY_SIZE(codec_cfg->data)) { in bt_bap_base_subgroup_codec_to_codec_cfg()
477 ARRAY_SIZE(codec_cfg->data)); in bt_bap_base_subgroup_codec_to_codec_cfg()
482 codec_cfg->data_len = ltv_len; in bt_bap_base_subgroup_codec_to_codec_cfg()
483 memcpy(codec_cfg->data, ltv_data, ltv_len); in bt_bap_base_subgroup_codec_to_codec_cfg()
488 if (ltv_len > ARRAY_SIZE(codec_cfg->meta)) { in bt_bap_base_subgroup_codec_to_codec_cfg()
[all …]
Dbap_broadcast_sink.c256 stream->codec_cfg = NULL; in broadcast_sink_set_ep_state()
580 struct bt_audio_codec_cfg *codec_cfg = user_data; in merge_bis_and_subgroup_data_cb() local
583 err = bt_audio_codec_cfg_set_val(codec_cfg, data->type, data->data, data->data_len); in merge_bis_and_subgroup_data_cb()
614 memcpy(&sink_bis->codec_cfg, data->subgroup_codec_cfg, sizeof(sink_bis->codec_cfg)); in base_subgroup_bis_index_cb()
621 if (sink_bis->codec_cfg.id == BT_HCI_CODING_FORMAT_LC3) { in base_subgroup_bis_index_cb()
624 memcpy(&sink_bis->codec_cfg, data->subgroup_codec_cfg, in base_subgroup_bis_index_cb()
625 sizeof(sink_bis->codec_cfg)); in base_subgroup_bis_index_cb()
629 &sink_bis->codec_cfg); in base_subgroup_bis_index_cb()
640 if (sink_bis->codec_cfg.data_len + bis->data_len > in base_subgroup_bis_index_cb()
641 sizeof(sink_bis->codec_cfg.data)) { in base_subgroup_bis_index_cb()
[all …]
Dbap_stream.h26 struct bt_audio_codec_cfg *codec_cfg);
35 bool bt_audio_valid_codec_cfg(const struct bt_audio_codec_cfg *codec_cfg);
Dbap_iso.c173 void bt_bap_iso_configure_data_path(struct bt_bap_ep *ep, struct bt_audio_codec_cfg *codec_cfg) in bt_bap_iso_configure_data_path() argument
192 path->pid = codec_cfg->path_id; in bt_bap_iso_configure_data_path()
194 if (codec_cfg->ctlr_transcode) { in bt_bap_iso_configure_data_path()
195 path->format = codec_cfg->id; in bt_bap_iso_configure_data_path()
196 path->cid = codec_cfg->cid; in bt_bap_iso_configure_data_path()
197 path->vid = codec_cfg->vid; in bt_bap_iso_configure_data_path()
199 path->cc_len = codec_cfg->data_len; in bt_bap_iso_configure_data_path()
200 path->cc = codec_cfg->data; in bt_bap_iso_configure_data_path()
Dcap_initiator.c145 const struct bt_audio_codec_cfg *codec_cfg; in cap_initiator_broadcast_audio_start_valid_param() local
149 codec_cfg = subgroup_param->codec_cfg; in cap_initiator_broadcast_audio_start_valid_param()
153 CHECKIF(codec_cfg == NULL) { in cap_initiator_broadcast_audio_start_valid_param()
159 cap_initiator_valid_metadata(codec_cfg->meta, codec_cfg->meta_len); in cap_initiator_broadcast_audio_start_valid_param()
198 bap_subgroup_param->codec_cfg = cap_subgroup_param->codec_cfg; in cap_initiator_broadcast_to_bap_broadcast_param()
680 const struct bt_audio_codec_cfg *codec_cfg = stream_param->codec_cfg; in valid_unicast_audio_start_param() local
695 CHECKIF(stream_param->codec_cfg == NULL) { in valid_unicast_audio_start_param()
700 CHECKIF(!cap_initiator_valid_metadata(codec_cfg->meta, codec_cfg->meta_len)) { in valid_unicast_audio_start_param()
801 struct bt_audio_codec_cfg *codec_cfg; in cap_initiator_unicast_audio_configure() local
828 active_proc->proc_param.initiator[i].start.codec_cfg = stream_param->codec_cfg; in cap_initiator_unicast_audio_configure()
[all …]
/Zephyr-Core-3.7.0/tests/bluetooth/audio/codec/src/
Dmain.c32 struct bt_audio_codec_cfg codec_cfg = in ZTEST() local
41 ret = bt_audio_codec_cfg_get_val(&codec_cfg, BT_AUDIO_CODEC_CFG_FREQ, &data); in ZTEST()
48 struct bt_audio_codec_cfg codec_cfg = in ZTEST() local
58 ret = bt_audio_codec_cfg_get_val(&codec_cfg, BT_AUDIO_CODEC_CFG_FREQ, &data); in ZTEST()
62 ret = bt_audio_codec_cfg_set_val(&codec_cfg, BT_AUDIO_CODEC_CFG_FREQ, in ZTEST()
66 ret = bt_audio_codec_cfg_get_val(&codec_cfg, BT_AUDIO_CODEC_CFG_FREQ, &data); in ZTEST()
73 struct bt_audio_codec_cfg codec_cfg = in ZTEST() local
79 ret = bt_audio_codec_cfg_get_val(&codec_cfg, BT_AUDIO_CODEC_CFG_FREQ, &data); in ZTEST()
82 ret = bt_audio_codec_cfg_set_val(&codec_cfg, BT_AUDIO_CODEC_CFG_FREQ, in ZTEST()
86 ret = bt_audio_codec_cfg_get_val(&codec_cfg, BT_AUDIO_CODEC_CFG_FREQ, &data); in ZTEST()
[all …]
/Zephyr-Core-3.7.0/include/zephyr/bluetooth/audio/
Daudio.h1064 int bt_audio_codec_cfg_get_freq(const struct bt_audio_codec_cfg *codec_cfg);
1076 int bt_audio_codec_cfg_set_freq(struct bt_audio_codec_cfg *codec_cfg,
1109 int bt_audio_codec_cfg_get_frame_dur(const struct bt_audio_codec_cfg *codec_cfg);
1121 int bt_audio_codec_cfg_set_frame_dur(struct bt_audio_codec_cfg *codec_cfg,
1144 int bt_audio_codec_cfg_get_chan_allocation(const struct bt_audio_codec_cfg *codec_cfg,
1158 int bt_audio_codec_cfg_set_chan_allocation(struct bt_audio_codec_cfg *codec_cfg,
1180 int bt_audio_codec_cfg_get_octets_per_frame(const struct bt_audio_codec_cfg *codec_cfg);
1192 int bt_audio_codec_cfg_set_octets_per_frame(struct bt_audio_codec_cfg *codec_cfg,
1215 int bt_audio_codec_cfg_get_frame_blocks_per_sdu(const struct bt_audio_codec_cfg *codec_cfg,
1228 int bt_audio_codec_cfg_set_frame_blocks_per_sdu(struct bt_audio_codec_cfg *codec_cfg,
[all …]
/Zephyr-Core-3.7.0/samples/bluetooth/tmap_peripheral/src/
Dbap_unicast_sr.c61 static void print_codec_cfg(const struct bt_audio_codec_cfg *codec_cfg) in print_codec_cfg() argument
63 printk("codec_cfg 0x%02x cid 0x%04x vid 0x%04x count %u\n", codec_cfg->id, codec_cfg->cid, in print_codec_cfg()
64 codec_cfg->vid, codec_cfg->data_len); in print_codec_cfg()
66 if (codec_cfg->id == BT_HCI_CODING_FORMAT_LC3) { in print_codec_cfg()
72 bt_audio_data_parse(codec_cfg->data, codec_cfg->data_len, print_cb, "data"); in print_codec_cfg()
74 ret = bt_audio_codec_cfg_get_freq(codec_cfg); in print_codec_cfg()
79 ret = bt_audio_codec_cfg_get_frame_dur(codec_cfg); in print_codec_cfg()
85 ret = bt_audio_codec_cfg_get_chan_allocation(codec_cfg, &chan_allocation, false); in print_codec_cfg()
91 bt_audio_codec_cfg_get_octets_per_frame(codec_cfg)); in print_codec_cfg()
93 bt_audio_codec_cfg_get_frame_blocks_per_sdu(codec_cfg, true)); in print_codec_cfg()
[all …]
/Zephyr-Core-3.7.0/samples/bluetooth/cap_acceptor/src/
Dcap_acceptor_unicast.c58 static void log_codec_cfg(const struct bt_audio_codec_cfg *codec_cfg) in log_codec_cfg() argument
60 LOG_INF("codec_cfg 0x%02x cid 0x%04x vid 0x%04x count %u", codec_cfg->id, codec_cfg->cid, in log_codec_cfg()
61 codec_cfg->vid, codec_cfg->data_len); in log_codec_cfg()
63 if (codec_cfg->id == BT_HCI_CODING_FORMAT_LC3) { in log_codec_cfg()
69 bt_audio_data_parse(codec_cfg->data, codec_cfg->data_len, log_codec_cfg_cb, "data"); in log_codec_cfg()
71 ret = bt_audio_codec_cfg_get_freq(codec_cfg); in log_codec_cfg()
76 ret = bt_audio_codec_cfg_get_frame_dur(codec_cfg); in log_codec_cfg()
82 if (bt_audio_codec_cfg_get_chan_allocation(codec_cfg, &chan_allocation, true) == in log_codec_cfg()
87 ret = bt_audio_codec_cfg_get_octets_per_frame(codec_cfg); in log_codec_cfg()
93 bt_audio_codec_cfg_get_frame_blocks_per_sdu(codec_cfg, true)); in log_codec_cfg()
[all …]
/Zephyr-Core-3.7.0/samples/bluetooth/hap_ha/src/
Dbap_unicast_sr.c73 static void print_codec_cfg(const struct bt_audio_codec_cfg *codec_cfg) in print_codec_cfg() argument
75 printk("codec_cfg 0x%02x cid 0x%04x vid 0x%04x count %u\n", codec_cfg->id, codec_cfg->cid, in print_codec_cfg()
76 codec_cfg->vid, codec_cfg->data_len); in print_codec_cfg()
78 if (codec_cfg->id == BT_HCI_CODING_FORMAT_LC3) { in print_codec_cfg()
84 bt_audio_data_parse(codec_cfg->data, codec_cfg->data_len, print_cb, "data"); in print_codec_cfg()
86 ret = bt_audio_codec_cfg_get_freq(codec_cfg); in print_codec_cfg()
91 ret = bt_audio_codec_cfg_get_frame_dur(codec_cfg); in print_codec_cfg()
97 ret = bt_audio_codec_cfg_get_chan_allocation(codec_cfg, &chan_allocation, false); in print_codec_cfg()
103 bt_audio_codec_cfg_get_octets_per_frame(codec_cfg)); in print_codec_cfg()
105 bt_audio_codec_cfg_get_frame_blocks_per_sdu(codec_cfg, true)); in print_codec_cfg()
[all …]
/Zephyr-Core-3.7.0/tests/bluetooth/tester/src/audio/
Dbtp_cap.c192 uint8_t cig_id, struct bt_audio_codec_cfg *codec_cfg, in cap_unicast_setup_ase() argument
218 memcpy(&u_stream->codec_cfg, codec_cfg, sizeof(*codec_cfg)); in cap_unicast_setup_ase()
234 struct bt_audio_codec_cfg codec_cfg; in btp_cap_unicast_setup_ase() local
258 memset(&codec_cfg, 0, sizeof(codec_cfg)); 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()
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()
271 codec_cfg.meta_len = cp->metadata_ltvs_len; in btp_cap_unicast_setup_ase()
[all …]
Dbtp_bap_unicast.c56 static void print_codec_cfg(const struct bt_audio_codec_cfg *codec_cfg) in print_codec_cfg() argument
58 LOG_DBG("codec_cfg 0x%02x cid 0x%04x vid 0x%04x count %u", codec_cfg->id, codec_cfg->cid, in print_codec_cfg()
59 codec_cfg->vid, codec_cfg->data_len); in print_codec_cfg()
61 if (codec_cfg->id == BT_HCI_CODING_FORMAT_LC3) { in print_codec_cfg()
67 bt_audio_data_parse(codec_cfg->data, codec_cfg->data_len, print_cb, "data"); in print_codec_cfg()
69 ret = bt_audio_codec_cfg_get_freq(codec_cfg); in print_codec_cfg()
74 ret = bt_audio_codec_cfg_get_frame_dur(codec_cfg); in print_codec_cfg()
80 ret = bt_audio_codec_cfg_get_chan_allocation(codec_cfg, &chan_allocation, false); in print_codec_cfg()
86 bt_audio_codec_cfg_get_octets_per_frame(codec_cfg)); in print_codec_cfg()
88 bt_audio_codec_cfg_get_frame_blocks_per_sdu(codec_cfg, true)); in print_codec_cfg()
[all …]
Dbtp_bap_broadcast.c224 struct bt_audio_codec_cfg *codec_cfg) in setup_broadcast_source() argument
241 memcpy(&source->streams[0].codec_cfg, codec_cfg, sizeof(*codec_cfg)); in setup_broadcast_source()
246 subgroup_param[i].codec_cfg = &source->streams[0].codec_cfg; in setup_broadcast_source()
295 struct bt_audio_codec_cfg codec_cfg; in btp_bap_broadcast_source_setup() local
315 memset(&codec_cfg, 0, sizeof(codec_cfg)); in btp_bap_broadcast_source_setup()
316 codec_cfg.id = cp->coding_format; in btp_bap_broadcast_source_setup()
317 codec_cfg.vid = cp->vid; in btp_bap_broadcast_source_setup()
318 codec_cfg.cid = cp->cid; in btp_bap_broadcast_source_setup()
319 codec_cfg.data_len = cp->cc_ltvs_len; in btp_bap_broadcast_source_setup()
320 memcpy(codec_cfg.data, cp->cc_ltvs, cp->cc_ltvs_len); in btp_bap_broadcast_source_setup()
[all …]
/Zephyr-Core-3.7.0/samples/bluetooth/bap_unicast_server/src/
Dmain.c133 static void print_codec_cfg(const struct bt_audio_codec_cfg *codec_cfg) in print_codec_cfg() argument
135 printk("codec_cfg 0x%02x cid 0x%04x vid 0x%04x count %u\n", codec_cfg->id, codec_cfg->cid, in print_codec_cfg()
136 codec_cfg->vid, codec_cfg->data_len); in print_codec_cfg()
138 if (codec_cfg->id == BT_HCI_CODING_FORMAT_LC3) { in print_codec_cfg()
144 bt_audio_data_parse(codec_cfg->data, codec_cfg->data_len, print_cb, "data"); in print_codec_cfg()
146 ret = bt_audio_codec_cfg_get_freq(codec_cfg); in print_codec_cfg()
151 ret = bt_audio_codec_cfg_get_frame_dur(codec_cfg); in print_codec_cfg()
157 ret = bt_audio_codec_cfg_get_chan_allocation(codec_cfg, &chan_allocation, false); in print_codec_cfg()
163 bt_audio_codec_cfg_get_octets_per_frame(codec_cfg)); in print_codec_cfg()
165 bt_audio_codec_cfg_get_frame_blocks_per_sdu(codec_cfg, true)); in print_codec_cfg()
[all …]
/Zephyr-Core-3.7.0/subsys/bluetooth/audio/shell/
Daudio.h95 struct bt_audio_codec_cfg codec_cfg; member
179 struct bt_audio_codec_cfg codec_cfg; member
891 const struct bt_audio_codec_cfg *codec_cfg) in print_codec_cfg() argument
894 codec_cfg->id, codec_cfg->cid, codec_cfg->vid, codec_cfg->data_len); in print_codec_cfg()
902 if (codec_cfg->data_len == 0U) { in print_codec_cfg()
904 } else if (codec_cfg->id == BT_HCI_CODING_FORMAT_LC3) { in print_codec_cfg()
908 ret = bt_audio_codec_cfg_get_freq(codec_cfg); in print_codec_cfg()
913 ret = bt_audio_codec_cfg_get_frame_dur(codec_cfg); in print_codec_cfg()
919 ret = bt_audio_codec_cfg_get_chan_allocation(codec_cfg, &chan_allocation, false); in print_codec_cfg()
924 ret = bt_audio_codec_cfg_get_octets_per_frame(codec_cfg); in print_codec_cfg()
[all …]
Dbap.c639 const struct bt_audio_codec_cfg *codec_cfg, struct bt_bap_stream **stream, in lc3_config() argument
644 print_codec_cfg(ctx_shell, 0, codec_cfg); in lc3_config()
665 const struct bt_audio_codec_cfg *codec_cfg, in lc3_reconfig() argument
670 print_codec_cfg(ctx_shell, 0, codec_cfg); in lc3_reconfig()
799 static int set_metadata(struct bt_audio_codec_cfg *codec_cfg, const char *meta_str) in set_metadata() argument
809 sys_put_le16(context, codec_cfg->meta); in set_metadata()
1264 struct bt_audio_codec_cfg *codec_cfg = &uni_stream->codec_cfg; in cmd_config() local
1266 for (size_t i = 0U; i < codec_cfg->data_len;) { in cmd_config()
1267 const uint8_t len = codec_cfg->data[i++]; in cmd_config()
1272 if (len == 0 || len > codec_cfg->data_len - i) { in cmd_config()
[all …]
/Zephyr-Core-3.7.0/samples/bluetooth/bap_unicast_client/src/
Dstream_lc3.c58 const struct bt_audio_codec_cfg *codec_cfg = stream->bap_stream->codec_cfg; in extract_lc3_config() local
64 ret = bt_audio_codec_cfg_get_freq(codec_cfg); in extract_lc3_config()
86 ret = bt_audio_codec_cfg_get_frame_dur(codec_cfg); in extract_lc3_config()
108 ret = bt_audio_codec_cfg_get_chan_allocation(codec_cfg, &lc3_tx->chan_allocation, false); in extract_lc3_config()
116 ret = bt_audio_codec_cfg_get_frame_blocks_per_sdu(codec_cfg, true); in extract_lc3_config()
121 ret = bt_audio_codec_cfg_get_octets_per_frame(codec_cfg); in extract_lc3_config()
/Zephyr-Core-3.7.0/tests/bluetooth/audio/bap_broadcast_source/src/
Dmain.c56 struct bt_audio_codec_cfg *codec_cfg; in bap_broadcast_source_test_suite_fixture_init() local
76 codec_cfg = malloc(sizeof(struct bt_audio_codec_cfg)); in bap_broadcast_source_test_suite_fixture_init()
77 zassert_not_null(codec_cfg); in bap_broadcast_source_test_suite_fixture_init()
93 memset(codec_cfg, 0, sizeof(struct bt_audio_codec_cfg)); in bap_broadcast_source_test_suite_fixture_init()
99 *codec_cfg = BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ, in bap_broadcast_source_test_suite_fixture_init()
107 subgroup_param[i].codec_cfg = codec_cfg; in bap_broadcast_source_test_suite_fixture_init()
163 free(param->params[0].codec_cfg); in bap_broadcast_source_test_suite_after()
234 struct bt_audio_codec_cfg *codec_cfg = bap_stream->codec_cfg; in ZTEST_F() local
237 zassert_equal(bt_audio_codec_cfg_get_freq(codec_cfg), in ZTEST_F()
239 zassert_equal(bt_audio_codec_cfg_get_frame_dur(codec_cfg), in ZTEST_F()
[all …]

123