[alsa-devel] Rawmidi vs. /dev/snd/*

Paul D. DeRocco pderocco at ix.netcom.com
Mon Apr 2 19:02:15 CEST 2012

> From: Gabriel M. Beddingfield [mailto:gabrbedd at 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.


Ciao,               Paul D. DeRocco
Paul                mailto:pderocco at ix.netcom.com 

More information about the Alsa-devel mailing list