From owner-freebsd-multimedia@FreeBSD.ORG Fri May 23 08:25:35 2008 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B7171065677 for ; Fri, 23 May 2008 08:25:35 +0000 (UTC) (envelope-from yongjhen@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.240]) by mx1.freebsd.org (Postfix) with ESMTP id EF86A8FC20 for ; Fri, 23 May 2008 08:25:34 +0000 (UTC) (envelope-from yongjhen@gmail.com) Received: by an-out-0708.google.com with SMTP id b33so120133ana.13 for ; Fri, 23 May 2008 01:25:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:content-type:content-transfer-encoding; bh=rW2wLhF/rGUuDdRjMztdxkhSJQD55bZpmA/joNFe7d0=; b=hVAAWXLZsROIAS3/YEhWDX7BBbqpr60Y+LfpXZB8cFesOBrgcI/Lb9MPlnpaKJCfLTCLZWWNXTZtMENtD25qDULhhooSG++qezwArbNM2/7wBw/CxMguDqa1MbNPmhrh0/cbGuPR1BTsG79TqB5/pEgMiJuMVo3V7g7qDGLaFLk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:content-type:content-transfer-encoding; b=WCy94nrYu2FJkMbvOGY+sRrJvPagwa6QlpmTQicnMNIkUHndXK5dNroqvPvrGxyTAQgHlCl9AjFjzGaNGk1K+oRJC0hiVlgRYURaM0luyNY0NP1XR6HuYyImXx3gUlLJmLhKVdQZWih5t5Z2swR9ye+meIa7Y952iWQ+kF0lBPk= Received: by 10.100.10.15 with SMTP id 15mr1525366anj.105.1211529534319; Fri, 23 May 2008 00:58:54 -0700 (PDT) Received: from ?192.168.11.58? ( [211.21.63.147]) by mx.google.com with ESMTPS id i19sm7069848wxd.7.2008.05.23.00.58.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 23 May 2008 00:58:53 -0700 (PDT) Message-ID: <48367933.8030600@gmail.com> Date: Fri, 23 May 2008 15:58:43 +0800 From: Yong-Jhen Hong User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.14) Gecko/20080421 Lightning/0.8 Thunderbird/2.0.0.14 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: freebsd-multimedia@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Webcam and linux-gspca-kmod X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2008 08:25:35 -0000 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: [yongjhen@monster ~]$ sudo kldload gspca kldload: can't load gspca: No such file or directory and there is an error message from dmesg: link_elf: symbol msleep undefined 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 -#if __FreeBSD_version > 700100 +#if __FreeBSD_version > 700054 and re-build the module. This time the module loads and /dev/video0 appears! >From 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 But when I launch Gnome Cheese to test the driver, it still doesn't work, with 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 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