Hi all,

I've been reading up on how to write device drivers for Linux (I come from a programming background but am new to using Linux for anything other than web servers) and there's something I'm a little fuzzy on.

I think I understand how to create a kernel mode driver that is accessed (for example) through /dev/midx01

Obviously this would be intended to be a midi driver. My question is how do programs such as midi sequencers know how to communicate with this driver?

1.
they just write/read raw midi data to the device stream???

2.
there's a set "protocol" (i.e. writing commands to tell the driver what to do) for midi drivers???

3.
through a custom written ALSA driver that communicates with the custom kernel driver???

4.
Alsa drivers are a separate beast and don't use kernel drivers at all???

I was hoping someone here could point me in the right direction, and if any of those four ideas/options are correct. Searching the web brings up plenty of results but I've not quite found the info I need yet.

Thanks.