I'm sorry, I sent you a wrong patch. Here is a correct one. Only apply it after the "git checkout ...".
GWater Krzysztof 'ChanibaL' Bociurko schrieb:
Still nothing: $ git clone http://repo.or.cz/r/microdia.git $ cd microdia $ git am ../patch Applying Add sensor MT9V112 used in 6270 devices error: patch failed: microdia-dev.c:102 error: microdia-dev.c: patch does not apply error: patch failed: microdia.h:311 error: microdia.h: patch does not apply error: micron.c: does not exist in index error: micron.h: does not exist in index Patch failed at 0001. When you have resolved this problem run "git-am --resolved". If you would prefer to skip this patch, instead run "git-am --skip".$ git checkout --track -b development origin/development Branch development set up to track remote branchrefs/remotes/origin/development. Switched to a new branch "development" $ git am ../patch previous dotest directory .dotest still exists but mbox given. $ rm -r .dotest $ git am ../patch Applying Add sensor MT9V112 used in 6270 devices error: patch failed: microdia-dev.c:102 error: microdia-dev.c: patch does not apply error: patch failed: micron.h:121 error: micron.h: patch does not apply Patch failed at 0001. When you have resolved this problem run "git-am --resolved". If you would prefer to skip this patch, instead run "git-am --skip". On Mon, 24 Nov 2008 15:36:35 +0100 GWater <[EMAIL PROTECTED]> wrote:Just remove the ".dotest" directory in you microdia folder if that error comes up. GWater ChanibaL schrieb:Sorry for the cluelesness, but how do I do that? I copied the patch to a file and run it against both a fresh git checkout and after switching to development and always having a "previous dotest directory .dotest still exists but mbox given." error. If i save the link directly it saves with a html markup, so i copied the text, to be sure the file starts with From 1e52d5543ba31f8e4b7e8538e0f173c3e9c635c2 Mon Sep 17 00:00:00 2001 From: GWater <[EMAIL PROTECTED]> And ends with #endif -- 1.5.6.5 ? If the patch is broken because of googlegroups handling of attachments could you please send me the patch to my email address (chanibal at - nospam- gmail dot com)? Thanks. On 24 Lis, 09:35, GWater <[EMAIL PROTECTED]> wrote:Try if this patch helps. Apply it with $ git am <patchfile> 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 9030224c0ccd97f3ee13a8ca0716101e8bb30283 Mon Sep 17 00:00:00 2001
From: GWater <[EMAIL PROTECTED]>
Date: Fri, 14 Nov 2008 19:14:27 +0100
Subject: [PATCH] Add sensor MT9V112 used in 6270 devices
The sensor supports YUV442 and 10-bit Bayer output.
JPEG is available via sn9c20x.
However YUV422 output is disabled until we get it to work.
Signed-off-by: GWater <[EMAIL PROTECTED]>
---
microdia-dev.c | 6 ++++
microdia.h | 1 +
micron.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
micron.h | 2 +
4 files changed, 79 insertions(+), 2 deletions(-)
diff --git a/microdia-dev.c b/microdia-dev.c
index f3cdf4d..a233ab9 100644
--- a/microdia-dev.c
+++ b/microdia-dev.c
@@ -88,6 +88,12 @@ struct sensor_info sensors[] = {
.address = 0x5d,
.probe = mt9m001_probe
},
+ {
+ .id = MT9V112_SENSOR,
+ .name = "MT9V112",
+ .address = 0x5d,
+ .probe = mt9v112_probe
+ },
};
/**
diff --git a/microdia.h b/microdia.h
index 09f3e9f..6f18e09 100644
--- a/microdia.h
+++ b/microdia.h
@@ -311,6 +311,7 @@ enum microdia_sensors {
MT9V111_SENSOR = 7,
MT9V011_SENSOR = 8,
MT9M001_SENSOR = 9,
+ MT9V112_SENSOR = 10,
};
diff --git a/micron.c b/micron.c
index cc70fec..b959e8f 100644
--- a/micron.c
+++ b/micron.c
@@ -52,12 +52,12 @@ struct microdia_video_format mt9m111_fmts[] = {
.depth = 8,
.set_format = mt9m111_set_raw
},
- {
+ /*{
.pix_fmt = V4L2_PIX_FMT_YUYV,
.desc = "YUV 4:2:2",
.depth = 16,
.set_format = mt9m111_set_yuv422
- },
+ },*/
{
.pix_fmt = V4L2_PIX_FMT_JPEG,
.desc = "JPEG (YUV 4:2:2)",
@@ -419,6 +419,74 @@ static __u8 mt9m001_init[][3] = {
{0x2e, 0x00, 0x24}, {0x07, 0x00, 0x02},
};
+static __u8 mt9v112_init[][3] = {
+ {0x0d, 0x00, 0x21}, {0x0d, 0x00, 0x20}, {0xf0, 0x00, 0x00},
+ {0x34, 0xc0, 0x19}, {0x0a, 0x00, 0x11}, {0x0b, 0x00, 0x0b},
+ {0x20, 0x07, 0x03}, {0x35, 0x20, 0x22}, {0xf0, 0x00, 0x01},
+ {0x05, 0x00, 0x00}, {0x06, 0x34, 0x0c}, {0x3b, 0x04, 0x2a},
+ {0x3c, 0x04, 0x00}, {0xf0, 0x00, 0x02}, {0x2e, 0x0c, 0x58},
+ {0x5b, 0x00, 0x01}, {0xc8, 0x9f, 0x0b}, {0xf0, 0x00, 0x01},
+ {0x9b, 0x53, 0x00}, {0xf0, 0x00, 0x00}, {0x2b, 0x00, 0x20},
+ {0x2c, 0x00, 0x2a}, {0x2d, 0x00, 0x32}, {0x2e, 0x00, 0x20},
+ {0x09, 0x01, 0xdc}, {0x01, 0x00, 0x0c}, {0x02, 0x00, 0x20},
+ {0x03, 0x01, 0xe0}, {0x04, 0x02, 0x80}, {0x06, 0x00, 0x0c},
+ {0x05, 0x00, 0x98}, {0x20, 0x07, 0x03}, {0x09, 0x01, 0xf2},
+ {0x2b, 0x00, 0xa0}, {0x2c, 0x00, 0xa0}, {0x2d, 0x00, 0xa0},
+ {0x2e, 0x00, 0xa0}, {0x01, 0x00, 0x0c}, {0x02, 0x00, 0x20},
+ {0x03, 0x01, 0xe0}, {0x04, 0x02, 0x80}, {0x06, 0x00, 0x0c},
+ {0x05, 0x00, 0x98}, {0x09, 0x01, 0xc1}, {0x2b, 0x00, 0xae},
+ {0x2c, 0x00, 0xae}, {0x2d, 0x00, 0xae}, {0x2e, 0x00, 0xae},
+};
+
+/**
+ * @brief Initialize mt9v112 sensors
+ *
+ * @param dev Pointer to device structure
+ *
+ * @return 0 or negative error code
+ *
+ */
+int mt9v112_initialize(struct usb_microdia *dev)
+{
+ int i;
+ int ret = 0;
+ __u8 value[2], reg;
+ for (i = 0; i < ARRAY_SIZE(mt9v112_init); i++) {
+ reg = mt9v011_init[i][0];
+ value[0] = mt9v112_init[i][1];
+ value[1] = mt9v112_init[i][2];
+ ret = sn9c20x_write_i2c_data(dev, 2, reg, value);
+ if (ret < 0) {
+ UDIA_WARNING("Sensor Init Error (%d). "
+ "line %d\n", ret, i);
+ break;
+ }
+ }
+
+ return ret;
+}
+
+int mt9v112_probe(struct usb_microdia *dev)
+{
+ int ret;
+ __u8 buf[2];
+ ret = sn9c20x_read_i2c_data(dev, 2, 0x00, buf);
+ if (ret == 0) {
+ if (buf[0] != 0x12)
+ return -EINVAL;
+ if (buf[1] == 0x29) {
+ mt9v112_initialize(dev);
+ dev->camera.modes = micron_resolutions;
+ dev->camera.nmodes = ARRAY_SIZE(micron_resolutions);
+ dev->camera.fmts = mt9m111_fmts;
+ dev->camera.nfmts = ARRAY_SIZE(mt9m111_fmts);
+ return MT9V112_SENSOR;
+ }
+ }
+
+ return -EINVAL;
+}
+
/**
* @brief Initialize mt9v011 sensors
*
diff --git a/micron.h b/micron.h
index 4e2ee99..1955e5e 100644
--- a/micron.h
+++ b/micron.h
@@ -121,4 +121,6 @@ int mt9m111_set_yuv422(struct usb_microdia *dev);
int mt9m001_probe(struct usb_microdia *dev);
+int mt9v112_probe(struct usb_microdia *dev);
+
#endif
--
1.5.6.5
signature.asc
Description: OpenPGP digital signature
