From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtpfb1-g21.free.fr ([212.27.42.9]:41317 "EHLO smtpfb1-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755042Ab2KVSk0 convert rfc822-to-8bit (ORCPT ); Thu, 22 Nov 2012 13:40:26 -0500 Received: from smtp1-g21.free.fr (smtp1-g21.free.fr [212.27.42.1]) by smtpfb1-g21.free.fr (Postfix) with ESMTP id 5F31F2C870 for ; Thu, 22 Nov 2012 12:34:12 +0100 (CET) Date: Thu, 22 Nov 2012 12:33:57 +0100 From: Jean-Francois Moine To: Linux Media Mailing List , Hans de Goede Subject: [PATCH] gspca - ov534: Fix the light frequency filter. Message-ID: <20121122123357.4da1fa2c@armhf> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-media-owner@vger.kernel.org List-ID: From: Jean-François Moine 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/