Lines Matching refs:param
1306 int bt_avdtp_discover(struct bt_avdtp *session, struct bt_avdtp_discover_params *param) in bt_avdtp_discover() argument
1311 if (!param || !session) { in bt_avdtp_discover()
1322 return avdtp_send(session, buf, ¶m->req); in bt_avdtp_discover()
1345 struct bt_avdtp_get_capabilities_params *param) in bt_avdtp_get_capabilities() argument
1350 if (!param || !session) { in bt_avdtp_get_capabilities()
1363 net_buf_add_u8(buf, (param->stream_endpoint_id << 2U)); in bt_avdtp_get_capabilities()
1365 return avdtp_send(session, buf, ¶m->req); in bt_avdtp_get_capabilities()
1433 struct bt_avdtp_set_configuration_params *param) in avdtp_process_configure_command() argument
1438 if (!param || !session) { in avdtp_process_configure_command()
1451 net_buf_add_u8(buf, (param->acp_stream_ep_id << 2U)); in avdtp_process_configure_command()
1453 net_buf_add_u8(buf, (param->int_stream_endpoint_id << 2U)); in avdtp_process_configure_command()
1461 net_buf_add_u8(buf, param->codec_specific_ie_len + 2); in avdtp_process_configure_command()
1463 net_buf_add_u8(buf, param->media_type << 4U); in avdtp_process_configure_command()
1465 net_buf_add_u8(buf, param->media_codec_type); in avdtp_process_configure_command()
1467 net_buf_add_mem(buf, param->codec_specific_ie, param->codec_specific_ie_len); in avdtp_process_configure_command()
1469 return avdtp_send(session, buf, ¶m->req); in avdtp_process_configure_command()
1473 struct bt_avdtp_set_configuration_params *param) in bt_avdtp_set_configuration() argument
1475 if (!param || !session || !param->sep) { in bt_avdtp_set_configuration()
1480 if (param->sep->state != AVDTP_IDLE) { in bt_avdtp_set_configuration()
1484 return avdtp_process_configure_command(session, BT_AVDTP_SET_CONFIGURATION, param); in bt_avdtp_set_configuration()
1487 int bt_avdtp_reconfigure(struct bt_avdtp *session, struct bt_avdtp_set_configuration_params *param) in bt_avdtp_reconfigure() argument
1489 if (!param || !session || !param->sep) { in bt_avdtp_reconfigure()
1494 if (param->sep->state != AVDTP_OPEN) { in bt_avdtp_reconfigure()
1498 return avdtp_process_configure_command(session, BT_AVDTP_RECONFIGURE, param); in bt_avdtp_reconfigure()
1501 static int bt_avdtp_ctrl(struct bt_avdtp *session, struct bt_avdtp_ctrl_params *param, uint8_t ctrl, in bt_avdtp_ctrl() argument
1507 if (!param || !session || !param->sep) { in bt_avdtp_ctrl()
1512 if (!(param->sep->state & check_state)) { in bt_avdtp_ctrl()
1524 net_buf_add_u8(buf, (param->acp_stream_ep_id << 2U)); in bt_avdtp_ctrl()
1526 return avdtp_send(session, buf, ¶m->req); in bt_avdtp_ctrl()
1529 int bt_avdtp_open(struct bt_avdtp *session, struct bt_avdtp_ctrl_params *param) in bt_avdtp_open() argument
1531 return bt_avdtp_ctrl(session, param, BT_AVDTP_OPEN, AVDTP_CONFIGURED); in bt_avdtp_open()
1534 int bt_avdtp_close(struct bt_avdtp *session, struct bt_avdtp_ctrl_params *param) in bt_avdtp_close() argument
1536 return bt_avdtp_ctrl(session, param, BT_AVDTP_CLOSE, AVDTP_OPEN | AVDTP_STREAMING); in bt_avdtp_close()
1539 int bt_avdtp_start(struct bt_avdtp *session, struct bt_avdtp_ctrl_params *param) in bt_avdtp_start() argument
1543 err = bt_avdtp_ctrl(session, param, BT_AVDTP_START, AVDTP_OPEN); in bt_avdtp_start()
1544 if (!err && param->sep->sep_info.tsep == BT_AVDTP_SINK) { in bt_avdtp_start()
1545 bt_avdtp_set_state_lock(param->sep, AVDTP_STREAMING); in bt_avdtp_start()
1551 int bt_avdtp_suspend(struct bt_avdtp *session, struct bt_avdtp_ctrl_params *param) in bt_avdtp_suspend() argument
1553 return bt_avdtp_ctrl(session, param, BT_AVDTP_SUSPEND, AVDTP_STREAMING); in bt_avdtp_suspend()
1556 int bt_avdtp_abort(struct bt_avdtp *session, struct bt_avdtp_ctrl_params *param) in bt_avdtp_abort() argument
1558 return bt_avdtp_ctrl(session, param, BT_AVDTP_ABORT, in bt_avdtp_abort()