From owner-freebsd-multimedia@FreeBSD.ORG Sat Dec 1 12:06:43 2007 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFB9E16A418 for ; Sat, 1 Dec 2007 12:06:43 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 0B12613C459 for ; Sat, 1 Dec 2007 12:06:42 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A55984.dip.t-dialin.net [84.165.89.132]) by redbull.bpaserver.net (Postfix) with ESMTP id BC83D2E352; Sat, 1 Dec 2007 13:01:00 +0100 (CET) Received: from deskjail (deskjail.Leidinger.net [192.168.1.109]) by outgoing.leidinger.net (Postfix) with ESMTP id A7E3177539; Sat, 1 Dec 2007 13:00:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1196510455; bh=yudcXgnGXWAcm4PlyVlYqRZYoIAqNISaT Xk9z02M6/4=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To: References:X-Mailer:Mime-Version:Content-Type: Content-Transfer-Encoding; b=i1VGISG2cGw3anamlKs3vrgk5efTXnYbD1P5A rlT8qTGi8Nlb/HqbmIS7MP2j1rE69nJH03tdKFk1/TSuEjauhDFbW/AGGmynJ3oSQk1 Ap0wA9qW+xzoEVwbY4Vf19lzbBit/e5wyMC7+o9PRQRXlD1MXn62phzvpab8EKcfRAU uaoeVsmlGpLpLgITPFspQ/Eu7goObFWPcYuVcMotDu2BiPD5H/yu6p1TPWE1DOcsCbp OTZqPbp4VSbEmK1S8TnyOSUkbxhXS009RGpT/XOo7yZrcVTKQ65MhmtXA06yDFjqhLO OsI/8+a+0OCjS4uwfZ+a83TXMJ6XoGtKEVwjA== Date: Sat, 1 Dec 2007 13:00:54 +0100 From: Alexander Leidinger To: Chuck Robey Message-ID: <20071201130054.6ee3644c@deskjail> In-Reply-To: <4750885D.5020402@chuckr.org> References: <47475DF3.8030407@chuckr.org> <47477B4F.6000008@chuckr.org> <47484E4F.8000404@queue.to> <4749D405.6050800@chuckr.org> <20071126092456.ft3ir1peok80ckww@webmail.leidinger.net> <474B011A.6030705@chuckr.org> <20071128080526.qid2w9tvy800cck8@webmail.leidinger.net> <4750885D.5020402@chuckr.org> X-Mailer: Claws Mail 3.0.1 (GTK+ 2.10.14; i686-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.223, required 6, BAYES_05 -5.00, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, J_CHICKENPOX_15 0.60, RDNS_DYNAMIC 0.10, TW_SN 0.08) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: freebsd-multimedia@freebsd.org, ariff@freebsd.org Subject: Re: sound documentation for the snd_hda (Nvidia) 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: Sat, 01 Dec 2007 12:06:43 -0000 Quoting Chuck Robey (Fri, 30 Nov 2007 17:02:05 -0500): > Alexander Leidinger wrote: > >> I was operating under the assumption that those comments from hdac.c, > >> about the snd_hda driver badly needing a complete rewrite because it > >> was insufficiently, well, bussed? Yeah, bussed meant that code rework > >> was ongoing. > >> > >> If you even know what that comment about the busses being less than > >> they might be means, IF you could point me at any driver that you > >> personally think shows a more *ideal* setup, it would at least make me > >> aware of what's really wanted. You don't need to describe it yourself, > >> I know that'd be a major bore to do that for me, and I could probably > >> learn as well by just reading code that illustrates what things > >> *should* be. > > > > AFAIK, the non-ideal part of the driver is not related to our > > soundsystem. I was told the HDA architecture allows more than just the > > normal sound output you get with, e.g. AC97 based soundcards. So I think > > the idea is to split up the driver specific part a little bit more, so > > that you can add more things later. So the parts you need to read are > > the HDA specs and get an idea what can be improved there. Graphically > > it's like this ATM: > > It's getting to the point that I really, really am getting confused. > You're telling me stuff about the driver, but others are telling me that > the comment is out of date and incorrect, that there is no such driver > rewrite under consideration. The comment in hdac.c is quite clear and > definite that it IS going to need a rewrite, that's why I have been > asking this. Do you know this to be true, or false, or is this maybe a > guess? I'm not directly involved in the HDA driver. What I wrote is subject to how the HDA driver was before it entered the tree. Ariff based his work upon this driver and committed it to -current after some work. So far only stereo inout/output is done. For multichannel output our soundsystem needs some infrastructure changes. Ariff worked on this already, for a status of this you need to ask him. AFAIK Ariff didn't worked on other parts the azalia spec allows to do. The comment in the pre-CVS driver was related to this, as it was tailored to get some sound out of the chips. How much Ariff extended upon this, I don't know. AFAIR he did some changes, but I don't know to what extend. For a final answer you have to ask Ariff. > You need to understand, I think, that the basic approach to hardware > orginization in the HDA spec is pretty much totally different than any > other existing audio card design. It wouldn't be possible to fold any > existing design alongside this driver, because it would be like trying > to design in some mechanical transmission that would serve to work > equally well for a airship and a tricycle. It ain't a'gonna fly, at > least, it'd be very very difficult to treat the driver both as AC'97 and > Azalia, both in the same driver. That's not saying that a particular > piece of hardware wouldn't have an AC'97 side and a HDA side, but one > driver wouldn't run both ways. At least, trying to do that in one > driver would make ME schizophrenic. I am not going to pay a shrink even > if I get a great driver out of it. The goal is to make the HDA driver handle the azalia part of the chips. And AFAIK the possibility to use the AC97 part is some decision which has to / can be made at soundcard-/mainboard-design-time. So AFAIK some boards don't support the AC97 part of it at all. For this reason I don't think it makes sense to offer AC97 support additionally to the azalia support as well. > It's pretty obvious that a driver working compatibly with HDA would have > to be a separate system than any other driver, using only the same PCI > buss access code. I was thinking, if that comment was actually not just I think you better have a look at the hda driver and how it attaches to the FreeBSD sound infrastructure. If you gain some insights into the working of the sound system it would be great if you could write something up. Either in our wiki, as doxygen comments directly in the code, or in some other way of documenting it. We lack good docs for the sound system (and I've put up an entry on our ideas list for this task, but so far nobody send in something (even getting docs for small parts of the sound system would be great)). > outdated garbage, then it was referring to the organization of driver > internals. What I['m saying is, I'm a bit skeptical of this, what you > show, below. It depends where you draw the line. I haven't defined what "sound subsys" is in the diagram. It may be the case that we have to change the interface between the drivers and what we define as the sound subsys. A more detailed diagram could be this: /dev/dsp, /dev/mixer, ... | generic sound infrastructure (rate conversion, ...) | | HDA "middleware" -- driver A driver B -- AC97 "middleware" Another way could be: /dev/dsp, /dev/mixer, ... | generic sound infrastructure (rate conversion, ...) | | HDA infrastructure AC97 infrastructure | | driver A driver B, C, D > If anyone knows, for certain, whether a rewrite of the snd_hda driver is > still intended, please let me know. If it's not, well, that comment > really needs to be excised. But, no matter how well-intentioned, no > more guesses, they're just going to confuse me more. For a definitive answer, we need to ask Ariff (CCed). Bye, Alexander. > > +----------------------------------------+ > > | FreeBSD kernel | > > | +--------------+ | > > | | sound subsys | | > > +-------------------+------+-------+-----+ > > | > > +-------+--------+ > > | HDA code | > > +----------------+ > > > > > > And I think the goal is to get something like: > > +----------------------------------------+ > > | FreeBSD kernel | > > | +--------------+ | > > | | sound subsys | | > > +-------------------+------+-------+-----+ > > | > > +--------+--------+ > > |HDA bus/framework| > > ++-----+--------+-+ > > | | | > > sound ... something_else > > > > > > Hope this helps, > > Alexander. > > > -- It would be illogical to assume that all conditions remain stable. -- Spock, "The Enterprise Incident", stardate 5027.3 http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137