Here is a modified version of the mt9m001 patch that removes the many
duplicate writes and cleans things up a bit. Anyone with the mt9m001
sensor test and see if it works any better

On Tue, Feb 10, 2009 at 11:37 AM, GWater <[email protected]> wrote:
> Am Dienstag 10 Februar 2009 16:57:42 schrieb Daniel Holth:
>> That picture looks exactly like what I started with.
>>
>> To be fair to my camera and its dead pixels, according to the
>> datasheet it looks like the MT9M111 sensor has defect correction and
>> scaling logic that could be enabled with a few more entries into the
>> initialization sequence, and the saturation of the image can be
>> adjusted with another register.
>>
>> How about supporting the button on the back of the camera? In Windows
>> the user would see the 640x512 picture of themselves, and then when
>> they pressed the button a 1280x1024 still would be captured. Does v4l2
>> provide for that?
>> >
> rebased patches for new origin/master HEAD.
>
> GWater
>

--~--~---------~--~----~------------~-------~--~----~
Lets make microdia webcams plug'n play, (currently plug'n pray)
To post to this group, send email to [email protected]
Visit us online https://groups.google.com/group/microdia
-~----------~----~----~----~------~----~------~--~---

From 113fff856efaf5f707927f3f80ba7c6019fd1071 Mon Sep 17 00:00:00 2001
From: Josua Grawitter <[email protected]>
Date: Tue, 10 Feb 2009 12:39:29 -0500
Subject: [PATCH] Add sensor MT9M001

Signed-off-by: Josua Grawitter <[email protected]>
---
 micron.c |   55 ++++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 36 insertions(+), 19 deletions(-)

diff --git a/micron.c b/micron.c
index a2c0e34..1a982f8 100644
--- a/micron.c
+++ b/micron.c
@@ -277,6 +277,42 @@ struct sn9c20x_i2c_regs mt9v011_init[] = {
 	{0xff, 0xffff},
 };
 
+struct sn9c20x_i2c_regs mt9m001_init[] = {
+/* Sensor Reset */
+	{0x0d, 0x0001},
+	{0x0d, 0x0000},
+	{0x07, 0x0000},
+/* window size */
+	{0x01, 0x000e},
+	{0x02, 0x0014},
+	{0x03, 0x01df},
+	{0x04, 0x027f},
+/* blanking registers */
+	{0x05, 0x0013},
+	{0x06, 0x00f2},
+/* integration time */
+	{0x09, 0x10f2},
+	{0x0c, 0x0000},
+/* read options */
+	{0x1e, 0x8000},
+	{0x20, 0x1104},
+/* RGB Gain */
+	{0x2b, 0x002a},
+	{0x2c, 0x002a},
+	{0x2d, 0x002a},
+	{0x2e, 0x0029},
+/* Black Level Calibration */
+	{0x5f, 0x0904},
+	{0x60, 0x0000},
+	{0x61, 0x0000},
+	{0x62, 0x0498},
+	{0x63, 0x0000},
+	{0x64, 0x0000},
+/* Sensor Enable */
+	{0x07, 0x0002},
+	{0xff, 0xffff},
+};
+
 struct sn9c20x_i2c_regs mt9m111_init[] = {
 	{0xf0, 0x0000},
 	/* Reset sensor */
@@ -362,25 +398,6 @@ int mt9m111_set_autowhitebalance(struct usb_sn9c20x *dev)
 	return ret;
 }
 
-
-struct sn9c20x_i2c_regs mt9m001_init[] = {
-	{0x07, 0x0000}, {0x07, 0x0002}, {0x0d, 0x0001}, {0x0d, 0x0000},
-	{0x01, 0x000e}, {0x02, 0x0014}, {0x03, 0x03c1}, {0x04, 0x0501},
-	{0x05, 0x0083}, {0x06, 0x0006}, {0x0d, 0x0002}, {0x09, 0x0000},
-	{0x0a, 0x0000}, {0x0b, 0x0000}, {0x0c, 0x0000}, {0x11, 0x0000},
-	{0x1e, 0x8000}, {0x20, 0x1105}, {0x2b, 0x0008}, {0x2c, 0x0010},
-	{0x2d, 0x0014}, {0x2e, 0x0008}, {0x5f, 0x8904}, {0x60, 0x0000},
-	{0x61, 0x0000}, {0x62, 0x0498}, {0x63, 0x0000}, {0x68, 0x0000},
-	{0x20, 0x111d}, {0x06, 0x00f2}, {0x05, 0x0013}, {0x20, 0x111d},
-	{0x20, 0x111d}, {0x07, 0x0003}, {0x2b, 0x0010}, {0x2c, 0x0010},
-	{0x2d, 0x0010}, {0x2e, 0x0010}, {0x07, 0x0002}, {0x07, 0x0003},
-	{0x2c, 0x001d}, {0x2d, 0x001d}, {0x07, 0x0002}, {0x06, 0x00f2},
-	{0x05, 0x0013}, {0x09, 0x0387}, {0x07, 0x0003}, {0x2b, 0x0028},
-	{0x2c, 0x003f}, {0x2d, 0x003f}, {0x2e, 0x0028}, {0x07, 0x0002},
-	{0x09, 0x04f1}, {0x07, 0x0003}, {0x2b, 0x0024}, {0x2c, 0x0039},
-	{0x2d, 0x0039}, {0x2e, 0x0024}, {0x07, 0x0002}, {0xff, 0xffff},
-};
-
 int mt9v111_select_address_space(struct usb_sn9c20x *dev, __u8 address_space)
 {
 	__u8 buf[2];
-- 
1.5.6.3

Reply via email to