Lines Matching full:ep
79 void bt_bap_stream_attach(struct bt_conn *conn, struct bt_bap_stream *stream, struct bt_bap_ep *ep, 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()
92 stream->ep = ep; in bt_bap_stream_attach()
93 ep->stream = stream; in bt_bap_stream_attach()
98 if (stream != NULL && stream->ep != NULL && stream->ep->iso != NULL) { in bt_bap_stream_iso_chan_get()
99 return &stream->ep->iso->chan; in bt_bap_stream_iso_chan_get()
111 int bt_bap_ep_get_info(const struct bt_bap_ep *ep, struct bt_bap_ep_info *info) in bt_bap_ep_get_info() argument
115 CHECKIF(ep == NULL) { in bt_bap_ep_get_info()
116 LOG_DBG("ep is NULL"); in bt_bap_ep_get_info()
127 dir = ep->dir; in bt_bap_ep_get_info()
129 info->id = ep->status.id; in bt_bap_ep_get_info()
130 info->state = ep->status.state; in bt_bap_ep_get_info()
132 info->qos_pref = &ep->qos_pref; in bt_bap_ep_get_info()
134 if (ep->iso == NULL) { in bt_bap_ep_get_info()
138 info->paired_ep = bt_bap_iso_get_paired_ep(ep); in bt_bap_ep_get_info()
139 info->iso_chan = &ep->iso->chan; in bt_bap_ep_get_info()
144 if (IS_ENABLED(CONFIG_BT_AUDIO_TX) && ep->stream != NULL) { in bt_bap_ep_get_info()
145 if (IS_ENABLED(CONFIG_BT_BAP_BROADCAST_SOURCE) && bt_bap_ep_is_broadcast_src(ep)) { in bt_bap_ep_get_info()
148 bt_bap_ep_is_broadcast_snk(ep)) { in bt_bap_ep_get_info()
151 bt_bap_ep_is_unicast_client(ep)) { in bt_bap_ep_get_info()
153 if (ep->stream->conn != NULL) { in bt_bap_ep_get_info()
159 if (ep->stream->conn != NULL) { in bt_bap_ep_get_info()
346 if (stream == NULL || stream->ep == NULL) { in bt_bap_stream_can_send()
350 err = bt_bap_ep_get_info(stream->ep, &info); in bt_bap_stream_can_send()
362 struct bt_bap_ep *ep; in bap_stream_send() local
370 if (stream->ep == NULL) { in bap_stream_send()
371 LOG_DBG("stream->ep %p is NULL", stream); in bap_stream_send()
381 ep = stream->ep; in bap_stream_send()
383 if (ep->status.state != BT_BAP_EP_STATE_STREAMING) { in bap_stream_send()
385 bt_bap_ep_state_str(ep->status.state)); in bap_stream_send()
473 stream_ep = stream->ep; in bt_bap_stream_can_disconnect()
500 bt_bap_ep_is_broadcast_src(stream->ep)) || in bt_bap_stream_is_broadcast()
501 (IS_ENABLED(CONFIG_BT_BAP_BROADCAST_SINK) && bt_bap_ep_is_broadcast_snk(stream->ep)); in bt_bap_stream_is_broadcast()
507 const struct bt_bap_qos_cfg_pref *qos_pref = &stream->ep->qos_pref; in bt_bap_stream_verify_qos()
527 LOG_DBG("stream %p conn %p ep %p", stream, (void *)stream->conn, (void *)stream->ep); in bt_bap_stream_detach()
534 stream->ep->stream = NULL; in bt_bap_stream_detach()
535 stream->ep = NULL; in bt_bap_stream_detach()
574 if (stream->ep != NULL && stream->ep->iso != NULL) { in bt_bap_stream_reset()
575 bt_bap_iso_unbind_ep(stream->ep->iso, stream->ep); in bt_bap_stream_reset()
594 int bt_bap_stream_config(struct bt_conn *conn, struct bt_bap_stream *stream, struct bt_bap_ep *ep, in bt_bap_stream_config() argument
600 LOG_DBG("conn %p stream %p, ep %p codec_cfg %p codec id 0x%02x " in bt_bap_stream_config()
601 "codec cid 0x%04x codec vid 0x%04x", (void *)conn, stream, ep, in bt_bap_stream_config()
605 CHECKIF(conn == NULL || stream == NULL || codec_cfg == NULL || ep == NULL) { in bt_bap_stream_config()
621 switch (ep->status.state) { in bt_bap_stream_config()
630 LOG_ERR("Invalid state: %s", bt_bap_ep_state_str(ep->status.state)); in bt_bap_stream_config()
634 bt_bap_stream_attach(conn, stream, ep, codec_cfg); in bt_bap_stream_config()
689 if (stream == NULL || stream->ep == NULL || stream->conn == NULL) { in bt_bap_stream_enable()
701 if (stream->ep->status.state != BT_BAP_EP_STATE_QOS_CONFIGURED) { in bt_bap_stream_enable()
702 LOG_ERR("Invalid state: %s", bt_bap_ep_state_str(stream->ep->status.state)); in bt_bap_stream_enable()
717 struct bt_bap_ep *ep; in bt_bap_stream_stop() local
721 if (stream == NULL || stream->ep == NULL || stream->conn == NULL) { in bt_bap_stream_stop()
732 ep = stream->ep; in bt_bap_stream_stop()
734 switch (ep->status.state) { in bt_bap_stream_stop()
739 LOG_ERR("Invalid state: %s", bt_bap_ep_state_str(ep->status.state)); in bt_bap_stream_stop()
762 CHECKIF(stream == NULL || stream->ep == NULL || stream->conn == NULL) { in bt_bap_stream_reconfig()
772 state = stream->ep->status.state; in bt_bap_stream_reconfig()
809 LOG_DBG("stream %p ep %p", stream, stream == NULL ? NULL : stream->ep); in bt_bap_stream_connect()
811 CHECKIF(stream == NULL || stream->ep == NULL || stream->conn == NULL) { in bt_bap_stream_connect()
819 state = stream->ep->status.state; in bt_bap_stream_connect()
844 LOG_DBG("stream %p ep %p", stream, stream == NULL ? NULL : stream->ep); in bt_bap_stream_start()
846 CHECKIF(stream == NULL || stream->ep == NULL || stream->conn == NULL) { in bt_bap_stream_start()
851 state = stream->ep->status.state; in bt_bap_stream_start()
886 CHECKIF(stream == NULL || stream->ep == NULL || stream->conn == NULL) { in bt_bap_stream_metadata()
896 state = stream->ep->status.state; in bt_bap_stream_metadata()
933 CHECKIF(stream == NULL || stream->ep == NULL || stream->conn == NULL) { in bt_bap_stream_disable()
938 state = stream->ep->status.state; in bt_bap_stream_disable()
975 CHECKIF(stream == NULL || stream->ep == NULL || stream->conn == NULL) { in bt_bap_stream_release()
976 LOG_DBG("Invalid stream (ep %p, conn %p)", stream->ep, (void *)stream->conn); in bt_bap_stream_release()
980 state = stream->ep->status.state; in bt_bap_stream_release()