瀏覽代碼

[media] gspca - stv06xx: Fix a regression with the bridge/sensor vv6410

Setting the H and V flip controls at webcam connection time prevents
the webcam to work correctly.
This patch checks if the webcam is streaming before setting the flips.
It does not set the flips (nor other controls) at webcam start time.

Tested-by: Philippe ROUBACH <philippe.roubach@free.fr>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine 12 年之前
父節點
當前提交
0488112734
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c

+ 4 - 0
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c

@@ -52,9 +52,13 @@ static int vv6410_s_ctrl(struct v4l2_ctrl *ctrl)
 
 
 	switch (ctrl->id) {
 	switch (ctrl->id) {
 	case V4L2_CID_HFLIP:
 	case V4L2_CID_HFLIP:
+		if (!gspca_dev->streaming)
+			return 0;
 		err = vv6410_set_hflip(gspca_dev, ctrl->val);
 		err = vv6410_set_hflip(gspca_dev, ctrl->val);
 		break;
 		break;
 	case V4L2_CID_VFLIP:
 	case V4L2_CID_VFLIP:
+		if (!gspca_dev->streaming)
+			return 0;
 		err = vv6410_set_vflip(gspca_dev, ctrl->val);
 		err = vv6410_set_vflip(gspca_dev, ctrl->val);
 		break;
 		break;
 	case V4L2_CID_GAIN:
 	case V4L2_CID_GAIN: