aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/mars.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2009-01-07 14:49:57 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:42:30 -0400
commit36e819db435a61819d50c57c424a5ab2b9634e59 (patch)
tree298bc85147b5fb60eaf5e6ecb745382a9a3580fa /drivers/media/video/gspca/mars.c
parent96ff65144c3e302698d6c53b8d05098844c6b064 (diff)
V4L/DVB (10345): gspca - jpeg subdrivers: One quantization table per subdriver.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/mars.c')
-rw-r--r--drivers/media/video/gspca/mars.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/media/video/gspca/mars.c b/drivers/media/video/gspca/mars.c
index 477441e22bab..54c68ea7e546 100644
--- a/drivers/media/video/gspca/mars.c
+++ b/drivers/media/video/gspca/mars.c
@@ -22,6 +22,7 @@
22#define MODULE_NAME "mars" 22#define MODULE_NAME "mars"
23 23
24#include "gspca.h" 24#include "gspca.h"
25#define QUANT_VAL 1 /* quantization table */
25#include "jpeg.h" 26#include "jpeg.h"
26 27
27MODULE_AUTHOR("Michel Xhaard <mxhaard@users.sourceforge.net>"); 28MODULE_AUTHOR("Michel Xhaard <mxhaard@users.sourceforge.net>");
@@ -31,8 +32,6 @@ MODULE_LICENSE("GPL");
31/* specific webcam descriptor */ 32/* specific webcam descriptor */
32struct sd { 33struct sd {
33 struct gspca_dev gspca_dev; /* !! must be the first item */ 34 struct gspca_dev gspca_dev; /* !! must be the first item */
34
35 char qindex;
36}; 35};
37 36
38/* V4L2 controls supported by the driver */ 37/* V4L2 controls supported by the driver */
@@ -117,13 +116,11 @@ static void bulk_w(struct gspca_dev *gspca_dev,
117static int sd_config(struct gspca_dev *gspca_dev, 116static int sd_config(struct gspca_dev *gspca_dev,
118 const struct usb_device_id *id) 117 const struct usb_device_id *id)
119{ 118{
120 struct sd *sd = (struct sd *) gspca_dev;
121 struct cam *cam; 119 struct cam *cam;
122 120
123 cam = &gspca_dev->cam; 121 cam = &gspca_dev->cam;
124 cam->cam_mode = vga_mode; 122 cam->cam_mode = vga_mode;
125 cam->nmodes = ARRAY_SIZE(vga_mode); 123 cam->nmodes = ARRAY_SIZE(vga_mode);
126 sd->qindex = 1; /* set the quantization table */
127 return 0; 124 return 0;
128} 125}
129 126
@@ -345,7 +342,6 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
345 __u8 *data, /* isoc packet */ 342 __u8 *data, /* isoc packet */
346 int len) /* iso packet length */ 343 int len) /* iso packet length */
347{ 344{
348 struct sd *sd = (struct sd *) gspca_dev;
349 int p; 345 int p;
350 346
351 if (len < 6) { 347 if (len < 6) {
@@ -368,8 +364,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
368 frame, data, 0); 364 frame, data, 0);
369 365
370 /* put the JPEG header */ 366 /* put the JPEG header */
371 jpeg_put_header(gspca_dev, frame, 367 jpeg_put_header(gspca_dev, frame, 0x21);
372 sd->qindex, 0x21);
373 data += 16; 368 data += 16;
374 len -= 16; 369 len -= 16;
375 break; 370 break;