public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Creative WebCam mini driver
@ 2005-06-02 15:35 Kiril Jovchev
  2005-06-02 15:41 ` Duncan Sands
  2005-06-02 16:16 ` Alexey Dobriyan
  0 siblings, 2 replies; 4+ messages in thread
From: Kiril Jovchev @ 2005-06-02 15:35 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2887 bytes --]

Hi,

I have send patch quite a while ago for 2.6.8 version of kernel and I
did not got any reply from the list.
So now I'm sending the patch again for 2.6.11.11 kernel what is latest stable.

I am attaching the patch files and puting their code in the e-mail
body at the end of the e-mail.

I hope that I will get some reply this time.

Kiril Jovchev

--- linux-2.6.11.11/drivers/usb/media/stv680.c	2005-05-27
08:06:46.000000000 +0300
+++ linux/drivers/usb/media/stv680.c	2005-06-02 17:59:52.000000000 +0300
@@ -9,6 +9,9 @@
  * Endpoints (formerly known as AOX) se401 USB Camera Driver
  * Copyright (c) 2000 Jeroen B. Vreeken (pe1rxq@amsat.org)
  *
+ * Creative WebCam Go Mini Driver, modified by Kiril Jovchev 
+ * (jovchev@gmail.com)
+ *
  * Still somewhat based on the Linux ov511 driver.
  * 
  * This program is free software; you can redistribute it and/or modify it
@@ -56,6 +59,11 @@
  *			   to set to a non-supported size. This allowed
  *			   gnomemeeting to work.
  *			   Fixed proc entry removal bug.
+ *
+ * ver 0.26 Sep, 2004 (kjv) 
+ * 			   Added support for Creative WebCam Go mini. 
+ * 			   Camera is based on same chip. 
+ * 
  */
 
 #include <linux/config.h>
