RFC: USB DVB-T, DVB-C, analog TV, FM radio driver framework

Markus Rechberger mrechberger at gmail.com
Tue Apr 7 14:42:20 PDT 2009


Hi all,

I was recently working on such a framework for configuring USB devices
from userland (PCI should be possible too with corresponding hooks to
allow configspace writes).
The Framework emulates the video4linux2 and linux DVB framework to
applications by using LD_PRELOAD and intercepting the corresponding
open/ioctl/mmap/close commands to /dev/video[n] /dev/radio[n]
/dev/dvb/adapter[n]/ devicenodes. The only required kernel dependency
in case of USB drivers is a USB datapipe driver.
The architecture itself is separated into a userspace library for
normal users and a userspace daemon which has to run as a permitted
user which has access to the raw USB stack (by using libusb?).
Currently I have the drivers work on Linux and OSX, the driver code
itself is 1:1 the same on both systems I would like to keep it the
same on FBSD too.
It was fairly easy to port some LinuxDVB tools to OSX and use them
there with that framework.
Once the device is set up the videodata will just be available at the
USB endpoints and should be exposed to userland. Since the latency of
usbdevfs (on linux) and the userspace IOKit USB interface is too slow
I required a kernelmodule for exposing the data on both systems - but
this is fairly easy and realized just by implementing a ringbuffer and
an interface to userland.

I wonder if there's any interest in having that supported on FreeBSD too?

devices which are supported:
http://www.terratec.net/en/products/Cinergy_HTC_USB_XS_HD_57290.html

basically all em28xx based devices can be supported and the driver
will be extended to support other Empia based TV products too.

regards,
Markus

rough overview about the framework:
http://mcentral.de/wiki/index.php5/DVBConfigFramework


More information about the freebsd-multimedia mailing list