Re: [OT] ALSA userspace API complexity

From: Jaroslav Kysela
Date: Thu Jan 05 2006 - 09:23:01 EST


On Thu, 5 Jan 2006, Heikki Orsila wrote:

> Alistair John Strachan <s0348365@xxxxxxxxxxxx> wrote:
> > On Tuesday 03 January 2006 23:10, Tomasz K?oczko wrote:
> > 2) ALSA API is to complicated: most applications opens single sound
> > stream.
>
> > FUD and nonsense. I've written many DSP applications and very often I can
> > recycle the same code for use in them.
>
> I've long ago stopped using ALSA API because it is broken. But if you
> wanted to make ALSA usable by real people you might considering adding 3
> functions (there are ~300 already so not much loss):

This sentence makes this in my mind: real people = lazy people. The error
codes are documented well. Also, aplay in the alsa-utils package has
good error recovery code including test pcm.c utility in alsa-lib.

> err = alsa_simple_pcm_open(nchannels, sampleformat, samplingrate, frames_in_period /* 0 for automated default */ );
> err = alsa_simple_writei(); /* handless signal brokeness automagically */
> alsa_simple_close();

Well, it's better to create only "fast parameter setup" and "default error
recovery" functions.

> Basically ogg123/mpg123 like applications would only need 3 alsa calls.
> Now everyone reimplementing their own buggy versions of simple mechanisms.

While "official" examples exists for a long time. Also, we already noted
that we are not best documentation writers, but everytime when we ask for
help we hear nothing from other people.

Jaroslav

-----
Jaroslav Kysela <perex@xxxxxxx>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/