All of lore.kernel.org
 help / color / mirror / Atom feed
* Implementing ALSA compatibility in OSS
@ 2004-11-15 10:38 Hannu Savolainen
  2004-11-15 13:13 ` Clemens Ladisch
  0 siblings, 1 reply; 17+ messages in thread
From: Hannu Savolainen @ 2004-11-15 10:38 UTC (permalink / raw)
  To: alsa-devel

Hi folks!

We are considering making our OSS software compatible with ALSA. However
there are some serious problems. Maybe somebody on this list could give us
some initial help.

Our initial plan was to implement a version of libasound.so that
implements the required functionality in OSS way. However the problem is
that there are more than 1500 snd_* functions exported by libasound.so
(of alsa-lib-1.0.7rc2). How many of them are actually needed and how many
of them are just helpers used internally by the library.

After checking about 10 or 20 different applications we have found about
220 different routines that have been used by them. In addition there
are 90 routines used by amixer/alsamixer we have decided to leave
unimplemented. Each new program we try adds about 10 to 20 new routines to
the set.

There are about 1200 calls we have not "seen" yet. At this rate we will
need to try at least 60 to 120 programs before we know how many ALSA
routines need to be implemented for good ALSA compatibility. However
it looks like we are running out of programs. Many apps on the applications
list (http://www.alsa-project.org/applications.php) seem to have been
updated last tame in 2002 and they don't work with ALSA 1.0.x any more. Is
this list up to date or do we have just looked at a wrong place.

Is there any other official documentation for the pcm and mixer
interfaces in addition to the DOXYGEN stuff? It's mostly just a function
prototype list and not very helpfull.

Btw, the "Howto use the ALSA API" document
(http://equalarea.com/paul/alsa-audio.html) contains three sample programs
for audio but they are bit out of date. The
snd_pcm_hw_params_set_rate_near() call seems to use some older parameter
passing convention and they don't work with ALSA 1.0.x. Maybe somebody
should fix them.

Is the ALSA library API frozen now or should we wait until the 2.0
version to avoid doing redundant work?

Another alternative is making OSS compatible with the ALSA's device driver
interface /dec/snd/*. This would be the most natural alternative. Is there
any documentation written for it (nothing seems to be available in the net)?


Third alternative might be improving the OSS plugin for Jack. After
browsing the ALSA web site it looks like many pages recommend using Jack
instead of the ALSA library API. However are there any reasons to
implement a new version of libasound.so instead of improving the Jack
plugin?


Anyway we will include a mimimal "Simple ALSA" (SALSA) library in the next
OSS version (in few days) that permits running selected ALSA applications
(mainly esd, xmms and alsaplayer). This is needed because many Linux
distributions have compiled them with OSS support disabled. The first
version of this library implements about 20 or 30 ALSA library routines.
In addtion there are about 200 "stub" routines required to make the loader
happy. The remaining 1300 calls don't have even stubs yet so we do not
claim having full ALSA support yet.

Best regards,

Hannu
-----
Hannu Savolainen (hannu@opensound.com)
http://www.opensound.com (Open Sound System (OSS))
http://www.compusonic.fi (Finnish OSS pages)
OH2GLH QTH: Karkkila, Finland LOC: KP20CM


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8

^ permalink raw reply	[flat|nested] 17+ messages in thread
* Re: Implementing ALSA compatibility in OSS
@ 2004-11-15 11:25 Peter Zubaj
  2004-11-15 11:48 ` Hannu Savolainen
  2004-11-15 12:29 ` Hannu Savolainen
  0 siblings, 2 replies; 17+ messages in thread
From: Peter Zubaj @ 2004-11-15 11:25 UTC (permalink / raw)
  To: hannu; +Cc: alsa-devel

Hi,

I am not alsa-developer, but:

Would be simpler and faster to implement only alsa-lib plugin as whole
alsa-lib (I never tryed this) ????

And if you create new alsalib (SALSA) you will overwrite old one -
this will prevent ussage of both sound systems at same time.
For example soundcard 1 uses ALSA and sound card 2 uses OSS.

Look at pcm_jack.c (from alsa-lib) - this plugin implements output to
jack from every alsa app (I think).

I think API is stable, but I think kernel api can be changed, because
these changes will be hiden in alsa-lib.

Peter Zubaj

____________________________________
http://www.pobox.sk/ - spolahliva a bezpecna prevadzka





-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8

^ permalink raw reply	[flat|nested] 17+ messages in thread
* Re: Implementing ALSA compatibility in OSS
@ 2004-11-15 13:11 Peter Zubaj
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Zubaj @ 2004-11-15 13:11 UTC (permalink / raw)
  To: hannu; +Cc: alsa-devel

>This approach sounds interesting. Unfortunately my impression after
>looking at the code is that the plugin interface only works with PCM.
>Also
>the library seems to be build tightly around ALSA kernel drivers and
>taking ALSA's place as the "hardware" driver (for the default and hw:*
>devices).

AFAIK every interface (control, pcm, midi, ...) in alsa can have it's
own plugins. These plugins can be compiled in lib and load at runtime
through .asoundrc file. I think, it is possible to even create virtual
user space soundcard. Only compilation depends on internal alsa-lib
heades (*_local.h) and on kernel asound.h file.
And these local headers can change at any time without warning.

But you should check LICENSE if you can use internal alsa-lib headers
and asound.h header.

If you implement your own alsa-lib you will be always one (or more)
step behind ALSA, and it will cost you too much. And missing functions
implementations can by problems too.

Peter Zubaj
____________________________________
http://www.pobox.sk/ - spolahliva a bezpecna prevadzka





-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2004-11-16  9:56 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-15 10:38 Implementing ALSA compatibility in OSS Hannu Savolainen
2004-11-15 13:13 ` Clemens Ladisch
2004-11-15 13:41   ` Hannu Savolainen
2004-11-15 16:01     ` Jaroslav Kysela
2004-11-15 17:31       ` Hannu Savolainen
2004-11-15 18:52         ` Takashi Iwai
2004-11-15 19:58           ` Jaroslav Kysela
2004-11-16  9:34             ` Takashi Iwai
2004-11-16  9:56               ` Jaroslav Kysela
2004-11-15 19:14         ` Paul Davis
2004-11-15 16:27     ` Clemens Ladisch
2004-11-15 17:58       ` Hannu Savolainen
2004-11-15 19:03         ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2004-11-15 11:25 Peter Zubaj
2004-11-15 11:48 ` Hannu Savolainen
2004-11-15 12:29 ` Hannu Savolainen
2004-11-15 13:11 Peter Zubaj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.