Webcam and linux-gspca-kmod

Yong-Jhen Hong yongjhen at gmail.com
Fri May 23 08:25:35 UTC 2008


Hi all,

I want to enable the use of built-in webcam on my Asus W5F, so I have
less reason and time to reboot into other OS ;)

After looking for some information from google, it seems Luigi's Linux
driver emulation layer is the best way to go, and I am sure my webcam
works under Ubuntu 8.04, which uses gspcav1 version 20070508.

It is also great to learn that Luigi also make a port
multimedia/linux-gspca-kmod, and it uses gspcav1 version 20071220.
I try to build and load the kernel module, but it fails:

<terminal>
[yongjhen at monster ~]$ sudo kldload gspca
kldload: can't load gspca: No such file or directory
</terminal>

and there is an error message from dmesg:
<dmesg>
link_elf: symbol msleep undefined
</dmesg>

I look into the source tree of FreeBSD, thinking that the msleep() API
change should be nearer to kernel version 700054 than 700100, so I make
this one line change to
$PREFIX/share/linux-kmod-compat/linux_compat/linux_compat.c

<diff>
-#if __FreeBSD_version > 700100
+#if __FreeBSD_version > 700054
</diff>

and re-build the module. This time the module loads and /dev/video0
appears!

>From dmesg:
<dmesg>
usb_spca5xx_init: gspca driver 01.00.20 registered
ldev0 on uhub4
ldev_attach: sc at 0xca71bb00, l_u_d at 0xca71bb58
--- allocate 336 bytes gives 0xc765ea00
interface 0 has 8 altsettings (cur 0)
gspca_attach_bridge: USB GSPCA camera found.(VC0321)
spca5xx_probe: [spca5xx_probe:4259] Camera type YUYV
vc032x_probe_sensor: [vc032x_probe_sensor:140] check sensor header 44
vc032x_read_sensor_register: [vc032x_read_sensor_register:123] Read
Sensor h (0x00) m (0x30) l (0x31)
vc032x_read_sensor_register: [vc032x_read_sensor_register:123] Read
Sensor h (0x00) m (0x30) l (0x31)
vc032x_read_sensor_register: [vc032x_read_sensor_register:123] Read
Sensor h (0x00) m (0x30) l (0x31)
vc0321_config: [vc0321_config:371] Find Sensor PO3130NC
spca5xx_getcapability: [spca5xx_getcapability:1239] maxw 640 maxh 480
minw 176 minh 144
62926735 [1117] video_register_device: to be fixed but ok for now
ldev0: Vimicro Corp. USB2.0 Web Camera, rev 2.00/1.00, addr 2
</dmesg>

But when I launch Gnome Cheese to test the driver, it still doesn't
work, with dmesg:
<dmesg>
63052317 [1081] video_devdata: not complete but ok for now
spca5xx_set_light_freq: [spca5xx_set_light_freq:1920] Sensor currently
not support light frequency banding filters.
gspca_set_isoc_ep: [gspca_set_isoc_ep:936] ISO EndPoint found 0x82
AlternateSet 7
63052899 [ 876] usb_submit_urb: openpipe error 4
init isoc: usb_submit_urb(0) ret -463052899 [ 959] usb_kill_urb: not
complete but try something
63052899 [ 959] usb_kill_urb: not complete but try something
63052899 [ 959] usb_kill_urb: not complete but try something
63052899 [ 959] usb_kill_urb: not complete but try something
spca5xx_open: [spca5xx_open:1987]  DEALLOC error on init_Isoc
</dmesg>

Thinking that might be problem of gspca, I also try to re-build module
with version 20070508 instead (the version Ubuntu 8.04 uses), but the
result is the same :(

Does anyone have similar experience?


Regards,
yongjhen



More information about the freebsd-multimedia mailing list