77,7 → 77,7 |
static unsigned int sloppy = 0; |
static unsigned int v4l2 = 1; |
|
static volatile unsigned int grab_complete = 0; |
static volatile unsigned int grab_task = -1; |
|
/* insmod args */ |
MODULE_PARM(radio,"1-" __stringify(BTTV_MAX) "i"); |
2375,11 → 2375,11 |
|
/* S.Ha.R.K. Version: Active wait until complete */ |
|
grab_complete = 0; |
int pid = (int)(arg); |
|
while(grab_complete == 0); |
if (pid != -1) grab_task = pid; |
|
return grab_complete; |
return grab_task; |
|
} |
|
3197,7 → 3197,6 |
wakeup->vbi->vb.ts = ts; |
wakeup->vbi->vb.field_count = btv->field_count; |
wakeup->vbi->vb.state = state; |
grab_complete = 1; |
//wake_up(&wakeup->vbi->vb.done); |
} |
if (wakeup->top == wakeup->bottom) { |
3207,7 → 3206,6 |
wakeup->top->vb.ts = ts; |
wakeup->top->vb.field_count = btv->field_count; |
wakeup->top->vb.state = state; |
grab_complete = 1; |
//wake_up(&wakeup->top->vb.done); |
} |
} else { |
3217,7 → 3215,6 |
wakeup->top->vb.ts = ts; |
wakeup->top->vb.field_count = btv->field_count; |
wakeup->top->vb.state = state; |
grab_complete = 1; |
//wake_up(&wakeup->top->vb.done); |
} |
if (NULL != wakeup->bottom && curr->bottom != wakeup->bottom) { |
3226,8 → 3223,6 |
wakeup->bottom->vb.ts = ts; |
wakeup->bottom->vb.field_count = btv->field_count; |
wakeup->bottom->vb.state = state; |
grab_complete = 1; |
//wake_up(&wakeup->bottom->vb.done); |
} |
} |
} |
3262,7 → 3257,6 |
item = list_entry(btv->capture.next, struct bttv_buffer, vb.queue); |
list_del(&item->vb.queue); |
item->vb.state = STATE_ERROR; |
grab_complete = 2; |
//wake_up(&item->vb.done); |
} |
while (!list_empty(&btv->vcapture)) { |
3269,7 → 3263,6 |
item = list_entry(btv->vcapture.next, struct bttv_buffer, vb.queue); |
list_del(&item->vb.queue); |
item->vb.state = STATE_ERROR; |
grab_complete = 2; |
//wake_up(&item->vb.done); |
} |
|
3293,7 → 3286,6 |
//do_gettimeofday(&wakeup->vb.ts); |
wakeup->vb.field_count = btv->field_count; |
wakeup->vb.state = STATE_DONE; |
grab_complete = 1; |
//wake_up(&wakeup->vb.done); |
spin_unlock(&btv->s_lock); |
} |
3389,8 → 3381,10 |
if ((astat & BT848_INT_RISCI) && (stat & (2<<28))) |
bttv_irq_wakeup_top(btv); |
|
if ((astat & BT848_INT_RISCI) && (stat & (1<<28))) |
if ((astat & BT848_INT_RISCI) && (stat & (1<<28))) { |
task_activate(grab_task); |
bttv_irq_switch_fields(btv); |
} |
|
if ((astat & BT848_INT_HLOCK) && btv->opt_automute) |
audio_mux(btv, -1); |