Does Alsa Really Suck This Much?

After a frustrating period trying to get reasonable sound output with SDL and alsa (for reference, I have an nforce4 sound chip - it uses snd_intel8x0), I decided I'd check out the nforce binary audio drivers. These are OSS and still don't support hardware mixing, but I just want to be able to play Quake and zsnes with decent sound output... Is that really so much to ask?

Anyway, after a surprisingly pleasant installer, a lot of messing about in aptitude and a bit of configuration in /etc/modprobe.d, I was ready to go with OSS sound. First thing I notice? Sound quality is HUGELY improved. This isn't just a slight improvement, this is like I'm playing it on my dedicated mp3 player instead of my crappy on-board sound chip. Another thing I notice, I can turn the volume to 100% and it still sounds great (and loud). If anything it sounds louder than the alsa driver went, and it *doesn't clip the sound* - If I turn the volume above 64% on the alsa driver, it sounds terrible...

Unfortunately, it would appear that since dmix came along and made alsa vaguely usable, everyone seems to have abandoned OSS/esd support... gstreamer 0.10 seems to have problems after playing a single stream with OSS and esd using OSS (I quite enjoy listening to more than one song when I open Rhythmbox...) and totem-gstreamer video playback is incredibly choppy using the esdsink (but fine with osssink). This didn't use to work that badly not so long ago, what happened?

Maybe I'm not blaming the right components (is it the kernel's fault? Ubuntu's fault? Gstreamer's fault? ESD's fault? All of the above?), but this really isn't good... Both OSS and Alsa used to work a year or two ago, perfectly (or as perfectly as either could manage) - why isn't this the case anymore? I urged a friend to test this (he has an nforce2 sound chip) and he confirmed the superior sound quality but incredibly buggy nature of applications too (he runs KDE also, perhaps this says something?)

Can anyone help me out with this? Now I've heard how much better the sound is using OSS, there's no way I can turn back - but my sound system is completely crippled. I'd like to know either A- How to get things to play nicely with OSS and ESD, or B- How to make Alsa not sound crap. This is almost enough for me to consider buying a new sound-card, so can anyone recommend a sound-card that has hardware-mixing support and equivalent-to-OSS sound quality under Alsa?

seringen says:

the nforce2 chipset has historically been a pain in the rear due to closed source drivers, faulty impelmentations and lack of specs. 

A creative audigy of some sort or another, or if you want to be an audiophile a card from m-audio or something of the sort will do just fine under linux.  Alsa really is the place to be these days.

HTH

Julian Turner says:

If you're looking for a budget card with decent ALSA support and hardware mixing, consider the SoundBlaster Live! series.

Chris Lord says:

I have a SoundBlaster Live 5.1 in another machine and the sound quality discrepancy between alsa and oss exists there too - so I guess that card is out of the question.

Also, looking at m-audio cards at http://www.alsa-project.org/alsa-doc/index.php?vendor=vendor-MAudio#matrix, apparently none of them have hardware-mixing support - so that's also out...

As for alsa being the place to be... I really really urge you to try oss and see the difference in sound quality - It's ridiculous :( Of course I want to be using alsa, seeing as oss support is thin on the ground these days, but I also want my sound not to suck :/

Rudd-O says:

Oh, well, my experience with Sound Blaster Live! has been mixed.

This I can tell you: it sounds good enough.  I'm probably used to the internal resampling that the card does, so I'd advise you to get a card that does not do the resampling or uses advanced algorithms.  Hiss levels are remarkably low, compared to onboard alternatives.

On the other hand... ummm, I've had trouble recording audio with MythTV (crackly and poppy audio is what I can manage) so for that I use the Crystal embedded in my motherboard.

Finally: if you keep the Wave (not the PCM) volume up, up, up, you get distortion/clipping (above 80%).  Furthermore, if you turn up the bass (and I suspect doing this with the treble control as well), it also clips (unless you reduce the Wave).  For the bass levels I crave, I keep Wave at 63%, Master at 100% and PCM at 100% as well.  I'm sure I'm losing a bit of dynamic range, but, eh, with a pair of hi-fi speakers equipped with twelve-inch subs... who the hell cares, right?

CameronH says:

ALSA is a much better system than OSS, it still needs some fine tuning though - particularly in the drivers.

I have an Audigy2, and the biggest problem is the strange state the mixer is in and actually figuring out how to use it to get recordings and such. Also the multichannel stuff can be a little odd to get your head around.

Audio quality and mixing is perfect (it supports hw mixing so no dmix involved). Also, after a bit of effort learning, it would seem I can do things in alsamixer I can't do in Windows, but it should still be a little easier to use at first.

Anonymous says:

The biggest problem with ALSA is that configuring it is beyond any mere mortal. If your stuff doesn't work out-of-the-box with ALSA, you have zero chance of getting it working yourself. Just try to get the optical output on that nforce4 to work and you'll see.

Jan Schmidt says:

"gstreamer 0.10 seems to have problems after playing a single stream with OSS and esd using OSS"

It's working here, using osssink to talk to the oss emulation in ALSA.

Feel like filing a bug report with some GStreamer debug output? Something like:

GST_DEBUG=*sink:5 rhythmbox > gst.log 2>&1

and send us gst.log

Mark Brown says:

Have you reported the sound quality difference to the ALSA developers or your distribution vendor? It sounds like something's terribly wrong there...

Alexander Boström says:

If you're getting noise in ALSA but not in OSS, it could be differences in mixer settings. I got some really bad noise from one of the inputs on my card. I think it was the CD input, but I'm not sure. I turned that down to minimum and muted it, and it helped. Make sure you show all mixers in the mixer app (or use alsamixer) and turn down to minimum and mute everything you don't need to enable. That might help.

Yeah, I know ALSA defaults to everything muted, but still... This has happened to me, prolly because I unmuted stuff I dodn't need while fiddling about with these really confusing ALSA mixer settings.

Chris Lord says:

Jan - I'll try that, thanks

Mark - I haven't, no - I guess I figured given that this has been a problem ever since I used Linux that people would just know... But that's probably a good idea.

Just to clarify, this sound quality difference isn't noise or the clipping at high volumes - it's almost as if all my sound is being down-sampled to 22Khz, then up-sampled back to 48Khz or something - high and low frequencies lose a lot of definition and my music sounds less 'spatial'... It's a quality difference, the actual sound is being degraded, rather than just having noise added. Imagine playing all your sound through bad speakers with no treble/bass response - that's what alsa's doing to my sound :(

LionsPhil says:

Heh, Linux multimedia in “is rubbish” shocker. I still can't get any kind of reliable audio playback when my machine is under any kind of vague load, even with renicing---dropouts ahoy!

Naresh V says:

Hi,
I really haven't confirmed this with the others but here it goes:-
With my setup (gentoo, amd64, some LDFLAGS), gstreamer kind of sucks compared to media players that sort of directly talk to the alsa-driver - like audacious, or mpd. I was a rhythmbox user for a long-time (got to love the Bonjour LAN-sharing thing) but once I gave mpd another shot (given that it can play radio-streams) I'm very happy with it.

Here's a plugin for pidgin for song-notifications that works for most gnome media-players out there:

code.google.com/p/musictracker/

Any comments?