Subject: Re: Need help with understanding the emuxki driver
To: None <firstname.lastname@example.org>
From: Mark Kirby <email@example.com>
Date: 11/29/2004 16:33:50
On Saturday 27 November 2004 22:30, firstname.lastname@example.org wrote:
> There is no dedicated register space for the MIDI interface on the emuxki.
> At least on non-audigy devices, not sure for the rest. That means you
> just can't map a BAR, because there is no such one. That means you have
> to go the bus_space_subregion way.
> I don't know if you've already done that part, but the bus_space_tag and
> the bus_space_handle parameters will have to come from the corresponding
> space of the emuxki parent driver. That means you have to pass them to
> the mpu at emuxki driver through attachment args, just like when you get
> PCI device IDs from the pci_attach_args structure.
> Then, as for the subregion to map, well, I guess it's the set of registers
> for the MIDI interface. If my reading of the Linux header is correct
> ("reading correctly Linux sources" is not something you can guarantee),
> it consists of two 8-bit registers at offset 0x18 of the parent register
> space (emuxki only maps one, AFAICT).
> So you want to map at address 0x18, at least 2 byte-long. You might have
> to map a 32-bit aligned region, I'm not sure of that.
Thanks for the reply.
I went with your suggestion of an offset of 0x18 and mapped 2 bytes. However
the mpu driver wont attach. I've created and set up mpu_emuxki.c and added
the necessary to files.pci and the GENERIC config file. It seems to be
failing because the mpu_find in the match method fails.
Looking at 8010.h from the latest linuk kernel sources i noticed this comment
//For Audigy, MPU port move to 0x70-0x74 ptr register
What does that mean? (i'm completely new to hardware programming so sorry for
the elementary questions)
If thats not the problem it may be the fact my card is audigy2 based (or my
code is wrong somewhere), but i'm fairly sure the linux driver has support
for these cards too.
One last thing in the code there are lots of DPRINTF statements, is there some
flag i need to set in the kernel config file to get the output of these
Any insight you can provide would be greatly appreciated.