Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Apr 2003 00:22:02 -0400
From:      Mathew Kanner <mat@cnd.mcgill.ca>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: midi problem, an isa device on a pci card
Message-ID:  <20030408042202.GS17533@cnd.mcgill.ca>
In-Reply-To: <20030407.011258.62370040.imp@bsdimp.com>
References:  <20030406164134.GN17533@cnd.mcgill.ca> <20030407.000118.68039554.imp@bsdimp.com> <20030407064749.GO17533@cnd.mcgill.ca> <20030407.011258.62370040.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
	First, in regards to your comments to Terry, indeed you are
right, it's just a simple on-board soundchip, no dma for the mpu, no
fancy bridges that I know of.

On Apr 07, M. Warner Losh wrote:
> [... trimmed ...]
> : >  You have to make them be full pci devices.
> : >  Hweover, this
> : > is relatively easy to do.  You hacks will just not work.
> : 
> : 	But it's an ISA device on on a pci card.
> 
> that's not possible.  It is *NOT* an ISA device unless it is on a card
> that has ISA fingers on it.  Otherwise it *IS* a PCI device.  Does the
> pci card have a PCI to ISA bridge on it?  If not, then you have to
> deal with it as a PCI bus.

	I learned my lesson in math class not to argue from instinct
alone, so I accept that what you are saying is the truth and try to
make it hang off the pci device.
	Does your gut say I can bus_bus_alloc_resource in the pci driver and do
port io given that I could from the isa driver?  Will it catch overlap
from the pci and isa busses?  (suppose I really had an isa pnp mpu
card and this pci card both wanting ports 0x300-0x302)

	I had a look at the netbsd code and they can say stuff like
this is a config file:
mpu at isa?
mpu at somesoundcard?
	I hope my mpu code doesn't need to know about particular
soundcards, like
DRIVER_MODULE(mpu, snd_cmi,...)
DRIVER_MODULE(mpu, snd_visamstrcrd,...)

	Incidentally, what about vga and joysticks for that matter?
Not isa, but isa drivers.

> [...more snips...]
> You likely need to attach the mpu device to the pci soundcard in some
> way, or if the pci device has its own function, directly to the pci
> device.  Chances are excellent that's what the interrupt problem you
> are encountering are.

	Not an interrupt problem.  Looking at code for other OSes, it
doesn't seem like anybody has interrupts for tx ready for mpu401s.
	I dug out my other soundcard and the older midi driver that I
did a few months ago and it now has the exact same problem of blasting
the stuff too fast.  I can only assume something has changed in the
synth timer code (unlikely), or the general freebsd timer code in last
few months.  
	
	Thank you very much for your comments.

	--Mat
> 
> Warner

-- 
Brain: Pinky, are you pondering what I'm pondering?
Pinky: I think so Brain, but pants with horizontal stripes make me
look chubby.



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