Skip to contentSkip to conversation

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

PATCH In review Jean-Francois Moine 2 participants 2 messages Nov 22, 2012 – Nov 29, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gspca - stv06xx: Fix a regression with the bridge/sensor vv6410

From: Jean-François Moine <[email protected]>

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.

drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c +4 -0
@@ -52,9 +52,13 @@
 
 	switch (ctrl->id) {
 	case V4L2_CID_HFLIP:
+		if (!gspca_dev->streaming)
+			return 0;
 		err = vv6410_set_hflip(gspca_dev, ctrl->val);
 		break;
 	case V4L2_CID_VFLIP:
+		if (!gspca_dev->streaming)
+			return 0;
 		err = vv6410_set_vflip(gspca_dev, ctrl->val);
 		break;
 	case V4L2_CID_GAIN:
Signature · 2 lines
Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/
#1 lore raw

Hi,

Thanks for the patch I've added this to my tree, and it is part of the pull-request I just send to Mauro for 3.8

Regards,

Hans

Quoted 28 lines · Jean-Francois Moine

From: Jean-François Moine <[email protected]>

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.

drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c +4 -0
@@ -52,9 +52,13 @@
 
  	switch (ctrl->id) {
  	case V4L2_CID_HFLIP:
+		if (!gspca_dev->streaming)
+			return 0;
  		err = vv6410_set_hflip(gspca_dev, ctrl->val);
  		break;
  	case V4L2_CID_VFLIP:
+		if (!gspca_dev->streaming)
+			return 0;
  		err = vv6410_set_vflip(gspca_dev, ctrl->val);
  		break;
  	case V4L2_CID_GAIN: