State of Sound Development On Linux Not So Sorry After All
An anonymous reader writes "There have been past claims by Adobe and others that development on Linux is a jungle, particularly with regards to audio. However today, the author of the popular 'The Sorry State of Sound in Linux' has posted a follow up showing Adobe's claims to be FUD, as well as being a good update on where OSS and ALSA are holding today, and why PulseAudio isn't a good idea."
modprobe
Invaders must die
If Pulse Audio really sucks, then Linux Audio really is in a sorry state .
I commend you for at least customizing your troll to the story. So few bother these days.
Sound development on Linux has a lot more easy interface than an undocumented kernel and driver system. End-users have had the greatest choice of sound systems as being either 4Front Open Sound System, Advanced Linux Sound Architecture, or perhaps a specific driver provided in-house from the vendor. ALSA has given Linux-based operating systems a greater edge over of ther *nix flavors if not even just Microsoft's selection. Even the *BSD's, specifically freeBSD, have been aiming their binary compatibility towards Linux thus proving it is leading the development tree rooted in commercial Unix.
Give me the Blue Pill. I don't want to hear anymore about SkyOS or MorphOS...
Pulseaudio sucks so bad I can't use it with the player of MY choice to watch movies.
I'd go on a Vegan diet but the delivery time from Vega is too long. --brownkitty
When I no longer have to reboot into OS X to do real multimedia production work, then I'll agree that alsa has arrived. But this self-congratulation party is way premature. Linux has nothing that can even begin to rival GarageBand, what to speak of Logic Pro or Pro Tools. I surely wish it were otherwise. In fact, I just got done spending hours fooling with the Pro Audio overlay for Gentoo, and couldn't even get Hydrogen to play nice with or without jackd. Yes, my soundcard is listed as "supported".
Caveat Utilitor
Linux has no reason for such a core feature to be so lacking, let alone for a feature to get *worse* in time.
Really, it is.
It can be a pain in the ass to get working still, and is buggy.
I'm sure it works well for some, but many others still have problems.
In theory pulseaudio is great. In practice, it sucks. Nevermind, it sucks in theory too :(
Giving a troll any sort of encouragement makes me a bit nervous but I agree. Something akin to movies - why write good dialogue when it it so much easier to blow something up?
"The man who fears no truths has nothing to fear from lies." --Sir Francis Bacon
Yes, Linux audio sucks. If nothing else, we have three common and incompatible APIs to perform a single tasks, and none of them are definitively better than the others. So, my question: what exactly is it that we're trying to achieve? What's the end goal of creating newer APIs instead of perfecting the old ones, such as moving from OSS to ALSA to whatever they roll out this month?
For comparison, FreeBSD uses multi-channel OSS. You can have a whole passel of processes writing to /dev/dsp simultaneously, because whenever a process attempts to open it, the OS spawns off a new copy. It Just Works. I'm a little amazed that my FreeBSD server's sound handling is so much better than my Linux desktop's and requires approximate zero client configuration. So again, what was Linux hoping to achieve by dropping old "obsolete" OSS in favor of increasingly complex solutions?
Dewey, what part of this looks like authorities should be involved?
And that is that ALSA's way of handling mixing is completely moronic.
As an user, I care about hearing sound first of all. Sound quality (no pops or crackles) comes second, latency comes third.
There should always be sound mixing, with no ifs, buts, exceptions, or configuration required. It should be there by default for anything that tries to play sound, whether through ALSA or the OSS backwards compatibility.
The result of this nonsense is that crap like pulseaudio continues to exist, which is CPU hungry, often skips, fails to work with some programs and crashes frequently (what the hell is up with that?).
Is there any document out there which explains why /dev/dsp doesn't get mixing with ALSA? And why nobody tried to patch that yet?
Pulse Audio is a bloody disaster. It breaks just about every audio application I have, and even when its not running, it creates over runs and under runs in other ALSA and SDL audio applications (like ZSNES). ALSA, and SDL audio was the perfect sound abstraction system. Pulse Audio screws EVERYTHING up. I have to makle my own patched RPMs to get rid of Pulse Audio hooks in applications. Its bad. Its really bad.
Audio applications should use ALSA but not lock the card. Games should use SDL. Everyone else should follow suit.
If an application is locking a card its the drivers fault. Fix the driver, fix the over runs, and ditch Pulse Audio!
ALSA was a big mistake, from the same mold as the Netscape "Let's throw everything away and start again!" that Jamie Zawinski complained about all those years ago. For some reason the ALSA developers decided that OSS sucked but rather than fix the few issues that existed, they threw it all away and created this huge monster called ALSA. There are some nice ideas in there, such as generic PCM buffer management, but there is no reason those features could not have been added to the existing OSS implementation. OSSv4 proves that it was possible. Instead Linux has plumped for a system that is too complex, poorly supported, poorly documented and disliked by developers. If instead the effort had been applied to fixing OSS, sound on Linux would now be further ahead than it is now. Now that OSSv4 is fully GPL I'd love to see it back in the mainline tree, at least to give users better choice, but sadly I suspect there are some major egos and political posturing that will stop that happening.
The audio quality is disappointing on Linux. I don't know if it's the decoding or the playback, but audio sounds much better on Windows.
Until developers can write apps and be sure that they will behave as he expects when it comes to sound across the vast majority of distros, I am afraid that we in the Linux world will still be playing catch up when it comes to multimedia. Sadly, the article did not show that things are improving in any way!
So much for the so called "freedom of choice"...but what's wrong with choosing a technology and throwing all development efforts behind it?
Those who crave the freedom to do whatever they want can still do precisely that since Linux and most software that makes a distro is open source.
The mere fact that there are folks that "spread FUD" is indicative of a degree of problems when it comes to Linux and sound.
The real problem here was created when developers started trying to solve the mixing issue by writing software libraries instead of a specification.
Instead of attempting to write a one size fits all sound library that would interface directly with the sound hardware and provide the direct interface for applications who wish to play sound, what they should have been done was drafting a specification for an API that contains only the most basic audio features (creation of primary / secondary audio buffers, enumerating supported device buffer formats, etc.). The driver provides the implementation for the specification. If the device driver indicates the device is capable of hardware mixing, it should use hardware mixing internally, if it doesn't, it uses software mixing internally, if supports the use of hardware buffers for secondary buffers it can do so, but this all will take place within within the driver specific implementation of the standard specification. This should have been paired with a robust generic open source driver that (hopefully) supported as many generic audio devices as possible. Using the interface exposed by the spec directly might seem a little low level, but additional software libraries could be built on top of that interface for use by applications. The important advantage if they had gone down THIS road is that the single conduit, the arbiter of all things audio in the system would've been the device driver for the sound hardware, which would reside neatly in the kernel.
Except the sound project names will be different.
The way they fail to match commercial OS sound systems will be somewhat different in detail but equally abysmal.
There will be the same "Works for me!(tm)" posts.
The only hope for Linux to get a commercial quality sound system is if one or more major commercial companies with competent grownups take on the task and have people sitting at desks 40 hours a week doing real work.
The open source "competing teams of bearded GNU freaks taking their sweet time working on competing projects because "choice is good(tm)" in their spare time between bong hits and World of Warcraft raids" isn't something anyone should be waiting around to start finally delivering commercial quality software engineering solutions.
I actually like the concept of PulseAudio. For the first time different applications that use the sound system can have their output levels adjusted individually, and most importantly for anyone new to Linux - easily. So there are no more surprises between a quiet application and a loud one.
As for stability, PulseAudio has been pretty rock solid, it hasn't crashed, but on boot VERY occasionally it decides to re-route all the outputs from the speakers to the USB headset, then you have to spend an age finding all the applications that play audio and set them back to the sound card.
The one major irritation is not a fault of PulseAudio as such, but with Skype. Being 32bit you have to have some 32bit parts of PulseAudio installed to hear the sounds of events like someone calling you. I un-installed the 32bit PulseAudio stuff, and can no longer hear these Skype events. So it's more of a critique on Skype totally ignoring Linux and 64bit (2 years and counting from the last Skype update for Linux).
So really, for me PulseAudio is very good, so long as the applications are compiled to use the 64bit sound system, and not just the 32bit like Skype is. For me, 32bit who cares!
Take Nobody's Word For It.
I hate PA. It's a complex mess and half the time it just doesn't want to work right. There is no way your average user could deal with it. Most of the time I have trouble with it not allowing multiple users to have audio at the same time seemingly due to some twisted sense of how security should work. ALSA is better than PA but still doesn't work a lot of the time.
It sounds like OSS is getting it's act together and just needs someone to hire the lead developer(s) and port all cards missing OSS support over. That sounds like a worthy goal for those selling distros or soundcards. If it works well and is easy for developers then it'll work well for end users. That is what matters. Sound has been my #1 embarrassment when pushing Linux. It has never worked well and it's time we get it fixed.
At what price learning? At what cost wisdom? The price is a man's peace of mind, and the cost is his life.
Both the Adobe article and the "Sorry State Of Sound" article date from May 2007. The new article reinforces that the state *was* sorry then.
"Yes, Linux audio sucks."
No it doesn't - it works for me. You're an idiot and/or a Microsoft astroturfer.
"If nothing else, we have three common and incompatible APIs to perform a single tasks,"
Choice is good. More choice is better. Duh. Don't you read Slashdot?
"and none of them are definitively better than the others."
Wrong. Sound system A > B and C. Sound system B > A and C. and Sound system C > A and B. A survey of the comments in this story will clearly back that up.
"For comparison, FreeBSD..."
Ok now you've done it. A GNU Strike Team is heading to your location right now.
So does anyone know how to get oss working in Fedora 11?
I am currently stuck with alsa, and after removing pulse audio, anything is more or less working. And xmms can even do it's own software mixing, but I would like to try oss4 so other applications also could do mixing. Does anyone know if there are ossV4 packages for fedora11 out there?
ps: I hate the name oss, it always make me think of "open source software" not an audio stack.
TFA says that the way sound is implemented in the kernel is basically okay, but there are problems with how the kernel's facilities are used at higher levels by applications, and with the way the whole thing is integrated by distros. I think he's basically correct.
As an example of what's not broke about the kernel, and doesn't need to be fixed, it's a good thing that we still have support for OSS. OSS allows you to do sound I/O in exactly the way you would expect to do sound I/O based on the fundamental design principles of unix. You just do open(), ioctl(), read() or write() on devices like /dev/dsp. If you couldn't do that, it would be a failure to do the obvious, straightforward stuff to handle sound in the Unix Way.
As an example of what is broken at higher levels: I run Ubuntu Jaunty. Sound works fine every time I boot the computer, and I get the bongo sound as the login screen comes up. Then when I log in, master playback is muted, and the volume is down at 1/31. Also, the way the Gnome icon shows me that sound is muted (a tiny red box with a white x in it) is the same as the way the network icon would show me that I'd disconnected my ethernet cable or something; in other words, it makes it look like it's not just muted, but actually broken. Here's my best attempt to characterize the bug: Here's a bug on launchpad that may or may not be the same thing:
Find free books.
...not so much "work for me" but "who cares?".
I am not an Audio professional. If someone whines about Qsynth taking
up 100% the CPU on Jaunty, I really can't relate to them. You might
as well whine at me about Gimp not being any good for making Matte
Paintings or somesuch.
A Pirate and a Puritan look the same on a balance sheet.
... when application developers or users express concern about a problem in your OS is to attack them, call them liars and FUD rakers, accuse them of being stooges for Microsoft or whatever.
I'm pretty sure the engineer who develops the Flash Linux player is probably on your side, and he was expressing a legitimate concern about a problem with Linux. As best I remember Adobe hired him out of the open source, Linux world. It would probably be more productive to listen to his concerns, and see if maybe, just maybe, there is a problem with audio on Linux. Having tried to write simple audio apps myself using OSS and ALSA I can assure you they have issues, OSS having no mixer at all was a nightmare to make play with more than one audio stream or more than one app at a time, that's why ESD, arts and pulse were created to hide these mixer deficiencies.
ALSA is a ridiculously overdone, convoluted audio API which makes it very painful for audio driver writers and application developers alike. It simply has too many knobs that can be tweaked and turned most of which never get implemented properly by driver writers and can't be trusted.
The simple fact that there must be a dozen different audio API's on Linux many of which exist solely to hide applications and users from the deficiencies in OSS and ALSA tells you something right there.
Rather than attacking this guy maybe you should have the empathy for the guy, he has to deploy an application that is used by probably millions of Linux users, most of whom are ticked off its not open source in the first place and then when it doesn't work perfectly they scream bloody murder. He has to try to make audio work in the face of the fact there are countless barely working or at least buggy ALSA drivers in the world, and there must be about a HUNDRED different ways to configure audio when you count OSS, ALSA, gstreamer, pulse, esd, arts, jack, OpenAL, and a MILLION different configurations when you count all the obscure options you can or in some cases HAVE to set on audio drivers.
As an end user I've suffered through painful, hard to fix audio bugs, in just about every PC I've owned over the last ten years due to audio driver bugs. Sure I could sift through "supported" hardware lists and try to find that rare new PC or laptop where everything is guaranteed to work on Linux, but I would actually prefer to just buy the hardware I want at the price I want. Of course in all fairness to the Linux developer community it is a total bitch to get working drivers on all the PC hardware being put out especially when the vast majority of hardware developers either just don't support Linux, support Linux badly, or actively obstruct Linux support.
You all seriously need to realize that if you want broader acceptance of your wonderful operating system:
A. You need applications and application developers to develop for your system, and not attack them if they point out problems deploying apps on your system. In a perfect world every app would be open source, but there may be some apps which aren't Linux would be better off having as closed source than not having at all.
B. it will have to actually work for ordinary people who aren't going to spend days/weeks/years fiddling with things to try to make it work right.
One of the beauties of the Mac is the hardware is tightly controlled. You may view that as confining and depriving you of your freedom, but it also helps insure the damn thing works out of the box, and most of the applications on it work pretty damn well. After years of fighting nagging bugs on Linux I decided it was in my own best interest to just switch to a Mac for my desktop system and I use my Linux box solely to develop code on. Linux on the desktop is a lot better than it was but unfortunately its just not a very good desktop experience by comparison.
Unless there is a major attitude adjustment in the Linux community that is unlikely to change. Either:
A. Be content that Linux is a niche OS for hardcore fans a
@de_machina
needs to be integrated into the Linux core and ALSA/PulseAudio need to die kthx
Do you mean GNU nuts as part of 'we' who only care about spreading GNU licensed software and the extinction of all other open source licensed software packages?
Do you mean BSD type developers who just want to write high quality software for other people to use?
Do you mean people who want Linux to be an exact Windows clone with the same APIs?
Do you mean people who want Linux to be an exact OS X clone with the same APIs?
Do you mean people who still think Linux shouldn't be for the masses and silly stuff like sound is unimportant?
Do you mean people who just plain suck at computer engineering and coding?
Every single one of those groups considers themselves part of the Linux 'we' - and each and every one of them is furiously flaming the other groups in comments in this story.
Great post. Can you please help me get my PreSonus FireBox working under freebsd?
Thanks.
Wait. Claiming audio sucks on Linux is FUD because there's not one, not two, but three mutually incompatible and redundant APIs? How the hell is this not a clusterfuck?
Oh I'm sure there's some reason why someone prefers one to the other, but seriously. You're sending bits to a soundcard. That's it. Just make one API and be done with it. Got a beef with the API? Enhance it, don't just throw it away?
My god, audio was one of the reasons why I ditched Linux for a mac four years ago after running it as my primary OS for ten years prior. Frankly I got tired of having sound work in some applications, but not others. I got tired of guessing which mixer would adjust the sound, which mixer wouldn't. I got tired of seeing "No ALSA cards detected" in my startup, but someone how having `alsamixer` be the one mixer that worked most consistently.
This is a mess made by the developer community and developer community has so far failed to show that it is capable of solving it. If only there were a Benevolent Dictator or something...
I've never had trouble getting stereo output on a Linux box. At least, not in the last few years. 5.1 through a digital out, however... that's been a nightmare for me. I haven't tried the latest distributions, but Ubuntu just plain wouldn't do it through the digital out jack. Fedora will, but only outputs 2 channel. EVERYTHING I've tried hasn't worked, and no config file changes have changed my results. I'm going to try the latest Fedora and Ubuntu soon, so we'll see if it's gotten any better.
I don't know about you, but my servers run on the power of cotton candy and happy thoughts. -Anonymous Coward
The developer of PulseAudio explains some of the rationale in this interview.
-- Ed Avis ed@membled.com
From reading the (very interesting) article, it sounds like he's still saying it is in a sorry state. Summary for those lazy people.
OSS3 was a bit crap and removed from the kernel in favour of ALSA
ALSA is also a bit crap because it does mixing in a stupid place, and sometimes not at all. Also it has an unnecessarily complicated API.
OSS4 was written, which is much better than ALSA - simpler API, lower latency, better mixing - but isn't included in the mainline kernel.
PulseAudio is a horrible horrible ugly evil stupid idiotic hack. Did they never use Arts?!?
So as it stands we have ALSA which is sub-par, being driven by PulseAudio which seems to do its best to cock things up.
When I've installed Ubuntu on other peoples the machines the first thing I do is remove PulseAudio. It offers no benefit for the average user and is the source of many headaches. Imagine being a new user and, when when discovering you can't do anything sound related, have to dive into a nasty tome of a HOWTO like this: http://ubuntuforums.org/showthread.php?t=789578. You'd be looking for your Windows install disk before you even started scrolling down.
The main reason why PulseAudio isn't a good idea:
It is just the best possible counterexample of "Just Works(tm)". In other terms: each time I try it, it just "Doesn't Work(tm)". Without it, sound works more often than not; I don't care why or how as long as it does work. Simple observation: "apt-get install pulseaudio" breaks audio, "dpkg --purge pulseaudio" repairs audio.
Hm. Maybe that's how Linux audio is supposed to be brought to a (relatively) sane state: by breaking it so terribly that rolling everything back to the previous state would almost look like a step forward.
Over the years I had a lot of prolbems with ALSA, the biggest being the lack of sound mixing with the sound card on my motherboard. To get around it, I went out and bought a different sound card that supported hardware mixing. I still had problems where ALSA would just break periodically and require restarting it. Then at one point it just plain broke and nothing would fix it.
I had enough and installed OSS. What a difference. Latency is better and it just works. There is no excuse to not providing consistent audio mixing. I should have switched to OSS in the beginning rather than buy an expensive sound card because ALSA couldn't do software mixing.
A sound API should provide sufficient abstraction so that basic operations do not depend on the underlying hardware. Mixing, sample rate conversion (when needed) and per-application volume settings fall under basic operation as far as I'm concerned.
This post is encrypted twice with ROT-13. Documenting or attempting to crack this encryption is illegal.
My chief complaint, both on Windows and Linux is that probably 99% of applications have no concept of anything other than the default sound card, making multiple cards useless for all but a few niche applications. Apps that use sound need to provide a way to specify which device is used in case the user wants to use other than the default, period. None of the solutions for audio so far have really done anything to make this better (or they make it worse in the process) - granted, it's mostly an application issue, but control of device selection in the mixer as well would help.
I'm definitely not an authority on either Linux or Windows audio, but I see something wrong with this statement:
http://blogs.adobe.com/penguin.swf/linuxaudio.png
http://4.bp.blogspot.com/_vLES3KKBdaM/Sjsptq1kkCI/AAAAAAAAAGU/yITp1qKuHOU/s1600-h/windowsaudio.png
Looking at both graphs, there's a striking difference: I don't see any loops in the Windows one (though, not being complete, there could be some). I don't see any major problems with library diversity, but the fact that there is no apparent hierarchy does confuse me.
At least get your zealotry straight.
The "bearded GNU freaks" wouldn't dare touch World of Warcraft. It's proprietary! It certainly isn't "Free as in Freedom"!
Don't thank God, thank a doctor!
For me, PulseAudio was a saviour when I got a pair of USB speakers to supplement the headphone out. It does actually just work, but there was a whole Linux Audio Jungle out there for me to hack through (couldn't find a simple explanation of the various options anywhere) before I got it working. When I finally installed the correct GUI packages (ubuntu) it was much easier to use than reconfiguring the output modules of each program (xmms, vlc etc) every time I wanted to use speakers (or headphones). No config files needed editing, it did Just Work.
It does crash now and again, and there doesn't seem to be a GUI option to restart the server.
The network capabilities look really cool too (see another post above) but I have no need at the moment.
Haven't noticed latency problems so far.
The real sorry state is that guy's ability to write a readable web page. He forgot what bullets are halfway through, or something.
why write good dialogue when it it so much easier to blow something up?
You've been watching MythBusters, haven't you. :-)
LOL!
Every 'bearded GNU freak' has two machines:
1. And ideologically pure Linux machine that he posts +5 Insightful diatribes calling for blood with the smallest hint of GNU copyright infringing stories.
2. An unspoken Windows box that he plays World of Warcraft and other games on while downloading hundreds of gigs of copyright infringing music on.
I've spoiled my laptop speakers playing music on ubuntu. It takes elaborate tweaks to the equalizer and sacrificing the frequency range to get non speaker distorting sound. I REALLY wish I knew how to get around this.
Real men read Slashdot articles at -1, bottom up.
Ever try to have two applications lock the soundcard in ol' /dev/ ? OSS didn't do threaded audio well, and what was it MMIO or directIO or such. ALSA was the true Open Source implementation for every sound device in the market and experimental implementations. 4Front Technologies is nothing more than an extended outfit of chipset manufacturers that would need another what U$50 to U$100? Outside of schools, universities, and such that is quite aggregating for non-commercial use.
Don't care what anyone might say about this, Every day I have problems with sound over s/pdif and HDMI.
In EVERY update of ubuntu I had sound glitches. Since day one I hated pulseaudio... how cares about volume per application or sound servers across the network when you have to kill firebox in order to have sound in VLC?... yeah, that happens a lot.
Math is beautiful... e^(pi*i)+1=0
Even something as simple as recording from the output of the computer doesn't work. I've tried PulseAudio, ALSA and OSS, all with a very simple conclusion: dead silence. It hasn't worked in Ubuntu in the last 3 years; I can't speak for the previous versions.
Is this ever going to work? And if it's currently working, what am I doing wrong?
(in Vista)
App -> libao -> OSS API -> OSS Back-end - Good sound, low latency.
App -> libao -> OSS API -> ALSA Back-end - Good sound, minor latency.
App -> libao -> ALSA API -> OSS Back-end - Good sound, low latency.
App -> libao -> ALSA API -> ALSA Back-end - Bad sound, horrible latency.
App -> SDL -> OSS API -> OSS Back-end - Good sound, really low latency.
App -> SDL -> OSS API -> ALSA Back-end - Good sound, minor latency.
App -> SDL -> ALSA API -> OSS Back-end - Good sound, low latency.
App -> SDL -> ALSA API -> ALSA Back-end - Good sound, minor latency.
App -> OpenAL -> OSS API -> OSS Back-end - Great sound, really low latency.
App -> OpenAL -> OSS API -> ALSA Back-end - Adequate sound, bad latency.
App -> OpenAL -> ALSA API -> OSS Back-end - Bad sound, bad latency.
App -> OpenAL -> ALSA API -> ALSA Back-end - Adequate sound, bad latency.
App -> OSS API -> OSS Back-end - Great sound, really low latency.
App -> OSS API -> ALSA Back-end - Good sound, minor latency.
App -> ALSA API -> OSS Back-end - Great sound, low latency.
App -> ALSA API -> ALSA Back-end - Good sound, bad latency.
Do you by any chance buy Monster cables, and a wooden volume knob, because it "sounds better"?
I'm sorry, but without proper ABX tests, I do not believe a single word of this table.
And about the latency: Please enlighten us, how you actually measured them?
Any sufficiently advanced intelligence is indistinguishable from stupidity.
I have a recording studio and I run Linux.
But not for recording.
I stumbled around for weeks just trying to figure out what the problem was and gave up. OSS, ALSA, JACK, PulseAudio, WTF?? There should be a mixer and that's it. Ardour looks nice, but if I have to screw around with a bunch of cryptic backend shit just to be able to record something it's not worth my time.
With Windows you install Cool Edit or Soundforge and off you go.
I'm sure from all the rave reviews it's technically superior and all, but right now it's controlled by a paranoid schizo who hasn't got a clue how open source works: after GPLing it and whining that he hasn't suddenly started making money, he now thinks he can dictate what license apps using his API have to be released under.
cool story, bro.
You never had to do that with OSS, but bad applications did it just as they do now with ALSA, and bad OSS drivers that blocked could easily have been fixed. FreeBSD handles multiple open()s of the PCM device just fine, for example. There is absolutely no reason, technical or otherwise, why the Linux OSS implementation could not have added the same functionality.
We didn't need to rip out OSS just to get software mixing. OSSv4 does mixing just fine. It could easily have been added to the existing in-kernel OSS.
Great. What if I'm not a Linux developer? Oh, then I guess I ignore ALSA. Also have you actually tried to program to the ALSA API? What a fucking nightmare! OSS has a sane API: open the device, issue a couple of ioctls and just write PCM samples to the file descriptor. No hassle. Just the way it should be.
There is nothing special about the way ALSA is designed that allows it to support multiple sound cards and software mixing for multiple applications, and there is no technical reason why OSSv3 could not have had those features added to it: OSSv4 proves that it was always possible, and would have been far less work than ripping it all up and creating ALSA. That's my point.
Try using the OpenGL output driver, and make sure 'wait for vertical blank' (vsync) or a similarly-worded option is enabled.
I didn't even read what they said. All I know is as an IT guy with many users that use Linux. It has issues. Adobe Flash causing a shit load of them. (especially peered with Skype)
I myself don't have many issues, but then again I take extra special care on what hardware I purchase.
As "Reboot" is the first step in support for Windows. In Linux I've found it's "alsa force-reload".
Looking at the charts, and looking in a few other places, it is clear to me that OSSv4 is the way to go.
So, when does this start to happen? I tried this a few months ago, and I had to patch my kernel and do all sorts of other things that ended up hosing sound completely (since I'm not a developer, asking me to do developer-ly things is trouble).
When will it be a simple switch in the kernel config, or a simple matter of installing a package in the major distros?
For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
First off, KDE and Gnome != Linux. Last time I checked they both ran on FreeBSD too. They are the real problem. When I first started playing with sound on Linux (probably 1996 or so), OSS was the established standard for the kernel. I think there were some other devices for compatibility, but Linux developers used OSS.
Then around 2000 or so, ALSA started to show up as a viable project. It supported low latency sound and was more reliable for syncing sound to video. Obviously, you want this for playing video games or watching movies. Quite a few distro maintainers jumped on it and added it to their distro before it was added into the mainline kernel. Eventually it was added, and they kept OSS for backwards compatibility.
Until recently, yes, Linux didn't support multichannel audio, but now ALSA does, and it does "just work." Most of those daemons were created to patch on support for multichannel and networking. I assume those must be the "incompatible APIs" you were talking about.
There is one daemon called jack which seems to be good for audio editing--it is a whole routing system for audio, but I doubt one would need to use it for just playing sound since ALSA seems to have all the features, and ALSA was never superseded by anything else like you implied. Jack, esd, pulseaudio, artsd (unless it uses esd), & etc all use ALSA.
I can't seem to find any such thing. My computer/media centre goes into my stereo amp which doesn't have L/R balance. I was hoping for a simple tool to do this in the computer. Couldn't find one. Does anyone have a suggestion?
Audio in Linux is hard. Audio is such a different direction from the original purpose of server. And part of the hardness is all the different systems Pulse, ALSA, OSS etc which many people (like me) can't understand the difference between. X.org is in way better shape than audio.
Stupidity is its own reward.
You care enough to troll, apparently.
All I want to know is, what the hell is wrong with PulseAudio. I've been using PulseAudio since fedora began shipping with it. I have yet to have an issue with it. ALL my players of choice work with it (mplayer, rhythmbox, totem, vlc, elisa, exaile). ALL games I play don't care whether it is PulseAudio or not what's on the background. The OS doesn't care either, my sound card still works. Personally, I like the network transparency a-la Xorg and the fact that I can redirect audio streams at will.
So, here's the question: WHAT IS THE FSCKING PROBLEM?!?
If you have an issue with it, then you are doing it wrong.
I like to correct the Lemming driven mis-perception that "it's all broken".
Some people genuinely have bad luck with whatever configuration they happen to have.
Many others just like to spread completely bogus nonsense.
A Pirate and a Puritan look the same on a balance sheet.
What if Linux/BSD people did something completely opportunistic and implemented very same calls to API which will produce exact same results?
Something like ALSA 2/WINE hybrid but proper documentation, very same calls/usage. For example "Core Audio" of OS X?
I follow AVID guys and others and I don't think they are insane to leave all that work on writing software for 2 different operating systems having nothing to do with each other (except quicktime which helps a lot) and add "Linux" to the supported list. I am not a audio guy but I know their needs are way beyond "if it plays that mp3", to give a clue, one of the first parts of OS X to move to 64bit was sound system, Core Audio. The MIDI etc. are way beyond the Atari 1040 ST "plug the mini and it records, great" ages. Musicians do mad things now, connecting a lot of things together, add realtime effects etc.
Funny is, Audio is always under rated on computers. That is why Creative lives nightmare because of "integrated sound" while NVidia and ATI are enjoying even more profit since gamers really hated the integrated graphics system. Look to Apple and search for "Core Audio" which is said to be "state of the art" by industry. How many results? Now look for "Core Graphics" :) I bet it is same deal on Microsoft side regarding direct3d vs directsound.
Issue here is, people can't understand what professional audio guys needs. For them, "playing that mp3" or even (if exists) "6 channel game" is enough. For Pro audio, it is just the beginning.
On Gentoo I just had to disable CONFIG_SOUND in the kernel and install the package from a repo, and that was last year (I think just as 2.6.28 came out, not entirely sure). I don't see why you'd need to patch your kernel as all you need should be in the modules.
What are we going to replace with? I want to hear what Linus and others have to say. Maybe it's time to really look at audio in Linux. We've had lots of framework overhauls in Linux. Alsa2 anyone?
Everyone wants a Tux in their life.
i remember being on irc in a linux channel in the mid/late 90s with some guy who worked at redhat.
he was emphatically angry, ranting about 'why would anyone want to play two sounds at once'? this was in a discussion about how you can have the system 'beep' to notify you of things while you are playing a game.
this is the type of person that has been controlling linux development.. i.e. people who just dont 'get it'. people who simply do not care what ordinary users want. and in fact, ordinary users do not really have a say in linux development, it has been taken over by big corporations, who are the major funders of the kernel hackers... stuffing it full of crap like massive parallelism and kernel integrated httpd (god that was dumb) instead of basic things like 'does audio work'.
and it has been over TEN YEARS since that 'conversation'. entire operating systems , nay, computer systems have been born, matured, and gone to pasture in equivalent time frames.
the problem is psychological and social and political, not just technical.
we are talking about getting one sound card to work, at all... im trying to figure out what possible relevance your complaint could have to this entire conversation. you might as well just blurt out 'i dont like navel oranges, only valencia'.
this is the problem... people cannot focus on what is important.. ie, getting basic sound to work. instead they go off on these tangents of irrelevant nonsense and here we are, 10 years later... still no basic sound support.
reminds me of the afghanistan war. your name isn't Rumsfeld is it?
I have to wonder what program you are using to output the audio. On my desktop, there are settings that allow the audio to be routed immediately to output without processing in PulseAudio or anything.
But, more to the point, your latency relies on the program itself much more. I've been doing quite a bit of low-latency audio programming using both ALSA and PulseAudio, and they both get extremely small if you know what you're doing. With ALSA, I've gotten to around 1ms, while I can easily get PulseAudio to approximately 5ms. Using a PC that has two cores, I've gotten the numbers cut down to around 0.5ms and 2ms, respectively.
If you're having a real touchy time getting response that low, you likely have to bump up priority of the process. Using ALSA, simply setting the application to realtime scheduling will do it. With PulseAudio, you're going to need to set the audio server itself to realtime as well as the application (I haven't done too much testing with that, but that seems to be the consensus online). As a parent suggested, you probably want to look at using JACK. It does most of the dirty work for you.
I learned most of this working on a low-latency audio application. Just yesterday I got the thing to route a guitar at low latency using ALSA, and I'm looking to finish up the Pulse portion this next week or so.
s/and World of Warcraft raids/Nethack amulet retrievals
There you go.
Computers are useless. They can only give you answers.
-- Pablo Picasso
So we should be using OSS because the author doesn't use suspend on his computer?
The article is just a big rant about how difficult he finds ALSA to develop for, how he doesn't understand the benefits of a user-space audio stack as found in Windows Vista and with PulseAudio empowering Ubuntu and other distributions.
This is something that has been bothering me for a while now. It's been a couple years since sound servers were in any way necessary. The sole purpose of ESD was to work around the fact that only one application could open /dev/dsp at a time. It was a horrible, nasty hack that was unfortunately necessary at one point in our history. Nobody really wanted it to be a long term solution, we just wanted something that would work until the people ho wrote the sound drivers got their sh*t together.
Yet here we are, years later, and not only have we never tried to phase out these horrid abominations, we keep adding new and more complicated ones. I have no words for how absurd this is. Why is it that we can't just fix the issues in the drivers where they belong rather than piling heap after steaming heap on top of them? And even when they do actually fix the issues, nobody ever tries to dig us back out of the pile...
If I don't put anything here, will anyone recognize me anymore?
I can't say I'm impressed with alsa, oss4 on the other hand is godlike ... simple fast and working
Just proves Adobe don't know Jack, or Jack Control, or JackEQ, or Jackbeat, or Jack Rack ...
The reality is this: it is already a difficult compromise choosing audio software to work with on PC or Mac platforms. Only people who aren't serious about their work really have time to worry about linux solutions here. Composers are only just now beginning to see anything like a move towards a merger of sequencers and notation programs, with Sibelius and Finale adding limited audio support and Cubase adding better support for orchestral articulations and some improved notation capabilities. Protools added some code taken from Sibelius but it's still rudimentary. Competition in terms of features is very tight between these various alternatives, and it's not like OpenOfficeâ'it can't just do 'more or less, the main tasks we need'. The open source software has to actually be *better* than the existing options. Whenever I wonder again about this I just compare the 'new' features in the most recent version of Cubase or Sibelius to the most recent features in the open source alternatives and I can only laugh...
Um, why would a bearded GNU freak ever work on Linux ? Its not idealogically pure at all. They'd sit on Hurd/Debian
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.slashdot.org Errors found while checking this document as HTML5!
If we switch to OSSv4, people will start whining because we will have three sound systems instead of two. A gift for all Linux FUD spreaders. Drivers quality will not improve in the switch from ALSA to OSS (why should it?) so people will keep complaining about cracks and pops and out-of-the-box hardware support, and new bugs will inevitably crawl in during the process of converting existing drivers from ALSA to OSS.
Of course, developers will have to support ALSA for a long time (dropping ALSA altogether would break nearly ALL the current linux applications, not just flash player) so the support burden for distributions maintainers would become even heavier.
All of this - because ALSA does not match the pipe dream about sound systems of TFA writer. In the end, the features offered to the end user by a OSSv4 stack would be less than those provided by a working ALSA + PulseAudio stack, as even the writer itself states (about hybernation support).
Not to mention the fact that nowadays many applications will make use of high level libraries that hide the details of the sound system from them, so they couldn’t care less about ALSA or OSS.
So no, thank you! Please report bugs, do complain as loud as you can, but yet another fork is the last thing we need now.
How could endless free labour produce the same quality as commercial products?!
That's like expecting wikipedia to succeed over MS Encarta, or US Products made in China.
Luckily there are paid developers working full time on those open source sound systems, oh and of course those "bearded GNU freaks" that work for free.
Do you use Miles? Or DirectAutio? Or whatever the replacement from MS of DirectAudio (to fit in with DRM requirements) is? EAX? Or EAX2?
Incompatible standards.
And, though MS push the OS builtin, Miles seems to be very very popular, saying something for DirectAudio's worthiness...
Sorry old chap, but he was right. There is a degree of FUD in your post.
I use nothing but Linux on all my machines. I do multi track recording using Ardour and Rose Garden and while the single solution Mac software looks slicker, and involves less configuration, the results are not easier to obtain, and no better in quality. In fact on Linux I am spoilt for formats and alternatives.
If I had one request for the Linux people it would be to make a default configuration for a set of default audio applications so that I don't have to search around scratching my head every time I need to set up a new machine.
The software is there, but the default setup is not.
You're one of those "I love Linux and open source but..." types who really couldn't care less about Linux and open source. If Linux became closed source clone of the Mac OS, but free as in money, you'd be there using it. You're not fooling anyone.
To all people who post a comment, is there any one working with the Linux community to improve the situation ? I guess not. So plz, continue bashing the Pulse and Alsa.
I like PA. I had to set it up myself, since I use Debian, but since I got it working (not too hard),it has been great. It fixed the "Flash locking the sound card" issues I had been having, and everything else continued working fine, and I got sound mixing out of it. That said, from everything I have found out about OSSv4, I would like to see it replace alsa and most of PA, but it seems unlikely.
Climate Progress - Hell and High Water
We "bearded GNU freaks" do not know of this "copyright" doctrine. We are well versed in the dark and arcane rituals of "Copyleft", on the other hand.
Actually, the world of free software has Jokosher, which is inspired by GarageBand, and to me seems as easy to use. Still at an early stage, but I recommend taking note of it! Note that it's actually not JACK-based, which would make it so much easier for new users (the crowd usually drawn to GarageBand) to get into. Perhaps in the not-too-distant future, Jokosher could be bundled into free operating system distributions, making them a nice alternative to Apple computers.
I also recommend Qtractor, which is more full-featured, but still not as intimidating as a full-blown DAW.
But, I must say, being a heavy user, that I feel that Ardour has come a long way in usability in that last two years, and these days it's almost as easy to use as all the above. It's not hard to get productive with it fairly quickly. If you gotta learn a piece of software in order to produce music, I would recommend Ardour right now. It can start you small, and take you very high up in features. Ardour's huge problem right now (if you ask me) is it's outdated and paltry documentation.
That said -- I fully agree with your statement that audio production on free software is not ready for self-congratulation. It's immensely powerful (there's nothing quite like JACK in the proprietary world, and there are some truly astounding LADSPA effects) but it's hardly rock solid, and definitely a mess.
Creative lives in a nightmare of their own making.
They produced lots of expensive crap that's worse than "integrated crap".
A friend of mine had an Audigy that caused crashes very often. When I saw what happened to him, I did some searches on the web and the results convinced me to not bother considering Creative for audio, even "consumer grade audio". FWIW I didn't have complaints about my SB Pro, but the industry has moved on since then.
On one computer we have onboard realtek sound and a creative labs "Live!" plugged into it, and guess what, the onboard sound has better sensitivity and lower noise when recording than the piece of shit Creative hardware that costs about the third of the price of the entire motherboard with the onboard sound. And the output latency is crap, ASIO is hard with it.
Do professional audio guys actually use Creative?
Some external models were good for semi professionals or pros without too much money in hand but no, Audigy etc. aren't suited for professional recording as far as I followed.
Whole marked seems to move to M-Audio which does have its own problems but at least, coming from same company making pro-tools (AVID) so they understand professional support requests. Of course, Mac is fully supported unlike Creative.
I mean, people doesn't tend to care for audio as long as it plays their mp3/movies. It is not the same deal as the GPU.
I moved to Mac long time ago and I know the SB Pro, AWE64, early Live were great cards but wasted with their horrible drivers and support policy.
No. Sadly, pulseaudio exists simply to copy Vista. Vista introduced per-application mixers and apparently this is a Cool New Feature that everybody supposedly wants, even if it's a shitty implementation that slows down what was a perfectly working sound system.
One of the hosted Ubuntu derivatives needed PulseAudio for its network code, to make their LTSP stuff work. Then Ubuntu unnecessarily started installing it by default, one version after they packaged it.
Like Linus would care about what other people think. He doesn't and has proven it time and again.
You call it the "saviour" and yet here is what you say..
and
OSS is tolerable, if you've got a card that it has drivers for.
ALSA, on the other hand is overcomplex, unstable crap...and unfortunately, denial ain't just a river in Egypt.
C'est la vie Anonymous coward.
I'm sure it will get more robust with time, but the crashes are rare enough not to be too much of a pain, and the convenience of switching outputs on the fly (or simultaneous output) outweighs that anyway.
My wife's laptop runs Ubuntu 7.10 and setting up Pulseaudio took a bit of work.
The recipe at https://wiki.ubuntu.com/PulseAudio was a big help.
So which is it? Nevermind don't answer, I already know that no one uses that piece of shit ALSA API.
Following an upgrade from Ubuntu v8, I'm running Ubuntu v9.04 (Jackalope) on an EEE PC and sound was completely fraked. After doing some research, I uninstalled PulseAudio from my system and now it all works fine. Still a few tweaks required, but dang, it works.
Why the hell does PulseAudio exist if it's such a piece of crap? Why is it in Ubuntu by default?
Maybe it has great potential and could be a wonderful thing, but until "it just works" it should be an optional extra, not installed by default.
I left my body to science, but I'm afraid they've turned it down...
Well....to be more precise, I duel boot partitions, I do not have seperate machines.
Oh dear....please do not tell anyone.
-Hack
Got Geometrodynamics? Awe, too hard to figure out? Too bad.
Windows 7 rulz!!11! (http://www.google.com/search?q=windows+7+rulz)
I think linux has a lot of great open source developers.
A really insightful article regarding this topic is this: http://0pointer.de/blog/projects/guide-to-sound-apis.html And this is what Lennart Poettering (Linux audio guru) had to say about this article: Nah, this is a complete and utter bullshit story. Slashdot just proved again that it is full of nonsense. Gah. Disgusting. I don't think that this deserves a real response. I mean really, this smells more like a astroturfing from 4front, with all that OSS4 fanboyism. This guys is just some lame fud blogger, not a technical guy who does any real the work, knows the technical details, works with the community and gets his stuff into the kernel or the distributions. Would be good if Slashdot would verify that the folks whose story they post actually know what they are talking about. Because this dude obviously hasn't. But I guess Slashdot is not the New York Times and asking some actual respected Linux developers or even just linux-audio-devel before publishing such FUD stories would be asking for too much. That famous Adobe jungle picture that was posted 2007 was grossly misleading already, and it still is. At least arts, nas, esd, oss were obsolete back then already, and mentioning almost unknown niche system such as Allegro or ClanLib doesn't make it any better. What I have to say about the situation of Linux audio APIs I posted here: http://0pointer.de/blog/projects/guide-to-sound-apis.html If you care enough about slashdot, then try to get them to bring a story about that blog story, even if it is already frm last year. As a change from their usual stories this one, as I dare to say, would be written by someone who has at least a bit insight into what's really going on. ;-)
Lennart