Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 Dec 2006 12:21:47 +0100
From:      Hans Petter Selasky <hselasky@c2i.net>
To:        freebsd-multimedia@freebsd.org
Cc:        Luigi Rizzo <rizzo@icir.org>, multimedia@freebsd.org
Subject:   Re: pwcbsd extensions for spca-supported cameras
Message-ID:  <200612311221.50111.hselasky@c2i.net>
In-Reply-To: <20061230111525.A9195@xorpc.icir.org>
References:  <20061230111525.A9195@xorpc.icir.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday 30 December 2006 20:15, Luigi Rizzo wrote:
> If someone (kernel programmers) is interested in having a look at
> this code...
>
> It is not yet usable but i am moving forward quite fast,
> hopefully with a bit of help we can manage to have a working driver
> within a few days.
>
> I have been working recently to integrate more cameras into the
> pwcbsd port, namely those supported by the spca (userland)
> application/driver.
>
> I am doing rather good progress, but wouldn't mind a bit
> of review/help if you are interested. Details are at
>
>  http://info.iet.unipi.it/~luigi/FreeBSD/usb-cameras.html
>
> basically i can probe the camera and start the usb transfer,
> all left to do now is link the code that detects the start of frame
> into the usb isoc stream, and later to invoke the format converters
> appropriately.
>
> let me know if you have any suggestions on how to proceed with this.
> (the code is basically the pwcbsd and spcaview that we have in
> the ports, with very limited modifications - the license is
> obviously the same as the original, so this is going to remain
> a port).
>

If you want more stable isochronous transfers, and especially High-speed ISOC 
transfers, you need to use my new USB API. Please see:

http://www.turbocat.net/~hselasky/usb4bsd

There are examples in "ugen.c" on how to do ISOC transfers, which is basically 
the same as in the old system.

More examples on how to use ISOC transfers:

http://www.turbocat.net/~hselasky/isdn4bsd/sources/src/sys/i4b/layer1/ihfc2/i4b_wibusb.h
http://www.turbocat.net/~hselasky/isdn4bsd/sources/src/sys/i4b/layer1/ihfc2/i4b_hfcsusb.h

I found this comment:

/* !!!!!!!!!! IMPORTANT DO NOT SET THIS HIGHER THAN 8 !!!!!!!!!!!!!!! 
 * !!!!!!!!!! OHCI IS BUGGY IF YOU DO SO              !!!!!!!!!!!!!!!*/
#define ISO_FRAMES_PER_DESC     8

Please set ISO_FRAMES_PER_DESC to 50 and hardcode MAX_ISO_BUFS to 2. That will 
work on all USB host controllers.

#
# I recommend using the latest sources:
#

svn --username anonsvn --password anonsvn \
      checkout svn://svn.turbocat.net/i4b
#
# The following commands will
# install the driver on FreeBSD:
#
cd i4b/trunk/i4b/FreeBSD.usb
make S=../src package
make install

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612311221.50111.hselasky>