Lines Matching refs:meta
773 net_buf_simple_add_mem(buf, ep->codec_cfg.meta, ep->codec_cfg.meta_len); in ascs_ep_get_status_enable()
2268 static int ascs_verify_metadata(struct bt_bap_ep *ep, const struct bt_ascs_metadata *meta, in ascs_verify_metadata() argument
2280 if (meta->len > CONFIG_BT_AUDIO_CODEC_CFG_MAX_METADATA_SIZE) { in ascs_verify_metadata()
2281 LOG_WRN("Not enough space for Codec Config Metadata: %u > %d", meta->len, in ascs_verify_metadata()
2289 err = bt_audio_data_parse(meta->data, meta->len, ascs_parse_metadata, &result); in ascs_verify_metadata()
2304 static void ase_metadata(struct bt_ascs_ase *ase, struct bt_ascs_metadata *meta) in ase_metadata() argument
2313 LOG_DBG("ase %p meta->len %u", ase, meta->len); in ase_metadata()
2333 err = ascs_verify_metadata(ep, meta, &rsp); in ase_metadata()
2339 err = unicast_server_cb->metadata(stream, meta->data, meta->len, &rsp); in ase_metadata()
2359 ep->codec_cfg.meta_len = meta->len; in ase_metadata()
2360 (void)memcpy(ep->codec_cfg.meta, meta->data, meta->len); in ase_metadata()
2367 static int ase_enable(struct bt_ascs_ase *ase, struct bt_ascs_metadata *meta) in ase_enable() argument
2375 LOG_DBG("ase %p meta->len %u", ase, meta->len); in ase_enable()
2390 err = ascs_verify_metadata(ep, meta, &rsp); in ase_enable()
2396 err = unicast_server_cb->enable(stream, meta->data, meta->len, &rsp); in ase_enable()
2417 ep->codec_cfg.meta_len = meta->len; in ase_enable()
2418 (void)memcpy(ep->codec_cfg.meta, meta->data, meta->len); in ase_enable()
2474 struct bt_ascs_metadata *meta; in ascs_enable() local
2488 meta = net_buf_simple_pull_mem(buf, sizeof(*meta)); in ascs_enable()
2489 (void)net_buf_simple_pull(buf, meta->len); in ascs_enable()
2491 if (!is_valid_ase_id(meta->ase)) { in ascs_enable()
2492 ascs_cp_rsp_add(meta->ase, BT_BAP_ASCS_RSP_CODE_INVALID_ASE, in ascs_enable()
2494 LOG_WRN("Unknown ase 0x%02x", meta->ase); in ascs_enable()
2498 ase = ase_find(conn, meta->ase); in ascs_enable()
2500 LOG_DBG("Invalid operation for idle ase 0x%02x", meta->ase); in ascs_enable()
2501 ascs_cp_rsp_add(meta->ase, BT_BAP_ASCS_RSP_CODE_INVALID_ASE_STATE, in ascs_enable()
2506 ase_enable(ase, meta); in ascs_enable()
2912 struct bt_ascs_metadata *meta; in ascs_metadata() local
2926 meta = net_buf_simple_pull_mem(buf, sizeof(*meta)); in ascs_metadata()
2927 (void)net_buf_simple_pull(buf, meta->len); in ascs_metadata()
2929 if (meta->len > CONFIG_BT_AUDIO_CODEC_CFG_MAX_METADATA_SIZE) { in ascs_metadata()
2930 LOG_DBG("Cannot store %u octets of metadata", meta->len); in ascs_metadata()
2932 ascs_cp_rsp_add(meta->ase, BT_BAP_ASCS_RSP_CODE_NO_MEM, in ascs_metadata()
2937 if (!is_valid_ase_id(meta->ase)) { in ascs_metadata()
2938 ascs_cp_rsp_add(meta->ase, BT_BAP_ASCS_RSP_CODE_INVALID_ASE, in ascs_metadata()
2940 LOG_WRN("Unknown ase 0x%02x", meta->ase); in ascs_metadata()
2944 ase = ase_find(conn, meta->ase); in ascs_metadata()
2946 LOG_DBG("Invalid operation for idle ase 0x%02x", meta->ase); in ascs_metadata()
2947 ascs_cp_rsp_add(meta->ase, BT_BAP_ASCS_RSP_CODE_INVALID_ASE_STATE, in ascs_metadata()
2952 ase_metadata(ase, meta); in ascs_metadata()