From owner-freebsd-multimedia@FreeBSD.ORG Fri May 23 09:06:38 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 641611065676 for ; Fri, 23 May 2008 09:06:38 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id 2C90E8FC0C for ; Fri, 23 May 2008 09:06:38 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 175497308B; Fri, 23 May 2008 10:50:45 +0200 (CEST) Date: Fri, 23 May 2008 10:50:45 +0200 From: Luigi Rizzo To: Yong-Jhen Hong Message-ID: <20080523085045.GB77439@onelab2.iet.unipi.it> References: <48367933.8030600@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48367933.8030600@gmail.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-multimedia@freebsd.org Subject: Re: 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 09:06:38 -0000 On Fri, May 23, 2008 at 03:58:43PM +0800, Yong-Jhen Hong wrote: > 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 ;) ... > 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 > ok thanks for the patch, i will try to fix this in the next release. > But when I launch Gnome Cheese to test the driver, it still doesn't > work, with dmesg: in order to test the driver, the best option is to use the 'pwcview' program in the linux-kmod-compat directory. Re. other applications, one thing to remember is that the freebsd port of gspca does not support mmap, which seems to be the preferred access method for Linux apps. So you need to rewrite a small piece of the client using read() to a locally allocated buffer to access the video. A patch of this kind for linphone is at http://info.iet.unipi.it/~luigi/patch-msv4l.c see if you can do something similar with your program. cheers luigi