summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/zc3xx.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-05-06 14:28:23 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-14 14:33:44 +0200
commitfba11fed8aad86c10cde062ba0b76e8f8551f256 (patch)
tree844493efdd911cf272adade18b01344c6b136eae /drivers/media/video/gspca/zc3xx.c
parent[media] gspca_gl860: Add a present check to sd_stop0 (diff)
downloadlinux-fba11fed8aad86c10cde062ba0b76e8f8551f256.tar.xz
linux-fba11fed8aad86c10cde062ba0b76e8f8551f256.zip
[media] gspca_zc3xx: Fix setting of jpeg quality while streaming
When the user changes the JPEG quality while the camera is streaming, the driver should not only change the JPEG headers send to userspace, but also actually tell the camera to use a different quantization table. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/zc3xx.c')
-rw-r--r--drivers/media/video/gspca/zc3xx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c
index 8f21bae46ef8..33a2aab1dca1 100644
--- a/drivers/media/video/gspca/zc3xx.c
+++ b/drivers/media/video/gspca/zc3xx.c
@@ -5923,6 +5923,8 @@ static void setquality(struct gspca_dev *gspca_dev)
struct sd *sd = (struct sd *) gspca_dev;
s8 reg07;
+ jpeg_set_qual(sd->jpeg_hdr, jpeg_qual[sd->reg08]);
+
reg07 = 0;
switch (sd->sensor) {
case SENSOR_OV7620:
@@ -6886,7 +6888,6 @@ static int sd_start(struct gspca_dev *gspca_dev)
break;
}
setquality(gspca_dev);
- jpeg_set_qual(sd->jpeg_hdr, jpeg_qual[sd->reg08]);
setlightfreq(gspca_dev);
switch (sd->sensor) {
@@ -7042,7 +7043,7 @@ static int sd_setquality(struct gspca_dev *gspca_dev, __s32 val)
sd->reg08 = i;
sd->ctrls[QUALITY].val = jpeg_qual[i];
if (gspca_dev->streaming)
- jpeg_set_qual(sd->jpeg_hdr, sd->ctrls[QUALITY].val);
+ setquality(gspca_dev);
return gspca_dev->usb_err;
}