pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/44926: userland support for SN9C102 chip (cam)
>Number: 44926
>Category: pkg
>Synopsis: userland support for SN9C102 chip (cam)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Mon May 02 12:30:00 +0000 2011
>Originator: B.ICT A.P. deBROUWER Jr.
>Release: 5.1
>Organization:
-none-
>Environment:
NetBSD 10.0.2.17 5.1 NetBSD 5.1 (GENERIC.nouadio.ugen) #0: Thu Apr 28 20:51:59
UTC 2011 root@10.0.2.17:/obj/sys/arch/i386/compile/GENERIC.nouadio.ugen i386
>Description:
A Chicony Electronics USB Cam having USB ID 0x6025 doesn't work.
We have SN9C101 support in graphics/snx101view but not SN9C102.
>How-To-Repeat:
You'd plug in a SN9C102 based cam.
>Fix:
(snx101view is made by Takafumi Mizuno <taka-qce%ls-a.jp@localhost>)
see these patches conform the existing code.
these give me vague image i.s.o. none,
unsure but think one has to add some sensor code to get a sharp image.
i'll email Takafumi Mizuno and ask him to include this patches,
or them could go as pkgsrc patches till accepted upstream by Takafumi Mizuno.
(and yes all these userland cam progs should be turned into uvideo drivers)
--- snx101shot.c.orig 2010-12-10 11:20:15.000000000 +0100
+++ snx101shot.c 2010-12-10 11:20:31.000000000 +0100
@@ -56,6 +56,7 @@
static struct usb_dev_info devslist [] = {
{ "Tama Electronic Corp. Z-102/Sweex USB MiniWebcam", SONIX_ID, 0x6005,
0x6005},
+ { "Chicony Electronics. USB Cam", SONIX_ID, 0x6025, 0x6025},
{ NULL }
};
--- snx101view.c.orig 2010-12-10 11:20:10.000000000 +0100
+++ snx101view.c 2010-12-10 11:20:20.000000000 +0100
@@ -66,6 +66,7 @@
static struct usb_dev_info devslist [] = {
{ "Tama Electronic Corp. Z-102/Sweex USB MiniWebcam", SONIX_ID, 0x6005,
0x6005},
+ { "Chicony Electronics. USB Cam", SONIX_ID, 0x6025, 0x6025},
{ NULL }
};
--- sonix.c.orig 2010-12-10 18:41:54.000000000 +0100
+++ sonix.c 2010-12-10 18:44:47.000000000 +0100
@@ -94,6 +94,10 @@
urbnum = INIT6005_URBSNUM;
inits = init6005;
break;
+ case 0x6025:
+ urbnum = INIT6025_URBSNUM;
+ inits = init6025;
+ break;
default:
fprintf(stderr, "Unknown sensor. The camera is not supported yet.\n");
return -1;
--- sonix.h 2010-12-10 16:05:53.000000000 +0100
+++ sonix.h.new 2010-12-10 16:06:09.000000000 +0100
@@ -40,7 +40,7 @@
u_int16_t val;
u_int16_t idx;
u_int16_t len;
-#define LENNUM_MAX 31
+#define LENNUM_MAX 43
u_int8_t data[LENNUM_MAX];
} initURB_t;
--- sonixinit.h.orig 2004-03-07 17:05:13.000000000 +0100
+++ sonixinit.h 2010-12-10 18:40:08.000000000 +0100
@@ -1,4 +1,5 @@
#define INIT6005_URBSNUM 31
+#define INIT6025_URBSNUM 31
extern initURB_t init6005[INIT6005_URBSNUM];
-
+extern initURB_t init6025[INIT6025_URBSNUM];
--- sonixinit.c.orig 2004-03-07 17:04:59.000000000 +0100
+++ sonixinit.c 2010-12-10 18:40:01.000000000 +0100
@@ -65,3 +65,69 @@
/* [29] */
{ ACT_WRITE, 0x0019, 0x0000, 0x0001, { 0xab /* MCK_SIZE=0xa=10 */ } },
/* [30] */
};
+
+initURB_t init6025[INIT6025_URBSNUM] = {
+ { ACT_SETIF, 0x0000, 0x00, 0x0000, { 0x00 } }, /* [0] */
+ { ACT_SETIF, 0x0000, 0x08, 0x0000, { 0x00 } }, /* [1] */
+ { ACT_READ, 0x0000, 0x0000, 0x0001, { 0x10 } }, /* [2] *//* read ID */
+ { ACT_WRITE, 0x0001, 0x0000, 0x0001, { 0x04 } }, /* [3] */
+ { ACT_WRITE, 0x0017, 0x0000, 0x0001, { 0x60 } }, /* [4] */
+ { ACT_WRITE, 0x0001, 0x0000, 0x0020, { 0x44, 0x03, 0x00, 0x00, 0x00,
0x00, 0x00, 0x20,
+ 0x11, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00,
+ 0x01, /* R_GAIN */
+ 0x01, /* B_GAIN */
+ 0x01, /* G_GAIN */
+ 0x33, /* H_START(pixel) */
+ 0x09, /* V_START(pixel) */
+ 0x0a, /* Offset */
+ 0x14, /* H_SIZE */
+ 0x0f, /* V_SIZE */
+ 0x60,
+ 0x86, /* compression enable */
+ 0x2b,
+ 0x14, /* HO_SIZE 0x14*32=640 */
+ 0x0f, /* VO_SIZE 0x0f*32=480 */
+ 0x02, /* AE_STRX (horizontal)
2*32=64 */
+ 0x02, /* AE_STRY (vertical)
2*32=64 */
+ 0x12, /* AE_ENDX (horizontal)
9*32=288 */
+ 0x0d /* AE_ENDY (vertical)
7*32=224 */ } },
+ /* [5] */
+ { ACT_WRITE, 0x0008, 0x0000, 0x0008, { 0x30, 0x11, 0x00, 0x00, 0x0c,
0x00, 0x00, 0x10 } }, /* [6] */
+ { ACT_WRITE, 0x0008, 0x0000, 0x0008, { 0x30, 0x11, 0x02, 0x20, 0xa9,
0x00, 0x00, 0x10 } }, /* [7] */
+ { ACT_WRITE, 0x0015, 0x0000, 0x0002, { 0x14, /* H_SIZE 14h=20
20*32=640 */
+ 0x0f /* V_SIZE 0fh=15
15*32=480 */ } }, /* [8] */
+ { ACT_WRITE, 0x0018, 0x0000, 0x0001, { 0x86 } }, /* [9] *//*
Compression */
+ { ACT_WRITE, 0x0012, 0x0000, 0x0001, { 0x33 /* H_START (85) */ } }, /*
[10] */
+ { ACT_WRITE, 0x0013, 0x0000, 0x0001, { 0x09 /* V_START (31) */ } }, /*
[11] */
+ { ACT_WRITE, 0x0017, 0x0000, 0x0001, { 0x60 } }, /* [12] */
+ { ACT_WRITE, 0x0017, 0x0000, 0x0001, { 0x60 } }, /* [13] */
+ { ACT_WRITE, 0x0019, 0x0000, 0x0001, { 0x2b } }, /* [14] */
+ { ACT_WRITE, 0x001c, 0x0000, 0x0004, { 0x02, /* AE_STRX 2*32=64 */
+ 0x02, /* AE_STRY 2*32=64 */
+ 0x12, /* AE_ENDX 18*32=576 */
+ 0x0d /* AE_ENDX 13*32=416 */ }
}, /* [15] */
+ { ACT_WRITE, 0x0001, 0x0000, 0x0001, { 0x44 } }, /* [16] *//* Start
Video transfer */
+#if 0
+ { ACT_WRITE, 0x0018, 0x0000, 0x0002, { 0x86, 0x2b } }, /* [17] *//*
Compression */
+#endif
+ { ACT_WRITE, 0x0018, 0x0000, 0x0002, { 0x06, 0x2b } }, /* [17] *//* No
compression */
+ { ACT_WRITE, 0x001b, 0x0000, 0x0001, { 0x0f /* VO_SIZE 10*32=320 */ }
}, /* [18] */
+ { ACT_WRITE, 0x0008, 0x0000, 0x0008, { 0x30, 0x11, 0x00, 0xc0, 0x01,
0x00, 0x00, 0x16 } },
+ /* [19] */
+ { ACT_WRITE, 0x0008, 0x0000, 0x0008, { 0x30, 0x11, 0x02, 0x20, 0x70,
0x00, 0x00, 0x1d } },
+ /* [20] */
+ { ACT_READ, 0x0008, 0x0000, 0x0001, { 0x00 } }, /* [21] */
+ { ACT_READ, 0x0008, 0x0000, 0x0001, { 0x00 } }, /* [22] */
+ { ACT_WRITE, 0x0008, 0x0000, 0x0008, { 0x30, 0x11, 0x02, 0x20, 0x70,
0x00, 0x00, 0x14 } },
+ /* [23] */
+ { ACT_WRITE, 0x001b, 0x0000, 0x0001, { 0x0f /* VO_SIZE 10*32=320 */ }
}, /* [24] */
+ { ACT_WRITE, 0x0008, 0x0000, 0x0008, { 0x30, 0x11, 0x00, 0xc0, 0x05,
0x00, 0x00, 0x16 } },
+ /* [25] */
+ { ACT_WRITE, 0x0008, 0x0000, 0x0008, { 0x30, 0x11, 0x02, 0x20, 0x60,
0x00, 0x00, 0x1d } },
+ /* [26] */
+ { ACT_READ, 0x0008, 0x0000, 0x0001, { 0x00 } }, /* [27] */
+ { ACT_READ, 0x0008, 0x0000, 0x0001, { 0x00 } }, /* [28] */
+ { ACT_WRITE, 0x0008, 0x0000, 0x0008, { 0x30, 0x11, 0x02, 0x20, 0x60,
0x00, 0x00, 0x14 } },
+ /* [29] */
+ { ACT_WRITE, 0x0019, 0x0000, 0x0001, { 0xab /* MCK_SIZE=0xa=10 */ } },
/* [30] */
+};
+
Home |
Main Index |
Thread Index |
Old Index