Lines Matching full:ep
127 struct bt_a2dp_ep *ep; in a2dp_get_capabilities_ind() local
136 ep = CONTAINER_OF(sep, struct bt_a2dp_ep, sep); in a2dp_get_capabilities_ind()
138 net_buf_add_u8(rsp_buf, ep->codec_cap->len + 2U); in a2dp_get_capabilities_ind()
142 net_buf_add_u8(rsp_buf, ep->codec_type); in a2dp_get_capabilities_ind()
144 net_buf_add_mem(rsp_buf, &ep->codec_cap->codec_ie[0], ep->codec_cap->len); in a2dp_get_capabilities_ind()
153 struct bt_a2dp_ep *ep; in a2dp_process_config_ind() local
168 ep = CONTAINER_OF(sep, struct bt_a2dp_ep, sep); in a2dp_process_config_ind()
189 sbc = (struct bt_a2dp_codec_sbc_params *)&ep->codec_cap->codec_ie[0]; in a2dp_process_config_ind()
200 /* For reconfig, ep->stream must already be valid, callback can be NULL as default accept. in a2dp_process_config_ind()
204 stream = ep->stream; in a2dp_process_config_ind()
224 err = a2dp_cb->config_req(a2dp, ep, &cfg, &stream, &rsp_err_code); in a2dp_process_config_ind()
227 stream->local_ep = ep; in a2dp_process_config_ind()
231 ep->stream = stream; in a2dp_process_config_ind()
271 struct bt_a2dp_ep *ep; in bt_a2dp_media_data_callback() local
275 ep = CONTAINER_OF(sep, struct bt_a2dp_ep, sep); in bt_a2dp_media_data_callback()
276 if (ep->stream == NULL || buf->len < sizeof(*media_hdr)) { in bt_a2dp_media_data_callback()
279 stream = ep->stream; in bt_a2dp_media_data_callback()
295 struct bt_a2dp_ep *ep; in a2dp_ctrl_ind() local
299 ep = CONTAINER_OF(sep, struct bt_a2dp_ep, sep); in a2dp_ctrl_ind()
300 if (ep->stream == NULL) { in a2dp_ctrl_ind()
304 stream = ep->stream; in a2dp_ctrl_ind()
318 ep->stream = NULL; in a2dp_ctrl_ind()
331 struct bt_a2dp_ep *ep = CONTAINER_OF(sep, struct bt_a2dp_ep, sep); in a2dp_open_ind() local
337 done_cb = (ep->stream != NULL && ep->stream->ops != NULL) ? ep->stream->ops->established in a2dp_open_ind()
344 struct bt_a2dp_ep *ep = CONTAINER_OF(sep, struct bt_a2dp_ep, sep); in a2dp_start_ind() local
350 done_cb = (ep->stream != NULL && ep->stream->ops != NULL) ? ep->stream->ops->started : NULL; in a2dp_start_ind()
356 struct bt_a2dp_ep *ep = CONTAINER_OF(sep, struct bt_a2dp_ep, sep); in a2dp_suspend_ind() local
363 (ep->stream != NULL && ep->stream->ops != NULL) ? ep->stream->ops->suspended : NULL; in a2dp_suspend_ind()
369 struct bt_a2dp_ep *ep = CONTAINER_OF(sep, struct bt_a2dp_ep, sep); in a2dp_close_ind() local
376 (ep->stream != NULL && ep->stream->ops != NULL) ? ep->stream->ops->released : NULL; in a2dp_close_ind()
382 struct bt_a2dp_ep *ep = CONTAINER_OF(sep, struct bt_a2dp_ep, sep); in a2dp_abort_ind() local
388 done_cb = (ep->stream != NULL && ep->stream->ops != NULL) ? ep->stream->ops->aborted : NULL; in a2dp_abort_ind()
395 struct bt_a2dp_ep *ep; in bt_a2dp_set_config_cb() local
399 ep = CONTAINER_OF(a2dp->set_config_param.sep, struct bt_a2dp_ep, sep); in bt_a2dp_set_config_cb()
400 if (ep->stream == NULL) { in bt_a2dp_set_config_cb()
403 if ((ep->stream == NULL) || (SET_CONF_REQ(req) != &a2dp->set_config_param)) { in bt_a2dp_set_config_cb()
406 stream = ep->stream; in bt_a2dp_set_config_cb()
455 struct bt_a2dp_ep *ep = NULL; in bt_a2dp_get_capabilities_cb() local
462 user_ret = a2dp->discover_cb_param->cb(a2dp, info, &ep); in bt_a2dp_get_capabilities_cb()
463 if (ep != NULL) { in bt_a2dp_get_capabilities_cb()
464 ep->codec_type = info->codec_type; in bt_a2dp_get_capabilities_cb()
465 ep->sep.sep_info = info->sep_info; in bt_a2dp_get_capabilities_cb()
466 *ep->codec_cap = info->codec_cap; in bt_a2dp_get_capabilities_cb()
467 ep->stream = NULL; in bt_a2dp_get_capabilities_cb()
652 struct bt_a2dp_ep *ep; in bt_a2dp_ctrl_cb() local
655 ep = CONTAINER_OF(a2dp->ctrl_param.sep, struct bt_a2dp_ep, sep); in bt_a2dp_ctrl_cb()
656 if ((ep->stream == NULL) || (CTRL_REQ(req) != &a2dp->ctrl_param)) { in bt_a2dp_ctrl_cb()
659 stream = ep->stream; in bt_a2dp_ctrl_cb()
661 ep->stream = NULL; in bt_a2dp_ctrl_cb()
678 struct bt_a2dp_ep *ep = CONTAINER_OF(CTRL_REQ(req)->sep, struct bt_a2dp_ep, sep); in bt_a2dp_open_cb() local
680 bt_a2dp_done_cb done_cb = (ep->stream != NULL && ep->stream->ops != NULL) in bt_a2dp_open_cb()
681 ? ep->stream->ops->established in bt_a2dp_open_cb()
689 struct bt_a2dp_ep *ep = CONTAINER_OF(CTRL_REQ(req)->sep, struct bt_a2dp_ep, sep); in bt_a2dp_start_cb() local
692 (ep->stream != NULL && ep->stream->ops != NULL) ? ep->stream->ops->started : NULL; in bt_a2dp_start_cb()
699 struct bt_a2dp_ep *ep = CONTAINER_OF(CTRL_REQ(req)->sep, struct bt_a2dp_ep, sep); in bt_a2dp_suspend_cb() local
702 (ep->stream != NULL && ep->stream->ops != NULL) ? ep->stream->ops->suspended : NULL; in bt_a2dp_suspend_cb()
709 struct bt_a2dp_ep *ep = CONTAINER_OF(CTRL_REQ(req)->sep, struct bt_a2dp_ep, sep); in bt_a2dp_close_cb() local
712 (ep->stream != NULL && ep->stream->ops != NULL) ? ep->stream->ops->released : NULL; in bt_a2dp_close_cb()
719 struct bt_a2dp_ep *ep = CONTAINER_OF(CTRL_REQ(req)->sep, struct bt_a2dp_ep, sep); in bt_a2dp_abort_cb() local
722 (ep->stream != NULL && ep->stream->ops != NULL) ? ep->stream->ops->aborted : NULL; in bt_a2dp_abort_cb()
858 struct bt_a2dp_ep *ep; in a2dp_stream_l2cap_disconnected() local
861 ep = CONTAINER_OF(sep, struct bt_a2dp_ep, sep); in a2dp_stream_l2cap_disconnected()
862 if (ep->stream != NULL) { in a2dp_stream_l2cap_disconnected()
864 struct bt_a2dp_stream *stream = ep->stream; in a2dp_stream_l2cap_disconnected()
867 /* Many places set ep->stream as NULL like abort and close. in a2dp_stream_l2cap_disconnected()
871 ep->stream = NULL; in a2dp_stream_l2cap_disconnected()
966 int bt_a2dp_register_ep(struct bt_a2dp_ep *ep, uint8_t media_type, uint8_t sep_type) in bt_a2dp_register_ep() argument
970 __ASSERT_NO_MSG(ep); in bt_a2dp_register_ep()
974 ep->sep.media_data_cb = bt_a2dp_media_data_callback; in bt_a2dp_register_ep()
976 ep->sep.media_data_cb = NULL; in bt_a2dp_register_ep()
979 ep->sep.media_data_cb = NULL; in bt_a2dp_register_ep()
981 err = bt_avdtp_register_sep(media_type, sep_type, &(ep->sep)); in bt_a2dp_register_ep()