From owner-freebsd-current@FreeBSD.ORG Wed Apr 23 22:37:25 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6474F37B401 for ; Wed, 23 Apr 2003 22:37:25 -0700 (PDT) Received: from hak.cnd.mcgill.ca (hak.cnd.mcgill.ca [132.216.11.133]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FF9043FA3 for ; Wed, 23 Apr 2003 22:37:24 -0700 (PDT) (envelope-from mat@hak.cnd.mcgill.ca) Received: from hak.cnd.mcgill.ca (localhost.cnd.mcgill.ca [127.0.0.1]) by hak.cnd.mcgill.ca (8.12.3p2/8.12.3) with ESMTP id h3O5dr6d058325; Thu, 24 Apr 2003 01:39:53 -0400 (EDT) (envelope-from mat@hak.cnd.mcgill.ca) Received: (from mat@localhost) by hak.cnd.mcgill.ca (8.12.3p2/8.12.3/Submit) id h3O5dr5R058324; Thu, 24 Apr 2003 01:39:53 -0400 (EDT) Date: Thu, 24 Apr 2003 01:39:53 -0400 From: Mathew Kanner To: freebsd-current@freebsd.org Message-ID: <20030424053953.GF23335@cnd.mcgill.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Organization: I speak for myself, operating in Montreal, CANADA User-Agent: Mutt/1.5.3i X-Spam-Status: No, hits=-6.4 required=5.0 tests=USER_AGENT_MUTT version=2.53 X-Spam-Checker-Version: SpamAssassin 2.53 (1.174.2.15-2003-03-30-exp) Subject: pseudo bus, fake devices, midi problems X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2003 05:37:25 -0000 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