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? > --~--~---------~--~----~------------~-------~--~----~ > 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 > -~----------~----~----~----~------~----~------~--~---
rebased patches for new origin/master HEAD. GWater
From 72f3cb1d13e6cc237ade9ed0aea6d4df1c70a2c7 Mon Sep 17 00:00:00 2001 From: Josua Grawitter <[email protected]> Date: Sun, 1 Feb 2009 11:44:22 +0100 Subject: [PATCH] Add sensor MT9M001 Signed-off-by: Josua Grawitter <[email protected]> --- micron.c | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 88 insertions(+), 19 deletions(-) diff --git a/micron.c b/micron.c index a2c0e34..f924c6f 100644 --- a/micron.c +++ b/micron.c @@ -277,6 +277,94 @@ struct sn9c20x_i2c_regs mt9v011_init[] = { {0xff, 0xffff}, }; +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, 0x511d}, + {0x20, 0xd11d}, + {0x09, 0x03e8}, + {0x07, 0x0003}, + {0x2b, 0x0010}, + {0x2c, 0x0010}, + {0x2d, 0x0010}, + {0x2e, 0x0010}, + {0x07, 0x0002}, + {0x06, 0x00f2}, + {0x05, 0x0013}, + {0x09, 0x043c}, + {0x07, 0x0003}, + {0x2b, 0x0023}, + {0x2c, 0x003f}, + {0x2d, 0x003a}, + {0x2e, 0x0023}, + {0x07, 0x0002}, + {0x09, 0x0879}, + {0x07, 0x0003}, + {0x2b, 0x0027}, + {0x2c, 0x003f}, + {0x2d, 0x0039}, + {0x2e, 0x0027}, + {0x07, 0x0002}, + {0x09, 0x0b4c}, + {0x07, 0x0003}, + {0x2b, 0x0029}, + {0x2c, 0x003f}, + {0x2d, 0x0035}, + {0x2e, 0x0029}, + {0x07, 0x0002}, + {0x09, 0x0e1f}, + {0x07, 0x0003}, + {0x2d, 0x0030}, + {0x07, 0x0002}, + {0x09, 0x103e}, + {0x07, 0x0003}, + {0x2d, 0x002b}, + {0x07, 0x0002}, + {0x09, 0x10f2}, + {0x07, 0x0003}, + {0x2b, 0x002a}, + {0x2c, 0x003f}, + {0x2d, 0x002a}, + {0x2c, 0x002a}, + {0x07, 0x0002}, + {0x07, 0x0003}, + {0x07, 0x0002}, + {0x07, 0x0003}, + {0x07, 0x0002}, + {0x07, 0x0003}, + {0x07, 0x0002}, + {0x07, 0x0000}, +}; + struct sn9c20x_i2c_regs mt9m111_init[] = { {0xf0, 0x0000}, /* Reset sensor */ @@ -362,25 +450,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.6.0.6
From 25a307666fe4c1d53bae1c524f827ed3774fa766 Mon Sep 17 00:00:00 2001 From: Josua Grawitter <[email protected]> Date: Sun, 1 Feb 2009 11:47:39 +0100 Subject: [PATCH] Move externs for sensor init arrays to sensor header files Signed-off-by: Josua Grawitter <[email protected]> --- micron.h | 6 ++++++ omnivision.h | 6 ++++++ sn9c20x.h | 13 +------------ 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/micron.h b/micron.h index 9b1e27d..c7e8c90 100644 --- a/micron.h +++ b/micron.h @@ -92,6 +92,12 @@ #define MT9V111_IFP_AWB_WINBOUNDARY_TOP(x) (((x/32) & 0xf) << 8) /* top boundary of AWB meas. window */ #define MT9V111_IFP_AWB_WINBOUNDARY_BOTTOM(x) (((x/32) & 0xf) << 12) /* bottom boundary of AWB meas. window */ +extern struct sn9c20x_i2c_regs mt9v112_init[]; +extern struct sn9c20x_i2c_regs mt9v111_init[]; +extern struct sn9c20x_i2c_regs mt9v011_init[]; +extern struct sn9c20x_i2c_regs mt9m111_init[]; +extern struct sn9c20x_i2c_regs mt9m001_init[]; + int mt9v111_select_address_space(struct usb_sn9c20x *dev, __u8 address_space); int mt9v111_set_exposure(struct usb_sn9c20x *dev); int mt9v111_set_hvflip(struct usb_sn9c20x *dev); diff --git a/omnivision.h b/omnivision.h index c67c237..faf6e8f 100644 --- a/omnivision.h +++ b/omnivision.h @@ -531,6 +531,12 @@ #define OV965X_COM15_OUTPUT_RGB_555 0x30 #define OV965X_COM15_SWAP_R_AND_B 0x08 +extern struct sn9c20x_i2c_regs soi968_init[]; +extern struct sn9c20x_i2c_regs ov9650_init[]; +extern struct sn9c20x_i2c_regs ov9655_init[]; +extern struct sn9c20x_i2c_regs ov7660_init[]; +extern struct sn9c20x_i2c_regs ov7670_init[]; + int ov7670_auto_flip(struct usb_sn9c20x *, __u8); int ov7670_flip_detect(struct usb_sn9c20x *dev); diff --git a/sn9c20x.h b/sn9c20x.h index d0cd202..27bab4a 100644 --- a/sn9c20x.h +++ b/sn9c20x.h @@ -291,18 +291,6 @@ struct sn9c20x_i2c_regs { __u16 value; }; -extern struct sn9c20x_i2c_regs mt9v112_init[]; -extern struct sn9c20x_i2c_regs mt9v111_init[]; -extern struct sn9c20x_i2c_regs mt9v011_init[]; -extern struct sn9c20x_i2c_regs mt9m111_init[]; -extern struct sn9c20x_i2c_regs mt9m001_init[]; -extern struct sn9c20x_i2c_regs soi968_init[]; -extern struct sn9c20x_i2c_regs ov9650_init[]; -extern struct sn9c20x_i2c_regs ov9655_init[]; -extern struct sn9c20x_i2c_regs ov7660_init[]; -extern struct sn9c20x_i2c_regs ov7670_init[]; -extern struct sn9c20x_i2c_regs hv7131r_init[]; - #define SN9C20X_N_FMTS 3 #define SN9C20X_N_MODES 6 @@ -458,6 +446,7 @@ static inline int sn9c20x_queue_streaming(struct sn9c20x_video_queue *queue) } /* sensor hv7131r has no header-file of its own: */ +extern struct sn9c20x_i2c_regs hv7131r_init[]; int hv7131r_initialize(struct usb_sn9c20x *dev); int hv7131r_set_exposure(struct usb_sn9c20x *dev); int hv7131r_set_gain(struct usb_sn9c20x *dev); -- 1.6.0.6
signature.asc
Description: This is a digitally signed message part.
