Re: mpu401 module update

"Greg Crain" <[email protected]> Sat, 15 Nov 2003 09:24:19 -0500 EST
Newsgroups gmane.os.openbeos.midi
Message-ID <7411646340-BeMail@c1270910-a>
Hi,
Thanks for commiting the code.  I will see if it builds.

I had to make a fix in the emuxki.c file.   Somehow, this line does not=20
parse correctly and it incorrectly created the device port at 0x70 or=20
something:=20
if ((err =3D3D (*mpu401->create=3D5Fdevice)(card->config.nabmbar + (IS=3D=
5FAUDIGY(&
card->config) =3D3F EMU=3D5FA=3D5FMUDATA1 : EMU=3D5FMUDATA),	&card->midi.=
driver, 0,=20
midi=3D5Finterrupt=3D5Fop, &card->midi)) < B=3D5FOK)

I split it up, like so:
midiaddress =3D3D card->config.nabmbar + EMU=3D5FMUDATA;
dprintf("emuxki: midi device 0x%x\n",midiaddress);
if ((err =3D3D (*mpu401->create=3D5Fdevice)(midiaddress,&card->midi.drive=
r, 0,=20
midi=3D5Finterrupt=3D5Fop, &card->midi)) < B=3D5FOK)
		return (err);

My card base address is E000, so it should create a device at E018. =20
Also, this works for the SBLive =3D5Fonly=3D5F.   The Audigys' use indire=
ct=20
addressing to the UART that is not compatible with the Be R5 module,=20
nor mine.   It can be easily fixed later, but I have to think of a=20
method.  I want to avoid specific solutions in the generic module.=20

And then enable the midi receive interrupts, EMU=3D5FINTE=3D5FMIDIRXENABL=
E.

Greg

> Selon Philippe Houdoin <[email protected]>:
>=20
> Hi Philippe, Greg,
>=20
> i take the task. i hope you don't mind
>=20
> i committed the source from greg, fixing warnings. I fixed warnings=20
> too in=20
> emuxki. the midi=3D5Fdriver.h is in os/drivers.
>=20
> I don't know if the module works built this way. It should but i'm=20
> not sure.
> Anyway it seems clean to me now.
>=20
> thanks Greg,
>=20
> J=3DE9r=3DF4me