Is it time for remove (crap) ALSA from kernel tree ?
Quoted 10 lines
Quoted 4 lines
The track record of ALSA for me goes like this:
- dmix finally started working automatically (at least on my Kubuntu system) about one year ago, about five years after everybody could see that this was badly needed.I don't remember when it happened, but I do remember that I suddenly had to manually disable dmix to stop it messing around with my sound. I don't need it, and I certainly don't like libraries doing random IPC behind my back.
I don't like random applications blocking my sound card.
Joe user wants to play sound, and he couldn't care less about "random IPC" or what-fucking-ever.
Dmix using the low quality sampling rate converter by default was another bad decision.
You are concerned about your precious audio quality? Me too. Most people, however, are using god-awful plastic speakers for twenty euros and shitty onboard sound chips. Sad but true.
Quoted 8 lines
Quoted 5 lines
- Different desktop environments have different sound daemons to paper over the weaknesses of ALSA (no dmix by default / unfriendly API), which creates new problems. Yes there are other reasons for sound daemons, but I doubt anybody would have come up with the idea if it wasn't for ALSA.
Those sound daemons were around long before ALSA was even conceived.
ALSA appeared in 1999, KDE 2 with aRtsd (another catastrophic failure of technology) was released in october 2000.
Linux 2.6.0 seems to have appeared in 2003, so you are right for realistic values of "being around".
Quoted 3 lines
That sounds like a minor glitch that should be easily remedied if you file a proper bug report. Have you tried?
No, I kinda gave up on ALSA after reading its API (rather "functions that happen to be exported") documentation and kinda hoped it would go away ASAP.
[long rant on ALSA's developer "friendliness"]
If you want to see an example try this one:
http://www.alsa-project.org/alsa-doc/alsa-lib/hcontrol.html
or this one
http://www.alsa-project.org/alsa-doc/alsa-lib/group___h_control.html#g881a1bbb1e95b7bcadc5c2a88124c3d1
and now program against it! Having fun already?
Observe how "HCTL"s seem to be used everywhere, and the documentation is "typedef struct _snd_hctl_elem snd_hctl_elem_t : HCTL element handle". Wow.
the struct looks like this:
struct _snd_hctl_elem {
snd_ctl_elem_id_t id; /* must be always on top */
struct list_head list; /* links for list of all helems */
int compare_weight; /* compare weight (reversed) */
/* event callback */
snd_hctl_elem_callback_t callback;
void *callback_private;
/* links */
snd_hctl_t *hctl; /* associated handle */
};Notice how compare_weight should probably be called comparison_weight or priority, or relative_priority, or rel_priority or (...). The comment is worse than no comment. The author couldn't be bothered to use a dictionary? I think he wanted to tell us whether higher priorities have higher or lower numbers, but I still don't know which.callback_private should be callback_opaque. The construct has always been called opaque pointer. If it was private it wasn't in this struct. What about "must be always on top"??? Is it trying to tell us that you should not randomize the struct layout?
Bonus points for using abbrvns ("helems") in cmts, thy r mch mr nformtv tht wy.
There are two other structs of the same quality in the same header file alsa-lib/control/control_local.h.
(control_local? As opposed to... remote? With a different interface or what? It doesn't make any sense.)
This mess probably couldn't have survived a real review by the kernel community.
For comparison, a comment taken from KDE's Phonon, copyright Matthias Kretz:
/**
* This signal is emitted whenever the volume has changed. As the
* volume can change without a call to setVolume (calls over dbus)
* this is important
* to keep a widget showing the current volume up to date.
*/
void volumeChanged(qreal newVolume);
Spot the difference?
Kernel or user space, again:
Put everything in kernel OR userspace but not both. Either is OK, but the arguably more "modern" approach is userspace for error resilience and easy hacking (i.e. more features faster). Latency is an issue? - Well you can't play sound without userspace creating it so you're not adding any new problems.
Kernel only would have the advantage of being able to present "everything as a file" which is a good tradition. And no IPC.
ALSA took the disadvantages of both approaches and added the disadvantage of having to get two chunks of code to get it working. It takes a twisted mind to have two obvious right options and pick the third, obscure, and wrong option. So sampling rate conversion is hard ("too dangerous for the kernel"), boo hoo. It sure isn't more difficult to get right than a filesystem. Deal with it.
History of ALSA:
I examined the lkml archive 1999 to 2002 a bit. There was much talk about using all the DSP, bass boost, and other sundry hardware capabilities of cards just appearing at the time. The focus was on adding support for everything which
a) didn't happen (DSPs almost never get used to their full potential, I think)
b) somehow became uninteresting over the years. I don't want to "enhance" my sound with cheap DSP effects, I'll take a good stereo, thank you very much.
c) is only relevant for games because you don't want to use any effect off your card in professional audio applications
d) is plain stupid if you don't know what exactly you are going to need beforehand.
Sorry for the long rant - I've regularly gotten worked up about ALSA in the last few years whenever I got in touch with it. Mostly as a user and once as a potential client developer, but I was disgusted and turned away.
Quoted 8 lines
Quoted 5 lines
- On my IBM/Lenovo R50e notebook with Intel chipset sound didn't work before I "muted" the "headphone jack sense" control in alsamixer. That took two hours or so. When both the master volume and the PCM volume control are set to 100% I get really bad clipping problems.
Shoddy hardware. Don't blame the drivers for that.
Random quote from the internet: "It all sounds perfectly reasonable until you have to explain to your granny why her PC sounded like shit over the last couple of months."
This can be fixed in the driver. It's called a quirk.
Quoted 3 lines
Yes, API and configuration file syntax aside, the ALSA developers are always friendly and responsive.
Yes. It just seems like nobody feels in charge to revisit the big picture issues where things really went wrong.
The last signals from Jaroslav Kysela I found on the net look like he is convinced of having created a great architecture, especially for professional audio applications(*). He is employed by Novell like Takashi, apparently, which won't make Takashi feel too adventurous, right? My guess is that Jaroslav is (officially or not) assigned to everything but drivers, and he is just not doing anything ALSA at all.
Meanwhile, ALSA continues to be crap and annoy people.
(*) ALSA is not lacking in raw capability, to be sure.
Quoted 7 lines
Quoted 3 lines
(*) I am not representing KDE in an official way at all, but I can say that KDE developers generally put *much* effort into making APIs as logical and friendly as they possibly can.
I've still not, after all these years, managed to figure out what KDE (or Gnome) is supposed to be good for. I'm not missing anything from my window manager, xterm and xemacs setup.
Maybe you could try a recent KDE or show me the command-line equivalents of Amarok or KPDF or Gwenview :)
Quoted 1 line · Andreas Hartmetz
I don't like random applications blocking my sound card.
So don't use random applications.
Quoted 1 line
You are concerned about your precious audio quality? Me too. Most people, however, are using god-awful plastic speakers for twenty euros and shitty onboard sound chips. Sad but true.
Exactly, which is why mixing has been default for some time now for most cards. Are you only ranting about how it should've been earlier?
Quoted 1 line
ALSA appeared in 1999, KDE 2 with aRtsd (another catastrophic failure of technology) was released in october 2000.
http://www.arts-project.org/gen/newsarchive/news_1998.html
Quoted 4 lines
Quoted 3 lines
That sounds like a minor glitch that should be easily remedied if you file a proper bug report. Have you tried?
No, I kinda gave up on ALSA after reading its API (rather "functions that happen to be exported") documentation and kinda hoped it would go away ASAP.
You give up reporting small hardware problems that bother you because the application developer documentation for something is not in great shape? What an odd thing to do. And what a shame that this thread apparently was unable to outlive it's originator troll and turn useful...
[ ... ]
Quoted 1 line
hacking (i.e. more features faster). Latency is an issue? - Well you can't play sound without userspace creating it so you're not adding any new problems.
Capture.
Rene.
Quoted 4 lines
Quoted 1 line
I don't like random applications blocking my sound card.
So don't use random applications.
I imitated the style of the mail I replied to. Besides, choosing apps based on sound system is retarded if you wanted to indicate that this should be done more often or something.
Quoted 7 lines
Quoted 3 lines
You are concerned about your precious audio quality? Me too. Most people, however, are using god-awful plastic speakers for twenty euros and shitty onboard sound chips. Sad but true.
Exactly, which is why mixing has been default for some time now for most cards. Are you only ranting about how it should've been earlier?
Exactly! And the config file is hostile if you want to change it.
Quoted 5 lines
Quoted 2 lines
ALSA appeared in 1999, KDE 2 with aRtsd (another catastrophic failure of technology) was released in october 2000.
KDE 2 *was* released in 2000. Why would you care, I already admitted that sound daemons were there before ALSA.
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
That sounds like a minor glitch that should be easily remedied if you file a proper bug report. Have you tried?
No, I kinda gave up on ALSA after reading its API (rather "functions that happen to be exported") documentation and kinda hoped it would go away ASAP.
You give up reporting small hardware problems that bother you because the application developer documentation for something is not in great shape?
Yep, because I was frustrated with the whole thing. Having huge bad APIs with no documentation is telling your fellow developers to piss off and do something else. I did.
It's not like a little oversight to be quickly forgotten. ALSA has been there for at least *five years* without documentation for most parts.
Quoted 6 lines
Quoted 3 lines
hacking (i.e. more features faster). Latency is an issue? - Well you can't play sound without userspace creating it so you're not adding any new problems.
Capture.
If you are not doing DMA from the sound card to kernel memory and then directly to disk blocks, you are using user space apps period. So what's different with capture?
Quoted 1 line
Rene.
Quoted 7 lines · Andreas Hartmetz
Quoted 4 lines
Quoted 1 line
I don't like random applications blocking my sound card.
So don't use random applications.
I imitated the style of the mail I replied to. Besides, choosing apps based on sound system is retarded if you wanted to indicate that this should be done more often or something.
What I indicated was that if someone wants to use multiple applications that work together bringing you The One Integrated Sound Experience it might make sense to use applications... that work together. Don't go blame ALSA for either the fact that aRTs isn't actually useful nor KDE's decision to stick with it for way too long. See -- the problem is again not ALSA (or OSS for that matter) but userspace not getting its act together.
KDE has finally dropped aRts from KDE4 and, again, ALSA has been mixing by default for some time now so we're talking history anyway. You want mixing on your card? You got it.
Many don't -- they might not care about desktop sounds period and/or they might use a clumsy chip/card for that and use a nice one for music without any need for mixing on it (such as I do). Admittedly, mixing Abba's Dancing Queen with Slayer's Angel of Death is great fun for quite a while but at some point you do actually grow weary of it...
Quoted 1 line
Exactly! And the config file is hostile if you want to change it.
It could be a bit nicer yes. Since software mixing is enabled by default now no configuration is generally needed though and it seems not a particularly huge priority. Now that it's an advanced feature, maybe the flexibility pays off in fact -- not sure, I don't use any configuration myself other than for some testing and playing around every once in a while.
Quoted 2 lines
KDE 2 *was* released in 2000. Why would you care, I already admitted that sound daemons were there before ALSA.
Because blaming ALSA for bad decisions made by others seems a little off and you did exactly that a few messages back. Not nice!
Quoted 6 lines
Quoted 2 lines
You give up reporting small hardware problems that bother you because the application developer documentation for something is not in great shape?
Yep, because I was frustrated with the whole thing. Having huge bad APIs with no documentation is telling your fellow developers to piss off and do something else. I did.
You weren't having a developer problem but a user problem. Your problem was not with the API documentation but with what would appear to be a simple glitch in one particular driver. Mixing that in with a "ALSA sucks because its documentation isn't upto par" is a little disingenious.
Sure the (library) documentation blows donkeys. So wat else's is new in the land of Linux? I recently did a block-ish driver. Documentation? Whahahaha!
So that leaves that "bad" that you prefixed API with but keep in mind that ALSA is designed as an audio system suitable for advanced/professional use while also still filling the needs of consumer users and that it does in fact do so is obvious from the fact that everyone's using it. A complex API is the downside of flexibility. Perhaps it would've been better if alsa-lib had also made a very simple API available to non-demanding users from the start but other software can do that as well.
For my current purposes libao does, but I hope in the future something like Phonon does. The ideal situation is that anyone in userspace is using a single API _such_ as Phonon since userspace has to synchronise things itself as well -- it might for example want to provide you with the option to automatically mute your music when you get an incoming call and this is not something which alsa-lib can do by itself.
If it looks like I'm shifting blame -- you bet I am. It's userspace which has for years failed to get its multimedia act together, with KDE and GNOME going out of their way to pick other infrastructure than the other one. The kernel is not a guilty party and improvements should be sought where the problems lie.
As said earlier, KDE4 might just be such an improvement. Personally I'm hoping I'll even manage to start running it this time because damnit, I miss solitaire...
Quoted 7 lines
Quoted 6 lines
Quoted 3 lines
hacking (i.e. more features faster). Latency is an issue? - Well you can't play sound without userspace creating it so you're not adding any new problems.
Capture.
If you are not doing DMA from the sound card to kernel memory and then directly to disk blocks, you are using user space apps period. So what's different with capture?
The latency in this case is defined as the time between data arriving at the machine from the outside and it being available for further processing by an application. Think looping stuff out again in realtime after doing something to it to see why you want it to be low. If you'll grant that all those users who were dissatisfied with early 2.6 weren't just blowing smoke, I assume you'll grant that latency matters and that putting it all in userspace is not an obvious step in minimising it -- even interrupt latency matters.
Note also it's certainly not (just) PCM but also very much MIDI. A musician hitting a key on a keyboard needs to hear the sound he's making, processed, recorded, stretched, whatever the computer does to it, with _very_ minimal latency. Yes, this means that the userspace application(s) have to be fast themselves but if they aren't getting their data delivered to them in time to begin with they're SOL. Perhaps it's possible to get okay results with a top-priority, realtime scheduled full stack in userspace which bangs I/O ports and does all those pesky driver thingies but why do we have a kernel again?
As to going the other way and putting it _all_ in the kernel; why? Why would you care about the split from an API standpoint? The alsa-lib API is the API, period. At which point it crosses over into the kernel is something an application gets to see as an implementation detail. Rejoice -- you now don't have to worry about floating point for example in the context of resampling and/or soft-volume, or ...
Rene.
Quoted 1 line · Rene Herman
KDE has finally dropped aRts from KDE4 and, again, ALSA has been mixing by default for some time now so we're talking history anyway. You want mixing on your card? You got it.
I've been following this discussion with some interest, to learn more about ALSA. I've been creating startup scripts for all of my sound-using applications which look like this:
LD_PRELOAD=libaoss.so exec /usr/bin/alsaplayer "$*"
I found that without libaoss.so preloaded, I wasn't getting software mixing at all. I'm constantly running an MP3 player, and with that library I can get sound alerts from other apps too.
I don't understand exactly what you mean by ALSA mixing by default. I have the OSS Mixer API selected during kernel compiles. Is that what you are referring to?
Thanks,
Patrick
On 06/28/2007 02:18 AM, Patrick Draper wrote:
Please always use Reply-to-All on this list -- subscribers here like to also get personal copies.
Quoted 8 lines
Quoted 1 line · Rene Herman
KDE has finally dropped aRts from KDE4 and, again, ALSA has been mixing by default for some time now so we're talking history anyway. You want mixing on your card? You got it.
I've been following this discussion with some interest, to learn more about ALSA. I've been creating startup scripts for all of my sound-using applications which look like this:
LD_PRELOAD=libaoss.so exec
/usr/bin/alsaplayer"$*"I found that without libaoss.so preloaded, I wasn't getting software mixing at all.
This would seem to indicate that your alsaplayer (what's in a name) is setup to output to OSS and not to ALSA...
The OSS interface -- consisting of direct access to device nodes such as /dev/dsp0, /dev/mixer and /dev/music -- is an older interface for sound on Linux. The newer ALSA interface works via a library API and is best used natively. For backwards compatibility though, ALSA also provides emulation of the older OSS interface.
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. This kernel space emulation is made available through the "OSS PCM/Mixer/Sequencer API" you see as options in the ALSA kernel configuration menu.
The other way is a userspace emulation through the libaoss.so library that you are using. That library catches accesses to the OSS device nodes in userspace and translates them to ALSA accesses before they even get to the kernel.
ALSA does software mixing (the act of mixing two seperate streams together to form one) in userspace and as such, the kernelspace OSS emulation does not support software mixing, while this userspace emulation does -- if your ALSA default device is setup for software mixing (it is by default these days) this also works for this libaoss route. If you run a OSS program without the library preload it's using the kernel emulation though.
So -- the fact that mixing actually works for you when using libaoss means software mixing is working correctly for your ALSA setup. The only thing you should do is _use_ ALSA (natively) and not its OSS emulation so you can drop the library preload.
I don't have alsaplayer installed (wasn't that thing dead?) so I can't walk you through its configuration easily, but I suppose you'll be able to figure it out. If you need to specify an ALSA device somewhere, make sure it's not the old "hw:0" but "default" (or "default:0" for the first card, "default:1" for the second, ...). The "hw:N" devices don't do mixing.
Quoted 2 lines
I'm constantly running an MP3 player, and with that library I can get sound alerts from other apps too.
I myself mostly use the ogg123 and mpg321 command line players, both based on libao and thereby only a simple:
$ echo "default_driver=alsa09" >/etc/libao.conf
away from being native ALSA players.
Quoted 2 lines
I don't understand exactly what you mean by ALSA mixing by default. I have the OSS Mixer API selected during kernel compiles. Is that what you are referring to?
No. That's part of the kernel space OSS emulation. A "mixer" in that context is the part of a soundcard that controls volumes and may mix the output of several parts of the card/chip for playback and its inputs for capture. Ie, that which is controlled by a mixer application such as the (ncurses) ALSA reference mixer "alsamixer" or the mixer your desktop environment provides.
Once you have everything running as a native ALSA application you could disable that option. In fact, since you're using the userspace emulation, you could already. The new-ish Flash Player 9 (important for youtube these days) for Linux is also an ALSA application and since I use it, I myself haven't needed OSS emulation for anything anymore.
Rene.
Quoted 3 lines · Rene Herman
to figure it out. If you need to specify an ALSA device somewhere, make sure it's not the old "hw:0" but "default" (or "default:0" for the first card, "default:1" for the second, ...). The "hw:N" devices don't do
mixing.
Slight correction/expansion -- don't do _software_ mixing. Some cards can do hardware mixing and in that case, "hw:N" or, specifically "hw:N,0", "hw:N,1" and so on devices are available as hardware mixed devices.
Try a cat /proc/asound/card0/pcm0p/info and check the "subdevices_count" for the number of hardware mixed playback devices you have available. If it's 1, your card should've been configured (by ALSA itself) to use software mixing by default and if it's higher than 1, it should not have been and will use hardware mixing...
Rene.
Quoted 8 lines · Rene Herman
Quoted 4 lines · Rene Herman
to figure it out. If you need to specify an ALSA device somewhere, make sure it's not the old "hw:0" but "default" (or "default:0" for the first card, "default:1" for the second, ...). The "hw:N" devices don't do mixing.
Slight correction/expansion -- don't do _software_ mixing. Some cards can do hardware mixing and in that case, "hw:N" or, specifically "hw:N,0", "hw:N,1" and so on devices are available as hardware mixed devices.
Correcting the correction (sorry, it was late) -- "hw:N" is card N, "hw:N,M" is PCM interface M of card N and "hw:N,M,K" is (hardware mixed) subdevice K on PCM interface M of card N. Normal cards have only one PCM interface meaning that M is 0 in the above.
That is, I meant that "hw:N,0,0", "hw:N,0,1" and so on are the hardware mixed devices.
Rene.
Quoted 1 line · Rene Herman
So -- the fact that mixing actually works for you when using libaoss means software mixing is working correctly for your ALSA setup. The only thing you should do is _use_ ALSA (natively) and not its OSS emulation so you can drop the library preload.
Cool. How do I go about figuring out what every app uses? For example, you mentioned that the flash 9 plugin, which I also use, is an ALSA aware application. How do you know? I need the check out everything that I use which needs sound (vmware, skype, kmplayer, etc.) I don't have source code for at least two of those.
Thanks,
Patrick
Quoted 11 lines · Patrick Draper
Quoted 4 lines · Rene Herman
So -- the fact that mixing actually works for you when using libaoss means software mixing is working correctly for your ALSA setup. The only thing you should do is _use_ ALSA (natively) and not its OSS emulation so you can drop the library preload.
Cool. How do I go about figuring out what every app uses? For example, you mentioned that the flash 9 plugin, which I also use, is an ALSA aware application. How do you know? I need the check out everything that I use which needs sound (vmware, skype, kmplayer, etc.) I don't have source code for at least two of those.
Go into the sound preferences menu of the app and check which device it uses. If it's something like /dev/dsp or /dev/audio it's using OSS. If it looks like "default" or "hw:0" it's ALSA.
If your app does not have any sound preferences menu it's broken and you should file a bug report.
You can determine whether an app with no configurable sound device is using ALSA by running "strace broken_app" and grep the output for "/dev/dsp" or "/dev/audio".
Lee
Quoted 11 lines · Patrick Draper
Quoted 4 lines · Rene Herman
So -- the fact that mixing actually works for you when using libaoss means software mixing is working correctly for your ALSA setup. The only thing you should do is _use_ ALSA (natively) and not its OSS emulation so you can drop the library preload.
Cool. How do I go about figuring out what every app uses? For example, you mentioned that the flash 9 plugin, which I also use, is an ALSA aware application. How do you know? I need the check out everything that I use which needs sound (vmware, skype, kmplayer, etc.) I don't have source code for at least two of those.
run ldd on the binary...
Quoted 4 lines · Patrick Draper
Quoted 1 line · Rene Herman
So -- the fact that mixing actually works for you when using libaoss means software mixing is working correctly for your ALSA setup. The only thing you should do is _use_ ALSA (natively) and not its OSS emulation so you can drop the library preload.
Cool. How do I go about figuring out what every app uses? For example, you mentioned that the flash 9 plugin, which I also use, is an ALSA aware application. How do you know? I need the check out everything that I use which needs sound (vmware, skype, kmplayer, etc.) I don't have source code for at least two of those.
If can I join .. (again)
After upgrade to skype 1.4.x all sound output in skype I have only in left channel. Serching for skype+left+channel on google shows many people have this kind problem :> ALSA does not privide application mixer settings on application level. Some messages on skype forums suggests some workarouds in ~/.asoudrc but where is documentation for this part ? Anywhere are described ALSA diagnostics procedures/technics ?
kloczek
Signature · 4 lines
----------------------------------------------------------- *Ludzie nie mają problemów, tylko sobie sami je stwarzają* ----------------------------------------------------------- Tomasz Kłoczko, sys adm @zie.pg.gda.pl|*e-mail: [email protected]*
Quoted 12 lines · Tomasz Kłoczko
Quoted 6 lines · Patrick Draper
Quoted 2 lines · Rene Herman
So -- the fact that mixing actually works for you when using libaoss means software mixing is working correctly for your ALSA setup. The only thing you should do is _use_ ALSA (natively) and not its OSS emulation so you can drop the library preload.
Cool. How do I go about figuring out what every app uses? For example, you mentioned that the flash 9 plugin, which I also use, is an ALSA aware application. How do you know? I need the check out everything that I use which needs sound (vmware, skype, kmplayer, etc.) I don't have source code for at least two of those.
If can I join .. (again)
Heh =)
Quoted 2 lines
ALSA does not privide application mixer settings on application level. Some messages on skype forums suggests some workarouds in ~/.asoudrc but where is documentation for this part ?
You may want to read this one:
http://www.alsa-project.org/alsa-doc/doc-php/asoundrc.php
Quoted 4 lines
Anywhere are described ALSA diagnostics procedures/technics ?
kloczek
Gabriel C
Quoted 1 line · Tomasz Kłoczko
If can I join .. (again)
Welcome...
Quoted 1 line
After upgrade to skype 1.4.x all sound output in skype I have only in left channel. Serching for skype+left+channel on google shows many people have this kind problem :>
This would seem to be a (fairly, it's no doubt just outputting mono) skype specific problem and given that skype is a proprietary closed source application, you now get to go suck on a Skype support engineer! Hurrah!
Or this might be helpful:
http://forum.skype.com/lofiversion/index.php/t85880.html
No, no idea why skype would require you to do this yourself. Maybe you should ask them. This is now _really_ no longer a kernel issue though.
Rene.
Quoted 5 lines · Patrick Draper
Quoted 1 line · Rene Herman
So -- the fact that mixing actually works for you when using libaoss means software mixing is working correctly for your ALSA setup. The only thing you should do is _use_ ALSA (natively) and not its OSS emulation so you can drop the library preload.
Cool. How do I go about figuring out what every app uses? For example, you mentioned that the flash 9 plugin, which I also use, is an ALSA aware application. How do you know?
Various methods. If all's well, the application has a config menu where you can look at and change the settings.
Or, running ldd on the binary to see if it's linked to libasound, "grep /proc/<pid>/maps libasound" (also catches dlopen), "strace" or usually easiest and what I tended to do -- "lsmod" to see if starting the app triggered the automatic loading of snd-pcm-oss and snd-mixer-oss which I don't normally have loaded.
This is the "[things are still not great] partly _due_ to people maintaining OSS is somehow a valid choice on Linux" that I stated early in this thread. I actually believe the kernel space OSS emulation has been fairly counter productive -- it's allowed applications to stay with an obsolete interface since the users didn't even have to _know_ due to it all just working. At least with the userspace emulation, people know they are using an OSS emulation if they are starting the application with an library preload.
The kernel space emulation is a bit more bullet-proof in the sense that the userspace emulation would not for example help with applications that use direct syscalls to open device nodes and I guess that was important.
When OSS/Free was replaced with ALSA inside the Linux kernel this was a big change in an area most users use and any such change inevitably opens up big cans of change resistant wankers who understand the old interface and have no need for the new one and will tell you that you did it all wrong, it was all for nothing and you suck period. They'll keep it up for years and years generally. The kernel-space OSS emulation _does_ mostly just work, which is the kind of thing that you need in this environment to be allowed to tell these people to go sexually entertain themselves.
Perhaps it's now finally coming to the time where the kernel space emulation can be deprecated and eventually removed. Or not...
Quoted 3 lines
I need the check out everything that I use which needs sound (vmware, skype, kmplayer, etc.) I don't have source code for at least two of those.
I don't know if vmware by now supports native ALSA but it didn't use to. The current version of skype (1.4, still called a beta it seems) does.
kmplayer seems to be a frontend for various mediaplayer solutions. Don't you just love that mess? Its backends include MPlayer and Xine, and both these can talk native ALSA fine at least. For mplayer, use a "ao=alsa" line in the .mplayer/config file (or just start it with -ao alsa) and for xine, look in its setup menu (audio tab, having set the interface level to beter than "beginner").
Rene.