From owner-freebsd-multimedia@FreeBSD.ORG Wed Jul 11 04:27:13 2007 Return-Path: X-Original-To: multimedia@freebsd.org Delivered-To: freebsd-multimedia@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C1EC716A41F for ; Wed, 11 Jul 2007 04:27:13 +0000 (UTC) (envelope-from loafier@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 7CE1913C457 for ; Wed, 11 Jul 2007 04:27:13 +0000 (UTC) (envelope-from loafier@gmail.com) Received: by an-out-0708.google.com with SMTP id c14so360510anc for ; Tue, 10 Jul 2007 21:27:12 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=R0+UK6J+Ewvdlfl5hwD+FWrMj9hqB0KI91DT+MSf1N4rbT2yLHbjP7fk5TfHXSMsJpeBJ3i06kL1tvNxWakykf4VZ95TzblE7wQnY1pXmFJP3YqWuIFXuXSctAZzwGrgJuDzWdmLVT92FuyFkIqe3X5zHlTRnjzaaQTGE/UK0x8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=qVgioTQIg0bKN1LrDTvp7qeO5mxNwehdVZydS6M1X7lPl2xa7N2BGSanKAjsvnXS417G/ZZOnNrIrbF2rv64mC5rr999RgsQyntcxjP0617/41PerRGPAOft5ooGbH/pJ9F7kapo+FYNlKm1K7d+CVw6pG7U+8BjExHYZF34/HU= Received: by 10.100.191.5 with SMTP id o5mr2577475anf.1184128032418; Tue, 10 Jul 2007 21:27:12 -0700 (PDT) Received: by 10.100.109.17 with HTTP; Tue, 10 Jul 2007 21:27:12 -0700 (PDT) Message-ID: Date: Tue, 10 Jul 2007 21:27:12 -0700 From: "Christopher Davis" Sender: loafier@gmail.com To: multimedia@freebsd.org In-Reply-To: <20070710093829.34mqbekao4wwww4s@webmail.leidinger.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070710093829.34mqbekao4wwww4s@webmail.leidinger.net> X-Google-Sender-Auth: a684898945dd5b30 Cc: freebsd-hackers@freebsd.org Subject: Re: Audio driver template X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2007 04:27:13 -0000 On 7/10/07, Alexander Leidinger wrote: > Quoting Christopher Davis (from Mon, 9 Jul 2007 > 11:47:14 -0700): > > > http://people.freebsd.org/~cg/template.c > > > > Thought I would take a look at the audio driver template as > > part of my task to modernize drivers, soc2007. I would simplify > > the read and write functions to avoid using the bus tag and > > handle, but I'm not sure what else to do to bring it up to date. > > > > How else can it be improved? > > Putting it into the examples directory instead of having it on the > people's own pages would be an improvement (the developer handbook > needs to be changed to point to the examples directory then). > > And you should clarify what kind of improvements are valid for your > SoC work. Somehow I doubt that adding shiny new features (like hps > suggested) is part of the goal for your work. I think it's more like > bringing existing drivers up-to-par with currently available generic > driver interfaces, isn't it? > > I also think examples for suspend/resume stuff should be added. > /sys/dev/sound/pci/atiixp.c has suspend and resume methods if you want > an example. > > You could also review the locking, as it changed a little bit > recently, I think. > > Apart from the atiixp driver the envy42, emu10kx and HDA drivers can > also serve as examples for what is the most current in the sound > subsystem in FreeBSD. Maybe you can gain some more hints from them (I > think the template is not very up-to-date compared to them). > > The new mixer interface is not used yet in the drivers, so we don't > have examples at all for them. You could ask ryanb@FreeBSD.org (or on > multimedia@) about it. > > Ariff@FreeBSD.org (or multimedia@) can maybe help if you have some > questions regarding the drivers in the tree (maybe Ariff will answer > to your initial question anyway). > > Bye, > Alexander. > > -- > I guess the Little League is even littler than we thought. > -- D. Cavett > > http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 > http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 > Yes, my project is to modify drivers to use new interface features, like bus_alloc_resources(), which can help cut down bloat. Adding new features is probably out of scope at this point. Here's what I've done so far: http://loafier.sixbit.org/template.c - simplified read and write functions (changed to macros) - used bus_alloc_resources() -- I'm not sure if the resource id numbers are correct. - used pci_enable_busmaster() and pci_enable_io() functions -- I'm not sure if this is correct, either. - used bus_get_dma_tag() for the parent arg of bus_dma_tag_create() I'll take a look at those newer drivers to see what audio-specific changes to make... -- Christopher Davis