LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   webcam install (https://www.linuxquestions.org/questions/linux-hardware-18/webcam-install-216964/)

wytiger 09-14-2004 05:50 PM

OOps... messed up the patch.... sorry for those that read it... will repost with correct patch momentarily....

wytiger 09-14-2004 06:24 PM

My previous post's patch missed a pair of line changes. Here is the repost. Apologies for any confusion if you read the previous...

This patch will work for the spca5xx-10092004 release. It has been tested successful for me on FC2, but YMMV.

Please note that this patch will replace some lines meant for the IC200, so do not use if you have an IC200 as well as an IC150. It's not perfect, it's not pretty, but it does appear to work!

Save the following code as spca50x_ic150.patch:

Code:

--- spca50x.c.orig        2004-09-14 19:14:53.013147860 -0400
+++ spca50x.c        2004-09-14 19:16:26.894062976 -0400
@@ -388,6 +388,7 @@
        DeMonUSBCapture,
        CreativeVista,
        PolaroidPDC2030,        /* 64 */
+        MicroInnovationIC150,
        LastCamera
 };
 static struct cam_list clist[] = {
@@ -456,6 +457,7 @@
        {DeMonUSBCapture,"3DeMON USB Capture"},
        {CreativeVista,"Creative Webcam Vista"},
        {PolaroidPDC2030,"Polaroid PDC2030"},
+        {MicroInnovationIC150, "Micro Innovation IC150"},
        {-1, NULL}
 };
 
@@ -523,6 +525,7 @@
        {USB_DEVICE (0x041E, 0x4018)},        /* Creative Webcam Vista (PD1100) */
        {USB_DEVICE (0x0546, 0x3273)},        /* Polaroid PDC2030*/
        {USB_DEVICE (0x0000, 0x0000)},        /* MystFromOri Unknow Camera */
+        {USB_DEVICE (0x0461, 0x0815)},  /* Micro Innovation IC150 */
        {}                        /* Terminating entry */
 };
 
