Is everyone sick?
Jay Vaughan
EMAIL HIDDEN
Wed Oct 28 21:53:16 CET 2009
>>
> But incidentally, I have access to pretty much all
> the MS developer tools, and the Windows Driver Kit is just a 2.5GB
> download, so sample code is available (according to the docs,
> there's an
> MPU-401 driver (anyone remember that one?) and a few other related
> samples in there.
>
there are plenty of windows usb midi drivers that all use the same
basic framework, i think.
> Now, Google didn't turn up any proper specs for the AMT8 - if you have
> the necessary source and docs lying around somewhere, I'm happy to
> have
> a look.
>
My current kernel version has support for the AMT8/MT4 devices with
the following VID/PID
0x86a 0x001
0x86a 0x002
0x86a 0x003
the driver is implemented as part of the sound/drivers/usb/ *class*
drivers for usb-midi, which means this should be quite a simple driver
for you to understand how to set things up for the AMT8. a class
driver is a particular driver that will operate for all devices,
regardless of manufacturer, by identifying with the class of service
required: in this case USB MIDI.
the driver has a few quirks, these are all guarded by
QUIRK_MIDI_EMAGIC. if you have a linux source tree, then use cscope
in $(LINUXSRC)/sound/ to find all occurrences of QUIRK_MIDI_EMAGIC, do
a little grand tour, and you'll see its all pretty much already been
discovered. the snd_usbmidi_emagic_ops struct has some interesting
pointers to custom functions for handling the AMT8 device, and its all
you need to implement on the Win7 side of things, i think. as long as
you can get a win7 codebase already (driver demo code) that will show
you how to do the endpoint i/o through the driver API, this code
should be relatively easy to understand and transmogrify. for
example, the snd_usbmidi_emagic_input() function does just what it
says: handles input from the emagic device .. if your win7
democodebase has a place to put such things, then maybe you've only
got to rewrite 4, maybe 5 small C functions and you're done.
btw, the alsa usb class drivers for midi are pretty sweet in terms of
the sheer number of devices that are being supported by a single
driver. i doubt you'll have difficulty understanding the reasoning
for all the quirk and struct_ops housekeeping. but you can ignore all
that if you need to.
>> windows, then its still crap. putting new hardware on linux, if the
>> hardware is really good hardware, regardless of the branding, is very
>> easy.
>
> The big question is: Is the AMT8 well-behaved hardware? The Win2k
> driver
> consists of two parts: A USB driver that I assume installs a "serial"
> port to the hardware, and the actual MIDI driver.
most USB MIDI drivers that have 'two parts' are actually a shim, and a
driver.
the shims purpose is to upload a little firmware so the machine can
boot and properly interact with the driver. yes, thats right kids,
some of your USBMIDI gear doesn't actually have its own firmware. do
*not* delete that working driver installation on your old and crusty
machine, if you want to be really safe, because it could be the only
place left on earth that has the firmware to make your hardware do
something. this is, alas, becoming more of a future-proof problem.
in the case of a lot of the OEM style USB MIDI interfaces, this
(typically 8051-based) firmware can be found all over the place. in
the case of the AMT8, its possible the firmware payload is obviously
marked as being so in the windows driver package. (that is, if it
does need a firmware shim, i didn't go that deeper into the linux
code..) for example, on this firmware shim business, the MT4
firmware is available in a few flavours - an unlicensed copy of the
original driver file extracted from the windows driver, and a
completely open source re-write of 8051 firmware code, just to do the
same thing. if you need a firmware shim and you can't find one,
probably things will get a bit more difficult, but then again, maybe
that free 8051 code is easier to adapt than we think, too .. :)
well. anyway. if the AMT8 does need a firmware shim to get things
started, then have a closer look at all related driver files in your
windows box, you could use linux on all the files in the windows
driver to find the 8051 firmware code (e.g. "file ./win32_files/*" and
look for 8051), and .. yeah i guess you do have to play with the
registry too, in case the shim is using it for some reason.
>> a question: can you boot that system with a linux boot CD, like
>> pure:dyne, and use the interface?
>
> Never tried...
>
i keep puredyne on a usb stick for booting on random PC's whenever i
get the chance, its lovely:
http://code.goto10.org/projects/puredyne/
very easy to use and set up, and you can probably make music with it
right away without too much fuss ..
>> maybe your next jam session needs to involve ditching your windows
>> world, and having a quick look at what linux thinks about all your
>> music hardware ..
>
> Erm, no. I like the tools I have. And as far as I'm aware, there's
> still
> no drivers for the MOTU PCI-424 system, so it's going to be an awfully
> quiet session...
i forget what hardware you've got in your system, in total, but i
think to fix your AMT8 problem it could be quite a lot simpler to
write your own Win7 driver for it, than you think ..
make a puredyne boot stick
boot it on your pc with all hardware you want to try out plugged in
check it out (fire up seq24, aconnectgui, and a sofsynth, try to play
it through your AMT8)
have fun with what works
== this will tell you to what degree AMT8 is working
go back to win7, get the dev tools, look for a driver demo related to
USB MIDI CLASS drivers
look at the sources for AMT8 as above
see if the leap between the two code-bases could be done, quite
simply .. and if so, do it.
== problem solved
i know you're a competent coder martin, i'm not recommending this to
blow smoke up your ass, but i think if you really have an issue with
your AMT8, it could be worth considering.
;
--
Jay Vaughan
More information about the music-bar
mailing list