Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 142492
b: refs/heads/master
c: 5196d7c
h: refs/heads/master
v: v3
  • Loading branch information
Erik Andr?n authored and Mauro Carvalho Chehab committed Apr 7, 2009
1 parent d7915f4 commit 670db5f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7460f524980d1d7c39f05b7e95d6d2fba072fd8a
refs/heads/master: 5196d7c63197b03b29985e8bd9bfa4425b253673
16 changes: 3 additions & 13 deletions trunk/drivers/media/video/gspca/m5602/m5602_ov9650.c
Original file line number Diff line number Diff line change
Expand Up @@ -662,12 +662,7 @@ int ov9650_set_hflip(struct gspca_dev *gspca_dev, __s32 val)
PDEBUG(D_V4L2, "Set horizontal flip to %d", val);

sensor_settings[HFLIP_IDX] = val;
err = m5602_read_sensor(sd, OV9650_MVFP, &i2c_data, 1);
if (err < 0)
return err;

i2c_data = ((i2c_data & 0xdf) | ((val & 0x01) << 5));

i2c_data = ((val & 0x01) << 5) | (sensor_settings[VFLIP_IDX] << 4);
err = m5602_write_sensor(sd, OV9650_MVFP, &i2c_data, 1);

return err;
Expand All @@ -692,19 +687,14 @@ int ov9650_set_vflip(struct gspca_dev *gspca_dev, __s32 val)
s32 *sensor_settings = sd->sensor_priv;

PDEBUG(D_V4L2, "Set vertical flip to %d", val);

sensor_settings[VFLIP_IDX] = val;
err = m5602_read_sensor(sd, OV9650_MVFP, &i2c_data, 1);
if (err < 0)
return err;

i2c_data = ((i2c_data & 0xef) | ((val & 0x01) << 4));

i2c_data = ((val & 0x01) << 4) | (sensor_settings[VFLIP_IDX] << 5);
err = m5602_write_sensor(sd, OV9650_MVFP, &i2c_data, 1);

if (err < 0)
return err;

/* When vflip is toggled we need to readjust the bridge hsync/vsync */
if (gspca_dev->streaming)
err = ov9650_start(sd);

Expand Down

0 comments on commit 670db5f

Please sign in to comment.