Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173930
b: refs/heads/master
c: 5a2e8d9
h: refs/heads/master
v: v3
  • Loading branch information
Marton Nemeth authored and Mauro Carvalho Chehab committed Dec 5, 2009
1 parent b9a7137 commit 33303b4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ff75e99c62bcef8ccd6fb70151ad2b87aa52a165
refs/heads/master: 5a2e8d9fc15901d6ee4ec177b3845a84b6b960bd
18 changes: 11 additions & 7 deletions trunk/drivers/media/video/gspca/pac7311.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ static const struct v4l2_pix_format vga_mode[] = {
.priv = 0},
};

#define LOAD_PAGE3 255
#define LOAD_PAGE4 254
#define END_OF_SEQUENCE 0

/* pac 7302 */
static const __u8 init_7302[] = {
/* index,value */
Expand Down Expand Up @@ -302,7 +306,7 @@ static const __u8 start_7302[] = {
0xff, 1, 0x02, /* page 2 */
0x22, 1, 0x00,
0xff, 1, 0x03, /* page 3 */
0x00, 255, /* load the page 3 */
0, LOAD_PAGE3, /* load the page 3 */
0x11, 1, 0x01,
0xff, 1, 0x02, /* page 2 */
0x13, 1, 0x00,
Expand All @@ -313,7 +317,7 @@ static const __u8 start_7302[] = {
0x6e, 1, 0x08,
0xff, 1, 0x01, /* page 1 */
0x78, 1, 0x00,
0, 0 /* end of sequence */
0, END_OF_SEQUENCE /* end of sequence */
};

#define SKIP 0xaa
Expand Down Expand Up @@ -379,9 +383,9 @@ static const __u8 start_7311[] = {
0xf0, 13, 0x01, 0x00, 0x00, 0x00, 0x22, 0x00, 0x20, 0x00,
0x3f, 0x00, 0x0a, 0x01, 0x00,
0xff, 1, 0x04, /* page 4 */
0x00, 254, /* load the page 4 */
0, LOAD_PAGE4, /* load the page 4 */
0x11, 1, 0x01,
0, 0 /* end of sequence */
0, END_OF_SEQUENCE /* end of sequence */
};

/* page 4 - the value SKIP says skip the index - see reg_w_page() */
Expand Down Expand Up @@ -461,12 +465,12 @@ static void reg_w_var(struct gspca_dev *gspca_dev,
index = *seq++;
len = *seq++;
switch (len) {
case 0:
case END_OF_SEQUENCE:
return;
case 254:
case LOAD_PAGE4:
reg_w_page(gspca_dev, page4_7311, sizeof page4_7311);
break;
case 255:
case LOAD_PAGE3:
reg_w_page(gspca_dev, page3_7302, sizeof page3_7302);
break;
default:
Expand Down

0 comments on commit 33303b4

Please sign in to comment.