[linux-audio-dev] Linux VERSUS OSS ???

guenter geiger geiger at xdv.org
Fri Oct 10 13:34:01 UTC 2003


On Fri, 10 Oct 2003, Paul Davis wrote:
> >You say that the alsa kernel drivers export the  hardware capabilities to
> >user level.
> >Would it be possible to write an API in C++ for ALSA then, basically
> >not using the alsalib, but the fast hardware abstraction ?
>
> its certainly possible. whether its worth it is another
> question. using alsa-lib on a "hw:N" ALSA device adds very very little
> code to the execution path. i take it that you understand that the
> "hw:N" devices presented by alsa-lib correspond precisely to the
> hardware-limited capabilities offered by the hardware? that is, access
> to these devices has to use parameters offered by the hardware, and no
> format conversion, channel mapping, rate conversion or anything else
> is done by alsa-lib. you basically get to the system calls and then
> into the kernel in 1-3 layers of function calls, which is likely as
> good as you'd get in another library.
>
> if you want C++, i think you'd be better off wrapping alsa-lib. i can
> see no reason to implement another library that has to handle the
> kernel API (read, write, ioctl, open, close, etc.).
>
> but yes, its possible.

Thanks for the clarifications. Actually I was thinking in terms
of the OSX driver structure you mentioned, but of course, you were
talking about the kernel modules, while I was thinking about the
user level alsalib (which has nothing to do with driver programming
per se).

Anyhow, last but not least, I think the rtaudio should be mentioned
in this context http://www-ccrma.stanford.edu/~gary/rtaudio/,
which to my understanding the C++ wrapper around alsa-lib that you
mention. (and more ..)

Guenter






More information about the Linux-audio-dev mailing list