@@ -7161,19 +7164,19 @@
                case 0x0461:        /* MicroInnovation  */
                        switch (dev->descriptor.idProduct) {
                                case 0x0815:
-                                        spca50x->desc = MicroInnovationIC200;
-                                        spca50x->bridge = BRIDGE_SPCA508;
+                                        spca50x->desc = MicroInnovationIC150;
+                                        spca50x->bridge = BRIDGE_SPCA561;
                                        spca50x->sensor = SENSOR_PB100_BA;
                                        spca50x->header_len =
-                                                SPCA508_OFFSET_DATA;
+                                                SPCA561_OFFSET_DATA;
                                       
                                        spca50x->i2c_ctrl_reg =
                                                SPCA50X_REG_I2C_CTRL;
                                        spca50x->i2c_base =
-                                                SPCA508_INDEX_I2C_BASE;
+                                                SPCA561_INDEX_I2C_BASE;
                                        spca50x->i2c_trigger_on_write = 1;
-                                        spca50x->cameratype = YUVY;
-                                        info ("USB SPCA5XX camera found. Type MicroInnovation IC200 (SPCA508+PB100)");
+                                        spca50x->cameratype = GBRG;
+                                        info ("USB SPCA5XX camera found. Type MicroInnovation IC150 (SPCA561+PB100)");
                                        break;
                                default:
                                        goto error;

Untar the spca5xx-10092004 code, then browse to spca5xx-10092004/drivers/usb. Copy the patch here. Next, run the following command to patch spca50x.c:

Code:

patch spca50x.c spca50x_ic150.patch
You should see a message stating:

Code:

patching file spca50x.c
Then, go back to spca5xx-10092004/ and do a make clean && make && make install as su (i use sudo):

Code:

sudo make clean
sudo make
sudo make install

Then plug in your IC150. Check dmesg for the following line:

Code:

spca5xx driver 0.51 registered
You should be able to use your Micro Innovations IC150 webcam! Good luck!

wytiger 09-16-2004 11:31 AM

Quote:

Originally posted by d1l2w3
Kernel 2.4.x

[root@localhost /]# make dep
make: *** No rule to make target `dep'. Stop.
If you are using MDK10, shouldn't you be following directions for kernel 2.6.x?

Simply:

make clean
make
make install

d1l2w3 09-17-2004 06:20 PM

Downloaded spca5xx-10092004
This is what happens.


[don@localhost spca5xx-10092004]$ make clean
rm -r -f drivers/usb/*.o drivers/usb/.spcadecoder.o.cmd \
drivers/usb/.spca50x.o.cmd *.o *.ko *.mod.* .[a-z]* core *.i
[don@localhost spca5xx-10092004]$ make
Building SPCA5XX driver for 2.5/2.6 kernel.
PLEASE IGNORE THE "Overriding SUBDIRS" WARNING
Remember: you must have read/write access to your kernel source tree.
make -C /lib/modules/`uname -r`/build SUBDIRS=/home/don/software/spca5xx-10092004 modules
make: *** /lib/modules/2.6.3-7mdk/build: No such file or directory. Stop.
make: *** [default] Error 2
[don@localhost spca5xx-10092004]$

d1l2w3 09-17-2004 06:34 PM

This is what happens with the patch.
patch spca50x.c spca50x_ic150.patch

[don@localhost usb]$ patch spca50x.c spca50x_ic150.patch
patching file spca50x.c
Hunk #1 FAILED at 388.
Hunk #2 FAILED at 457.
Hunk #3 FAILED at 525.
patch unexpectedly ends in middle of line
Hunk #4 FAILED at 7164.
4 out of 4 hunks FAILED -- saving rejects to file spca50x.c.rej
[don@localhost usb]$

wytiger 09-17-2004 10:38 PM

Do you have the kernel source installed? That message makes me think not if the directory does not exist...

Also, as far as the patch is concerned, I suspect that your created file may be word-wrapped which could explain errors with the lines not syncing.... just a SWAG, though.

Email me at wytiger at linuxquestions dot net and i can e-mail you a copy of the patch, otherwise let me know an alternate way to get it to you....

d1l2w3 09-18-2004 10:17 AM

Do you have the kernel source installed? That message makes me think not if
the directory does not exist...

I do not know if it is or not.
How do I find out?
How do I install it if it isn't installed?
_
_Also, as far as the patch is concerned, I suspect that your created file may
be word-wrapped which could explain errors with the lines not syncing....
just a SWAG, though.

Attached is the patch.
_
_Email me at wytiger at linuxquestions dot net and i can e-mail you a copy of
the patch, otherwise let me know an alternate way to get it to you...

e-mail address is:

dlw@hei.net

rvijay17 09-20-2004 12:06 AM

wytiger, it worked
 
I got IC100 webcam and was just trying my hand with spca drivers. Initially it did not work though everything installed smoothly, the patch, the drivers everything was smooth. But it did not work. I thought that the chipset of IC100 would be different and that's why its not working.

Then I went to /lib/modules/2.6.x/drivers/usb/media and saw that the spca driver had permissions 600. I then changed it to 711, rmmod'ed the spca driver and again insmod'ed it and this time it worked.

My Micro IC100 webcam works. But the picture is not at all SHARP and there's no way i can increase the sharpness in spcagui. And one more thing, gnomemeeting is able to detect the webcam but is unable to open it. By "open it", i mean it shows nothing. Any pointers to this.

I got FC2 with the kernel source present.

regards,
vijay.

wytiger 09-20-2004 08:13 PM

d1l2w3:
Patch e-mailed to you. Also, run the following command, and list the results to the forum:
Code:

rpm -qa | grep kernel
You should be looking for something that looks like kernel-source...
If you do not see it, try and run this as root:
Code:

urpmi kernel-source
(Please bear in mind that I am not a Mandrake user, and therefore cannot attest to the accuracy of the above command)


rvijay17:
Does Gnomemeeting show a black window where the video feed should be, or does it not register that there is a camera at all? If it is a black window, maybe the brightness on the camera is too low (seems to be a common complaint among spca5xx users.) Shine a bright flashlight into it while looking at the black window, and let me know if it registers any light.

wytiger 09-20-2004 08:20 PM

rvijay17:
Wait, I re-read your post -- did you say that my patch worked for an IC100, as well as the IC150 it was intended for?

rvijay17 09-21-2004 12:24 AM

Yes, I got IC100 and it works. But xawtv, spcagui and gnomemeeting shows it as IC150. As long as it works, I got no problem. The only problem is that the picture's quality is very poor. I need to increase the sharpness. Anyone got any idea how to increase the sharpness. I tried to increase the frame rate but no success.

And with gnomemeeting, it does work but only if I work as root. Its able to detect the webcam working as a normal user but no picture. Not a brightnes issue.

Please, any pointers on how to increase the sharpness of the image.

regards,
vijay.

d1l2w3 09-21-2004 12:02 PM

installed new patch.
This is what happens as root and as user.

[root@localhost usb]# /home/don/software/spca5xx-10092004/drivers/usb/spca50x.c spca50x_ic150.patch
/home/don/software/spca5xx-10092004/drivers/usb/spca50x.c: line 1: /bin: is a directory
/home/don/software/spca5xx-10092004/drivers/usb/spca50x.c: line 2: syntax error near unexpected token `('
/home/don/software/spca5xx-10092004/drivers/usb/spca50x.c: line 2: ` * SPCA50x based usb camera driver (currently suppor ts'



[don@localhost don]$ rpm -qa | grep kernel
kernel-2.6.3.7mdk-1-1mdk
[don@localhost don]$ su
Password:
[root@localhost don]# rpm -qa | grep kernel
kernel-2.6.3.7mdk-1-1mdk
[root@localhost don]#

wytiger 09-21-2004 12:28 PM

You definitely don't have the kernel source, then, accourding to the output. Try to urpmi the kernel-source. You will need that to compile.

Also, it looks like the patch command was not run right, did you run patch spca50x.c spca50x_ic150.patch?

wytiger 09-21-2004 12:30 PM

rvijay17:

Regretfully, i don't have any pointers on how to update the sharpness software-wise. my IC150 has a manual focus around the lens, I assumed that your IC100 would too.

d1l2w3 09-21-2004 10:39 PM

Quote:

Originally posted by wytiger
You definitely don't have the kernel source, then, accourding to the output. Try to urpmi the kernel-source. You will need that to compile.

What is and how do I 'urpmi the kernel-source'?

Also, it looks like the patch command was not run right, did you run patch spca50x.c spca50x_ic150.patch?

[don@localhost usb]$ patch spca50x.c spca50x_ic150.patch
patching file spca50x.c
patch: **** malformed patch at line 4: ________DeMonUSBCapture,

[don@localhost usb]$ su
Password:
[root@localhost usb]# patch spca50x.c spca50x_ic150.patch
patching file spca50x.c
patch: **** malformed patch at line 4: ________DeMonUSBCapture,

[root@localhost usb]#


All times are GMT -5. The time now is 10:52 PM.