public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gspca - ov534: Fix the light frequency filter.
@ 2012-11-22 11:33 Jean-Francois Moine
  0 siblings, 0 replies; 10+ messages in thread
From: Jean-Francois Moine @ 2012-11-22 11:33 UTC (permalink / raw)
  To: Linux Media Mailing List, Hans de Goede

From: Jean-François Moine <moinejf@free.fr>

The exchanges relative to the light frequency filter were adapted
from a description found in a ms-windows driver. It seems that the
registers were the ones of some other sensor.

This patch was done thanks to the documentation of the right
OmniVision sensors.

Note: The light frequency filter is either off or automatic.
The application will see either off or "50Hz" only.

--- a/drivers/media/usb/gspca/ov534.c
+++ b/drivers/media/usb/gspca/ov534.c
@@ -1038,13 +1038,12 @@
 {
 	struct sd *sd = (struct sd *) gspca_dev;
 
-	val = val ? 0x9e : 0x00;
-	if (sd->sensor == SENSOR_OV767x) {
-		sccb_reg_write(gspca_dev, 0x2a, 0x00);
-		if (val)
-			val = 0x9d;	/* insert dummy to 25fps for 50Hz */
-	}
-	sccb_reg_write(gspca_dev, 0x2b, val);
+	if (!val)
+		sccb_reg_write(gspca_dev, 0x13,		/* off */
+				sccb_reg_read(gspca_dev, 0x13) & ~0x20);
+	else
+		sccb_reg_write(gspca_dev, 0x13,		/* auto */
+				sccb_reg_read(gspca_dev, 0x13) | 0x20);
 }
 
 

-- 
Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/

^ permalink raw reply	[flat|nested] 10+ messages in thread
* [PATCH] gspca - ov534: Fix the light frequency filter
@ 2012-11-22 11:46 Jean-Francois Moine
  2012-11-23 17:09 ` Antonio Ospite
  0 siblings, 1 reply; 10+ messages in thread
From: Jean-Francois Moine @ 2012-11-22 11:46 UTC (permalink / raw)
  To: Linux Media Mailing List, Hans de Goede

(fix lack of signature)
From: Jean-François Moine <moinejf@free.fr>

The exchanges relative to the light frequency filter were adapted
from a description found in a ms-windows driver. It seems that the
registers were the ones of some other sensor.

This patch was done thanks to the documentation of the right
OmniVision sensors.

Note: The light frequency filter is either off or automatic.
The application will see either off or "50Hz" only.

Tested-by: alexander calderon <fabianp902@gmail.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>

--- a/drivers/media/usb/gspca/ov534.c
+++ b/drivers/media/usb/gspca/ov534.c
@@ -1038,13 +1038,12 @@
 {
 	struct sd *sd = (struct sd *) gspca_dev;
 
-	val = val ? 0x9e : 0x00;
-	if (sd->sensor == SENSOR_OV767x) {
-		sccb_reg_write(gspca_dev, 0x2a, 0x00);
-		if (val)
-			val = 0x9d;	/* insert dummy to 25fps for 50Hz */
-	}
-	sccb_reg_write(gspca_dev, 0x2b, val);
+	if (!val)
+		sccb_reg_write(gspca_dev, 0x13,		/* off */
+				sccb_reg_read(gspca_dev, 0x13) & ~0x20);
+	else
+		sccb_reg_write(gspca_dev, 0x13,		/* auto */
+				sccb_reg_read(gspca_dev, 0x13) | 0x20);
 }
 
 

-- 
Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-11-29 22:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-22 11:33 [PATCH] gspca - ov534: Fix the light frequency filter Jean-Francois Moine
  -- strict thread matches above, loose matches on Subject: below --
2012-11-22 11:46 Jean-Francois Moine
2012-11-23 17:09 ` Antonio Ospite
2012-11-23 18:12   ` Jean-Francois Moine
2012-11-26 13:08     ` Antonio Ospite
2012-11-26 15:23       ` Jean-Francois Moine
2012-11-26 17:12         ` Antonio Ospite
2012-11-26 17:51           ` Jean-Francois Moine
2012-11-29  9:25     ` Hans de Goede
2012-11-29 22:14       ` Antonio Ospite

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox