OSS vs ALSA API (was Re: Is it time for remove (crap) ALSA from kernel tree ?)



Hi!

Today both OSS and ALSA teams have to spend significant
amounts of time in emulating the "alien" APIs. Making
OSS and ALSA to co-exist will require some work in both
sides but that should be nothing when compared to the
effort required for emulation.

...
In Linux we typically do not do two APIs and codebases
for the same purpose. If we do, like sys_mmap and
sys_mmap2, it's an older legacy interface that never
changes, that we are moving people AWAY from, and a
newer interface.

I see no reason to change from the path at which
upstream has arrived: OSS is a legacy API that's frozen
in time, and ALSA provides the new stuff.

While I agree that ALSA is better than OSS... I don't actually think
ALSA kernel<>user api is... at least for my purposes. I'm still using
OSS emulation, because I could not get alsa proper to work... and the
advanced stuff just does not work in emulation.

In OSS days, if you wanted to test kernel sound driver, you did:

mknod /dev/dsp
cat /bin/bash > /dev/dsp.

With alsa+oss emulation, you need

mknod /dev/mixer
install aumix
aumix
mknod /dev/dsp
cat /bin/bash > /dev/dsp.

With alsa proper, it is

install alsalib
create about 5 device nodes
install alsautils
maybe do some config?
aplay some.wav

..provided you have .wav near you. I'm not sure if it is possible to
produce sounds using normal shell scripting? (w/o alsautils)?

I can even test kernel graphics drivers by cat /bin/bash > /dev/fb0...
it would be nice to have equivalent for audio... OSS API seems to be
the equivalent these days, but please don't deprecate it.

Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
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/



Relevant Pages

  • Re: [2.6 patch] schedule obsolete OSS drivers for removal
    ... > recommend to use ALSA API directly with apps. ... At the same time the kernel API itself should be suitable to ... > I, at least, have never thought that the OSS _API_ would die. ...
    (Linux-Kernel)
  • Re: [2.6 patch] schedule obsolete OSS drivers for removal
    ... Should a crippled OSS API be the way forward for Linux? ... ALSA API forces not use devices files and many things on sound managing ...
    (Linux-Kernel)
  • Re: [OT] ALSA userspace API complexity
    ... Jaroslav Kysela ha scritto: ... >>API, if kinky and verbose. ... And who is going to pay my medical bills when ALSA ... We can add a simple (like OSS) API layer ...
    (Linux-Kernel)
  • Re: Is it time for remove (crap) ALSA from kernel tree ?
    ... mixing by default for some time now so we're talking history anyway. ... I've been following this discussion with some interest, to learn more about ALSA. ... This would seem to indicate that your alsaplayer is setup to output to OSS and not to ALSA... ... It does so in two different ways in fact -- the first one is a direct kernel space emulation where ALSA interprets accesses to those device nodes it then manages much like real OSS would do. ...
    (Linux-Kernel)
  • Re: [2.6 patch] schedule obsolete OSS drivers for removal
    ... >> I never ever did ask for any support on behalf of the ALSA bunch... ... > isolating the apps from the hardware as much as practically possible). ... recommend to use ALSA API directly with apps. ... I, at least, have never thought that the OSS _API_ would die. ...
    (Linux-Kernel)