| By Date: | <-- --> |
| By Thread: | <-- --> |
Mauro,
this is a patch fixing a small bug in zc0301_start_transfer()
introduced in the ZC0301 driver v1.04.
Signed-off-by: Luca Risolia <luca.risolia (at) studio.unibo.it>
The patch was not made against the Mercurial v4l-dvb tree,
becouse I did not update my tree yet, but I think you can
apply this patch without problems to your actual tree.
Best regards,
Luca Risolia
---
--- b/drivers/media/video/zc0301/zc0301_core.c.orig 2006-04-25 09:11:30.000000000 +0000
+++ b/drivers/media/video/zc0301/zc0301_core.c 2006-04-25 09:09:08.000000000 +0000
(at) (at) -1,5 +1,5 (at) (at)
/***************************************************************************
- * Video4Linux2 driver for ZC0301 Image Processor and Control Chip *
+ * Video4Linux2 driver for ZC0301[P] Image Processor and Control Chip *
* *
* Copyright (C) 2006 by Luca Risolia <luca.risolia (at) studio.unibo.it> *
* *
(at) (at) -47,13 +47,13 (at) (at)
/*****************************************************************************/
-#define ZC0301_MODULE_NAME "V4L2 driver for ZC0301 " \
+#define ZC0301_MODULE_NAME "V4L2 driver for ZC0301[P] " \
"Image Processor and Control Chip"
#define ZC0301_MODULE_AUTHOR "(C) 2006 Luca Risolia"
#define ZC0301_AUTHOR_EMAIL "<luca.risolia (at) studio.unibo.it>"
#define ZC0301_MODULE_LICENSE "GPL"
-#define ZC0301_MODULE_VERSION "1:1.04"
-#define ZC0301_MODULE_VERSION_CODE KERNEL_VERSION(1, 0, 4)
+#define ZC0301_MODULE_VERSION "1:1.05"
+#define ZC0301_MODULE_VERSION_CODE KERNEL_VERSION(1, 0, 5)
/*****************************************************************************/
(at) (at) -427,10 +427,11 (at) (at) resubmit_urb:
static int zc0301_start_transfer(struct zc0301_device* cam)
{
struct usb_device *udev = cam->usbdev;
+ struct usb_host_interface* altsetting = usb_altnum_to_altsetting(
+ usb_ifnum_to_if(udev, 0),
+ ZC0301_ALTERNATE_SETTING);
+ const unsigned int psz = altsetting->endpoint[0].desc.wMaxPacketSize;
struct urb* urb;
- const unsigned int wMaxPacketSize[] = {0, 128, 192, 256, 384,
- 512, 768, 1023};
- const unsigned int psz = wMaxPacketSize[ZC0301_ALTERNATE_SETTING];
s8 i, j;
int err = 0;
(at) (at) -1914,7 +1915,7 (at) (at) zc0301_usb_probe(struct usb_interface* i
mutex_init(&cam->dev_mutex);
- DBG(2, "ZC0301 Image Processor and Control Chip detected "
+ DBG(2, "ZC0301[P] Image Processor and Control Chip detected "
"(vid/pid 0x%04X/0x%04X)",id->idVendor, id->idProduct);
for (i = 0; zc0301_sensor_table[i]; i++) {
(at) (at) -1936,7 +1937,7 (at) (at) zc0301_usb_probe(struct usb_interface* i
cam->state |= DEV_MISCONFIGURED;
}
- strcpy(cam->v4ldev->name, "ZC0301 PC Camera");
+ strcpy(cam->v4ldev->name, "ZC0301[P] PC Camera");
cam->v4ldev->owner = THIS_MODULE;
cam->v4ldev->type = VID_TYPE_CAPTURE | VID_TYPE_SCALES;
cam->v4ldev->hardware = 0;
On Mon, Apr 24, 2006 at 11:32:58AM -0300, Mauro Carvalho Chehab wrote:
> Luca,
>
> Em Dom, 2006-04-23 às 02:04 +0000, Luca Risolia escreveu:
> > ZC0301 driver updates:
> >
> > - Add support for PB-0330 image sensor
> > - Generic documentation cleanups and updates
> >
> > Signed-off-by: Luca Risolia <luca.risolia (at) studio.unibo.it>
> >
> > Mauro, please apply.
> Applied, thanks.
>
> Next time, please generate against Mercurial v4l-dvb tree. There were a
> change at Kconfig file due to V4L1/V4L2 explicit options introduced at
> devel tree.
>
> >
> > Best regards,
> > Luca Risolia
>
> Cheers,
> Mauro.
>
Attachment:
pgp1kAucTN79w.pgp
Description: PGP signature
-- video4linux-list mailing list Unsubscribe mailto:video4linux-list-request (at) redhat.com?subject=unsubscribe https://www.redhat.com/mailman/listinfo/video4linux-list