[alsa-devel] Alsa Driver Development - General Concepts

karl at lil-voodoo.co.uk karl at lil-voodoo.co.uk
Wed Nov 26 16:48:26 CET 2008


I've got a couple of audio/midi devices knocking around that I'd quite
like to add ALSA support for (for use in Linux sequencers/DAWs) so I've
been reading up on Linux device drivers and Alsa driver development.

I do have a programming background but unfortunately, I'm a little
confused on a couple of points and I was hoping someone wouldn't mind
helping me out.

I'm kind of basing my thoughts on the idea that I have a USB device which
is not recognised by the kernel and does not expose a known midi interface
(so requires a completely new Alsa driver?). The goal would be for this
device to be usable in Linux midi sequencers.

- How does the Alsa driver communicate with the hardware? Would I need to
write a Kernel driver (e.g. a character device) for the Alsa driver to
talk to?

- Would my Alsa driver basically create a card instance and then a RawMidi
component? I'm assuming the use of RawMidi would then allow applications
to recognise the Alsa driver as a seemingly ordinary midi port??? Then
implement _input_trigger() and _output_trigger() to exchange data with the
application, whilst passing data to/from the kernel driver to talk to the

Sorry if I'm way off base. I'm trying to get in on this thing to help
spread some extra Linux love in music world.

Many thanks.

More information about the Alsa-devel mailing list