Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 219434
b: refs/heads/master
c: 35b5366
h: refs/heads/master
v: v3
  • Loading branch information
Janne Grunau authored and Mauro Carvalho Chehab committed Oct 21, 2010
1 parent 37a2ddb commit 9c94d5e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 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: 74a558b1f441c03b025cd6c11e79a94e99368856
refs/heads/master: 35b53664d5d0331c8ec2ef44e74eaf4d18f00c06
25 changes: 14 additions & 11 deletions trunk/drivers/media/video/hdpvr/hdpvr-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,19 +156,22 @@ static int device_authorization(struct hdpvr_device *dev)
v4l2_info(&dev->v4l2_dev, "firmware version 0x%x dated %s\n",
dev->usbc_buf[1], &dev->usbc_buf[2]);

if (dev->usbc_buf[1] == HDPVR_FIRMWARE_VERSION) {
switch (dev->usbc_buf[1]) {
case HDPVR_FIRMWARE_VERSION:
dev->flags &= ~HDPVR_FLAG_AC3_CAP;
} else if (dev->usbc_buf[1] == HDPVR_FIRMWARE_VERSION_AC3) {
break;
case HDPVR_FIRMWARE_VERSION_AC3:
case HDPVR_FIRMWARE_VERSION_0X12:
case HDPVR_FIRMWARE_VERSION_0X15:
dev->flags |= HDPVR_FLAG_AC3_CAP;
} else if (dev->usbc_buf[1] > HDPVR_FIRMWARE_VERSION_AC3) {
v4l2_info(&dev->v4l2_dev, "untested firmware version 0x%x, "
"the driver might not work\n", dev->usbc_buf[1]);
dev->flags |= HDPVR_FLAG_AC3_CAP;
} else {
v4l2_err(&dev->v4l2_dev, "unknown firmware version 0x%x\n",
dev->usbc_buf[1]);
ret = -EINVAL;
goto unlock;
break;
default:
v4l2_info(&dev->v4l2_dev, "untested firmware, the driver might"
" not work.\n");
if (dev->usbc_buf[1] >= HDPVR_FIRMWARE_VERSION_AC3)
dev->flags |= HDPVR_FLAG_AC3_CAP;
else
dev->flags &= ~HDPVR_FLAG_AC3_CAP;
}

response = dev->usbc_buf+38;
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/media/video/hdpvr/hdpvr.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@

#define NUM_BUFFERS 64

#define HDPVR_FIRMWARE_VERSION 0x8
#define HDPVR_FIRMWARE_VERSION_AC3 0xd
#define HDPVR_FIRMWARE_VERSION 0x08
#define HDPVR_FIRMWARE_VERSION_AC3 0x0d
#define HDPVR_FIRMWARE_VERSION_0X12 0x12
#define HDPVR_FIRMWARE_VERSION_0X15 0x15

/* #define HDPVR_DEBUG */

Expand Down

0 comments on commit 9c94d5e

Please sign in to comment.