From: Gabriel M. Beddingfield [mailto:gabrbedd@gmail.com]
It would be a good idea for you to check out the alsa-lib sources and snoop around in the src/rawmidi/ folder.
In reality, only one file descriptor is returned by snd_rawmidi_poll_descriptors(). However, the API returns an array so that it can expand in the future without having to recompile programs linked to the library.
Yes, the ALSA documentation sucks. But I assure you that if you try to use the raw kernel interface... the documentation is worse. :-)
Since ALSA is big an complicated, and since my embedded system will probably be based on SALSA, I downloaded that source, which is comparatively simple (hence the S, I guess). It makes it clear what's going on: the RawMidi handle already contains a pollfd for its internal use, and snd_rawmidi_poll_descriptors makes that available to the app.
Thanks for your time.