Lines Matching full:req

31 #define DISCOVER_REQ(_req) CONTAINER_OF(_req, struct bt_avdtp_discover_params, req)
34 #define GET_CAP_REQ(_req) CONTAINER_OF(_req, struct bt_avdtp_get_capabilities_params, req)
37 #define SET_CONF_REQ(_req) CONTAINER_OF(_req, struct bt_avdtp_set_configuration_params, req)
40 #define CTRL_REQ(_req) CONTAINER_OF(_req, struct bt_avdtp_ctrl_params, req)
392 static int bt_a2dp_set_config_cb(struct bt_avdtp_req *req) in bt_a2dp_set_config_cb() argument
394 struct bt_a2dp *a2dp = SET_CONF_PARAM(SET_CONF_REQ(req)); 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()
408 LOG_DBG("SET CONFIGURATION result:%d", req->status); in bt_a2dp_set_config_cb()
411 a2dp_cb->config_rsp(stream, req->status); in bt_a2dp_set_config_cb()
415 if ((!req->status) && (ops->configured != NULL)) { in bt_a2dp_set_config_cb()
421 static int bt_a2dp_get_capabilities_cb(struct bt_avdtp_req *req) in bt_a2dp_get_capabilities_cb() argument
425 struct bt_a2dp *a2dp = GET_CAP_PARAM(GET_CAP_REQ(req)); in bt_a2dp_get_capabilities_cb()
430 if (GET_CAP_REQ(req) != &a2dp->get_capabilities_param) { in bt_a2dp_get_capabilities_cb()
434 LOG_DBG("GET CAPABILITIES result:%d", req->status); in bt_a2dp_get_capabilities_cb()
435 if (req->status) { in bt_a2dp_get_capabilities_cb()
500 a2dp->get_capabilities_param.req.func = bt_a2dp_get_capabilities_cb; in bt_a2dp_get_sep_caps()
517 static int bt_a2dp_discover_cb(struct bt_avdtp_req *req) in bt_a2dp_discover_cb() argument
519 struct bt_a2dp *a2dp = DISCOVER_PARAM(DISCOVER_REQ(req)); in bt_a2dp_discover_cb()
523 LOG_DBG("DISCOVER result:%d", req->status); in bt_a2dp_discover_cb()
528 if (!(req->status)) { in bt_a2dp_discover_cb()
539 err = bt_avdtp_parse_sep(DISCOVER_REQ(req)->buf, sep_info); in bt_a2dp_discover_cb()
584 a2dp->discover_param.req.func = bt_a2dp_discover_cb; in bt_a2dp_discover()
609 a2dp->set_config_param.req.func = cb; in bt_a2dp_stream_config_set_param()
648 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
651 struct bt_a2dp *a2dp = CTRL_PARAM(CTRL_REQ(req)); in bt_a2dp_ctrl_cb()
656 if ((ep->stream == NULL) || (CTRL_REQ(req) != &a2dp->ctrl_param)) { in bt_a2dp_ctrl_cb()
664 LOG_DBG("ctrl result:%d", req->status); in bt_a2dp_ctrl_cb()
667 rsp_cb(stream, req->status); in bt_a2dp_ctrl_cb()
670 if ((!req->status) && (done_cb != NULL)) { in bt_a2dp_ctrl_cb()
676 static int bt_a2dp_open_cb(struct bt_avdtp_req *req) in bt_a2dp_open_cb() argument
678 struct bt_a2dp_ep *ep = CONTAINER_OF(CTRL_REQ(req)->sep, struct bt_a2dp_ep, sep); in bt_a2dp_open_cb()
684 return bt_a2dp_ctrl_cb(req, rsp_cb, done_cb, false); in bt_a2dp_open_cb()
687 static int bt_a2dp_start_cb(struct bt_avdtp_req *req) in bt_a2dp_start_cb() argument
689 struct bt_a2dp_ep *ep = CONTAINER_OF(CTRL_REQ(req)->sep, struct bt_a2dp_ep, sep); in bt_a2dp_start_cb()
694 return bt_a2dp_ctrl_cb(req, rsp_cb, done_cb, false); in bt_a2dp_start_cb()
697 static int bt_a2dp_suspend_cb(struct bt_avdtp_req *req) in bt_a2dp_suspend_cb() argument
699 struct bt_a2dp_ep *ep = CONTAINER_OF(CTRL_REQ(req)->sep, struct bt_a2dp_ep, sep); in bt_a2dp_suspend_cb()
704 return bt_a2dp_ctrl_cb(req, rsp_cb, done_cb, false); in bt_a2dp_suspend_cb()
707 static int bt_a2dp_close_cb(struct bt_avdtp_req *req) in bt_a2dp_close_cb() argument
709 struct bt_a2dp_ep *ep = CONTAINER_OF(CTRL_REQ(req)->sep, struct bt_a2dp_ep, sep); in bt_a2dp_close_cb()
714 return bt_a2dp_ctrl_cb(req, rsp_cb, done_cb, true); in bt_a2dp_close_cb()
717 static int bt_a2dp_abort_cb(struct bt_avdtp_req *req) in bt_a2dp_abort_cb() argument
719 struct bt_a2dp_ep *ep = CONTAINER_OF(CTRL_REQ(req)->sep, struct bt_a2dp_ep, sep); in bt_a2dp_abort_cb()
724 return bt_a2dp_ctrl_cb(req, rsp_cb, done_cb, true); in bt_a2dp_abort_cb()
736 a2dp->ctrl_param.req.func = cb; in bt_a2dp_stream_ctrl_pre()