Re: [Alsa-devel] Re: [OT] ALSA userspace API complexity
From: Jaroslav Kysela
Date: Tue Jan 10 2006 - 05:50:14 EST
On Mon, 9 Jan 2006, Hannu Savolainen wrote:
> > >From the end user perspective, don't you think that having an opportunity
> > to change the API entry point from one to multiple (user space library -
> > preferred, direct kernel space - last resort) is more flexible for
> > developers and users? Please, consider this question without any flames
> > line which API is better and what's better for audio subsystem architects
> > and what's better for your commercial work.
> It's too late to discuss about this. This decision could have been made in
> 1992-1993 before large number of applications were already written.
> Unfortunately the whole issue was raised just recently.
>
> There has been definitions for routines like osslib_open(), etc in
> soundcard.h for years. Also the libOSSlib.so library contains such
> routines. If an OSS application is compiled without -DOSSLIB then they are
> defined as open, etc. Unfortunately this version of soundcard.h was not
> accepted by the kernel OSS maintainers so the stock Linux version doesn't
> have these definitions.
>
> If you like to get OSS apps to go through this library API you can do the
> following:
>
> - Get the latest soundcard.h from our OSS package to be included in the
> stock kernel.
> - Do the same for libOSSlib (sources shipped with OSS).
> - Tell all OSS developers to change all OSS system calls to use their
> osslib_ counterparts. And to recompile against the latest soundcard.h
> with -DOSSLIB. Make sure all distributions have done the changes before
> that.
>
> Then you can include a libOSSlib.o library in ALSA with all the OSS
> emulation stuf inside.
You should do the clear statement that the direct using of syscalls is not
recommented for application developers. Unfortunately at this time, I
admit, it would be very difficult to change the existing applications.
I can only suggest to OSS including the commercial version:
1) create a osslib package under GPL and probably also under BSD licence
2) notify developers in your documentation that every syscall has own
function in osslib and that using syscalls directly is not recommended
In this way, your library will go to all Linux distributions and OSS app
developers will have quite confirmed the right direction from you.
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/