Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jul 1997 11:44:29 +0200 (MET DST)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        rhh@ct.picker.com (Randall Hopper)
Subject:   Re: guspnp9 feedback
Message-ID:  <199707140944.LAA10489@labinfo.iet.unipi.it>
In-Reply-To: <19970714062602.02401@ct.picker.com> from "Randall Hopper" at Jul 14, 97 06:25:43 am

next in thread | previous in thread | raw e-mail | index | archive | help
> Ok, well the awe driver mallocs kernel mem in the attach.  If the malloc
> fails, it returns 0.  Since attach() calls can fail, it might be good to
> leave the non-void return type in there, and we can beef up the error
> checking of attach() invocations as we notice unchecked invocations.

see one of my followup messages (also to hackers) on the failure
handling in attach routines. I will have to read the bible (the daemon
books on 4.3 and 4.4) to see what is the best way, but it currently
seems easier to put all things which might fail into the probe routine.

>  |Also, the probe code can probably benefit from the addition of proper
>  |support for PnP boards, since these boards identify clearly themselves
>  |in the PnP id and do not require black magic in the probe routine.
> 
> Good point.  There's some PnP detection code for the SB32/AWE32 cards in
> newer versions of the Linux AWE driver, but later versions are GPLed.  So I
> guess this would have to be reengineered (?).  If I had a PnP card, I'd

the sound_pnp.c file has some pnp code inside. Perhaps even the gus
files. Finally, I have a (locally patched) copy of the pnp code from
S.Patel which can be used to this purpose. So we do not really need to
rewrite any low-level pnp stuff, just integrate pieces.

With sound cards, I still have a conceptual problem, since one
card can have multiple etherogeneous "devices" (e.g. audio, midi,
synthesis) at different addresses. I will have to look more carefully
at the pci code to see if/how it can deal with multifunction devices,
and then will duplicate their approach for PnP.

One more problem is that many of the sound files do not support
multiple instances of one device, they use static variables for
each device type.

	Cheers
	Luigi



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