diff options
author | Jean-François Moine <moinejf@free.fr> | 2010-02-18 08:12:06 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-02-26 19:11:03 +0100 |
commit | f6b22e5e8e93d03046d3878664a9ba375ccded96 (patch) | |
tree | e17241ef7886549e648dc4096236dd8c0a2d7959 /drivers/media/video/gspca | |
parent | V4L/DVB: videobuf: add missing checks for kzalloc returning NULL (diff) | |
download | linux-f6b22e5e8e93d03046d3878664a9ba375ccded96.tar.xz linux-f6b22e5e8e93d03046d3878664a9ba375ccded96.zip |
V4L/DVB: gspca - sonixj: Add vertical flip control for sensor hv7131r
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca')
-rw-r--r-- | drivers/media/video/gspca/sonixj.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c index 4ece1109d399..fea807574425 100644 --- a/drivers/media/video/gspca/sonixj.c +++ b/drivers/media/video/gspca/sonixj.c @@ -282,7 +282,7 @@ static const struct ctrl sd_ctrls[] = { static __u32 ctrl_dis[] = { (1 << INFRARED_IDX) | (1 << VFLIP_IDX) | (1 << FREQ_IDX) | (1 << AUTOGAIN_IDX), /* SENSOR_ADCM1700 0 */ - (1 << INFRARED_IDX) | (1 << VFLIP_IDX) | (1 << FREQ_IDX), + (1 << INFRARED_IDX) | (1 << FREQ_IDX), /* SENSOR_HV7131R 1 */ (1 << INFRARED_IDX) | (1 << VFLIP_IDX) | (1 << FREQ_IDX), /* SENSOR_MI0360 2 */ @@ -1780,23 +1780,34 @@ static void setautogain(struct gspca_dev *gspca_dev) sd->ag_cnt = -1; } -/* ov7630/ov7648 only */ +/* hv7131r/ov7630/ov7648 only */ static void setvflip(struct sd *sd) { u8 comn; if (sd->gspca_dev.ctrl_dis & (1 << VFLIP_IDX)) return; - if (sd->sensor == SENSOR_OV7630) { + switch (sd->sensor) { + case SENSOR_HV7131R: + comn = 0x18; /* clkdiv = 1, ablcen = 1 */ + if (sd->vflip) + comn |= 0x01; + i2c_w1(&sd->gspca_dev, 0x01, comn); /* sctra */ + break; + case SENSOR_OV7630: comn = 0x02; if (!sd->vflip) comn |= 0x80; - } else { + i2c_w1(&sd->gspca_dev, 0x75, comn); + break; + default: +/* case SENSOR_OV7648: */ comn = 0x06; if (sd->vflip) comn |= 0x80; + i2c_w1(&sd->gspca_dev, 0x75, comn); + break; } - i2c_w1(&sd->gspca_dev, 0x75, comn); } static void setsharpness(struct sd *sd) |