summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/gspca/sunplus.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2009-07-09 08:28:46 +0200
committerJean-Francois Moine <moinejf@free.fr>2009-07-09 08:28:46 +0200
commite85e9d72ef3cca1749a676ac0e0a99506f2e87c3 (patch)
treec7d6c81632739f04308ee048e35994956ef95b85 /linux/drivers/media/video/gspca/sunplus.c
parentc0f8b9a193501684bb2c80845b24d71465941e03 (diff)
downloadmediapointer-dvb-s2-e85e9d72ef3cca1749a676ac0e0a99506f2e87c3.tar.gz
mediapointer-dvb-s2-e85e9d72ef3cca1749a676ac0e0a99506f2e87c3.tar.bz2
gspca - sunplus: Webcam 052b:1803 added.
From: Johannes Goerner <johannes-goerner@gmx.de> Priority: normal Signed-off-by: Johannes Goerner <johannes-goerner@gmx.de> Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Diffstat (limited to 'linux/drivers/media/video/gspca/sunplus.c')
-rw-r--r--linux/drivers/media/video/gspca/sunplus.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/linux/drivers/media/video/gspca/sunplus.c b/linux/drivers/media/video/gspca/sunplus.c
index 16bc65dc7..f23594e0b 100644
--- a/linux/drivers/media/video/gspca/sunplus.c
+++ b/linux/drivers/media/video/gspca/sunplus.c
@@ -52,6 +52,7 @@ struct sd {
#define LogitechClickSmart420 2
#define LogitechClickSmart820 3
#define MegapixV4 4
+#define MegaImageVI 5
u8 *jpeg_hdr;
};
@@ -875,7 +876,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;
@@ -1017,7 +1021,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);
@@ -1413,6 +1418,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)},