Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Apr 2003 01:39:53 -0400
From:      Mathew Kanner <mat@cnd.mcgill.ca>
To:        freebsd-current@freebsd.org
Subject:   pseudo bus, fake devices, midi problems
Message-ID:  <20030424053953.GF23335@cnd.mcgill.ca>

next in thread | raw e-mail | index | archive | help
Hello All,
	I'm playing with Midi and have reached an impasse, someone
please advise before I waste a lot of time.
	Premise (part 1):  Midi isn't really part of the PCM and it
should be and I've almost got it there, when done, drivers that
implement midi won't have to be re-factored into a bridge driver and
pcm/midi sub-drivers but will much more like a mixer, where you just
define a kobj that implement the needed parts.
	Premise (part 2): Timidity (a userland midi sound renderer,
akin to modtrackers from back in the day) can can do level 0 rendering
or level 2 rendering (the difference is level 0, timing is done in the
kernel).  
	Problem: PCM requires that drivers be real devices and uses
the index (uh, unit number), so I need a fake bus, to hold a
fake driver so I can get a unit number.
	I'm in the process of creating a pseudo bus that will be off
the root_bus, it re-implements all bus-methods to do almost nothing and
will auto-create all drivers upon driver registration.

	Questions:
	How wrong is a pseudo bus? / How fake can a driver be?
	Is there another way to wedge a fake device into pcm?

	An unrelated question, how does one augment MFILES?  Seems
like I have to redefine with all the possible .m files around instead
of just supplementing with the new .m files my module.

	Thanks,
	--Mat

-- 
"There are only 10 types of people in this world: those who
understand binary and those who don't." -- from 0xdeadbeef



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