return -1;\r
\r
qemu_mutex_lock(&state->thread_mutex);\r
- if (ready_count < MARUCAM_SKIPFRAMES) {\r
- ++ready_count; /* skip a frame cause first some frame are distorted */\r
- qemu_mutex_unlock(&state->thread_mutex);\r
- return 0;\r
- }\r
if (state->req_frame == 0) {\r
qemu_mutex_unlock(&state->thread_mutex);\r
return 0;\r
}\r
\r
qemu_mutex_lock(&state->thread_mutex);\r
+ if (ready_count < MARUCAM_SKIPFRAMES) {\r
+ ++ready_count; /* skip a frame cause first some frame are distorted */\r
+ qemu_mutex_unlock(&state->thread_mutex);\r
+ return 0;\r
+ }\r
if (state->streamon == _MC_THREAD_STREAMON) {\r
state->req_frame = 0; /* clear request */\r
state->isr |= 0x01; /* set a flag of rasing a interrupt */\r
qemu_bh_schedule(state->tx_bh);\r
- ret = 1;\r
+ ret = 1;\r
} else {\r
ret = -1;\r
}\r
-\r
qemu_mutex_unlock(&state->thread_mutex);\r
return ret;\r
}\r
uint32_t width, height;\r
\r
qemu_mutex_lock(&g_state->thread_mutex);\r
- if (ready_count < MARUCAM_SKIPFRAMES) {\r
- ++ready_count; /* skip a frame cause first some frame are distorted */\r
- qemu_mutex_unlock(&g_state->thread_mutex);\r
- return S_OK;\r
- }\r
if (g_state->req_frame == 0) {\r
qemu_mutex_unlock(&g_state->thread_mutex);\r
return S_OK;\r
}\r
\r
qemu_mutex_lock(&g_state->thread_mutex);\r
+ if (ready_count < MARUCAM_SKIPFRAMES) {\r
+ ++ready_count; /* skip a frame cause first some frame are distorted */\r
+ qemu_mutex_unlock(&g_state->thread_mutex);\r
+ return S_OK;\r
+ }\r
g_state->req_frame = 0; /* clear request */\r
g_state->isr |= 0x01; /* set a flag raising a interrupt. */\r
qemu_bh_schedule(g_state->tx_bh);\r