FreeBSD 4.9 / 5.2 Hauppauge PVR-250 / 350 Driver Patch (Jan 31, 2004)

Scott Long scottl at freebsd.org
Mon Feb 23 20:58:21 PST 2004


John Wehle wrote:
> [ This is the Jan 31, 2004 snapshot of my source tree.  Included are
>   changes to support FreeBSD 5.2 in addition to a fix for the crash
>   which happens when unloading the module on some systems.  The FreeBSD
>   5.2 support was made possible by Erik Moe <emoe at cox.net> who did
>   the initial port and supplied access to his machine so I could
>   integrate the changes. ]
> 

Very nice driver.  I'm not terribly familiar with the hardware, but I
wanted to make a comment on the busdma usage.  When you are allocating
a buffer with bus_dmamem_alloc(), you don't need to check the return
value of bus_dmamap_load() since it is guaranteed to succeed and not
be deferred in that case.  Also, the dma tag for these buffers should
be created with NULL, NULL for the lock arguments.

Also, you might be able to save the overhead of uiomove() by using
bus_dmamap_load_uio() to operate directly on the uio buffers rather
than pre-allocting static buffers.  This would only work if the
hardware can do multiple S/G elements, so it might not work in this
case, don't know.

Anyways, very nice driver.

Scott



More information about the freebsd-multimedia mailing list