Hi all, This patch adds a USB MIDI Gadget driver. This driver is glue between the USB gadget interface and the ALSA MIDI interface. It allows an embedded Linux system to appear as a class-compliant USB-MIDI device to a host system on the other end of a USB cable. Much of the code is borrowed from zero.c, usbmidi.c and usbaudio.c; my thanks to David, Clemens and Takashi for their work. Included are usb_audio.h and usb_midi.h containing definitions from the relevant USB specifications for USB audio and USB MIDI devices. The definitions of struct usb_ms_header_descriptor and struct usb_ms_endpoint_descriptor are the same as those that appear in sound/usb/usbmidi.c, with the intention of that file including instead. I have not included that change here. This patch is against v2.6.17. I have tested using dummy_hcd inside user-mode linux, and using s3c2410_udc. Testing with user-mode linux requires minor changes to a few Kconfig files in order to enable the USB and sound subsystems with ARCH=um. I have tested playing a midi file with aplaymidi at one end and dumping the events with amidi at the other (in both directions) as well as connecting to a Mac running a synth with Garage Band. All comments are welcome. If the response is favourable then I'll submit this driver to the USB folks for inclusion. Cheers, - Ben. P.S. My apologies if it's inappropriate to cross-post to linux-usb-devel and alsa-devel, I'm hoping you're both interested. :) P.P.S. My first attempt at emailing a patch with Thunderbird. Whitespace was munged when inline, so I hope a text/plain attachment is ok.