Try if this patch helps. Apply it with $ git am <patchfile>
GWater ChanibaL schrieb:
Ok, so git clone http://repo.or.cz/r/microdia.git (in empty dir) cd microdia git checkout --track -b development origin/development make sudo insmod microdia.ko log_level=15 [45123.071066] microdia: Microdia USB 2.0 webcam driver loaded [45123.073223] usbcore: registered new interface driver usb_microdia_driver [45123.075155] microdia: v2008.10 : Microdia USB 2.0 Webcam Driver (now I plug in the camera) [45218.000059] usb 1-1: new full speed USB device using uhci_hcd and address 4 [45218.177226] usb 1-1: configuration #1 chosen from 1 choice [45218.183022] microdia: Probe function called with VendorID=0C45, ProductID=6270 and InterfaceNumber=0 [45218.183039] microdia: Microdia USB 2.0 Webcam - 0C45:6270 plugged- in. [45218.183049] microdia: Release: 0100 [45218.183053] microdia: Number of interfaces : 1 [45218.183058] microdia: Detected SN9C20X Bridge [45218.241864] microdia: I2C write to 0a: 90 30 0a 00 00 00 00 10 [45218.244875] microdia: I2C slave 0x30 returned error during write to address 0x0a [45218.244899] microdia: I2C write to 0a: 90 30 0a 00 00 00 00 10 [45218.250866] microdia: I2C slave 0x30 returned error during write to address 0x0a [45218.250888] microdia: I2C write to 0a: 90 30 0a 00 00 00 00 10 [45218.255862] microdia: I2C slave 0x30 returned error during write to address 0x0a [45218.255881] microdia: I2C write to 0a: 90 21 0a 00 00 00 00 10 [45218.261880] microdia: I2C slave 0x21 returned error during write to address 0x0a [45218.261906] microdia: I2C write to 0a: 90 21 0a 00 00 00 00 10 [45218.266859] microdia: I2C slave 0x21 returned error during write to address 0x0a [45218.266878] microdia: I2C write to f0: b0 5d f0 00 00 00 00 10 [45218.268961] microdia: I2C write to 00: 90 5d 00 00 00 00 00 10 [45218.270858] microdia: I2C read from 00: a2 5d 00 00 00 00 00 10 [45218.276308] microdia: I2C read: 00 00 00 00 12 29 [45218.276324] microdia: I2C write to 01: b0 5c 01 00 04 00 00 10 [45218.278870] microdia: I2C slave 0x5c returned error during write to address 0x01 [45218.278895] microdia: I2C write to ff: 90 5d ff 00 00 00 00 10 [45218.281855] microdia: I2C read from 00: a2 5d 00 00 00 00 00 10 [45218.284875] microdia: I2C read: ff 00 ff 00 12 29 [45218.284897] microdia: I2C write to 00: 90 5d 00 00 00 00 00 10 [45218.286867] microdia: I2C read from 00: a2 5d 00 00 00 00 00 10 [45218.289971] microdia: I2C read: 00 00 00 00 12 29 [45218.289982] microdia: Failed to detect sensor. [45218.289991] microdia: Device Init failed (-19)! (disconnecting camera) [45320.928077] usb 1-1: USB disconnect, address 4 sudo rmmod microdia [45349.784864] microdia: usb_microdia_exit: Microdia USB 2.0 webcam driver unloaded [45349.788169] usbcore: deregistering interface driver usb_microdia_driver Anything usefull here? On 22 Lis, 10:26, GWater <[EMAIL PROTECTED]> wrote:One way to find out. Use this line to insmod the module: # insmod microdia.ko log_level=15 Then post the dmesg output. GWater JoJo jojo schrieb:Hi This is a known issue with 6270, the sensor is not getting probed hence at this point the support is very poor. -JoJo On Sat, Nov 22, 2008 at 7:16 AM, ChanibaL <[EMAIL PROTECTED]> wrote:Ok, made the "git checkout --track -b development origin/development" on a fresh source, after compilation and inserting the module (insmod), here's the dmesg output: [37725.143421] microdia: Microdia USB 2.0 webcam driver loaded [37725.149711] microdia: Microdia USB 2.0 Webcam - 0C45:6270 plugged- in. [37725.149739] microdia: Detected SN9C20X Bridge [37725.233533] usbcore: registered new interface driver usb_microdia_driver [37725.234310] microdia: v2008.10 : Microdia USB 2.0 Webcam Driver No problems here, but: $ LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so mplayer tv:// -tv driver=v4l2:width=640:height=480:fps=25:device=/dev /video0 -vo xv MPlayer 1.0rc2-4.3.2 (C) 2000-2007 MPlayer Team CPU: Intel Celeron 2/Pentium III Coppermine,Geyserville (Family: 6, Model: 8, Stepping: 10) CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0 Compiled with runtime CPU detection. mplayer: could not connect to socket mplayer: No such file or directory Failed to open LIRC support. You will not be able to use your remote control. Playing tv://. TV file format detected. Selected driver: v4l2 name: Video 4 Linux 2 input author: Martin Olschewski <[EMAIL PROTECTED]> comment: first try, more to come ;-) v4l2: unable to open '/dev/video0': No such file or directory v4l2: ioctl set mute failed: Bad file descriptor v4l2: 0 frames successfully processed, 0 frames dropped. Exiting... (End of file) Also: $ ls /dev/ | grep -c video 0 There's no /dev/video* file, the old driver has a /dev/video0 (even says so in dmesg) There are 64 files called /dev/.static/dev/video*, but they don't seem to work and are there after i remove the module, probably some placeholder or smth. Maybe something about my machine - it's a old pentium 3/1GHz (dell gx150), quite possible the usb version is 1.1, can't find any way to check it (lsusb -vv in my last message if someone's interested), through i doubt that's the error here.signature.asc < 1KWyĆwietlPobierz--~--~---------~--~----~------------~-------~--~----~ 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 1e52d5543ba31f8e4b7e8538e0f173c3e9c635c2 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 30f03c0..6810a01 100644
--- a/microdia-dev.c
+++ b/microdia-dev.c
@@ -102,6 +102,12 @@ struct sensor_info sensors[] = {
.address = 0x5d,
.initialize = mt9m001_initialize,
},
+ {
+ .id = MT9V112_SENSOR,
+ .name = "MT9V112",
+ .address = 0x5d,
+ .probe = mt9v112_probe
+ },
};
static __u16 known_cams[][2] = {
diff --git a/microdia.h b/microdia.h
index f615fd7..bf05203 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 4f926e9..9408654 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)",
@@ -425,6 +425,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 b469455..42e381b 100644
--- a/micron.h
+++ b/micron.h
@@ -121,4 +121,6 @@ int mt9m111_initialize(struct usb_microdia *dev);
int mt9m001_initialize(struct usb_microdia *dev);
+int mt9v112_probe(struct usb_microdia *dev);
+
#endif
--
1.5.6.5
signature.asc
Description: OpenPGP digital signature
