]> git.karo-electronics.de Git - linux-beck.git/commitdiff
V4L/DVB (12281): gspca - sunplus: Webcam 052b:1803 added.
authorJohannes Goerner <johannes-goerner@gmx.de>
Thu, 9 Jul 2009 06:28:46 +0000 (03:28 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 12 Sep 2009 15:17:47 +0000 (12:17 -0300)
Signed-off-by: Johannes Goerner <johannes-goerner@gmx.de>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Documentation/video4linux/gspca.txt
drivers/media/video/gspca/sunplus.c

index 7045ebf1d72d4f37fa94f3fa4b8781d1feb34551..37247697dbe8ccabaf7fba7d9c06784b0e4f0168 100644 (file)
@@ -140,6 +140,7 @@ spca500             04fc:7333       PalmPixDC85
 sunplus                04fc:ffff       Pure DigitalDakota
 spca501                0506:00df       3Com HomeConnect Lite
 sunplus                052b:1513       Megapix V4
+sunplus                052b:1803       MegaImage VI
 tv8532         0545:808b       Veo Stingray
 tv8532         0545:8333       Veo Stingray
 sunplus                0546:3155       Polaroid PDC3070
index 5127bbf9dd260ed519397f535953c830e67d16ea..eabad47a3ca60ca277883db3eebece8b793e5893 100644 (file)
@@ -52,6 +52,7 @@ struct sd {
 #define LogitechClickSmart420 2
 #define LogitechClickSmart820 3
 #define MegapixV4 4
+#define MegaImageVI 5
 
        u8 *jpeg_hdr;
 };
@@ -844,7 +845,10 @@ static int sd_config(struct gspca_dev *gspca_dev,
                break;
        case BRIDGE_SPCA533:
                cam->cam_mode = custom_mode;
-               cam->nmodes = sizeof custom_mode / sizeof custom_mode[0];
+               if (sd->subtype == MegaImageVI)         /* 320x240 only */
+                       cam->nmodes = ARRAY_SIZE(custom_mode) - 1;
+               else
+                       cam->nmodes = ARRAY_SIZE(custom_mode);
                break;
        case BRIDGE_SPCA504C:
                cam->cam_mode = vga_mode2;
@@ -988,7 +992,8 @@ static int sd_start(struct gspca_dev *gspca_dev)
 /*     case BRIDGE_SPCA533: */
 /*     case BRIDGE_SPCA536: */
                if (sd->subtype == MegapixV4 ||
-                   sd->subtype == LogitechClickSmart820) {
+                   sd->subtype == LogitechClickSmart820 ||
+                   sd->subtype == MegaImageVI) {
                        reg_w(gspca_dev, 0xf0, 0, 0, 0);
                        spca504B_WaitCmdStatus(gspca_dev);
                        reg_r(gspca_dev, 0xf0, 4, 0);
@@ -1384,6 +1389,7 @@ static const __devinitdata struct usb_device_id device_table[] = {
        {USB_DEVICE(0x04fc, 0x5360), BS(SPCA536, 0)},
        {USB_DEVICE(0x04fc, 0xffff), BS(SPCA504B, 0)},
        {USB_DEVICE(0x052b, 0x1513), BS(SPCA533, MegapixV4)},
+       {USB_DEVICE(0x052b, 0x1803), BS(SPCA533, MegaImageVI)},
        {USB_DEVICE(0x0546, 0x3155), BS(SPCA533, 0)},
        {USB_DEVICE(0x0546, 0x3191), BS(SPCA504B, 0)},
        {USB_DEVICE(0x0546, 0x3273), BS(SPCA504B, 0)},