Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Apr 2004 10:41:28 +0000
From:      Eivind Eklund <eivind@FreeBSD.org>
To:        Teemu.Parkkinen@patria.fi
Cc:        freebsd-arch@FreeBSD.org
Subject:   Re: Digital-tv card drivers and API discussion
Message-ID:  <20040413104128.GA2625@FreeBSD.org>
In-Reply-To: <OF2E836F34.E888AECD-ONC2256E75.0033299E@patria.fi>
References:  <OF2E836F34.E888AECD-ONC2256E75.0033299E@patria.fi>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 13, 2004 at 12:44:35PM +0300, Teemu.Parkkinen@patria.fi wrote:
> Hi all,
> 
> I am about to write a digital tv-driver for my dvb-c -card.

[...]

> 1) Should we use Linux-DVB API as a reference,  or should we consider some
> changes to it? The API seems to be constantly changing and improving.
> Version 3 is available here:
> http://www.linuxtv.org/download/dvb/linux-dvb-api-1.0.0.pdf
> but they are currently working on version 4. In my opinion, the API should
> be minimal, but complete, so there is no need to constantly add new
> features to it.


If the API in your evaluation is reasonably OK, we should stick with it
(or a subset of it).  Being directly compatible gives a lot of benefits.

You may also want to look at the Brooktree (bktr) and Meteor (meteor)
APIs already in FreeBSD.  Ideally, all of these similar would be
available through a single unified API, at least for the parts that are
common.

> 2) As linux kernel is GPL-licensed, I cannot just port the linux driver to
> FreeBSD, right?

That's more or less correct.  We CAN port over drivers, but we really
really prefer native (non-GPLed) drivers, as that lets us ship them
compiled in, and allows the kind of re-use of the code that we want to
allow.

> In other words, we have to write the driver from scratch. In this case
> we don't have to stick with the Linux DVB-API and therefore I suggest
> that we give think the api through before deciding how we implement
> it (do we follow linux api or not).

What issues do you see with the Linux API that would make us want to
change it?

> 3) Do you have any pointers to good books or other documentation on how to
> write device drivers for UNIX (BSD)? I already have read those from
> FreeBSD documentation, but a decent book would be handy.

The Design and Implementation of 4.4BSD contains some information, but
it is getting somewhat dated - you need to check all information in it.

Eivind.



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