Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 181447
b: refs/heads/master
c: 08135ba
h: refs/heads/master
i:
  181445: db18d57
  181443: b693797
  181439: d79d058
v: v3
  • Loading branch information
Antoine Jacquet authored and Mauro Carvalho Chehab committed Feb 26, 2010
1 parent 89ef1a6 commit 030ef4f
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 3 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: 969cc9264bf2bd94d51748bacdafa90352ab71fa
refs/heads/master: 08135ba238ba7fe4e7af8cf11d026a7ed6b51f21
37 changes: 35 additions & 2 deletions trunk/drivers/media/video/zr364xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
#define METHOD0 0
#define METHOD1 1
#define METHOD2 2
#define METHOD3 3


/* Module parameters */
Expand Down Expand Up @@ -114,7 +115,7 @@ static struct usb_device_id device_table[] = {
{USB_DEVICE(0x06d6, 0x003b), .driver_info = METHOD0 },
{USB_DEVICE(0x0a17, 0x004e), .driver_info = METHOD2 },
{USB_DEVICE(0x041e, 0x405d), .driver_info = METHOD2 },
{USB_DEVICE(0x08ca, 0x2102), .driver_info = METHOD2 },
{USB_DEVICE(0x08ca, 0x2102), .driver_info = METHOD3 },
{USB_DEVICE(0x06d6, 0x003d), .driver_info = METHOD0 },
{} /* Terminating entry */
};
Expand Down Expand Up @@ -302,7 +303,7 @@ static message m2[] = {
};

/* init table */
static message *init[3] = { m0, m1, m2 };
static message *init[4] = { m0, m1, m2, m2 };


/* JPEG static data in header (Huffman table, etc) */
Expand Down Expand Up @@ -967,6 +968,22 @@ static int zr364xx_vidioc_s_fmt_vid_cap(struct file *file, void *priv,
m0d1[0] = mode;
m1[2].value = 0xf000 + mode;
m2[1].value = 0xf000 + mode;

/* special case for METHOD3, the modes are different */
if (cam->method == METHOD3) {
switch (mode) {
case 1:
m2[1].value = 0xf000 + 4;
break;
case 2:
m2[1].value = 0xf000 + 0;
break;
default:
m2[1].value = 0xf000 + 1;
break;
}
}

header2[437] = cam->height / 256;
header2[438] = cam->height % 256;
header2[439] = cam->width / 256;
Expand Down Expand Up @@ -1582,6 +1599,22 @@ static int zr364xx_probe(struct usb_interface *intf,
m0d1[0] = mode;
m1[2].value = 0xf000 + mode;
m2[1].value = 0xf000 + mode;

/* special case for METHOD3, the modes are different */
if (cam->method == METHOD3) {
switch (mode) {
case 1:
m2[1].value = 0xf000 + 4;
break;
case 2:
m2[1].value = 0xf000 + 0;
break;
default:
m2[1].value = 0xf000 + 1;
break;
}
}

header2[437] = cam->height / 256;
header2[438] = cam->height % 256;
header2[439] = cam->width / 256;
Expand Down

0 comments on commit 030ef4f

Please sign in to comment.