Ok, this is not a tech blog, but I am a techie, and I discovered something today that hopefully helps someone someplace.
I just upgraded to the latest Ubuntu 11.04 on an old laptop with a built-in webcam. The official kernel driver for the webcam sucks, but you can get a good one here:
git clone http://repo.or.cz/r/microdia.git
You’ll have to make this yourself. There’s a link to to do that below. First note, however, that the files reference an include file that no longer ships with Ubuntu. That is videodef.h — an include file for V4L version 1, which is no longer supported.
So , you’ll need to edit out a line in sn9c20x-queue.c.
Change:
#include <linux/videodev.h>
to
/* #include <linux/videodev.h> */
(i.e. comment it out).
Then follow the rest of these instructions: http://ubuntuforums.org/showpost.php?p=7456689&postcount=4
You’ll also need to remove the standard-issue sn9c20x driver (gspca_sn9c20x) from /lib/modules/(linux kernel version)/kernel/drivers/media/video/gspca:
sudo rmmod gspca_sn9c20x
I just moved it to my homedir so it wouldn’t be probed:
mv /lib/modules/(whatever)/kernel/drivers/media/video/gspca_sn9c20x.ko ~
And put the sn9c20x.ko driver in:
cp /(wherever you ran make)/sn9c20x.ko /lib/modules/(whatever)/kernel/drivers/media/video
depmod -ae
Voila. Webcam works again. Whatever videodev.h provides has been replaced elsewhere. For Skype you’ll still want to use compatibility libraries, running it this way:
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so /usr/bin/skype
Hope that helps someone!
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so /usr/bin/skype
Tags: 0c45:627b, 11.04, microdia, microdia usb20, natty narwhal, ov7660, sn9c201, ubuntu, videodev.h, webcam
Someone should make a .deb out of it. I have one of those SN9C201-powered cams out there, and while Sonix Technology does provide drivers for Windows and OS X, I’m afraid that people who just happened to have one, and are not that experienced with -nix, might end up getting bummed up about it.
Thanks, ngs spincam usb 2.0 pc camera 1.3 megapixels.
Thank you, very nice post.
Could you probably have an idea why may I be entirely missing my Microdia camera in lsusb (and lshw)? It is built in my lenovo 3000 n100 notebook. I am asking because I am sure I *did have it working in Ubuntu*, may be it was 8.04, but many kernels ago it stopped appearing in lsusb, and obviously no hacking around the drivers may help.
Regards,
Mike