Lines Matching refs:req
32 #define DISCOVER_REQ(_req) CONTAINER_OF(_req, struct bt_avdtp_discover_params, req)
35 #define GET_CAP_REQ(_req) CONTAINER_OF(_req, struct bt_avdtp_get_capabilities_params, req)
38 #define SET_CONF_REQ(_req) CONTAINER_OF(_req, struct bt_avdtp_set_configuration_params, req)
41 #define CTRL_REQ(_req) CONTAINER_OF(_req, struct bt_avdtp_ctrl_params, req)
504 static int bt_a2dp_set_config_cb(struct bt_avdtp_req *req, struct net_buf *buf) in bt_a2dp_set_config_cb() argument
506 struct bt_a2dp *a2dp = SET_CONF_PARAM(SET_CONF_REQ(req)); in bt_a2dp_set_config_cb()
513 if ((ep->stream == NULL) || (SET_CONF_REQ(req) != &a2dp->set_config_param)) { in bt_a2dp_set_config_cb()
518 LOG_DBG("SET CONFIGURATION result:%d", req->status); in bt_a2dp_set_config_cb()
521 a2dp_cb->config_rsp(stream, req->status); in bt_a2dp_set_config_cb()
525 if ((!req->status) && (ops != NULL) && (ops->configured != NULL)) { in bt_a2dp_set_config_cb()
531 static int bt_a2dp_get_capabilities_cb(struct bt_avdtp_req *req, struct net_buf *buf) in bt_a2dp_get_capabilities_cb() argument
535 struct bt_a2dp *a2dp = GET_CAP_PARAM(GET_CAP_REQ(req)); in bt_a2dp_get_capabilities_cb()
540 if (GET_CAP_REQ(req) != &a2dp->get_capabilities_param || buf == NULL) { in bt_a2dp_get_capabilities_cb()
544 LOG_DBG("GET CAPABILITIES result:%d", req->status); in bt_a2dp_get_capabilities_cb()
545 if (req->status) { in bt_a2dp_get_capabilities_cb()
613 a2dp->get_capabilities_param.req.func = bt_a2dp_get_capabilities_cb; in bt_a2dp_get_sep_caps()
631 static int bt_a2dp_discover_cb(struct bt_avdtp_req *req, struct net_buf *buf) in bt_a2dp_discover_cb() argument
633 struct bt_a2dp *a2dp = DISCOVER_PARAM(DISCOVER_REQ(req)); in bt_a2dp_discover_cb()
637 LOG_DBG("DISCOVER result:%d", req->status); in bt_a2dp_discover_cb()
644 if (!(req->status)) { in bt_a2dp_discover_cb()
704 a2dp->discover_param.req.func = bt_a2dp_discover_cb; in bt_a2dp_discover()
731 a2dp->set_config_param.req.func = cb; in bt_a2dp_stream_config_set_param()
770 static int bt_a2dp_ctrl_cb(struct bt_avdtp_req *req, bt_a2dp_rsp_cb rsp_cb, bt_a2dp_done_cb done_cb, in bt_a2dp_ctrl_cb() argument
773 struct bt_a2dp *a2dp = CTRL_PARAM(CTRL_REQ(req)); in bt_a2dp_ctrl_cb()
778 if ((ep->stream == NULL) || (CTRL_REQ(req) != &a2dp->ctrl_param)) { in bt_a2dp_ctrl_cb()
788 LOG_DBG("ctrl result:%d", req->status); in bt_a2dp_ctrl_cb()
791 rsp_cb(stream, req->status); in bt_a2dp_ctrl_cb()
794 if ((!req->status) && (done_cb != NULL)) { in bt_a2dp_ctrl_cb()
801 static int bt_a2dp_open_cb(struct bt_avdtp_req *req, struct net_buf *buf) in bt_a2dp_open_cb() argument
803 struct bt_a2dp_ep *ep = CONTAINER_OF(CTRL_REQ(req)->sep, struct bt_a2dp_ep, sep); in bt_a2dp_open_cb()
809 return bt_a2dp_ctrl_cb(req, rsp_cb, done_cb, false); in bt_a2dp_open_cb()
812 static int bt_a2dp_start_cb(struct bt_avdtp_req *req, struct net_buf *buf) in bt_a2dp_start_cb() argument
814 struct bt_a2dp_ep *ep = CONTAINER_OF(CTRL_REQ(req)->sep, struct bt_a2dp_ep, sep); in bt_a2dp_start_cb()
819 return bt_a2dp_ctrl_cb(req, rsp_cb, done_cb, false); in bt_a2dp_start_cb()
822 static int bt_a2dp_suspend_cb(struct bt_avdtp_req *req, struct net_buf *buf) in bt_a2dp_suspend_cb() argument
824 struct bt_a2dp_ep *ep = CONTAINER_OF(CTRL_REQ(req)->sep, struct bt_a2dp_ep, sep); in bt_a2dp_suspend_cb()
829 return bt_a2dp_ctrl_cb(req, rsp_cb, done_cb, false); in bt_a2dp_suspend_cb()
832 static int bt_a2dp_close_cb(struct bt_avdtp_req *req, struct net_buf *buf) in bt_a2dp_close_cb() argument
834 struct bt_a2dp_ep *ep = CONTAINER_OF(CTRL_REQ(req)->sep, struct bt_a2dp_ep, sep); in bt_a2dp_close_cb()
839 return bt_a2dp_ctrl_cb(req, rsp_cb, done_cb, true); in bt_a2dp_close_cb()
842 static int bt_a2dp_abort_cb(struct bt_avdtp_req *req, struct net_buf *buf) in bt_a2dp_abort_cb() argument
844 struct bt_a2dp_ep *ep = CONTAINER_OF(CTRL_REQ(req)->sep, struct bt_a2dp_ep, sep); in bt_a2dp_abort_cb()
849 return bt_a2dp_ctrl_cb(req, rsp_cb, done_cb, true); in bt_a2dp_abort_cb()
862 a2dp->ctrl_param.req.func = cb; in bt_a2dp_stream_ctrl_pre()