Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jul 1997 17:21:30 +0930 (CST)
From:      Michael Smith <msmith@atrad.adelaide.edu.au>
To:        luigi@labinfo.iet.unipi.it (Luigi Rizzo)
Cc:        msmith@atrad.adelaide.edu.au, multimedia@FreeBSD.ORG, hackers@FreeBSD.ORG
Subject:   Re: sound driver structure and configuration
Message-ID:  <199707210751.RAA22242@genesis.atrad.adelaide.edu.au>
In-Reply-To: <199707210637.IAA20692@labinfo.iet.unipi.it> from Luigi Rizzo at "Jul 21, 97 08:37:06 am"

next in thread | previous in thread | raw e-mail | index | archive | help
Luigi Rizzo stands accused of saying:
> > Aha.  May I offer a suggestion?
> > 
> > Have the 'snd' controller pull in all the modules for the various 
> > on-card subsystems.  Have each of these subsystems register themselves
> > in a linker set using a 'name' field to identify themselves.
> > 
> > Then have 'device at ...?' statements which pull in probe code for
> 
> right, but this brings me back to the initial question. What does the
> config progrm do when it finds a "device at foo?" statement ? I have
> tried running config with different config files where foo is replaced
> by bar o rother strings and see no difference in the output . I guess
> the "isa" keyword is somehow magic (or it becomes specially treated
> because of something in the "files.i386" file ?

Oops, my previous wasn't good enough, sorry.

The 'device at foo?' doesn't appear to do anything special, and my
suggesting it was really wrong.

Here, in full glory :

controller	snd?	# sound support, also all chipset modules

device zw0 at isa? port...	# ZongleWonker ISA board probe
...
device bf0			# Bafwangg PCI soundcard probe


Then a chipset module might say :

struct snddriver_module foo_codec = {
	foocodec_attach,
	SNDD_TYPE_CODEC,
	(void *)foocodec_function_switch,
	"foo_codec"
}
DATA_SET(snddriver, foo_codec);

Then the 'zw' driver, knowing that the board it had found had a 'foo'
codec, would look it up by name in the 'snddriver' linker set, and
call its attach function to attach it, passing in the parameters
required.

Likewise the Bafwang card code would just detect the card and pull up
the desired chip driver(s).

Does that make more sense? 8)

-- 
]] Mike Smith, Software Engineer        msmith@gsoft.com.au             [[
]] Genesis Software                     genesis@gsoft.com.au            [[
]] High-speed data acquisition and      (GSM mobile)     0411-222-496   [[
]] realtime instrument control.         (ph)          +61-8-8267-3493   [[
]] Unix hardware collector.             "Where are your PEZ?" The Tick  [[



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