本文整理汇总了C++中VCD_MSG_ERROR函数的典型用法代码示例。如果您正苦于以下问题:C++ VCD_MSG_ERROR函数的具体用法?C++ VCD_MSG_ERROR怎么用?C++ VCD_MSG_ERROR使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了VCD_MSG_ERROR函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: vcd_term
u32 vcd_term(s32 driver_handle)
{
u32 rc = VCD_S_SUCCESS;
struct vcd_drv_ctxt *drv_ctxt;
VCD_MSG_MED("vcd_term:");
drv_ctxt = vcd_get_drv_context();
mutex_lock(&drv_ctxt->dev_mutex);
if (drv_ctxt->dev_state.state_table->ev_hdlr.term) {
rc = drv_ctxt->dev_state.state_table->ev_hdlr.
term(drv_ctxt, driver_handle);
} else {
VCD_MSG_ERROR("Unsupported API in device state %d",
drv_ctxt->dev_state.state);
rc = VCD_ERR_BAD_STATE;
}
mutex_unlock(&drv_ctxt->dev_mutex);
return rc;
}
示例2: vcd_disable_clock
u32 vcd_disable_clock(struct vcd_dev_ctxt *dev_ctxt)
{
u32 rc = VCD_S_SUCCESS;
if (dev_ctxt->pwr_clk_state == VCD_PWRCLK_STATE_OFF) {
VCD_MSG_ERROR("vcd_disable_clock(): Already in state "
"VCD_PWRCLK_STATE_OFF\n");
rc = VCD_ERR_FAIL;
} else if (dev_ctxt->pwr_clk_state == VCD_PWRCLK_STATE_ON_CLOCKED ||
dev_ctxt->pwr_clk_state == VCD_PWRCLK_STATE_ON_CLOCKGATED) {
dev_ctxt->active_clnts--;
if (!dev_ctxt->active_clnts) {
if (!res_trk_disable_clocks())
rc = VCD_ERR_FAIL;
dev_ctxt->pwr_clk_state =
VCD_PWRCLK_STATE_ON_NOTCLOCKED;
dev_ctxt->curr_perf_lvl = 0;
}
}
return rc;
}
示例3: get_res_trk_perf_level
u32 get_res_trk_perf_level(enum vcd_perf_level perf_level)
{
u32 res_trk_perf_level;
switch (perf_level) {
case VCD_PERF_LEVEL0:
res_trk_perf_level = RESTRK_1080P_VGA_PERF_LEVEL;
break;
case VCD_PERF_LEVEL1:
res_trk_perf_level = RESTRK_1080P_720P_PERF_LEVEL;
break;
case VCD_PERF_LEVEL2:
res_trk_perf_level = RESTRK_1080P_MAX_PERF_LEVEL;
break;
case VCD_PERF_LEVEL_TURBO:
res_trk_perf_level = RESTRK_1080P_TURBO_PERF_LEVEL;
break;
default:
VCD_MSG_ERROR("Invalid perf level: %d\n", perf_level);
res_trk_perf_level = -EINVAL;
}
VCDRES_MSG_MED("%s: res_trk_perf_level = %u", __func__,
res_trk_perf_level);
return res_trk_perf_level;
}
示例4: vcd_do_client_state_transition
void vcd_do_client_state_transition(struct vcd_clnt_ctxt *cctxt,
enum vcd_clnt_state_enum to_state, u32 ev_code)
{
struct vcd_clnt_state_ctxt *state_ctxt;
if (!cctxt || to_state >= VCD_CLIENT_STATE_MAX) {
VCD_MSG_ERROR("Bad parameters. cctxt=%p, to_state=%d",
cctxt, to_state);
}
if (!cctxt)
return;
state_ctxt = &cctxt->clnt_state;
if (state_ctxt->state) {
if (state_ctxt->state == to_state) {
VCD_MSG_HIGH("Client already in requested to_state=%d",
to_state);
return;
}
}
VCD_MSG_MED("vcd_do_client_state_transition: C%d -> C%d, for api %d",
(int)state_ctxt->state, (int)to_state, ev_code);
if (state_ctxt->state_table->exit)
state_ctxt->state_table->exit(cctxt, ev_code);
state_ctxt->state = to_state;
state_ctxt->state_table = vcd_clnt_state_table[to_state];
if (state_ctxt->state_table->entry)
state_ctxt->state_table->entry(cctxt, ev_code);
}
示例5: VCD_MSG_LOW
static void vcd_clnt_cb_in_stopping
(struct vcd_clnt_ctxt *cctxt,
u32 event,
u32 status,
void *payload, size_t sz, u32 *ddl_handle, void *const client_data) {
struct vcd_dev_ctxt *dev_ctxt = cctxt->dev_ctxt;
u32 rc = VCD_S_SUCCESS;
u32 frm_trans_end = false;
VCD_MSG_LOW("vcd_clnt_cb_in_stopping:");
if (cctxt->ddl_handle != ddl_handle) {
VCD_MSG_ERROR("ddl_handle mismatch");
return;
}
switch (event) {
case VCD_EVT_RESP_INPUT_DONE:
{
rc = vcd_handle_input_done(cctxt,
payload,
VCD_EVT_RESP_INPUT_FLUSHED,
status);
break;
}
case VCD_EVT_RESP_OUTPUT_DONE:
{
rc = vcd_handle_frame_done(cctxt,
payload,
VCD_EVT_RESP_OUTPUT_FLUSHED,
status);
break;
}
case VCD_EVT_RESP_OUTPUT_REQ:
{
rc = vcd_handle_output_required_in_flushing(cctxt,
payload);
break;
}
case VCD_EVT_RESP_STOP:
{
vcd_handle_stop_done(cctxt,
(struct vcd_transc *)
client_data, status);
break;
}
case VCD_EVT_IND_OUTPUT_RECONFIG:
{
(void) vcd_handle_ind_output_reconfig(cctxt,
payload, status);
frm_trans_end = true;
payload = NULL;
break;
}
case VCD_EVT_IND_HWERRFATAL:
{
vcd_handle_ind_hw_err_fatal(cctxt, VCD_EVT_RESP_STOP,
status);
break;
}
default:
{
VCD_MSG_ERROR
("Unexpected callback event=%d status=%d from DDL",
event, status);
dev_ctxt->command_continue = false;
break;
}
}
if (!VCD_FAILED(rc) && ((event == VCD_EVT_RESP_INPUT_DONE ||
event == VCD_EVT_RESP_OUTPUT_DONE) ||
event == VCD_EVT_RESP_OUTPUT_REQ ||
event == VCD_EVT_IND_OUTPUT_RECONFIG)) {
if (payload &&
((struct ddl_frame_data_tag *)\
payload)->frm_trans_end) {
vcd_mark_frame_channel(cctxt->dev_ctxt);
frm_trans_end = true;
}
if (frm_trans_end && !cctxt->status.frame_submitted) {
VCD_MSG_HIGH
("All pending frames recvd from DDL");
vcd_flush_bframe_buffers(cctxt,
VCD_FLUSH_INPUT);
vcd_flush_output_buffers(cctxt);
//.........这里部分代码省略.........
示例6: VCD_MSG_LOW
static void vcd_clnt_cb_in_stopping
(struct vcd_clnt_ctxt_type_t *p_cctxt,
u32 event,
u32 status,
void *p_payload, u32 n_size, u32 *ddl_handle, void *const p_client_data) {
struct vcd_dev_ctxt_type *p_dev_ctxt = p_cctxt->p_dev_ctxt;
u32 rc = VCD_S_SUCCESS;
u32 b_frm_trans_end = FALSE;
VCD_MSG_LOW("vcd_clnt_cb_in_stopping:");
if (p_cctxt->ddl_handle != ddl_handle) {
VCD_MSG_ERROR("ddl_handle mismatch");
return;
}
switch (event) {
case VCD_EVT_RESP_INPUT_DONE:
{
rc = vcd_handle_input_done(p_cctxt,
p_payload,
VCD_EVT_RESP_INPUT_FLUSHED,
status);
break;
}
case VCD_EVT_RESP_OUTPUT_DONE:
{
rc = vcd_handle_frame_done(p_cctxt,
p_payload,
VCD_EVT_RESP_OUTPUT_FLUSHED,
status);
break;
}
case VCD_EVT_RESP_OUTPUT_REQ:
{
rc = vcd_handle_output_required_in_flushing(p_cctxt,
p_payload);
break;
}
case VCD_EVT_RESP_STOP:
{
vcd_handle_stop_done(p_cctxt,
(struct vcd_transc_type *)
p_client_data, status);
break;
}
case VCD_EVT_IND_OUTPUT_RECONFIG:
{
(void) vcd_handle_ind_output_reconfig(p_cctxt,
p_payload, status);
vcd_mark_frame_channel(p_cctxt->p_dev_ctxt);
b_frm_trans_end = TRUE;
p_payload = NULL;
break;
}
case VCD_EVT_IND_HWERRFATAL:
{
vcd_handle_ind_hw_err_fatal(p_cctxt, VCD_EVT_RESP_STOP,
status);
break;
}
default:
{
VCD_MSG_ERROR
("Unexpected callback event=%d status=%d from DDL",
event, status);
p_dev_ctxt->b_continue = FALSE;
break;
}
}
if (!VCD_FAILED(rc) && ((event == VCD_EVT_RESP_INPUT_DONE ||
event == VCD_EVT_RESP_OUTPUT_DONE) ||
event == VCD_EVT_RESP_OUTPUT_REQ ||
event == VCD_EVT_IND_OUTPUT_RECONFIG)) {
if (p_payload &&
((struct ddl_frame_data_type_tag *)\
p_payload)->b_frm_trans_end) {
vcd_mark_frame_channel(p_cctxt->p_dev_ctxt);
b_frm_trans_end = TRUE;
}
if (b_frm_trans_end && !p_cctxt->status.n_frame_submitted) {
VCD_MSG_HIGH
("All pending frames recvd from DDL");
//.........这里部分代码省略.........
示例7: VCD_MSG_ERROR
static void vcd_clnt_cb_in_eos
(struct vcd_clnt_ctxt_type_t *p_cctxt,
u32 event,
u32 status,
void *p_payload, u32 n_size, u32 *ddl_handle, void *const p_client_data) {
struct vcd_dev_ctxt_type *p_dev_ctxt = p_cctxt->p_dev_ctxt;
struct vcd_transc_type *p_transc = NULL;
u32 b_frm_trans_end = FALSE;
if (p_cctxt->ddl_handle != ddl_handle) {
VCD_MSG_ERROR("ddl_handle mismatch");
return;
}
switch (event) {
case VCD_EVT_RESP_INPUT_DONE:
{
vcd_handle_input_done_in_eos(p_cctxt, p_payload,
status);
break;
}
case VCD_EVT_RESP_OUTPUT_DONE:
{
vcd_handle_frame_done_in_eos(p_cctxt, p_payload,
status);
break;
}
case VCD_EVT_RESP_OUTPUT_REQ:
{
(void)vcd_handle_output_required(p_cctxt, p_payload,
status);
break;
}
case VCD_EVT_RESP_EOS_DONE:
{
p_transc = (struct vcd_transc_type *)p_client_data;
vcd_handle_eos_done(p_cctxt, p_transc, status);
break;
}
case VCD_EVT_IND_OUTPUT_RECONFIG:
{
(void) vcd_handle_ind_output_reconfig(p_cctxt,
p_payload, status);
b_frm_trans_end = TRUE;
p_payload = NULL;
break;
}
case VCD_EVT_IND_HWERRFATAL:
{
vcd_handle_ind_hw_err_fatal(p_cctxt,
VCD_EVT_IND_HWERRFATAL, status);
break;
}
default:
{
VCD_MSG_ERROR
("Unexpected callback event=%d status=%d from DDL",
event, status);
p_dev_ctxt->b_continue = FALSE;
break;
}
}
if (event == VCD_EVT_RESP_INPUT_DONE ||
event == VCD_EVT_RESP_OUTPUT_DONE ||
event == VCD_EVT_RESP_OUTPUT_REQ ||
event == VCD_EVT_IND_OUTPUT_RECONFIG) {
if (p_payload && ((struct ddl_frame_data_type_tag *)
p_payload)->b_frm_trans_end) {
vcd_mark_frame_channel(p_cctxt->p_dev_ctxt);
b_frm_trans_end = TRUE;
}
if (b_frm_trans_end && !p_cctxt->status.n_frame_submitted)
vcd_handle_eos_trans_end(p_cctxt);
}
}
示例8: VCD_MSG_ERROR
static void vcd_clnt_cb_in_eos
(struct vcd_clnt_ctxt *cctxt,
u32 event,
u32 status,
void *payload, size_t sz, u32 *ddl_handle, void *const client_data) {
struct vcd_dev_ctxt *dev_ctxt = cctxt->dev_ctxt;
struct vcd_transc *transc = NULL;
u32 frm_trans_end = false, rc = VCD_S_SUCCESS;
if (cctxt->ddl_handle != ddl_handle) {
VCD_MSG_ERROR("ddl_handle mismatch");
return;
}
switch (event) {
case VCD_EVT_RESP_INPUT_DONE:
{
rc = vcd_handle_input_done_in_eos(cctxt, payload,
status);
break;
}
case VCD_EVT_RESP_OUTPUT_DONE:
{
rc = vcd_handle_frame_done_in_eos(cctxt, payload,
status);
break;
}
case VCD_EVT_RESP_OUTPUT_REQ:
{
rc = vcd_handle_output_required(cctxt, payload,
status);
break;
}
case VCD_EVT_RESP_EOS_DONE:
{
transc = (struct vcd_transc *)client_data;
vcd_handle_eos_done(cctxt, transc, status);
vcd_mark_frame_channel(cctxt->dev_ctxt);
break;
}
case VCD_EVT_IND_OUTPUT_RECONFIG:
{
rc = vcd_handle_ind_output_reconfig(cctxt,
payload, status);
if (!VCD_FAILED(rc)) {
frm_trans_end = true;
payload = NULL;
vcd_do_client_state_transition(cctxt,
VCD_CLIENT_STATE_RUN,
CLIENT_STATE_EVENT_NUMBER
(clnt_cb));
VCD_MSG_LOW
("RECONFIGinEOS:Suspending Client");
rc = vcd_sched_suspend_resume_clnt(cctxt,
false);
if (VCD_FAILED(rc)) {
VCD_MSG_ERROR
("Failed: suspend_resume_clnt. rc=0x%x",
rc);
}
}
break;
}
case VCD_EVT_IND_HWERRFATAL:
{
vcd_handle_ind_hw_err_fatal(cctxt,
VCD_EVT_IND_HWERRFATAL, status);
break;
}
case VCD_EVT_IND_INFO_OUTPUT_RECONFIG:
{
vcd_handle_ind_info_output_reconfig(cctxt, status);
break;
}
default:
{
VCD_MSG_ERROR
("Unexpected callback event=%d status=%d from DDL",
event, status);
dev_ctxt->command_continue = false;
break;
}
}
if (!VCD_FAILED(rc) &&
(event == VCD_EVT_RESP_INPUT_DONE ||
event == VCD_EVT_RESP_OUTPUT_DONE ||
event == VCD_EVT_RESP_OUTPUT_REQ ||
event == VCD_EVT_IND_OUTPUT_RECONFIG)) {
if (payload && ((struct ddl_frame_data_tag *)
payload)->frm_trans_end) {
vcd_mark_frame_channel(cctxt->dev_ctxt);
frm_trans_end = true;
}
//.........这里部分代码省略.........
示例9: VCD_MSG_LOW
static void vcd_dev_cb_in_initing
(struct vcd_drv_ctxt_type_t *p_drv_ctxt,
u32 event,
u32 status,
void *p_payload, u32 size, u32 *ddl_handle, void *const p_client_data)
{
struct vcd_dev_ctxt_type *p_dev_ctxt;
struct vcd_clnt_ctxt_type_t *p_client;
struct vcd_clnt_ctxt_type_t *p_tmp_client;
struct vcd_handle_container_type container;
u32 rc = VCD_S_SUCCESS;
u32 b_client_inited = FALSE;
u32 b_fail_all_open = FALSE;
VCD_MSG_LOW("vcd_dev_cb_in_initing:");
if (event != VCD_EVT_RESP_DEVICE_INIT) {
VCD_MSG_ERROR("vcd_dev_cb_in_initing: Unexpected event %d",
(int)event);
return;
}
p_dev_ctxt = &p_drv_ctxt->dev_ctxt;
p_dev_ctxt->b_continue = FALSE;
if (VCD_FAILED(status)) {
vcd_handle_device_init_failed(p_drv_ctxt, status);
return;
}
vcd_do_device_state_transition(p_drv_ctxt,
VCD_DEVICE_STATE_READY,
DEVICE_STATE_EVENT_NUMBER(pf_open));
if (!p_dev_ctxt->p_cctxt_list_head) {
VCD_MSG_HIGH("All clients are closed");
p_dev_ctxt->e_pending_cmd = VCD_CMD_DEVICE_TERM;
return;
}
if (!p_dev_ctxt->n_ddl_cmd_ch_depth
|| !p_dev_ctxt->a_trans_tbl)
rc = vcd_setup_with_ddl_capabilities(p_dev_ctxt);
if (VCD_FAILED(rc)) {
VCD_MSG_ERROR
("rc = 0x%x: Failed vcd_setup_with_ddl_capabilities",
rc);
b_fail_all_open = TRUE;
}
p_client = p_dev_ctxt->p_cctxt_list_head;
while (p_client) {
if (!b_fail_all_open)
rc = vcd_init_client_context(p_client);
if (!VCD_FAILED(rc)) {
container.handle = (void *)p_client;
p_client->callback(VCD_EVT_RESP_OPEN,
VCD_S_SUCCESS,
&container,
sizeof(container),
container.handle,
p_client->p_client_data);
p_client = p_client->p_next;
b_client_inited = TRUE;
} else {
VCD_MSG_ERROR
("rc = 0x%x, Failed: vcd_init_client_context",
rc);
p_client->callback(VCD_EVT_RESP_OPEN,
rc,
NULL, 0, 0, p_client->p_client_data);
p_tmp_client = p_client;
p_client = p_client->p_next;
vcd_destroy_client_context(p_tmp_client);
}
}
if (!b_client_inited || b_fail_all_open) {
VCD_MSG_ERROR("All client open requests failed");
p_dev_ctxt->e_pending_cmd = VCD_CMD_DEVICE_TERM;
} else {
if (vcd_power_event(p_dev_ctxt, NULL,
VCD_EVT_PWR_DEV_INIT_END)) {
VCD_MSG_ERROR("VCD_EVT_PWR_DEV_INIT_END failed");
}
//.........这里部分代码省略.........
示例10: vcd_ddl_callback
void vcd_ddl_callback(u32 event, u32 status, void *p_payload,
u32 n_size, u32 *ddl_handle, void *const p_client_data)
{
struct vcd_drv_ctxt_type_t *p_drv_ctxt;
struct vcd_dev_ctxt_type *p_dev_ctxt;
struct vcd_dev_state_ctxt_type_t *p_dev_state;
struct vcd_clnt_ctxt_type_t *p_cctxt;
struct vcd_transc_type *p_transc;
VCD_MSG_LOW("vcd_ddl_callback:");
VCD_MSG_LOW("event=0x%x status=0x%x", event, status);
p_drv_ctxt = vcd_get_drv_context();
p_dev_ctxt = &p_drv_ctxt->dev_ctxt;
p_dev_state = &p_drv_ctxt->dev_state;
p_dev_ctxt->b_continue = TRUE;
vcd_device_timer_stop(p_dev_ctxt);
switch (p_dev_state->e_state) {
case VCD_DEVICE_STATE_NULL:
{
VCD_MSG_HIGH("Callback unexpected in NULL state");
break;
}
case VCD_DEVICE_STATE_NOT_INIT:
{
VCD_MSG_HIGH("Callback unexpected in NOT_INIT state");
break;
}
case VCD_DEVICE_STATE_INITING:
{
if (p_dev_state->p_state_table->ev_hdlr.pf_dev_cb) {
p_dev_state->p_state_table->ev_hdlr.
pf_dev_cb(p_drv_ctxt, event, status,
p_payload, n_size, ddl_handle,
p_client_data);
} else {
VCD_MSG_HIGH("No device handler in %d state",
p_dev_state->e_state);
}
break;
}
case VCD_DEVICE_STATE_READY:
{
p_transc = (struct vcd_transc_type *)p_client_data;
if (!p_transc || !p_transc->b_in_use
|| !p_transc->p_cctxt) {
VCD_MSG_ERROR("Invalid clientdata "
"received from DDL ");
} else {
p_cctxt = p_transc->p_cctxt;
if (p_cctxt->clnt_state.p_state_table->ev_hdlr.
pf_clnt_cb) {
p_cctxt->clnt_state.p_state_table->
ev_hdlr.pf_clnt_cb(p_cctxt,
event, status, p_payload,
n_size, ddl_handle,
p_client_data);
} else {
VCD_MSG_HIGH
("No client handler in"
" (dsm:READY, csm:%d) state",
(int)p_cctxt->clnt_state.e_state);
if (VCD_FAILED(status)) {
VCD_MSG_FATAL("DDL callback"
" returned failure 0x%x",
status);
}
}
}
break;
}
default:
{
VCD_MSG_ERROR("Unknown state");
break;
}
}
}
示例11: vcd_continue
void vcd_continue(void)
{
struct vcd_drv_ctxt_type_t *p_drv_ctxt;
struct vcd_dev_ctxt_type *p_dev_ctxt;
u32 b_continue;
struct vcd_transc_type *p_transc;
u32 rc;
VCD_MSG_LOW("vcd_continue:");
p_drv_ctxt = vcd_get_drv_context();
p_dev_ctxt = &p_drv_ctxt->dev_ctxt;
p_dev_ctxt->b_continue = FALSE;
if (p_dev_ctxt->e_pending_cmd == VCD_CMD_DEVICE_INIT) {
VCD_MSG_HIGH("VCD_CMD_DEVICE_INIT is pending");
p_dev_ctxt->e_pending_cmd = VCD_CMD_NONE;
(void)vcd_init_device_context(p_drv_ctxt,
DEVICE_STATE_EVENT_NUMBER(pf_open));
} else if (p_dev_ctxt->e_pending_cmd == VCD_CMD_DEVICE_TERM) {
VCD_MSG_HIGH("VCD_CMD_DEVICE_TERM is pending");
p_dev_ctxt->e_pending_cmd = VCD_CMD_NONE;
(void)vcd_deinit_device_context(p_drv_ctxt,
DEVICE_STATE_EVENT_NUMBER(pf_close));
} else if (p_dev_ctxt->e_pending_cmd == VCD_CMD_DEVICE_RESET) {
VCD_MSG_HIGH("VCD_CMD_DEVICE_RESET is pending");
p_dev_ctxt->e_pending_cmd = VCD_CMD_NONE;
(void)vcd_reset_device_context(p_drv_ctxt,
DEVICE_STATE_EVENT_NUMBER(pf_dev_cb));
} else {
if (p_dev_ctxt->b_set_perf_lvl_pending) {
rc = vcd_power_event(p_dev_ctxt, NULL,
VCD_EVT_PWR_DEV_SET_PERFLVL);
if (VCD_FAILED(rc)) {
VCD_MSG_ERROR
("VCD_EVT_PWR_CLNT_SET_PERFLVL failed");
VCD_MSG_HIGH
("Not running at desired perf level."
"curr=%d, reqd=%d",
p_dev_ctxt->n_curr_perf_lvl,
p_dev_ctxt->n_reqd_perf_lvl);
} else {
p_dev_ctxt->b_set_perf_lvl_pending = FALSE;
}
}
do {
b_continue = FALSE;
if (vcd_get_command_channel_in_loop
(p_dev_ctxt, &p_transc)) {
if (vcd_submit_command_in_continue(p_dev_ctxt,
p_transc))
b_continue = TRUE;
else {
VCD_MSG_MED
("No more commands to submit");
vcd_release_command_channel(p_dev_ctxt,
p_transc);
vcd_release_interim_command_channels
(p_dev_ctxt);
}
}
} while (b_continue);
do {
b_continue = FALSE;
if (vcd_get_frame_channel_in_loop
(p_dev_ctxt, &p_transc)) {
if (vcd_try_submit_frame_in_continue(p_dev_ctxt,
p_transc)) {
b_continue = TRUE;
} else {
VCD_MSG_MED("No more frames to submit");
vcd_release_frame_channel(p_dev_ctxt,
p_transc);
vcd_release_interim_frame_channels
(p_dev_ctxt);
}
}
} while (b_continue);
if (!vcd_core_is_busy(p_dev_ctxt)) {
rc = vcd_power_event(p_dev_ctxt, NULL,
VCD_EVT_PWR_CLNT_CMD_END);
if (VCD_FAILED(rc))
VCD_MSG_ERROR("Failed:"
"VCD_EVT_PWR_CLNT_CMD_END");
//.........这里部分代码省略.........
示例12: vcd_clnt_cb_in_invalid
static void vcd_clnt_cb_in_invalid(
struct vcd_clnt_ctxt *cctxt, u32 event, u32 status,
void *payload, size_t sz, u32 *ddl_handle,
void *const client_data
)
{
struct vcd_dev_ctxt *dev_ctxt = cctxt->dev_ctxt;
VCD_MSG_LOW("vcd_clnt_cb_in_invalid:");
if (cctxt->ddl_handle != ddl_handle) {
VCD_MSG_ERROR("ddl_handle mismatch");
return;
}
switch (event) {
case VCD_EVT_RESP_STOP:
{
vcd_handle_stop_done_in_invalid(cctxt,
(struct vcd_transc *)client_data,
status);
break;
}
case VCD_EVT_RESP_INPUT_DONE:
case VCD_EVT_RESP_OUTPUT_REQ:
{
if (cctxt->status.frame_submitted)
cctxt->status.frame_submitted--;
if (payload && ((struct ddl_frame_data_tag *)
payload)->frm_trans_end)
vcd_mark_frame_channel(cctxt->dev_ctxt);
break;
}
case VCD_EVT_RESP_OUTPUT_DONE:
{
if (payload && ((struct ddl_frame_data_tag *)
payload)->frm_trans_end)
vcd_mark_frame_channel(cctxt->dev_ctxt);
break;
}
case VCD_EVT_RESP_TRANSACTION_PENDING:
{
if (cctxt->status.frame_submitted)
cctxt->status.frame_submitted--;
vcd_mark_frame_channel(cctxt->dev_ctxt);
break;
}
case VCD_EVT_IND_HWERRFATAL:
{
if (status == VCD_ERR_HW_FATAL)
vcd_handle_stop_done_in_invalid(cctxt,
(struct vcd_transc *)client_data,
status);
break;
}
case VCD_EVT_RESP_EOS_DONE:
{
vcd_mark_frame_channel(cctxt->dev_ctxt);
break;
}
case VCD_EVT_IND_OUTPUT_RECONFIG:
{
if (cctxt->status.frame_submitted > 0)
cctxt->status.frame_submitted--;
else
cctxt->status.frame_delayed--;
vcd_mark_frame_channel(cctxt->dev_ctxt);
break;
}
default:
{
VCD_MSG_ERROR("Unexpected callback event=%d status=%d"
"from DDL", event, status);
dev_ctxt->command_continue = false;
break;
}
}
}