midi problem, an isa device on a pci card
Mathew Kanner
mat at cnd.mcgill.ca
Mon Apr 7 21:19:52 PDT 2003
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.
More information about the freebsd-current
mailing list