From owner-freebsd-arch@FreeBSD.ORG Tue Apr 13 03:43:43 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9CC9516A4CE for ; Tue, 13 Apr 2004 03:43:43 -0700 (PDT) Received: from srv01.sparkit.no (srv01.sparkit.no [193.69.116.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id D2F2243D48 for ; Tue, 13 Apr 2004 03:43:42 -0700 (PDT) (envelope-from eivind@FreeBSD.org) Received: from ws ([193.69.114.88]) by srv01.sparkit.no (8.12.10/8.12.10) with ESMTP id i3DAhbcZ098916; Tue, 13 Apr 2004 12:43:37 +0200 (CEST) (envelope-from eivind@FreeBSD.org) Received: from ws (localhost [127.0.0.1]) by ws (8.12.9/8.12.10) with ESMTP id i3DAgU7K002995; Tue, 13 Apr 2004 10:42:30 GMT (envelope-from eivind@ws) Received: (from eivind@localhost) by ws (8.12.9/8.12.10/Submit) id i3DAgU2F002887; Tue, 13 Apr 2004 10:42:30 GMT (envelope-from eivind) Date: Tue, 13 Apr 2004 10:41:28 +0000 From: Eivind Eklund To: Teemu.Parkkinen@patria.fi Message-ID: <20040413104128.GA2625@FreeBSD.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i cc: freebsd-arch@FreeBSD.org Subject: Re: Digital-tv card drivers and API discussion X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2004 10:43:43 -0000 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.