| 38 |
static void vc0321_setbrightness(struct usb_spca50x *spca50x); |
static void vc0321_setbrightness(struct usb_spca50x *spca50x); |
| 39 |
static void vc0321_setcontrast(struct usb_spca50x *spca50x); |
static void vc0321_setcontrast(struct usb_spca50x *spca50x); |
| 40 |
static void vc0321_setcolors(struct usb_spca50x *spca50x); |
static void vc0321_setcolors(struct usb_spca50x *spca50x); |
|
; |
|
| 41 |
static void vc0321_setAutobright(struct usb_spca50x *spca50x); |
static void vc0321_setAutobright(struct usb_spca50x *spca50x); |
| 42 |
static void vc0321_setquality(struct usb_spca50x *spca50x); |
static void vc0321_setquality(struct usb_spca50x *spca50x); |
| 43 |
static int vc0321_sofdetect(struct usb_spca50x *spca50x,struct spca50x_frame *frame, unsigned char *cdata,int *iPix, int seqnum, int *datalength); |
static int vc0321_sofdetect(struct usb_spca50x *spca50x,struct spca50x_frame *frame, unsigned char *cdata,int *iPix, int seqnum, int *datalength); |
| 44 |
|
/******************* Banding flilter ***********************/ |
| 45 |
|
static void vc0321_set50HZ(struct usb_spca50x *spca50x); |
| 46 |
|
static void vc0321_set60HZ(struct usb_spca50x *spca50x); |
| 47 |
|
static void vc0321_setNoFliker(struct usb_spca50x *spca50x); |
| 48 |
/******************* Camera Private ***********************/ |
/******************* Camera Private ***********************/ |
| 49 |
|
|
| 50 |
/******************************************************************/ |
/******************************************************************/ |
| 64 |
.set_quality = vc0321_setquality, |
.set_quality = vc0321_setquality, |
| 65 |
.cam_shutdown = vc0321_shutdown, |
.cam_shutdown = vc0321_shutdown, |
| 66 |
.sof_detect = vc0321_sofdetect, |
.sof_detect = vc0321_sofdetect, |
| 67 |
|
.set_50HZ = vc0321_set50HZ, |
| 68 |
|
.set_60HZ = vc0321_set60HZ, |
| 69 |
|
.set_50HZScale = vc0321_set50HZ, |
| 70 |
|
.set_60HZScale = vc0321_set60HZ, |
| 71 |
|
.set_NoFliker = vc0321_setNoFliker, |
| 72 |
|
.set_NoFlikerScale = vc0321_setNoFliker, |
| 73 |
}; |
}; |
| 74 |
typedef struct { |
typedef struct { |
| 75 |
int sensorId; |
int sensorId; |
| 517 |
spca50x->colour = 0; |
spca50x->colour = 0; |
| 518 |
} |
} |
| 519 |
|
|
| 520 |
|
static void vc0321_set50HZ(struct usb_spca50x *spca50x) { |
| 521 |
|
switch (spca50x->sensor) { |
| 522 |
|
case SENSOR_OV7660: |
| 523 |
|
vc0321WriteVector(spca50x, ov7660_50HZ); |
| 524 |
|
break; |
| 525 |
|
default: |
| 526 |
|
break; |
| 527 |
|
} |
| 528 |
|
} |
| 529 |
|
|
| 530 |
|
static void vc0321_set60HZ(struct usb_spca50x *spca50x) { |
| 531 |
|
switch (spca50x->sensor) { |
| 532 |
|
case SENSOR_OV7660: |
| 533 |
|
vc0321WriteVector(spca50x, ov7660_60HZ); |
| 534 |
|
break; |
| 535 |
|
default: |
| 536 |
|
break; |
| 537 |
|
} |
| 538 |
|
} |
| 539 |
|
|
| 540 |
|
static void vc0321_setNoFliker(struct usb_spca50x *spca50x) { |
| 541 |
|
switch (spca50x->sensor) { |
| 542 |
|
case SENSOR_OV7660: |
| 543 |
|
vc0321WriteVector(spca50x, ov7660_NoFliker); |
| 544 |
|
break; |
| 545 |
|
default: |
| 546 |
|
break; |
| 547 |
|
} |
| 548 |
|
|
| 549 |
|
} |
| 550 |
|
|
| 551 |
static int vc0321_sofdetect(struct usb_spca50x *spca50x,struct spca50x_frame *frame, unsigned char *cdata,int *iPix, int seqnum, int *datalength) |
static int vc0321_sofdetect(struct usb_spca50x *spca50x,struct spca50x_frame *frame, unsigned char *cdata,int *iPix, int seqnum, int *datalength) |
| 552 |
{ |
{ |
| 553 |
|
|
| 554 |
if (cdata[0] == 0xFF && cdata[1] == 0xD8) { |
if (cdata[0] == 0xFF && cdata[1] == 0xD8) { |
| 555 |
// FIXME how can we change Hstart ?? |
|
|
if(spca50x->sensor == SENSOR_OV7660) |
|
|
*iPix = 44 ;// 46; //18 remove 0xff 0xd8; |
|
|
else |
|
| 556 |
*iPix = 46 ; |
*iPix = 46 ; |
| 557 |
PDEBUG(5, |
PDEBUG(5, |
| 558 |
"vc0321 header packet found datalength %d !!", |
"vc0321 header packet found datalength %d !!", |