Install SERP2 Webcam Driver
From Knowledge76
note, that this should also work for the SERP1 Microdia Camera (0c45:624f Microdia PC Camera (SN9C201 + OV9650) as well
Building driver from git
First make sure to install necessary build environment
sudo aptitude install linux-headers-`uname -r` git-core build-essential
Next grab a copy of the driver source from the git repository
git clone git://repo.or.cz/microdia.git cd microdia
Build it using the following command
make
To install the driver so that it loads every boot do the following
sudo cp ./sn9c20x.ko /lib/modules/`uname -r`/kernel/ubuntu/misc/media/ sudo depmod -a sudo modprobe sn9c20x
This should load the module and set it to load automatically on every boot. To check that it has found your camera type the following
dmesg
Expected Output:
> sn9c20x: SN9C20X USB 2.0 Webcam - 0C45:624F plugged-in. > sn9c20x: Detected OV9650 Sensor. > sn9c20x: Webcam device 0C45:624F is now controlling video device /dev/video0 > sn9c20x: Using yuv420 output format > usbcore: registered new interface driver sn9c20x > sn9c20x: SN9C20x USB 2.0 Webcam Driver v2009.01 loaded
Installing libv4l
libv4l is needed for two reasons.
- using it you can use older applications that only support the v4l1 API, sn9c20x only supports v4l2.
- many applications such as skype do not natively support the video output formats that the sn9c20x driver uses.
Note: Intrepid and above have this library in their repositories. Its called libv4l-0. I still recommend getting and installing the latest version though.
Download the source from the following location: http://people.atrpms.net/~hdegoede/libv4l-0.5.9.tar.gz
Extract the source archive
tar xzvf libv4l-0.5.9.tar.gz
Compile and install libv4l
cd libv4l-0.5.9 make make install PREFIX=/usr/
If your camera was detected properly when installing the driver and you have successfully built and installed libv4l the following commands should test the driver using mplayer
export LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so mplayer tv:// -tv driver=v4l2:width=320:height=240:outfmt=bgr24:fps=30
Compile libv4l as 32bits
This step is only needed if you are using a 64bit version of ubuntu and need to use libv4l with a 32bit application such as skype whcih does not have a 64bit binary available for linux
First make sure to install multilib support for 32bit compilation
sudo aptitude install gcc-multilib libc6-i386 lib6-dev-i386
Next in the libv4l-0.5.9 directory type the following
gedit libv4l2/Makefile libv4l1/Makefile libv4lconvert/Makefile
In each of the three Makefiles you opened replace
CFLAGS := -g -O1
with
CFLAGS := -g -O1 -m32 LDFLAGS := -m32
then save them and exit gedit
Now to compile and and install the 32bit version do the following
make make install PREFIX=/usr/ LIBDIR=/usr/lib32
This should give you a 32bit version of the library to use with 32bit applications