aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2009-11-25 00:49:21 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-05 15:42:09 -0500
commitc21c2db414bb38086f99c586ffdf019eedb9cad8 (patch)
tree0ac27999d9946e7416344cbf90afc875e6086c3a /drivers/media
parent09ea33e5c696958e8b1ae6d5ab184476b16592f1 (diff)
V4L/DVB (13495): pvrusb2: Support 16KB FX2 firmware
New FX2 firmware from Hauppauge is no longer 8KB in size - it's 16KB. This is true for HVR-1950 and HVR-1900 devices. Without this change, new pvrusb2 users with that hardware are unable to use the driver (because the CD shipped with the hardware only has the 16KB firmware). Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-devattr.c2
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-devattr.h1
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-hdw.c15
3 files changed, 16 insertions, 2 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-devattr.c b/drivers/media/video/pvrusb2/pvrusb2-devattr.c
index e4d7c13cab87..ef4ff411b39d 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-devattr.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-devattr.c
@@ -456,6 +456,7 @@ static const struct pvr2_device_desc pvr2_device_750xx = {
456 .flag_has_analogtuner = !0, 456 .flag_has_analogtuner = !0,
457 .flag_has_composite = !0, 457 .flag_has_composite = !0,
458 .flag_has_svideo = !0, 458 .flag_has_svideo = !0,
459 .flag_fx2_16kb = !0,
459 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, 460 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
460 .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE, 461 .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE,
461 .default_std_mask = V4L2_STD_NTSC_M, 462 .default_std_mask = V4L2_STD_NTSC_M,
@@ -478,6 +479,7 @@ static const struct pvr2_device_desc pvr2_device_751xx = {
478 .flag_has_analogtuner = !0, 479 .flag_has_analogtuner = !0,
479 .flag_has_composite = !0, 480 .flag_has_composite = !0,
480 .flag_has_svideo = !0, 481 .flag_has_svideo = !0,
482 .flag_fx2_16kb = !0,
481 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, 483 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
482 .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE, 484 .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE,
483 .default_std_mask = V4L2_STD_NTSC_M, 485 .default_std_mask = V4L2_STD_NTSC_M,
diff --git a/drivers/media/video/pvrusb2/pvrusb2-devattr.h b/drivers/media/video/pvrusb2/pvrusb2-devattr.h
index ea04ecf8aa39..e5b9594eb5f6 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-devattr.h
+++ b/drivers/media/video/pvrusb2/pvrusb2-devattr.h
@@ -176,6 +176,7 @@ struct pvr2_device_desc {
176 unsigned int flag_has_analogtuner:1; /* Has analog tuner */ 176 unsigned int flag_has_analogtuner:1; /* Has analog tuner */
177 unsigned int flag_has_composite:1; /* Has composite input */ 177 unsigned int flag_has_composite:1; /* Has composite input */
178 unsigned int flag_has_svideo:1; /* Has s-video input */ 178 unsigned int flag_has_svideo:1; /* Has s-video input */
179 unsigned int flag_fx2_16kb:1; /* 16KB FX2 firmware OK here */
179}; 180};
180 181
181extern struct usb_device_id pvr2_device_table[]; 182extern struct usb_device_id pvr2_device_table[];
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index 4c1a2a534427..9be04772c723 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -1474,8 +1474,19 @@ static int pvr2_upload_firmware1(struct pvr2_hdw *hdw)
1474 1474
1475 pipe = usb_sndctrlpipe(hdw->usb_dev, 0); 1475 pipe = usb_sndctrlpipe(hdw->usb_dev, 0);
1476 1476
1477 if (fw_entry->size != 0x2000){ 1477 if ((fw_entry->size != 0x2000) &&
1478 pvr2_trace(PVR2_TRACE_ERROR_LEGS,"wrong fx2 firmware size"); 1478 (!(hdw->hdw_desc->flag_fx2_16kb && (fw_entry->size == 0x4000)))) {
1479 if (hdw->hdw_desc->flag_fx2_16kb) {
1480 pvr2_trace(PVR2_TRACE_ERROR_LEGS,
1481 "Wrong fx2 firmware size"
1482 " (expected 8192 or 16384, got %u)",
1483 fw_entry->size);
1484 } else {
1485 pvr2_trace(PVR2_TRACE_ERROR_LEGS,
1486 "Wrong fx2 firmware size"
1487 " (expected 8192, got %u)",
1488 fw_entry->size);
1489 }
1479 release_firmware(fw_entry); 1490 release_firmware(fw_entry);
1480 return -ENOMEM; 1491 return -ENOMEM;
1481 } 1492 }