[alsa-devel] alsa-lib has anyone ever looked at taking it cross platform?

Aaron J. Grier agrier at poofygoof.com
Wed Jul 30 21:07:26 CEST 2008

On Fri, Jul 25, 2008 at 08:51:13PM +1000, Peter Dolding wrote:
> Now why are not alsa interfaces practical to use.   It is ment to be
> "Advanced Linux Sound Architecture"  The complete Architecture.   Not
> something you have to tack bits onto because its not functional or
> hard to use.  Have we got to the point like xlib where the complete
> alsa-lib has to be reworked for usability.

alsa-lib's weakness from my perspective is the sheer breadth and extent
of its API.  the simplest polled output case for PCM requires a
significant amount of code.  there are a dozen snd_pcm_*() functions
before snd_pcm_writei() can be called.  I can't just open() a device,
ioctl() a struct or two to set sampling and buffer parameters, and start
write()ing data.  

ALSA appears to trade large data structures for large numbers of
function calls.  I assume this is intended to give finer granularity of
error reporting, but it makes programming ALSA very involved, perhaps

the recent step of deprecating (and subsequently removing) function
calls to slim down the API is a step in the right direction.

  Aaron J. Grier | "Not your ordinary poofy goof." | agrier at poofygoof.com

More information about the Alsa-devel mailing list