diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-03 21:32:23 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-03 21:32:23 -0300 |
commit | ce6025ded70648148a8c6c4f440a55e940df1e9e (patch) | |
tree | c4e4476d973043f9090ed1142fc46dd7be4a36c8 | |
parent | 7968ebf4e1725375c495aa4bd895a19e88fb8f2c (diff) | |
parent | 3b38addc33a36ea34a73f3f910df0901feb4ff1a (diff) | |
download | mediapointer-dvb-s2-ce6025ded70648148a8c6c4f440a55e940df1e9e.tar.gz mediapointer-dvb-s2-ce6025ded70648148a8c6c4f440a55e940df1e9e.tar.bz2 |
merge: http://linuxtv.org/hg/~eandren/v4l-dvb
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/video/gspca/mars.c | 23 | ||||
-rw-r--r-- | linux/drivers/media/video/gspca/vc032x.c | 2 |
3 files changed, 19 insertions, 12 deletions
diff --git a/linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c b/linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c index 2bd7d4d99..7e79f7eca 100644 --- a/linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c +++ b/linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c @@ -104,7 +104,11 @@ int s5k4aa_probe(struct sd *sd) } /* Test some registers, but we don't know their exact meaning yet */ - if (m5602_read_sensor(sd, 0x00, prod_id, sizeof(prod_id))) + if (m5602_read_sensor(sd, 0x00, prod_id, 2)) + return -ENODEV; + if (m5602_read_sensor(sd, 0x02, prod_id+2, 2)) + return -ENODEV; + if (m5602_read_sensor(sd, 0x04, prod_id+4, 2)) return -ENODEV; if (memcmp(prod_id, expected_prod_id, sizeof(prod_id))) diff --git a/linux/drivers/media/video/gspca/mars.c b/linux/drivers/media/video/gspca/mars.c index c5a19b5bc..5d54893eb 100644 --- a/linux/drivers/media/video/gspca/mars.c +++ b/linux/drivers/media/video/gspca/mars.c @@ -69,10 +69,10 @@ static struct ctrl sd_ctrls[] = { .id = V4L2_CID_SATURATION, .type = V4L2_CTRL_TYPE_INTEGER, .name = "Color", - .minimum = 0, - .maximum = 220, + .minimum = 1, + .maximum = 255, .step = 1, -#define COLOR_DEF 190 +#define COLOR_DEF 200 .default_value = COLOR_DEF, }, .set = sd_setcolors, @@ -191,7 +191,7 @@ static int sd_start(struct gspca_dev *gspca_dev) struct sd *sd = (struct sd *) gspca_dev; int err_code; u8 *data; - int i, val; + int i; data = gspca_dev->usb_buf; @@ -253,9 +253,11 @@ static int sd_start(struct gspca_dev *gspca_dev) data[1] = 0; /* reg 94, Y Gain (auto) */ #if 1 /*jfm: from win trace*/ - val = sd->colors * 0x40 + 0x400; - data[2] = val; /* reg 0x5f/0x60 (LE) = saturation */ - data[3] = val >> 8; + /* reg 0x5f/0x60 (LE) = saturation */ + /* h (60): xxxx x100 + * l (5f): xxxx x000 */ + data[2] = sd->colors << 3; + data[3] = ((sd->colors >> 2) & 0xf8) | 0x04; data[4] = sd->brightness; /* reg 0x61 = brightness */ data[5] = 0x00; #else @@ -403,10 +405,11 @@ static int sd_setcolors(struct gspca_dev *gspca_dev, __s32 val) sd->colors = val; if (gspca_dev->streaming) { - val = val * 0x40 + 0x400; + + /* see sd_start */ gspca_dev->usb_buf[0] = 0x5f; - gspca_dev->usb_buf[1] = val; - gspca_dev->usb_buf[2] = val >> 8; + gspca_dev->usb_buf[1] = sd->colors << 3; + gspca_dev->usb_buf[2] = ((sd->colors >> 2) & 0xf8) | 0x04; reg_w(gspca_dev, 3); } return 0; diff --git a/linux/drivers/media/video/gspca/vc032x.c b/linux/drivers/media/video/gspca/vc032x.c index 72cbf56c9..f1c149476 100644 --- a/linux/drivers/media/video/gspca/vc032x.c +++ b/linux/drivers/media/video/gspca/vc032x.c @@ -2316,7 +2316,7 @@ static int sd_start(struct gspca_dev *gspca_dev) break; case SENSOR_MI1310_SOC: GammaT = mi1320_gamma; - MatrixT = mi0360_matrix; + MatrixT = mi1320_matrix; switch (mode) { case 1: init = mi1310_socinitQVGA_JPG; /* 320x240 */ |