Skip to content

Commit

Permalink
[media] gspca_xirlink_cit: Grab backlight compensation control while …
Browse files Browse the repository at this point in the history
…streaming

As it cannot be changed while streaming.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed Jul 30, 2012
1 parent 1ea172d commit 872099e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/media/video/gspca/xirlink_cit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1914,9 +1914,10 @@ static int cit_start_model2(struct gspca_dev *gspca_dev)
break;
}

/* FIXME this cannot be changed while streaming, so we
should report a grabbed flag for this control. */
cit_model2_Packet1(gspca_dev, 0x0028, v4l2_ctrl_g_ctrl(sd->lighting));
/* model2 cannot change the backlight compensation while streaming */
v4l2_ctrl_grab(sd->lighting, true);

/* color balance rg2 */
cit_model2_Packet1(gspca_dev, 0x001e, 0x002f);
/* saturation */
Expand Down Expand Up @@ -2715,6 +2716,8 @@ static void sd_stop0(struct gspca_dev *gspca_dev)
cit_write_reg(gspca_dev, 0x81, 0x0100); /* LED Off */
break;
case CIT_MODEL2:
v4l2_ctrl_grab(sd->lighting, false);
/* Fall through! */
case CIT_MODEL4:
cit_model2_Packet1(gspca_dev, 0x0030, 0x0004);

Expand Down

0 comments on commit 872099e

Please sign in to comment.