2/27/0018

Creative NX Pro PD1130

今まで目の前にあったにも関わらず、特に気に留めてもいなかったweb camera(と呼ぶことにしよう)が目についたので、machine(Vine Linux 3.2)に接続してみた。「ピッ」と電子音がしたので「認識してくれたかな」と期待半分で、dmesg。やっぱりそんなに甘くない。んじゃ、これを使えるようにしてみましょうと思ったワケ。

そんなワケで、名前も知らないweb camera君の素姓を調べるところから始めてみる。例によって、googleさんに「creative PD1130」を知りませんかと尋ねると
Creative Labs Tethered Web Camera NX Pro Digital PD1130 USB Beige Retail
って言うんだよと教えて貰えたので、driverを探してみる。

おぉ、その前に/etc/murasaki/murasaki.usbmapに
# Creative Labs Tethered Web Camera NX Pro Digital PD1130 USB Beige Retail
usbcam 0x0003 0x041e 0x401e 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
の2行を加えて、紫君が認識してくれるようにしておく。

さてさて、driverだがいろいろ探しているとCreative Open Sourceを発見。[Webcam Support]をclickして、開いたpageで[Webcam NX Pro PD1130]があることを確認。どうにかなりそうな気配。そゆことなので、A Free World LibLandの*DOWNLOAD*からspca5xx-20060202.tar.gzを頂いてくる。感謝、感謝。

あとは貰ってきたspca5xx-20060202.tar.gzのある場所に移動して
$ tar zxvf spca5xx-20060202.tar.gz
$ cd spca5xx-20060202
$ less README
で、手元のwebcam君が本当にsupportされているか再度確認。

READMEの中に
How do I use it?
================

Well, first you need to compile the driver (see below), then you need to make sure that the v4l infrastructure is set up and then load the driver. After you've done that, any v4l enabled application, such as spcaview, gqcam, xawtv, gnomemeeting, camE etc should work.
なんて書いてあるので、ひとまず、machineの中にお役立ちapplication達が入っているか確認してみる。
$ apt-cache search spcaview
$ apt-cache search gqcam
$ apt-cache search xawtv
perl-Video-Capture-V4l - A perl module for the Video4linux framegrabber interface.
xawtv - video4linux 互換デバイス用の TV アプリケーション
xawtv-fonts - Xawtv 用フォント
xawtv-motv - MOTIF 版の TV アプリケーション
xawtv-setup - TVキャプチャ・ボードのGUI設定ツール
$ for p in $(apt-cache search xawtv | cut -d" " -f1 | sort) ; do rpm -q $p ; done
パッケージ perl-Video-Capture-V4l はインストールされていません
xawtv-3.93-0vl1
xawtv-fonts-1.1-0vl2
xawtv-motv-3.93-0vl1
xawtv-setup-0.4-0vl1
$ apt-cache search gnomemeeting
gnomemeeting - Gnome ベースの H323 遠隔ビデオカンファレンスアプリケーション
$ rpm -q gnomemeeting
パッケージ gnomemeeting はインストールされていません
ということなので、ともかくxawtvがあることだけ確認。

次に
Supported kernel versions
=========================
The driver should compile and run successfully against most stable versions of the official Linux kernel (from ), within the range 2.4.10 to 2.6.14 inclusive. exept kernel 2.4.22, 2.4.23, 2.6.3
ということなので、コイツも確認しておく。
$ uname -r
2.4.31-0vl1.12
大丈夫。

いよいよcompile
$ cat INSTALL
Module compile outside the kernel tree but need the source of your running kernel installed and configured.
be sure your kernel include usb and v4l stuff
Kernel 2.4.x
configure your kernel
make dep
go to the spca5xx directories
make clean (to be sure)
make
if all goes right as root :
make install
Kernel 2.6.x
make clean
make
if all goes right as root :
make install
To test please use the command line spcaview you need libsdl installed with the
header from your distro or goto http:www.libsdl.org
plug the cam
as root
lsmod
spca5xx should be load with videodev, if not somethings goes wrong,
verify that your cam is supported if not and you are sure for a Sunplus
chip goto irc.freenode.net channel #spca50x and ask for help
if yes run spcaview with this parameters (maybe read the readme is the
best)
spcaview -f yuv
if you have a bttv card use the -d parameters to change the video
setting
that should work
Enjoy !!
という指示にほどほど従って
$ make clean
rm -r -f drivers/usb/*.o drivers/usb/.spcadecoder.o.cmd drivers/usb/.spca5xx.o.cmd *.o *.ko *.mod.* .[a-z]* core *.i
$ make
Compiling drivers/usb/spcadecoder.c
Compiling drivers/usb/spca5xx.c
In file included from /lib/modules/2.4.31-0vl1.12/build/include/linux/vmalloc.h:8,
from drivers/usb/spca5xx.c:46:
/lib/modules/2.4.31-0vl1.12/build/include/linux/highmem.h: 関数 `bh_kmap' 内:
/lib/modules/2.4.31-0vl1.12/build/include/linux/highmem.h:20: 警告: `void *' 型のポインタが計算で使われました
drivers/usb/spca5xx.c: トップレベル:
drivers/usb/spca5xx.c:150: 警告: `bright' defined but not used
drivers/usb/spca5xx.c:151: 警告: `contrast' defined but not used
Linking spca5xx.o
何やら怒られているようだが、READMEに一部のkernelで
/lib/modules/2.4.25/build/include/linux/highmem.h: Dans la fonction bh_kmap :
/lib/modules/2.4.25/build/include/linux/highmem.h:20: attention : usage en arithmtique d'un pointeur de type void *
が出るけど
Don't care module should load and works fine :)
と親切に書いてくれているのでここはそのまま前に進む。

INSTALLに従うとmake installなのだろうが、念の為(?)
$ su -
# checkinstall
続けて
# lsmod
Module Size Used by Tainted: P
ndiswrapper 77820 1
parport_pc 32360 1 (autoclean)
lp 8064 0 (autoclean)
[snip]
# modprobe spca5xx
# lsmod
Module Size Used by Tainted: P
spca5xx 658300 0 (unused)
videodev 8576 0 [spca5xx]
ndiswrapper 77820 1
parport_pc 32360 1 (autoclean)
lp 8064 0 (autoclean)
[snip]
と問題なくloadされることを確認。まぁ、しょっちゅう使うつもりもないので、rc.localとかには何も書かないでおこう。

以上で準備完了なので、webcam君の尻尾のUSB cableをmachineに接続。当たり前だが、今回も「ピッ」と音がする。で、うまく認識されたか確認。
# dmesg
[snip]
Linux video capture interface: v1.00
usb.c: registered new driver spca5xx
drivers/usb/spca5xx.c: spca5xx driver 00.57.09 registered
hub.c: new USB device 00:10.2-1, assigned address 2
drivers/usb/spca5xx.c: USB SPCA5XX camera found. Type Creative NX Pro Zc301+hv7131b
drivers/usb/spca5xx.c: [spca5xx_probe:8188] Camera type JPEG
drivers/usb/zc3xx.h: [zc3xx_config:454] Find Sensor HV7131B
drivers/usb/spca5xx.c: [spca5xx_getcapability:2176] maxw 640 maxh 480 minw 176 minh 144
おぉ、うまく行ってる。じゃ…ってことで
$ xawtv
ハイ。うまく写りました。

あとは
あたりを参考にさせて貰って設定すれば幸せになれるかも。(未設定)

0 コメント: