Browse Source

[PATCH] USB: add support for Creative WebCam mini to stv680 driver

Added support for Creative WebCam Go Mini.
Camera has STV680 chip and just different Product ID(0x4007) and Vendor ID (0x041e).

Signed-off-by: Kiril Jovchev <jovchev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kiril Jovchev 20 years ago
parent
commit
1636787794
2 changed files with 11 additions and 2 deletions
  1. 6 2
      drivers/usb/media/stv680.c
  2. 5 0
      drivers/usb/media/stv680.h

+ 6 - 2
drivers/usb/media/stv680.c

@@ -1375,9 +1375,13 @@ static int stv680_probe (struct usb_interface *intf, const struct usb_device_id
 	    (le16_to_cpu(dev->descriptor.idProduct) == USB_PENCAM_PRODUCT_ID)) {
 	    (le16_to_cpu(dev->descriptor.idProduct) == USB_PENCAM_PRODUCT_ID)) {
 		camera_name = "STV0680";
 		camera_name = "STV0680";
 		PDEBUG (0, "STV(i): STV0680 camera found.");
 		PDEBUG (0, "STV(i): STV0680 camera found.");
+	} 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 {
 	} 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.");
+		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;
 		retval = -ENODEV;
 		goto error;
 		goto error;
 	}
 	}

+ 5 - 0
drivers/usb/media/stv680.h

@@ -41,12 +41,17 @@
 
 
 #define USB_PENCAM_VENDOR_ID	0x0553
 #define USB_PENCAM_VENDOR_ID	0x0553
 #define USB_PENCAM_PRODUCT_ID	0x0202
 #define USB_PENCAM_PRODUCT_ID	0x0202
+
+#define USB_CREATIVEGOMINI_VENDOR_ID	0x041e
+#define USB_CREATIVEGOMINI_PRODUCT_ID	0x4007
+
 #define PENCAM_TIMEOUT          1000
 #define PENCAM_TIMEOUT          1000
 /* fmt 4 */
 /* fmt 4 */
 #define STV_VIDEO_PALETTE       VIDEO_PALETTE_RGB24
 #define STV_VIDEO_PALETTE       VIDEO_PALETTE_RGB24
 
 
 static struct usb_device_id device_table[] = {
 static struct usb_device_id device_table[] = {
 	{USB_DEVICE (USB_PENCAM_VENDOR_ID, USB_PENCAM_PRODUCT_ID)},
 	{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);
 MODULE_DEVICE_TABLE (usb, device_table);