Lines Matching refs:codec_cfg

260 					       struct bt_audio_codec_cfg *codec_cfg)  in init_net_buf_simple_from_codec_cfg()  argument
262 buf->__buf = codec_cfg->data; in init_net_buf_simple_from_codec_cfg()
263 buf->data = codec_cfg->data; in init_net_buf_simple_from_codec_cfg()
264 buf->size = sizeof(codec_cfg->data); in init_net_buf_simple_from_codec_cfg()
265 buf->len = codec_cfg->data_len; in init_net_buf_simple_from_codec_cfg()
268 int bt_audio_codec_cfg_get_val(const struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_get_val() argument
271 CHECKIF(codec_cfg == NULL) { in bt_audio_codec_cfg_get_val()
281 return bt_audio_data_get_val(codec_cfg->data, codec_cfg->data_len, (uint8_t)type, data); in bt_audio_codec_cfg_get_val()
284 int bt_audio_codec_cfg_set_val(struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_set_val() argument
291 CHECKIF(codec_cfg == NULL) { in bt_audio_codec_cfg_set_val()
306 init_net_buf_simple_from_codec_cfg(&buf, codec_cfg); in bt_audio_codec_cfg_set_val()
310 codec_cfg->data_len = ret; in bt_audio_codec_cfg_set_val()
316 int bt_audio_codec_cfg_unset_val(struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_unset_val() argument
322 CHECKIF(codec_cfg == NULL) { in bt_audio_codec_cfg_unset_val()
327 init_net_buf_simple_from_codec_cfg(&buf, codec_cfg); in bt_audio_codec_cfg_unset_val()
331 codec_cfg->data_len = ret; in bt_audio_codec_cfg_unset_val()
337 int bt_audio_codec_cfg_get_freq(const struct bt_audio_codec_cfg *codec_cfg) in bt_audio_codec_cfg_get_freq() argument
343 CHECKIF(codec_cfg == NULL) { in bt_audio_codec_cfg_get_freq()
348 data_len = bt_audio_codec_cfg_get_val(codec_cfg, BT_AUDIO_CODEC_CFG_FREQ, &data); in bt_audio_codec_cfg_get_freq()
366 int bt_audio_codec_cfg_set_freq(struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_set_freq() argument
378 return bt_audio_codec_cfg_set_val(codec_cfg, BT_AUDIO_CODEC_CFG_FREQ, &freq_u8, in bt_audio_codec_cfg_set_freq()
382 int bt_audio_codec_cfg_get_frame_dur(const struct bt_audio_codec_cfg *codec_cfg) in bt_audio_codec_cfg_get_frame_dur() argument
388 CHECKIF(codec_cfg == NULL) { in bt_audio_codec_cfg_get_frame_dur()
393 data_len = bt_audio_codec_cfg_get_val(codec_cfg, BT_AUDIO_CODEC_CFG_DURATION, &data); in bt_audio_codec_cfg_get_frame_dur()
411 int bt_audio_codec_cfg_set_frame_dur(struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_set_frame_dur() argument
423 return bt_audio_codec_cfg_set_val(codec_cfg, BT_AUDIO_CODEC_CFG_DURATION, in bt_audio_codec_cfg_set_frame_dur()
427 int bt_audio_codec_cfg_get_chan_allocation(const struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_get_chan_allocation() argument
436 CHECKIF(codec_cfg == NULL) { in bt_audio_codec_cfg_get_chan_allocation()
446 bt_audio_codec_cfg_get_val(codec_cfg, BT_AUDIO_CODEC_CFG_CHAN_ALLOC, &data); in bt_audio_codec_cfg_get_chan_allocation()
448 if (fallback_to_default && codec_cfg->id == BT_HCI_CODING_FORMAT_LC3) { in bt_audio_codec_cfg_get_chan_allocation()
466 int bt_audio_codec_cfg_set_chan_allocation(struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_set_chan_allocation() argument
478 return bt_audio_codec_cfg_set_val(codec_cfg, BT_AUDIO_CODEC_CFG_CHAN_ALLOC, in bt_audio_codec_cfg_set_chan_allocation()
483 int bt_audio_codec_cfg_get_octets_per_frame(const struct bt_audio_codec_cfg *codec_cfg) in bt_audio_codec_cfg_get_octets_per_frame() argument
488 CHECKIF(codec_cfg == NULL) { in bt_audio_codec_cfg_get_octets_per_frame()
494 bt_audio_codec_cfg_get_val(codec_cfg, BT_AUDIO_CODEC_CFG_FRAME_LEN, &data); in bt_audio_codec_cfg_get_octets_per_frame()
506 int bt_audio_codec_cfg_set_octets_per_frame(struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_set_octets_per_frame() argument
513 return bt_audio_codec_cfg_set_val(codec_cfg, BT_AUDIO_CODEC_CFG_FRAME_LEN, in bt_audio_codec_cfg_set_octets_per_frame()
518 int bt_audio_codec_cfg_get_frame_blocks_per_sdu(const struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_get_frame_blocks_per_sdu() argument
524 CHECKIF(codec_cfg == NULL) { in bt_audio_codec_cfg_get_frame_blocks_per_sdu()
529 data_len = bt_audio_codec_cfg_get_val(codec_cfg, in bt_audio_codec_cfg_get_frame_blocks_per_sdu()
532 if (fallback_to_default && codec_cfg->id == BT_HCI_CODING_FORMAT_LC3) { in bt_audio_codec_cfg_get_frame_blocks_per_sdu()
546 int bt_audio_codec_cfg_set_frame_blocks_per_sdu(struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_set_frame_blocks_per_sdu() argument
549 return bt_audio_codec_cfg_set_val(codec_cfg, BT_AUDIO_CODEC_CFG_FRAME_BLKS_PER_SDU, in bt_audio_codec_cfg_set_frame_blocks_per_sdu()
1172 int bt_audio_codec_cfg_meta_get_val(const struct bt_audio_codec_cfg *codec_cfg, uint8_t type, in bt_audio_codec_cfg_meta_get_val() argument
1175 CHECKIF(codec_cfg == NULL) { in bt_audio_codec_cfg_meta_get_val()
1180 return codec_meta_get_val(codec_cfg->meta, codec_cfg->meta_len, type, data); in bt_audio_codec_cfg_meta_get_val()
1183 int bt_audio_codec_cfg_meta_set_val(struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_meta_set_val() argument
1189 CHECKIF(codec_cfg == NULL) { in bt_audio_codec_cfg_meta_set_val()
1194 ret = codec_meta_set_val(codec_cfg->meta, codec_cfg->meta_len, ARRAY_SIZE(codec_cfg->meta), in bt_audio_codec_cfg_meta_set_val()
1197 codec_cfg->meta_len = ret; in bt_audio_codec_cfg_meta_set_val()
1203 int bt_audio_codec_cfg_meta_unset_val(struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_meta_unset_val() argument
1208 CHECKIF(codec_cfg == NULL) { in bt_audio_codec_cfg_meta_unset_val()
1213 ret = codec_meta_unset_val(codec_cfg->meta, codec_cfg->meta_len, in bt_audio_codec_cfg_meta_unset_val()
1214 ARRAY_SIZE(codec_cfg->meta), type); in bt_audio_codec_cfg_meta_unset_val()
1216 codec_cfg->meta_len = ret; in bt_audio_codec_cfg_meta_unset_val()
1222 int bt_audio_codec_cfg_meta_get_pref_context(const struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_meta_get_pref_context() argument
1227 CHECKIF(codec_cfg == NULL) { in bt_audio_codec_cfg_meta_get_pref_context()
1232 ret = codec_meta_get_pref_context(codec_cfg->meta, codec_cfg->meta_len); in bt_audio_codec_cfg_meta_get_pref_context()
1234 if (ret == -ENODATA && fallback_to_default && codec_cfg->id == BT_HCI_CODING_FORMAT_LC3) { in bt_audio_codec_cfg_meta_get_pref_context()
1241 int bt_audio_codec_cfg_meta_set_pref_context(struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_meta_set_pref_context() argument
1246 ret = codec_meta_set_pref_context(codec_cfg->meta, codec_cfg->meta_len, in bt_audio_codec_cfg_meta_set_pref_context()
1247 ARRAY_SIZE(codec_cfg->meta), ctx); in bt_audio_codec_cfg_meta_set_pref_context()
1249 codec_cfg->meta_len = ret; in bt_audio_codec_cfg_meta_set_pref_context()
1255 int bt_audio_codec_cfg_meta_get_stream_context(const struct bt_audio_codec_cfg *codec_cfg) in bt_audio_codec_cfg_meta_get_stream_context() argument
1257 CHECKIF(codec_cfg == NULL) { in bt_audio_codec_cfg_meta_get_stream_context()
1262 return codec_meta_get_stream_context(codec_cfg->meta, codec_cfg->meta_len); in bt_audio_codec_cfg_meta_get_stream_context()
1265 int bt_audio_codec_cfg_meta_set_stream_context(struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_meta_set_stream_context() argument
1270 ret = codec_meta_set_stream_context(codec_cfg->meta, codec_cfg->meta_len, in bt_audio_codec_cfg_meta_set_stream_context()
1271 ARRAY_SIZE(codec_cfg->meta), ctx); in bt_audio_codec_cfg_meta_set_stream_context()
1273 codec_cfg->meta_len = ret; in bt_audio_codec_cfg_meta_set_stream_context()
1279 int bt_audio_codec_cfg_meta_get_program_info(const struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_meta_get_program_info() argument
1282 CHECKIF(codec_cfg == NULL) { in bt_audio_codec_cfg_meta_get_program_info()
1287 return codec_meta_get_program_info(codec_cfg->meta, codec_cfg->meta_len, program_info); in bt_audio_codec_cfg_meta_get_program_info()
1290 int bt_audio_codec_cfg_meta_set_program_info(struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_meta_set_program_info() argument
1295 ret = codec_meta_set_program_info(codec_cfg->meta, codec_cfg->meta_len, in bt_audio_codec_cfg_meta_set_program_info()
1296 ARRAY_SIZE(codec_cfg->meta), program_info, in bt_audio_codec_cfg_meta_set_program_info()
1299 codec_cfg->meta_len = ret; in bt_audio_codec_cfg_meta_set_program_info()
1305 int bt_audio_codec_cfg_meta_get_lang(const struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_meta_get_lang() argument
1308 CHECKIF(codec_cfg == NULL) { in bt_audio_codec_cfg_meta_get_lang()
1313 return codec_meta_get_lang(codec_cfg->meta, codec_cfg->meta_len, lang); in bt_audio_codec_cfg_meta_get_lang()
1316 int bt_audio_codec_cfg_meta_set_lang(struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_meta_set_lang() argument
1321 ret = codec_meta_set_lang(codec_cfg->meta, codec_cfg->meta_len, ARRAY_SIZE(codec_cfg->meta), in bt_audio_codec_cfg_meta_set_lang()
1324 codec_cfg->meta_len = ret; in bt_audio_codec_cfg_meta_set_lang()
1330 int bt_audio_codec_cfg_meta_get_ccid_list(const struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_meta_get_ccid_list() argument
1333 CHECKIF(codec_cfg == NULL) { in bt_audio_codec_cfg_meta_get_ccid_list()
1338 return codec_meta_get_ccid_list(codec_cfg->meta, codec_cfg->meta_len, ccid_list); in bt_audio_codec_cfg_meta_get_ccid_list()
1341 int bt_audio_codec_cfg_meta_set_ccid_list(struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_meta_set_ccid_list() argument
1346 ret = codec_meta_set_ccid_list(codec_cfg->meta, codec_cfg->meta_len, in bt_audio_codec_cfg_meta_set_ccid_list()
1347 ARRAY_SIZE(codec_cfg->meta), ccid_list, ccid_list_len); in bt_audio_codec_cfg_meta_set_ccid_list()
1349 codec_cfg->meta_len = ret; in bt_audio_codec_cfg_meta_set_ccid_list()
1355 int bt_audio_codec_cfg_meta_get_parental_rating(const struct bt_audio_codec_cfg *codec_cfg) in bt_audio_codec_cfg_meta_get_parental_rating() argument
1357 CHECKIF(codec_cfg == NULL) { in bt_audio_codec_cfg_meta_get_parental_rating()
1362 return codec_meta_get_parental_rating(codec_cfg->meta, codec_cfg->meta_len); in bt_audio_codec_cfg_meta_get_parental_rating()
1365 int bt_audio_codec_cfg_meta_set_parental_rating(struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_meta_set_parental_rating() argument
1370 ret = codec_meta_set_parental_rating(codec_cfg->meta, codec_cfg->meta_len, in bt_audio_codec_cfg_meta_set_parental_rating()
1371 ARRAY_SIZE(codec_cfg->meta), parental_rating); in bt_audio_codec_cfg_meta_set_parental_rating()
1373 codec_cfg->meta_len = ret; in bt_audio_codec_cfg_meta_set_parental_rating()
1379 int bt_audio_codec_cfg_meta_get_program_info_uri(const struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_meta_get_program_info_uri() argument
1382 CHECKIF(codec_cfg == NULL) { in bt_audio_codec_cfg_meta_get_program_info_uri()
1387 return codec_meta_get_program_info_uri(codec_cfg->meta, codec_cfg->meta_len, in bt_audio_codec_cfg_meta_get_program_info_uri()
1391 int bt_audio_codec_cfg_meta_set_program_info_uri(struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_meta_set_program_info_uri() argument
1397 ret = codec_meta_set_program_info_uri(codec_cfg->meta, codec_cfg->meta_len, in bt_audio_codec_cfg_meta_set_program_info_uri()
1398 ARRAY_SIZE(codec_cfg->meta), program_info_uri, in bt_audio_codec_cfg_meta_set_program_info_uri()
1401 codec_cfg->meta_len = ret; in bt_audio_codec_cfg_meta_set_program_info_uri()
1407 int bt_audio_codec_cfg_meta_get_audio_active_state(const struct bt_audio_codec_cfg *codec_cfg) in bt_audio_codec_cfg_meta_get_audio_active_state() argument
1409 CHECKIF(codec_cfg == NULL) { in bt_audio_codec_cfg_meta_get_audio_active_state()
1414 return codec_meta_get_audio_active_state(codec_cfg->meta, codec_cfg->meta_len); in bt_audio_codec_cfg_meta_get_audio_active_state()
1417 int bt_audio_codec_cfg_meta_set_audio_active_state(struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_meta_set_audio_active_state() argument
1422 ret = codec_meta_set_audio_active_state(codec_cfg->meta, codec_cfg->meta_len, in bt_audio_codec_cfg_meta_set_audio_active_state()
1423 ARRAY_SIZE(codec_cfg->meta), state); in bt_audio_codec_cfg_meta_set_audio_active_state()
1425 codec_cfg->meta_len = ret; in bt_audio_codec_cfg_meta_set_audio_active_state()
1432 const struct bt_audio_codec_cfg *codec_cfg) in bt_audio_codec_cfg_meta_get_bcast_audio_immediate_rend_flag() argument
1434 CHECKIF(codec_cfg == NULL) { in bt_audio_codec_cfg_meta_get_bcast_audio_immediate_rend_flag()
1439 return codec_meta_get_bcast_audio_immediate_rend_flag(codec_cfg->meta, codec_cfg->meta_len); in bt_audio_codec_cfg_meta_get_bcast_audio_immediate_rend_flag()
1443 struct bt_audio_codec_cfg *codec_cfg) in bt_audio_codec_cfg_meta_set_bcast_audio_immediate_rend_flag() argument
1447 ret = codec_meta_set_bcast_audio_immediate_rend_flag(codec_cfg->meta, codec_cfg->meta_len, in bt_audio_codec_cfg_meta_set_bcast_audio_immediate_rend_flag()
1448 ARRAY_SIZE(codec_cfg->meta)); in bt_audio_codec_cfg_meta_set_bcast_audio_immediate_rend_flag()
1450 codec_cfg->meta_len = ret; in bt_audio_codec_cfg_meta_set_bcast_audio_immediate_rend_flag()
1457 const struct bt_audio_codec_cfg *codec_cfg) in bt_audio_codec_cfg_meta_get_assisted_listening_stream() argument
1459 CHECKIF(codec_cfg == NULL) { in bt_audio_codec_cfg_meta_get_assisted_listening_stream()
1464 return codec_meta_get_assisted_listening_stream(codec_cfg->meta, codec_cfg->meta_len); in bt_audio_codec_cfg_meta_get_assisted_listening_stream()
1468 struct bt_audio_codec_cfg *codec_cfg, enum bt_audio_assisted_listening_stream val) in bt_audio_codec_cfg_meta_set_assisted_listening_stream() argument
1472 ret = codec_meta_set_assisted_listening_stream(codec_cfg->meta, codec_cfg->meta_len, in bt_audio_codec_cfg_meta_set_assisted_listening_stream()
1473 ARRAY_SIZE(codec_cfg->meta), val); in bt_audio_codec_cfg_meta_set_assisted_listening_stream()
1475 codec_cfg->meta_len = ret; in bt_audio_codec_cfg_meta_set_assisted_listening_stream()
1481 int bt_audio_codec_cfg_meta_get_extended(const struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_meta_get_extended() argument
1484 CHECKIF(codec_cfg == NULL) { in bt_audio_codec_cfg_meta_get_extended()
1489 return codec_meta_get_extended(codec_cfg->meta, codec_cfg->meta_len, extended_meta); in bt_audio_codec_cfg_meta_get_extended()
1492 int bt_audio_codec_cfg_meta_set_extended(struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_meta_set_extended() argument
1497 ret = codec_meta_set_extended(codec_cfg->meta, codec_cfg->meta_len, in bt_audio_codec_cfg_meta_set_extended()
1498 ARRAY_SIZE(codec_cfg->meta), extended_meta, in bt_audio_codec_cfg_meta_set_extended()
1501 codec_cfg->meta_len = ret; in bt_audio_codec_cfg_meta_set_extended()
1507 int bt_audio_codec_cfg_meta_get_vendor(const struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_meta_get_vendor() argument
1510 CHECKIF(codec_cfg == NULL) { in bt_audio_codec_cfg_meta_get_vendor()
1515 return codec_meta_get_vendor(codec_cfg->meta, codec_cfg->meta_len, vendor_meta); in bt_audio_codec_cfg_meta_get_vendor()
1518 int bt_audio_codec_cfg_meta_set_vendor(struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_meta_set_vendor() argument
1523 ret = codec_meta_set_vendor(codec_cfg->meta, codec_cfg->meta_len, in bt_audio_codec_cfg_meta_set_vendor()
1524 ARRAY_SIZE(codec_cfg->meta), vendor_meta, vendor_meta_len); in bt_audio_codec_cfg_meta_set_vendor()
1526 codec_cfg->meta_len = ret; in bt_audio_codec_cfg_meta_set_vendor()
1532 int bt_audio_codec_cfg_meta_get_broadcast_name(const struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_meta_get_broadcast_name() argument
1535 CHECKIF(codec_cfg == NULL) { in bt_audio_codec_cfg_meta_get_broadcast_name()
1540 return codec_meta_get_broadcast_name(codec_cfg->meta, codec_cfg->meta_len, broadcast_name); in bt_audio_codec_cfg_meta_get_broadcast_name()
1543 int bt_audio_codec_cfg_meta_set_broadcast_name(struct bt_audio_codec_cfg *codec_cfg, in bt_audio_codec_cfg_meta_set_broadcast_name() argument
1549 ret = codec_meta_set_broadcast_name(codec_cfg->meta, codec_cfg->meta_len, in bt_audio_codec_cfg_meta_set_broadcast_name()
1550 ARRAY_SIZE(codec_cfg->meta), broadcast_name, in bt_audio_codec_cfg_meta_set_broadcast_name()
1553 codec_cfg->meta_len = ret; in bt_audio_codec_cfg_meta_set_broadcast_name()