@@ -1375,9 +1383,14 @@
 	    (le16_to_cpu(dev->descriptor.idProduct) == USB_PENCAM_PRODUCT_ID)) {
 		camera_name = "STV0680";
 		PDEBUG (0, "STV(i): STV0680 camera found.");
-	} else {
-		PDEBUG (0, "STV(e): Vendor/Product ID do not match STV0680 values.");
-		PDEBUG (0, "STV(e): Check that the STV0680 camera is connected to
the computer.");
+	} else if ((le16_to_cpu(dev->descriptor.idVendor) ==
USB_CREATIVEGOMINI_VENDOR_ID) &&
+            (le16_to_cpu(dev->descriptor.idProduct) ==
USB_CREATIVEGOMINI_PRODUCT_ID)) {
+                camera_name = "Creative WebCam Go Mini";
+                PDEBUG (0, "STV(i): Creative WebCam Go Mini found.");
+	} 
+	else {
+		PDEBUG (0, "STV(e): Vendor/Product ID do not match STV0680 or
Creative WebCam Go Mini values.");
+		PDEBUG (0, "STV(e): Check that the STV0680 or Creative WebCam Go
Mini camera is connected to the computer.");
 		retval = -ENODEV;
 		goto error;
 	}


--- linux-2.6.11.11/drivers/usb/media/stv680.h	2005-05-27
08:06:46.000000000 +0300
+++ linux/drivers/usb/media/stv680.h	2005-06-02 18:00:03.000000000 +0300
@@ -41,13 +41,19 @@
 
 #define USB_PENCAM_VENDOR_ID	0x0553
 #define USB_PENCAM_PRODUCT_ID	0x0202
+
+#define USB_CREATIVEGOMINI_VENDOR_ID 0x041e 
+#define USB_CREATIVEGOMINI_PRODUCT_ID 0x4007
+
 #define PENCAM_TIMEOUT          1000
 /* fmt 4 */
 #define STV_VIDEO_PALETTE       VIDEO_PALETTE_RGB24
 
 static struct usb_device_id device_table[] = {
 	{USB_DEVICE (USB_PENCAM_VENDOR_ID, USB_PENCAM_PRODUCT_ID)},
+	{USB_DEVICE (USB_CREATIVEGOMINI_VENDOR_ID, USB_CREATIVEGOMINI_PRODUCT_ID)},
 	{}
+	
 };
 MODULE_DEVICE_TABLE (usb, device_table);

[-- Attachment #2: stv680.c.patch --]
[-- Type: application/octet-stream, Size: 1751 bytes --]

--- linux-2.6.11.11/drivers/usb/media/stv680.c	2005-05-27 08:06:46.000000000 +0300
+++ linux/drivers/usb/media/stv680.c	2005-06-02 17:59:52.000000000 +0300
@@ -9,6 +9,9 @@
  * Endpoints (formerly known as AOX) se401 USB Camera Driver
  * Copyright (c) 2000 Jeroen B. Vreeken (pe1rxq@amsat.org)
  *
+ * Creative WebCam Go Mini Driver, modified by Kiril Jovchev 
+ * (jovchev@gmail.com)
+ *
  * Still somewhat based on the Linux ov511 driver.
  * 
  * This program is free software; you can redistribute it and/or modify it
@@ -56,6 +59,11 @@
  *			   to set to a non-supported size. This allowed
  *			   gnomemeeting to work.
  *			   Fixed proc entry removal bug.
+ *
+ * ver 0.26 Sep, 2004 (kjv) 
+ * 			   Added support for Creative WebCam Go mini. 
+ * 			   Camera is based on same chip. 
+ * 
  */
 
 #include <linux/config.h>
@@ -1375,9 +1383,14 @@
 	    (le16_to_cpu(dev->descriptor.idProduct) == USB_PENCAM_PRODUCT_ID)) {
 		camera_name = "STV0680";
 		PDEBUG (0, "STV(i): STV0680 camera found.");
-	} else {
-		PDEBUG (0, "STV(e): Vendor/Product ID do not match STV0680 values.");
-		PDEBUG (0, "STV(e): Check that the STV0680 camera is connected to the computer.");
+	} else if ((le16_to_cpu(dev->descriptor.idVendor) == USB_CREATIVEGOMINI_VENDOR_ID) &&
+            (le16_to_cpu(dev->descriptor.idProduct) == USB_CREATIVEGOMINI_PRODUCT_ID)) {
+                camera_name = "Creative WebCam Go Mini";
+                PDEBUG (0, "STV(i): Creative WebCam Go Mini found.");
+	} 
+	else {
+		PDEBUG (0, "STV(e): Vendor/Product ID do not match STV0680 or Creative WebCam Go Mini values.");
+		PDEBUG (0, "STV(e): Check that the STV0680 or Creative WebCam Go Mini camera is connected to the computer.");
 		retval = -ENODEV;
 		goto error;
 	}

[-- Attachment #3: stv680.h.patch --]
[-- Type: application/octet-stream, Size: 699 bytes --]

--- linux-2.6.11.11/drivers/usb/media/stv680.h	2005-05-27 08:06:46.000000000 +0300
+++ linux/drivers/usb/media/stv680.h	2005-06-02 18:00:03.000000000 +0300
@@ -41,13 +41,19 @@
 
 #define USB_PENCAM_VENDOR_ID	0x0553
 #define USB_PENCAM_PRODUCT_ID	0x0202
+
+#define USB_CREATIVEGOMINI_VENDOR_ID 0x041e 
+#define USB_CREATIVEGOMINI_PRODUCT_ID 0x4007
+
 #define PENCAM_TIMEOUT          1000
 /* fmt 4 */
 #define STV_VIDEO_PALETTE       VIDEO_PALETTE_RGB24
 
 static struct usb_device_id device_table[] = {
 	{USB_DEVICE (USB_PENCAM_VENDOR_ID, USB_PENCAM_PRODUCT_ID)},
+	{USB_DEVICE (USB_CREATIVEGOMINI_VENDOR_ID, USB_CREATIVEGOMINI_PRODUCT_ID)},
 	{}
+	
 };
 MODULE_DEVICE_TABLE (usb, device_table);
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Creative WebCam mini driver
  2005-06-02 15:35 [PATCH] Creative WebCam mini driver Kiril Jovchev
@ 2005-06-02 15:41 ` Duncan Sands
  2005-06-02 16:16 ` Alexey Dobriyan
  1 sibling, 0 replies; 4+ messages in thread
From: Duncan Sands @ 2005-06-02 15:41 UTC (permalink / raw)
  To: Kiril Jovchev; +Cc: linux-kernel

> I have send patch quite a while ago for 2.6.8 version of kernel and I
> did not got any reply from the list.
> So now I'm sending the patch again for 2.6.11.11 kernel what is latest stable.
> 
> I am attaching the patch files and puting their code in the e-mail
> body at the end of the e-mail.
> 
> I hope that I will get some reply this time.

Hi Kiril, I think you should send this to the usb mailing list
linux-usb-devel@lists.sourceforge.net.

Ciao,

Duncan.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Creative WebCam mini driver
  2005-06-02 15:35 [PATCH] Creative WebCam mini driver Kiril Jovchev
  2005-06-02 15:41 ` Duncan Sands
@ 2005-06-02 16:16 ` Alexey Dobriyan
  2005-06-03  6:54   ` Kiril Jovchev
  1 sibling, 1 reply; 4+ messages in thread
From: Alexey Dobriyan @ 2005-06-02 16:16 UTC (permalink / raw)
  To: Kiril Jovchev; +Cc: linux-kernel, linux-usb-devel

On Thursday 02 June 2005 19:35, Kiril Jovchev wrote:

> So now I'm sending the patch again for 2.6.11.11 kernel what is latest stable.

You're lucky it applies cleanly against 2.6.12-rc5-whatever. ;-)

There is no need to split the patch into two ones. Next time CC
linux-usb-devel@lists.sourceforge.net. Add "-p" to your diff switches.

> --- linux-2.6.11.11/drivers/usb/media/stv680.c
> +++ linux/drivers/usb/media/stv680.c

> + * Creative WebCam Go Mini Driver, modified by Kiril Jovchev 

Trailing whitespace.

> + *
> + * ver 0.26 Sep, 2004 (kjv) 
> + * 			   Added support for Creative WebCam Go mini. 
> + * 			   Camera is based on same chip. 
> + * 

Trailing whitespace.

> @@ -1375,9 +1383,14 @@
>  	    (le16_to_cpu(dev->descriptor.idProduct) == USB_PENCAM_PRODUCT_ID)) {
>  		camera_name = "STV0680";
>  		PDEBUG (0, "STV(i): STV0680 camera found.");
> -	} else {
> -		PDEBUG (0, "STV(e): Vendor/Product ID do not match STV0680 values.");
> -		PDEBUG (0, "STV(e): Check that the STV0680 camera is connected to the computer.");
> +	} else if ((le16_to_cpu(dev->descriptor.idVendor) == USB_CREATIVEGOMINI_VENDOR_ID) &&
> +            (le16_to_cpu(dev->descriptor.idProduct) == USB_CREATIVEGOMINI_PRODUCT_ID)) {

VENDOR_ID and PRODUCT_ID are constants. You can do

	if ((dev->descriptor.idVendor == cpu_to_le16(VENDOR_ID)) &&
	    (dev->descriptor.idProduct == cpu_to_le16(PRODUCT_ID))) {

> +                camera_name = "Creative WebCam Go Mini";
> +                PDEBUG (0, "STV(i): Creative WebCam Go Mini found.");
> +	} 
> +	else {

"} else {", please.

> +		PDEBUG (0, "STV(e): Vendor/Product ID do not match STV0680 or Creative WebCam Go Mini values.");
> +		PDEBUG (0, "STV(e): Check that the STV0680 or Creative WebCam Go Mini camera is connected to the computer.");

> --- linux-2.6.11.11/drivers/usb/media/stv680.h
> +++ linux/drivers/usb/media/stv680.h

> +#define USB_CREATIVEGOMINI_VENDOR_ID 0x041e 

Trailing whitespace.

>  static struct usb_device_id device_table[] = {
>  	{USB_DEVICE (USB_PENCAM_VENDOR_ID, USB_PENCAM_PRODUCT_ID)},
> +	{USB_DEVICE (USB_CREATIVEGOMINI_VENDOR_ID, USB_CREATIVEGOMINI_PRODUCT_ID)},
>  	{}
> +	

Why add this line?

>  };

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Creative WebCam mini driver
  2005-06-02 16:16 ` Alexey Dobriyan
@ 2005-06-03  6:54   ` Kiril Jovchev
  0 siblings, 0 replies; 4+ messages in thread
From: Kiril Jovchev @ 2005-06-03  6:54 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: linux-kernel, linux-usb-devel

Thanks for the comments Alexey. 

The whitespaces came from the diff. I the only switch what I have used it -u.

About the VENDOR_ID and PRODUCT_ID, I have looked at the code of
stv680.c that was in 2.6.11.11 and there the variables were casted.
> @@ -1375,9 +1383,14 @@
>           (le16_to_cpu(dev->descriptor.idProduct) == USB_PENCAM_PRODUCT_ID)) {
Probably this code needs to be fixed as well.

And about the extra lines and bad formating of else clause I'll do
better next time.

Do I need to submit fixed patch or you have applied this one?

//Cyrilo

On 6/2/05, Alexey Dobriyan <adobriyan@gmail.com> wrote:
> On Thursday 02 June 2005 19:35, Kiril Jovchev wrote:
> 
> > So now I'm sending the patch again for 2.6.11.11 kernel what is latest stable.
> 
> You're lucky it applies cleanly against 2.6.12-rc5-whatever. ;-)
> 
> There is no need to split the patch into two ones. Next time CC
> linux-usb-devel@lists.sourceforge.net. Add "-p" to your diff switches.
> 
> > --- linux-2.6.11.11/drivers/usb/media/stv680.c
> > +++ linux/drivers/usb/media/stv680.c
> 
> > + * Creative WebCam Go Mini Driver, modified by Kiril Jovchev
> 
> Trailing whitespace.
> 
> > + *
> > + * ver 0.26 Sep, 2004 (kjv)
> > + *                      Added support for Creative WebCam Go mini.
> > + *                      Camera is based on same chip.
> > + *
> 
> Trailing whitespace.
> 
> > @@ -1375,9 +1383,14 @@
> >           (le16_to_cpu(dev->descriptor.idProduct) == USB_PENCAM_PRODUCT_ID)) {
> >               camera_name = "STV0680";
> >               PDEBUG (0, "STV(i): STV0680 camera found.");
> > -     } else {
> > -             PDEBUG (0, "STV(e): Vendor/Product ID do not match STV0680 values.");
> > -             PDEBUG (0, "STV(e): Check that the STV0680 camera is connected to the computer.");
> > +     } else if ((le16_to_cpu(dev->descriptor.idVendor) == USB_CREATIVEGOMINI_VENDOR_ID) &&
> > +            (le16_to_cpu(dev->descriptor.idProduct) == USB_CREATIVEGOMINI_PRODUCT_ID)) {
> 
> VENDOR_ID and PRODUCT_ID are constants. You can do
> 
>         if ((dev->descriptor.idVendor == cpu_to_le16(VENDOR_ID)) &&
>             (dev->descriptor.idProduct == cpu_to_le16(PRODUCT_ID))) {
> 
> > +                camera_name = "Creative WebCam Go Mini";
> > +                PDEBUG (0, "STV(i): Creative WebCam Go Mini found.");
> > +     }
> > +     else {
> 
> "} else {", please.
> 
> > +             PDEBUG (0, "STV(e): Vendor/Product ID do not match STV0680 or Creative WebCam Go Mini values.");
> > +             PDEBUG (0, "STV(e): Check that the STV0680 or Creative WebCam Go Mini camera is connected to the computer.");
> 
> > --- linux-2.6.11.11/drivers/usb/media/stv680.h
> > +++ linux/drivers/usb/media/stv680.h
> 
> > +#define USB_CREATIVEGOMINI_VENDOR_ID 0x041e
> 
> Trailing whitespace.
> 
> >  static struct usb_device_id device_table[] = {
> >       {USB_DEVICE (USB_PENCAM_VENDOR_ID, USB_PENCAM_PRODUCT_ID)},
> > +     {USB_DEVICE (USB_CREATIVEGOMINI_VENDOR_ID, USB_CREATIVEGOMINI_PRODUCT_ID)},
> >       {}
> > +
> 
> Why add this line?
> 
> >  };
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-06-03  6:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-02 15:35 [PATCH] Creative WebCam mini driver Kiril Jovchev
2005-06-02 15:41 ` Duncan Sands
2005-06-02 16:16 ` Alexey Dobriyan
2005-06-03  6:54   ` Kiril Jovchev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox