Re: [linux-usb-devel] [PATCH] USB: add zr364xx V4L2 driver

2007-02-18 Thread Antoine Jacquet
Hi, > Ok, this works, although it is a little hardcore... it would be better > to use, instead, an enum with the three methods, using an alias that > have some sense for each mode. I will fix this in the next release of my driver. > When using video_ioctl2, you don't need to have DBG. zr364xx_te

Re: [linux-usb-devel] [PATCH] USB: add zr364xx V4L2 driver

2007-02-18 Thread Mauro Carvalho Chehab
Em Dom, 2007-02-18 às 19:57 +0100, Antoine Jacquet escreveu: > This patch adds a V4L2 driver giving support for USB webcams based on the > zr364xx chipsets. > > Signed-off-by: Antoine Jacquet <[EMAIL PROTECTED]> > +static struct usb_device_id device_table[] = { > + {USB_DEVICE(0x08ca, 0x0109)

Re: [linux-usb-devel] [PATCH] USB: add zr364xx V4L2 driver

2007-02-18 Thread Antoine Jacquet
This patch adds a V4L2 driver giving support for USB webcams based on the zr364xx chipsets. Signed-off-by: Antoine Jacquet <[EMAIL PROTECTED]> --- Thanks all for the comments on my previous post, I have updated my patch as you suggested: * remove videodev.h header * remove .har

Re: [linux-usb-devel] [PATCH] USB: add zr364xx V4L2 driver

2007-02-14 Thread Manu Abraham
On 2/15/07, Trent Piepho <[EMAIL PROTECTED]> wrote: > On Wed, 14 Feb 2007, Alan wrote: > > > > My comment is not very good, in fact on some cameras I need to swap the > > > > bytes > > > > to have correct JPEG data (so this is not an endianness issue I think). > > > > Maybe there is a macro to swa

Re: [linux-usb-devel] [PATCH] USB: add zr364xx V4L2 driver

2007-02-14 Thread Mauro Carvalho Chehab
Em Ter, 2007-02-13 às 22:27 +0100, Antoine Jacquet escreveu: > Hi, > > > Instead of those, you should call v4l1_compat to allow your driver to > > work with older apps. > > As far as I know, the zr364xx cameras only handle JPEG data. > So is it usefull to have V4L1 compatibility since I think old

Re: [linux-usb-devel] [PATCH] USB: add zr364xx V4L2 driver

2007-02-14 Thread Trent Piepho
On Wed, 14 Feb 2007, Alan wrote: > > > My comment is not very good, in fact on some cameras I need to swap the > > > bytes > > > to have correct JPEG data (so this is not an endianness issue I think). > > > Maybe there is a macro to swap bytes in a buffer? I cannot find it. > > > > Sorry, there's

Re: [linux-usb-devel] [PATCH] USB: add zr364xx V4L2 driver

2007-02-14 Thread Alan
> > My comment is not very good, in fact on some cameras I need to swap the > > bytes > > to have correct JPEG data (so this is not an endianness issue I think). > > Maybe there is a macro to swap bytes in a buffer? I cannot find it. > > Sorry, there's a swab32, but no swab16. I misremembered. I

Re: [linux-usb-devel] [PATCH] USB: add zr364xx V4L2 driver

2007-02-14 Thread Oliver Neukum
Am Dienstag, 13. Februar 2007 18:51 schrieb Antoine Jacquet: > Hello, > > >> + /* swap to good indian if camera needs it */ > >> + if (cam->method == 0) > >> + for (i = 0; i < BUFFER_SIZE; i += 2) { > >> + swap = cam->buffer[i]; > >> +

Re: [linux-usb-devel] [PATCH] USB: add zr364xx V4L2 driver

2007-02-13 Thread Antoine Jacquet
Hi, > Instead of those, you should call v4l1_compat to allow your driver to > work with older apps. As far as I know, the zr364xx cameras only handle JPEG data. So is it usefull to have V4L1 compatibility since I think older apps won't work with V4L2_PIX_FMT_JPEG palette? FYI, older versions of

Re: [linux-usb-devel] [PATCH] USB: add zr364xx V4L2 driver

2007-02-13 Thread Antoine Jacquet
Hello, >> +/* swap to good indian if camera needs it */ >> +if (cam->method == 0) >> +for (i = 0; i < BUFFER_SIZE; i += 2) { >> +swap = cam->buffer[i]; >> +cam->buffer[i] = cam->buffer[i + 1]; >> +

Re: [linux-usb-devel] [PATCH] USB: add zr364xx V4L2 driver

2007-02-12 Thread Mauro Carvalho Chehab
Hi Antoine, A few comments: > +#include Why are you including the old header? Probably you are using some obsolete stuff. You should instead include videodev2.h, removing the old style from kernel 2.4 times. > +static struct usb_device_id device_table[] = { > > +/* devices supported by this d

Re: [linux-usb-devel] [PATCH] USB: add zr364xx V4L2 driver

2007-02-11 Thread Oliver Neukum
> +/* devices supported by this driver */ > +static struct usb_device_id device_table[] = { > + {USB_DEVICE(-1, -1)}, /* add your custom entry here ... */ > + {USB_DEVICE(0x08ca, 0x0109)}, > + {USB_DEVICE(0x041e, 0x4024)}, This ... > +/* devices supported by this driver */ >

[linux-usb-devel] [PATCH] USB: add zr364xx V4L2 driver

2007-02-10 Thread Antoine Jacquet
This patch adds a V4L2 driver giving support for USB webcams based on the zr364xx chipsets. Signed-off-by: Antoine Jacquet <[EMAIL PROTECTED]> --- This driver has been available for some time on my website as a separate package and people seem to be happy with it. I think users would appreciat