From b2de056683a8a2c3caa93ef4549863eb272c61ca Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sat, 20 Feb 2010 04:45:49 -0300 Subject: [PATCH] --- yaml --- r: 181764 b: refs/heads/master c: 88e8d20a8c7c84533e1aa89dd45354cb5edded37 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/media/video/gspca/ov519.c | 22 +++++++++++++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index c1d1c2b31858..f5504a9da30e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 92e232acd61f610e09449dad3f6ff6d3c78887e9 +refs/heads/master: 88e8d20a8c7c84533e1aa89dd45354cb5edded37 diff --git a/trunk/drivers/media/video/gspca/ov519.c b/trunk/drivers/media/video/gspca/ov519.c index 016f8bb5c375..bc4ced6c013b 100644 --- a/trunk/drivers/media/video/gspca/ov519.c +++ b/trunk/drivers/media/video/gspca/ov519.c @@ -2702,6 +2702,11 @@ static void sd_reset_snapshot(struct gspca_dev *gspca_dev) sd->snapshot_needs_reset = 0; switch (sd->bridge) { + case BRIDGE_OV511: + case BRIDGE_OV511PLUS: + reg_w(sd, R51x_SYS_SNAP, 0x02); + reg_w(sd, R51x_SYS_SNAP, 0x00); + break; case BRIDGE_OV518: case BRIDGE_OV518PLUS: reg_w(sd, R51x_SYS_SNAP, 0x02); /* Reset */ @@ -3996,11 +4001,17 @@ static void ov51x_handle_button(struct gspca_dev *gspca_dev, u8 state) sd->snapshot_pressed = state; } else { - /* On the ov519 we need to reset the button state multiple - times, as resetting does not work as long as the button - stays pressed */ - if (sd->bridge == BRIDGE_OV519 && state) - sd->snapshot_needs_reset = 1; + /* On the ov511 / ov519 we need to reset the button state + multiple times, as resetting does not work as long as the + button stays pressed */ + switch (sd->bridge) { + case BRIDGE_OV511: + case BRIDGE_OV511PLUS: + case BRIDGE_OV519: + if (state) + sd->snapshot_needs_reset = 1; + break; + } } } @@ -4025,6 +4036,7 @@ static void ov511_pkt_scan(struct gspca_dev *gspca_dev, */ if (!(in[0] | in[1] | in[2] | in[3] | in[4] | in[5] | in[6] | in[7]) && (in[8] & 0x08)) { + ov51x_handle_button(gspca_dev, (in[8] >> 2) & 1); if (in[8] & 0x80) { /* Frame end */ if ((in[9] + 1) * 8 != gspca_dev->width ||