Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 696 → Rev 695

/shark/trunk/drivers/bttv/bttv-driver.c
77,7 → 77,7
static unsigned int sloppy = 0;
static unsigned int v4l2 = 1;
 
static volatile unsigned int grab_task = -1;
static volatile unsigned int grab_complete = 0;
 
/* insmod args */
MODULE_PARM(radio,"1-" __stringify(BTTV_MAX) "i");
2375,11 → 2375,11
 
/* S.Ha.R.K. Version: Active wait until complete */
 
int pid = (int)(arg);
grab_complete = 0;
 
if (pid != -1) grab_task = pid;
while(grab_complete == 0);
 
return grab_task;
return grab_complete;
 
}
 
3197,6 → 3197,7
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) {
3206,6 → 3207,7
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 {
3215,6 → 3217,7
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) {
3223,6 → 3226,8
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);
}
}
}
3257,6 → 3262,7
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)) {
3263,6 → 3269,7
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);
}
3286,6 → 3293,7
//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);
}
3367,7 → 3375,7
printk("\n");
}
 
if (astat&BT848_INT_VSYNC)
if (astat&BT848_INT_VSYNC)
btv->field_count++;
 
if (astat & BT848_INT_GPINT) {
3381,10 → 3389,8
if ((astat & BT848_INT_RISCI) && (stat & (2<<28)))
bttv_irq_wakeup_top(btv);
 
if ((astat & BT848_INT_RISCI) && (stat & (1<<28))) {
task_activate(grab_task);
if ((astat & BT848_INT_RISCI) && (stat & (1<<28)))
bttv_irq_switch_fields(btv);
}
 
if ((astat & BT848_INT_HLOCK) && btv->opt_automute)
audio_mux(btv, -1);