PulseAudio Creator Responds To Critics
Dan Jones writes "As recently discussed here, Linux sound development has come under fire for being overly complex and, more specifically, PulseAudio has been criticized for not being a 'good idea.' In a lengthy interview, PulseAudio creator Lennart Poettering has responded to the many critics of the new-generation sound server and says such complaints and criticisms about PulseAudio in some Internet forums are not really shared by the vast majority of technical people. While Poettering admits PulseAudio itself is not bug-free, he believes the majority of issues are being triggered by misbehaving drivers or applications."
Firrrrrsssst P Po Po sssst
When an application can make the soundsystem stop working for all other applications, than there is a bug in the soundsystem, not just the application that caused the problem.
------ Take away the right to say fuck and you take away the right to say fuck the government.
The idea is great. PulseAudio is an excellent solution for networked audio and thin unix clients. Now the problem is the people and the distros installing it by default on a desktop where it is utterly useless. No matter how close to bug-free it is, it is an unneeded source of bugs in that case.
This is not entirely true.
Now, I don't know what the exact bugs are that are causing problems. But the API should be stable no matter what happens to the outside. There should be no way to destabilize or crash the audio layer from a usermode application. So, if by "expect more correct behavior from the apps" he means "garbage in, garbage out", then that's fine. But if by "expect more correct behavior from the apps" he means "no error checking and if any app screws up then everything melts", then that's not fine.
I don't know which he means, but I've seen instances of both.
Breaking Into the Industry - A development log about starting a game studio.
The problem is that the implementation sucks, and that bugs are being ignored.
I'll perhaps reconsider my stance when pulseaudio starts using less CPU than the JVM when playing Puzzle Pirates. Finally something more bloated than Java, I guess.
Finally! A year of moderation! Ready for 2019?
While Poettering admits PulseAudio itself is not bug-free, he believes the majority of issues are being triggered by misbehaving drivers or applications.
Well, the way I see it, I can either use alsa and have (as far as I can tell) no bugs, or I can use PulseAudio and have more features and more bugs.
That might not be PulseAudio's fault, but it still means that if I use PulseAudio I will have a buggy sound system. Why do I want that? Why do I want it even if it's only buggy until all the applications get fixed?
Also, the promise of networked sound is kinda... meh... maybe I'd be happy if all my laptop sound got moved to my desktop box (which is connected to my stereo) automatically whenever my laptop is connected to my home access point (and, conversely, my desktop's sound automatically gets routed to my laptop whenever my laptop does an ssh home and is not around my home access point). But as far as I can tell, this is a bitch to set up, and I'm really not inclined to go clicking around some unintuitive menu system to set my sound up right every time I leave home or go back.
So what's the benefit of PulseAudio again?
I've read the background articles (but not the featured rebuttal about PulseAudio yet), and I was wondering why OSS was "deprecated" in favor of ALSA and whether (and if not why not) there's a possibility of OSSv4 being put back into the kernel. Anyone know?
If it's for-profit but free, you're not the customer -- you're the product (e.g., the Slashdot Beta's "audience").
Now the problem is the people and the distros installing it by default on a desktop where it is utterly useless.
In fact it's worse than useless (on Ubuntu): whenever I move away from my wireless access point at home (i.e. I'm on my bike on my way to the university), my sound stutters; this is probably PulseAudio spending too much time on making a new map of the network and too little time on actually handling sound waves (but I'm speculating).
Did no one test this? Am I the only person using a "ThinkPod" as a portable music player? Oh, I guess it's not one of those 95% most common use cases, so it's no biggie if it isn't handled properly.
Except that there are twenty disjoint chunks of 5% least common use cases not being fixed because they don't affect that many people, except everyone is affected by one... grr... </hyperbole> <apology/>
I think it is an absolute disaster, and outlined all the problems I had with it under Fedora 11 at https://bugzilla.redhat.com/show_bug.cgi?id=506213 and was totally ignored.
Next year will be the year of (working) audio on Linux...
here: http://colin.guthr.ie/2009/08/sound-on-linux-anti-fud-calm-certainty-and-confidence/
The largest problem with Linux audio is not really any particular driver model / sound server. OSS, ALSA, PulseAudio and Jack all work when set up properly, with supporting hardware, and supporting software. But it's never a given that a particular app will support whatever you're using, or give you the choice to select your output device if you have multiple sound cards.
I've been running Ubuntu for a long time now, and recently installed Windows as a dual boot for making music. Why? I can spend X hours on setting stuff up, or I can spend X hours on making music. I can simply count on any app that matters supporting ASIO or DirectSound on Windows.
While I actively try to convert people to Ubuntu for regular desktop apps I still tell people who plan to do audio/video stuff to go for Windows/OS X. While it's totally doable to set up a working environment in Linux if you know what you want and which apps you want, I like to play with stuff for fun. I'd rather invest my time in having fun creating content than trying to get stuff to work.
(And yes, I've tried Ubuntu Studio. Nice, but not there yet for me.)
.: Max Romantschuk
I have 2 sound cards and Pulseaudio has only given me great frustration. Not that Alsa is much better, but at least I hear something from the speakers. While I respect the work of the developers, they should probably get to the stage where everything works as intended with minimal features and then start adding complexity.
Lady Gaga apparently uses Linux.
Breakfast served all day!
It may be buggy (and by now I deactivate it on every machine that I administrate) but in the long run, I think we NEED something like PulseAudio and it really IS a good idea, because that is what you need if you want audio-forwarding for remote-sessions (like the X-Forwarding in SSH)
The MAFIAA is a bunch of mindless jerks who will be the first up against the wall when the revolution comes
I've read in several places that the main problem with PulseAudio is not its design and implementation, but its instantiation. Many distributions apparently do not properly set up PulseAudio, causing it to behave unexpectedly. I found this to be the case with Ubuntu 9.04. PulseAudio worked like crap until I followed the following directions to get it set up. It's been working like a dream ever since:
http://ubuntuforums.org/showthread.php?t=789578
LS
There is a fine line between being a cultivated citizen and being someone else's crop. - A. J. Patrick Liszkie
If you disagree with this guy, you're OBVIOSULY not "technical" and CERTAINLY not part of this mythical "vast majority".
Look, if you have a nice idea and it involves stacks and stacks of layers and drivers and the whole introduces a nice fat latency by design, and that nice idea pertains to something potentially very latency sensitive such as the audio to VoIP, then perhaps the nice idea wasn't so nice after all. And then there's the rest of the complaints.
I think "vast majority of technical people" is poetteringspeak for "yes men". Either that or he can show us wrong by patching all those drivers that he's pointing to. No, merely pointing elsewhere is not enough. Show us the code.
I disagree with the original article: ALSA is the way to go, I have drivers for all cards I've thrown at it, all applications imaginable that support ALSA work just fine for me, and no, as a OSS-to-ALSA changeover survivor, I don't want to change everything to another frigging API yet again (much less back to OSS), thank you very much. And while PulseAudio is less than perfect right now, I recognise it has uses.
But that's just that - it has uses. In its current state, I'm not using it for plain-ordinary music playing on my Debian system. I don't think it's ready enough as a common day-to-day audio routing thing. Still too many problems.
An example case: I was really disappointed when I upgraded Ubuntu on an older computer (600Mhz Pentium III with 256M memory and ESS Solo 1 onboard audio, plenty good enough for OpenOffice.org and web browsing, even ran Compiz at very good performance on GeForce 2 MX =) and sound playback started to just plain suck, when it previously worked just fine with straight-up app-to-ALSA playback. The machine just wasn't fast enough to route stuff through an application, plain and simple. And now Ubuntu foisted PulseAudio in. Uninstall PulseAudio = uninstall entire frigging GNOME desktop. I kept trying to tell it "no, I just want ALSA playback" in sound settings. No dice, pulseaudio kept respawning and hogging audio device all to itself. I kept disabling shit from all places imaginable. No dice, pulseaudio kept respawning. Now, I'm going insane (an unrelated story). I'll be armed with GCC and some dummy binaries. Mheheh. Muahaha. MUAHAHAHAHA. ...any better ideas?
Shockingly, I know, but I actually went and read your bug reports. You were specifically asked to file separate bug reports for separate issues. The original report was closed on the assumption that you would do so. Whether that is a good approach or not? One can debate that. But you were not ignored...
Enjoy life! This is not a dress rehearsal.
Even if he may be 100% right about that: way not to get the point!
I don't care whether problems are caused by the kernel, a driver, an application, the phase of the moon, or whatever. The thing is, if some "trivial" piece of hardware which has been part of mostly every computer since about 1990, still *does not fucking work* correctly today, I don't give a rat's ass whose fault that is. Especially if it appears the same "problems" have been solved satisfactorily at least 10 years ago on every other OS in mainstream use.
In the meantime, Linux has changed both the audio driver model (ALSA, OSS, who knows what else), and in addition to that, the "application interfaces" (arts, esd, PulseAudio, etc.) so frequently, that it is hardly any wonder that application developers are taking the piss and not updating their software to match the bugs/workarounds to whatever the current "flavor of the week" API for audio interfacing is.
Perhaps PulseAudio is just getting most of the "blame" because it is the most recently changed part of the audio subsystem, so if things used to work before, and now they don't, of course you're going to blame PulseAudio. Even if it is not by itself the "real" culprit.
Every expression is true, for a given value of 'true'
the *true* way-to-go is to use a real-time kernel... that's the only way which will free us of those irritating hick-ups in the sound pipeline. perhaps even audiophiles will be able to use it then.
I use linux computers to play games (HoN, Savage 2), listen to music, talk via skype, watch videos using Kaffeine/VLC, watch youtube videos, etc. I also have a usb headset that I need to work in conjunction with my built in cards on both my laptop and desktop. Therefore I need an audio stack that can handle all that at the same time. When I used to use ALSA, it was a pain in the neck to configure everything to run, and even then some applications just would not behave when I tried to launch more than one sound output at the same time. I haven't tried OSS 4, but the OSS that comes with ubuntu is unusable for multiple applications and hard to use with multiple sound cards. For some time, I solved this by using jack server, but it has to be configured manually, and is apparently designed for music production rather than playback so I constantly had problems with it. Pulseaudio has been great. At first it was a little buggy and shaky, but with the newest versions that come with Karmic Alphas (now Betas) are stable and great quality. The only bug that has been bothering me is that my usb headset's microphone does not work with my laptop's intel sound card microphone, but since my laptop's microphone is good quality, it doesn't really affect me that much. It seems to be a common problem since a long time ago, but I don't think anyone has been able to report it efficiently. Anyway, I like pulseaudio for what it allows me to do. Obviously it's a young software project so there are going to be bugs and inefficiencies, but if everyone would support the idea and start fixing bugs instead of sitting there and complaining about it not being a "good idea", then perhaps we would have a very good sound system in linux that everyone could use.
I never thought I'd see a Linux advocate use the Vista Defense! It's the drivers, it's the software, it's something, but it's not my code!
At least with Vista the problems with video drivers, and various other hardware devices was sorted out within a couple of months. In Linux the way audio is handled is an absolute mess.
"The 4Front interpretation of GPLv2 is irrelevant" not when they have enough money to take you to court and you don't have enough to live AND defend yourself at the same time.
And GPL2 doesn't protect against patents. Neither does BSD or CDDL.
Now if the BSD folks donated code under GPL3 that is BSD licensed this would help BOTH parties:
1) BSD gets a test to see if the extreme openness of the license extends to software that is patented (making it as free as it was before patents on software)
2) GPL gets code that they don't have to defend
I knew as soon as I read the headline here that this article would be jumped on by numerous "alsa is fine on it's own", "Why not OSS" and "PulseAudio is buggy blah blah" type posts but I didn't think that even the general slashdot hordes were that ignorant about what the hell PA is all about. I was sorely mistaken.
PulseAudio is very little to do about "networked audio" which everyone and their dog seems to use as an example to reason "I do not need networked audio, therefore I do not need pulseaudio". It's just ignorance in the extreme.
PulseAudio as an architecture is fast becoming the defacto standard on Linux, companies such as Intel, Nokia and Palm are putting significant resources into PA just now.
OSSv4 or older flavours simply does not have the API to deal with a modern linux desktop, plain and simple. We can maybe get some of the more userspace stuff such as bluetooth or airtunes support (the support for which I added to PA myself) using some kind of CUSE support but that's only just landed in the kernel just now, and it really wouldn't be a proper solution (and guess what? it would need a daemon running anyway!!)
As a PA developer and supporter, I've written up various articles explaining what PA is all about before and posted similar comments to mailing lists etc.
You can read some of them here:
http://colin.guthr.ie/2009/08/sound-on-linux-anti-fud-calm-certainty-and-confidence/
and
http://thread.gmane.org/gmane.comp.kde.amarok.devel/15356
I'll outline some of these things here to save you killing my poor server!
More and more audio device *are* network based. Apple Airport Express devices are pretty popular these days. I have two bluetooth headsets and my hifi system also support bluetooth connections and my Playstation 3 supports uPNP. So lots of things relating to network Audio are popping up (which is nothing to do with pulse->pulse network connections which is arguably a toy, even if I do personally use it a lot!). I don't think these should be ignored. PulseAudio supports all of these devices right now (although I've not had time to try the uPNP stuff on my PS3 specifically so don't quote me on that!)
In addition, rights access and management is a big issue. Today any modern linux desktop uses console kit to keep track of user sessions. When you switch from one user to another, console-kit ensures that the currently "active" user session is set to inactive, and it triggers udev callouts to remove the currently active users ACL on the /dev/snd/* nodes. (I seriously hope no one adds their user to the "audio" group these days!). This allows a new user to log in and get access to the sound hardware because they are now the "active" user. Switching between the two sessions triggers these ACL rewrites. Something has to manage this in applications so that they don't just bail out with EPERM errors. The sound has to go to /dev/null automatically without the application being aware of what is going on. Perhaps it can cork/uncork applications that listen for such signals so that music is paused etc. This is something that cannot be done without some kind of userspace daemon handling things.
Then on to power consumption. What most people quite often fail to realise is that Latency is Good. If you can pump 20 seconds worth of audio into a buffer and then switch off until you're woken up 19.5 seconds later then this is great for power consumption. You need to disable hardware interrupts and use kernel level timing constructs to deal with this, and automatically reduce your wakeup time on the event of an underrun to reduce the likelihood of a future underrun occurring. You also have to have accurate timing information reported such that a/v applications can handle things like lipsyncing etc. (and remember that hoping for a low latency audio output is
PA works just great on my machine, but make sure you have a recent version - anything before 0.9.15 had quite a few annoying bugs.
The FPU works perfectly fine in a Linux kernel. The RAID code can even use MMX, SSE, AltiVec, and so on. Observe:
kernel_fpu_begin();
do_stuff();
kernel_fpu_end();
The same goes for pretty much anything else, Bluetooth included if you actually care.
Even better, in the kernel I can get the ultimate in real-time performance. I can get working fine-grained security like SE Linux instead of crap like that offered by the X server.
Win, win, win. Kernel code rules.
http://ubuntuforums.org/showthread.php?t=789578
TL;DR. Here's a slightly shorter guide to a great pulseaudio setup on Ubuntu:
apt-get remove --purge pulseaudio
In my experience it works flawlessly ;-)
A lot of the problems with Pulseaudio are caused by the misconfiguration of Ubuntu's default kernel. It seems that they will be making the upcoming Karmic Koala even worse, according to a small rant on Lennart's blog today.
My other account has a 3-digit UID.
Oh give me a break, what a crock!
First off, the whole damn thing was so FUBAR, reports from users surely aren't even needed at all! The slightest bit of rudimentary testing reveals obvious breakage in multiple serious ways! You are getting hung up on all the details nice users like me took the time to write in there, when in reality we should have all just reported "all of us think this thing sucks for totally obvious reasons, have you even tried it? Fix your broken shit.".
"I will ignore all other issues mentioned in comments here."
Second of all, if I want to communicate with the developer by submitting bug reports written on a fricken paper aeroplane, then that's my prerogative - 1 report, 10 reports, initial bug, in the comments, it doesn't matter. The bottom line is that users are communicating serious problems to the developer, and the developer is *ignoring* them, because he doesn't care for how they were submitted. And, yeah, sure, that's his prerogative too, but it doesn't change the fact that the software sucks, problems are being brought to his attention, and he's not acting on them.
Third, you can't expect users to file separate reports for separate issues if they aren't capable of discerning how many issues there are! I already spent an hour identifying and writing down all the problematic and erratic behaviour I was seeing - and I have no idea how many different bugs that actually is. He should be thankful for receiving carefully specified reports at all, and use his knowledge of the system to immediately identify how many bugs there are, and go file separate bug reports himself, rather than expecting me to somehow slog through figuring it all out. He's not being paid to write software for me, but I'm also not being paid to do QA for him.
I don't care whether problems are caused by the kernel, a driver, an application, the phase of the moon, or whatever.
My sentiments exactly: http://linux.slashdot.org/comments.pl?sid=1409057&cid=29791305
Perhaps PulseAudio is just getting most of the "blame" because it is the most recently changed part of the audio subsystem
It could also be that in a lot of users' eyes, PA is overhyped. Some distros get PA installed and configured right, others don't (yes, I'm looking at you, Ubuntu). From the perspective of the users of the distros that don't get PA right, Pöttering is saying "PulseAudio is the greatness" which conflicts with their experiences. Telling someone that a thing they dislike is good for them and they should want it is not a great way to make friends (see also "eat your vegetables").
The sound on my =bare metal= install of Fedora 10 didn't work.
After much forum-searching, config tweaking, and pounding-of-keyboard, I eliminated PulseAudio.
The sound worked.
Tell me again about PA's awesomeness.
That was on 486 hardware and even worse!
The problems started with ESD or esound, the Enlightenment Sound Daemon. Prior to that, sound daemons were unusual. Nobody actually ran one. Enlightenment (the insane game-inspired window manager) got one, GNOME briefly used Enlightenment, and we've been stuck with sound daemons ever since.
The OSS to ALSA transition was the other botch. It used to be that an app just did open() on /dev/audio or /dev/dsp and made sound. Any competant UNIX programmer could handle that. Now we have a kernel API that is essentially unusable, so you have to use ALSA libraries to do anything. Actually, those are **barely** usable.
Really, it wasn't always like this. My 486 DX4-75 with 8 MB RAM (slackware, fvwm-1.x) could handle audio. Back then, programmers didn't fuck around adding bugs and bloat. They wrote stuff that worked, nice and solid, on the hardware that we had.
We need C only coded user tools to interact with pulseaudio, with THE 3 basic levels:command line,ncurses and GTK (has in the MPD audio player). Pulseaudio is important for upmixing/downmixing, setting volume per application (or attached an app volume to a global fixed gain volume). I dare remind people that ALSA top priority is 0 latency to hardware. alsalib plugins are already too much.
Sometimes mplayer will have sound, and totem will not, and other times, the opposite is true. Since the switch to pulseaudio, I have never seen a time when they both worked. Just a half hour ago there was no sound in miro. The volume slider in miro was turned up, the system volume was turned up, and my speaker volume was turned up. When I right clicked on my sound icon, went to preferences, and flipped to the "applications" tab, I found yet another volume slider labeled "miro" that was turned all the way down.
A few months ago I bought new speakers and a new sound card because my sound stopped working. The new hardware still didn't work, and a few days later, I found some random profile or device or something that was muted, but to even see that menu I had to change the default device in some gui I had never seed before, and then change it back. Starting about a month ago, whenever I play a youtube video, sound will not work for anything but flash (even after I close firefox) until I killall npviewer.bin
For some reason, when "surround" is muted on my laptop, my headphones don't work, but everything else does like normal, and if PCM gets muted, I will only get sound back if I turn the volume all the way down for a second, then turn it back up. Also, my USB headphones and USB speakers have never worked in linux.
The new surprises with every upgrade is also pretty fun. It used to be that I could just do a killall "pulseaudio" then /etc/init.d/alsasound restart, and everything would be back to the old way of working, but recently it just breaks everything even worse, requiring a reboot to fix. I'm hoping that a clean wipe of everything, and installation of ubuntu 9.10 may magically fix some of these random idiosyncrasies, but I'm not holding my breath for it.
It's not just for Windows anymore!
PulseAudio has been working like a dream on my Thinkpad T43/Ubuntu 9.04, and I really appreciate its more modern level of audio control than the outdated inflexible "volume up/down" interface with which most of us have been living for 10 years already. In my opinion the features PulseAudio provides as a sound server outweigh most of its problems. Bashing it because it is unstable is not fair IMO. It is not like they slack off, they actually are working on it. Ok, so maybe PulseAudio IMPLEMENTATION is maligned, but the features are certainly welcome. After getting used to per-application volume controls and on-the-fly stream redirection, I dont really welcome going back to the stone ages of audio interfaces.
> While Poettering admits PulseAudio itself is not bug-free, he believes the majority of issues are being triggered by misbehaving drivers or applications.
I go through this at my company. We have a cadre of theoretical purists who code they way [they think] they SHOULD be coding, and the way it SHOULD work. In the end, what SHOULD be and how other things SHOULD be using or working with your stuff doesn't mean $#@!. What matters is it works. PA doesn't.
Before you design for reuse, make sure to design it for use.
I've looked at GNOME, I've looked at ALSA, (indeed, Ubuntu in particular in general terms) I've looked at the bloated instability of Compiz, I've looked at FreeBSD by comparison, (which I use on a daily basis) and at some of OpenBSD's source...and I've come to an important realisation.
When it comes to both design philosophy and code quality, Linux developers suck; and I'm talking black hole level, here. The BSDs leave Linux so far behind that it isn't funny.
What is even worse than the poor code quality, is the level of denial. The GNOME developers in particular have been told on numerous occasions what an abomination their baby is, yet they continue to insist on defending it, rather than actually listening to the feedback they are given, and trying to improve.
The single main problem is what I called the Starbucks generation; self-righteous, latte-sipping yuppie CS graduates, who as said in another post, worship C++ and various hell-spawned forms of RPC, and use such to code bloated monoliths of a magnitude that would give Microsoft nightmares.
They think they know better than the 30 years of UNIX experience that has come before them, including the very authors of the initial operating system itself.
Although I haven't used Pulse, I have used ALSA, and I've used enough other Linux software to know that the Pulse author most likely shouldn't be defending himself; but should be humbly acknowledging that his software is terrible, and appealing to the community for help and insight into how he can do better.
He can start by reading this, and gaining a real appreciation of the system he is writing for.
There are a lot of programmers in the Linux community who badly need some humility. They need to study the designers and authors of early UNIX; they need to learn how those people thought, and they need to emulate said designers' thinking and behaviour.
Above all, more than anything else, there needs to be a return to implementation, rather than interface, simplicity. As priorities, faddishness, popularity, and most of all, the end user, need to die.
One problem that many forget looking back on the "good old days" of sound is that you couldn't get sound from more than one thing. On single task OSes like DOS this wasn't a problem, you only ran one app. However for multi-tasking OSes it meant that whatever opened the soundcard first had control until it gave it up. This was problematic for many reasons. Meant that you couldn't even do something simple like play an alert sound from the OS if someone was playing MP3s (not such a problem in the 486 days since those were hard pressed to decode MP3s in realtime).
Well, that's where sound daemons come in. The OS mixes sounds from multiple apps and sends it to the soundcard. Thus you can have multiple programs using sound, just like video. What's more, it'll let you do things like control the volume if an app neglects a volume control. Firefox doesn't seem to have a volume control, but the Windows 7 mixer has no problem adjusting its volume, independent of the system.
There is no reason why this should be a problem. Windows and OS-X do it just fine. There is a sound layer the OS has that you write drivers for an all apps can interface with. You can extend/bypass that with your own APIs if needed (like OpenAL or ASIO). It works really well. For that matter on Windows now they have created the concept of Universal Audio Architecture which is a standard way for devices to expose their functions to Windows, and thus work without device specific drivers.
There is no reason Linux can't do this as well. You can have an audio daemon, and should. What need to happen is time send to be spent designing things in an intelligent way first, and then implement them so that they don't change all the time. Have a standard ABI that the driver writers develop for, and a standard API(s) that the software developers write for. Have standard mechanisms for people to add to or override that if needed.
It'll work fine, if designed well, implemented well, and not fucked with. You can't change the spec every other week. It needs to be laid out and stuck with.
This isn't theoretical, as I said OS-X and Windows do it, and have been doing it for some time.
Comment removed based on user account deletion
Pulse Audio is killing Audio on Linux. It breaks everything. Its compatible with almost nothing. Even if you disable it, its not really gone, because everything processed through ALSA gets processed through PA using extra CPU cycles. Its horrible, and my distributor won't get rid of it in spite of repeated calls for Pulse Audio's death.
As for the mixer issue. If a given sound card does not support hardware mixing, it should be up to the ALSA Driver to handle that. If a given sound card does not support hardware midi, it should be up to ALSA to see to it Timidity handles that. I'd give anything to be able to remove Pulse from the big name Linux distros. We need one Audio driver frame work: ALSA. We need one game abstraction layer. SDL.
No more Pulse Audio, no more JACK, no more Port Audio. None of that bullshit.
Latency is Good
No its not. Video playback with an audio lag of several seconds? Not good. Playing games with an audio lag of several seconds? Not good.
As for the networked audio stuff, you mention UPnP. All you need for UPnP to work is a dedicated UPnP server like Mediatomb to stream your audio to the client. You do NOT need an audio daemon for this.
This sig does not contain any SCO code.
apt-get remove pulseaudio
he believes the majority of issues are being triggered by misbehaving drivers or applications
Linux is finally learning from Microsoft!
Quidnam Latine loqui modo coepi?
A lot of devices stream data over a network and play it locally as audio. That does not necessarily make any of them a "network based" audio device in the sense that they can be driven by PA.
Audio is not unique in needing device ACLs adjusted; it should not need a unique solution for doing that. In fact, having an audio server handle ACL adjustments when something else does that is a violation of the Unix philosophy of chaining together simple tools that focus on one thing.
Application-controlled latency is good. Library-enforced latency is bad. Sending audio from one user-space process to another is a case of the latter.
After reading your post made "as a PA developer", I'm even more down on it than before.
Its funny that this is music related, but that Meatloaf's most recent commits to the Linux source tree have been in the form of his new scheduler, which has nothing to do with sound at all! Anyone know when his new scheduler will be showing up in public distros?
Now taking the time to explain it this well and in length, would deserve the mod points I don't have. You'll have to do with a thank you post.
so, because a chip manufacturer and a phone company decided to add pulse support, that means everyone is using it? how about Mackey, or Elation? companies that provide light and sound solutions for major venues?
Good people go to bed earlier.
Your first sentence makes what point what exactly?
As for the ACL stuff, are you suggesting that all audio apps are rewritten to handle the ACLs and know about all the other applications that are out there so they can take appropriate action when particular events occur? Policy should not be something that has to be coded into every app, it should be centrally managed.
As for "application controlled latency is good" comment, sometimes you don't get that luxury. If you start off your stream playing on your laptops built in speakers and then have your bluetooth headset take over (it's a VoIP call so I want to use BT here), then the latency will *change*. The application cannot tell the bluetooth protocol to "be quicker". The application has to react to the latency information provided by the sound system.
And as I said, most applications seem to have this built in concept of "latency == bad", which is just bogus in most cases (media players etc.). If power consumption is the main factor (and with handhelds, laptops, netbooks and the like, it frequently *is*), then latency == good. Fewer CPU wakeups, longer battery life. Intel and others have been experimenting with large latencies of about 10-20 seconds with good results on power savings.
And with PA, "sending data from one userspace process to another" can be done with a zero-copy approach (the whole core of PA is zero-copy and lock free).
It's only accepted as long as infighting between developers continues to waste energy on all sides. A war of attrition that's characterized open source for so long that no one knows any better (1984, war is peace). A "benevolent dictator" should roundup the sound guys and stop their fucking around. Mark Shuttleworth shaped Ubuntu up to be the ONLY decent desktop linux distro, Guido van Rossum made Python a uniquely usable and efficient programming language (ditching backwards compatibility with the 3.0 release), and Steve Jobs carried Apple out of the gutter. So many open source projects flounder without strong (and sometimes arbitrary appearing) direction.
"Thank yous" gratefully received, as is beer (tho' obviously it has to be Free Beer... the cornerstone of all FLOSS work!)
Fundamentally, PulseAudio is architecturally flawed, and I don't get the impression from reading the rest of the Slashdot comments that people are confusing the roles of a networked audio daemon and a lower level kernel API. The problem is that PA is userspace, trying to do things that require kernel level control of timing. This is made worse by ALSA on Linux, which has poor latency, poor design, appalling code and sketchy documentation. I don't say this based on anecdotal comments from others, but on my experience working with ALSA in order to abstract the differences between various Unix like systems. In the BSD world, PA has only been (grudgingly) accepted because so many things now depend on it - but it actually duplicates some of the functionality already offered by the native kernel API. And just because a few big names are using it doesn't magically make PA any good - I can think of a number of widely used technologies that are piss poor compared to alternatives, but have become entrenched for reasons other than technical excellence. As for switching users on a desktop machine, I don't know anyone who does this, nor can I think of any reason why doing so would absolutely require an over engineered audio daemon.
I believe the solution to any *PROFESSIONAL* Linux Audio Production issue is to just go buy a Mac.
Technology -- No Place For Wimps! Grateful Dead and Jerry Garcia Chatroom -- http://www.wemissjerry.org
latency sucks... If I play a note on my guitar or keyboard, then I do not want to hear the sound more than a couple of milliseconds late... this is precisely why I still do my music recording on a windows box... I still can't get rid of it much as I really want to... I did have a perfectly good Ubuntu Studio setup going back on the LTS (Dapper Drake) before the current one, but certain issues pushed me into upgrading to the next LTS (Hardy Heron) and boom... pulseaudio screwed it all up... I was completely dumbfounded when I discovered it was an experimental sound system just dumped into the LTS without any attempt to get the default settings correct. I expect the LTS version of Ubuntu to actually work out of the box. So as a result, I got my XP box out of mothballs and went back to using XP for recording.
Donald 'Duck' Dunn: We had a band powerful enough to turn goat piss into gasoline.
You're confusing synchronization and latency. There's no particular reason you can't buffer up a few seconds of audio, yet make sure that audio is played exactly when the video calls for it.
Latency is Good. If you can pump 20 seconds worth of audio into a buffer and then switch off until you're woken up 19.5 seconds later then this is great for power consumption.
That may be the case for music listening, but for music making, 20 milliseconds is barely usable
I installed Ubuntu 9.04 on my new AMD64 laptop and tried to play some music. Aqualung (my preferred player) did not work properly with Pulse's ALSA emulation. For example, switching tracks caused a delay of several seconds. Next I tried to switch to Audacious, but it also behaved weirdly, and the sound quality was horrible. I also think I had problems with other applications. Next, I got rid of pulseaudio and suddenly everything worked 100%. Just reading this thread shows that this is not an uncommon experience. Conclusion: Pulseaudio is not ready to be installed by default on desktop systems.
PulseAudio was adopted to solve the problem of broken audio for some users, but PulseAudio broke stuff for some users for whom things worked before.
There is more loud complaining about newly-broken systems than there is praise for newly-working systems (humans are a fussy lot), and the complaining is drowning the praise.
Lesson: when you change something, make sure it works well and more importantly doesn't break anything for existing users, or the backlash will be terrible. Apple knows this, Ubuntu is learning this.
Misleading titles? Inflammatory blurbs? Keep in mind that Slashdot is a tabloid.
"next LTS (Hardy Heron) and boom... pulseaudio screwed it all up..."
Dude, Ubuntu's integration of PA in that version totally sucks. They didn't even try to get things right there and this then reflects badly on PA. Ubuntu have made a *lot* of mistakes with pulse and are continuing to do so, so please don't use this as the benchmark to judge.
We released Mandrvia around the same time with our first PA-by-default version, and it was received very well. So don't blaming the carpenter just because the stable boy left the door open while the horse bolted.
Oops.
It's structured the same way the audio systems on Windows and OS X are.
There should be no such distinction. Any "lower level" API should be an implementation detail of the application-level audio system, just as the PCI configuration space is an implementation detail as far as X clients are concerned. As for the traditional distinction between the audio deamon interface and the "lower level" one: it's an accident of history that we lived with that split so long. PA is a better world.
You should read up on POSIX realtime scheduling. There's nothing PA does that required kernel-level support. In fact, you should be happy PA runs in userspace: the less code in the kernel, the less can go wrong in the kernel. Besides: being in the kernel means that you're non-portable, that you can't use floating-point, and that you have various other coding constraints. Userspace is far better.
Pauline Kael, on Nixon: "How can he have won? Nobody I know voted for him."
I was using PulseAudio for a while. Every time I booted up I'd have to manually restart pulse. Then one day it just stopped working entirely. So then every time I booted I'd have to manually stop pulse and start alsa. Then that stopped working entirely. Finally I just completely removed PulseAudio, and everything has been working perfectly ever since.
I hope all the Ubuntu users *snip* who formed their opinions of PA back then will give PA a second chance on a well integrated setup.
I'm sorry, but the problems aren't resolved. I've been running karmic for about three weeks now and have experienced the same issues with PA that I had with earlier releases of Ubuntu. For example: flash in a web page can basically disable audio on the box. lsof shows firefox as the culprit and killing ff, followed by a full restart of PA & Alsa will fix the issue temporarily. If I something else is actively using sound (audacious for example), the issue doesn't seem to manifest.
Removing pulse and using plain alsa/esd prevents the issue from occurring as well. This can be the fault of Ubuntu but the result is still the same: I have fewer issues if I remove PA.
I suppose my point is this. As a user, I don't care if the buffering is awesome. I don't care if the framework supports modern desktop features. I do care if my sound works without having to jump through hoops repeatedly. I don't hate PA, and will continue to try it out with new releases. But I will continue to remove it after having issues.
I'll believe in corporations having personhood when Texas executes one... - advocate_one
I guess the OP is talking about buffer size, when he says latency. Use a big buffer when you are showing video, so you don't have to wake up all the time to transfer stuff to soundcard.
I do wonder how a 20 sec buffer will behave if the user decides to shut the audiostream down, or transfer it to another soundcard. Does it take 20 seconds to do that?
For games you are using a small soundcard buffer at the expense power. If your game dosn't have to do internal mixing (e.g moving soundsources), you can use a big PA buffer, and let PA mix your sound (which then has to use a small soundcard buffer to get low latency).
The point of my first sentence is that it's stupid to point at the PS3 or Airport Express and say "that's like PA's network support!" because they work quite differently. They send almost arbitrary audio files over the network; PA sends audio bit streams.
The point about ACLs is precisely that it should be centrally managed. If PulseAudio is applying its own policies independent of the other ACLs that get adjusted when I start a session, it's wrong.
So you have a buzzword compliant core. Are there any copies from application buffers to device buffers, or vice versa? How does it select output block sizes, for the kind of low-latency things that advocate_one is talking about? How does PA handle output stream mixing between applications? (Maybe it doesn't -- MPlayer on my machine is unable to open the audio device if I have a browser open that ever looked at a YouTube video. If it worked, that's a feature I would use a lot more than dynamically switching an audio stream between devices. It worked fine under ALSA.)
with Fedora, multiple versions, multiple different machines and sound hardware families. Sometimes I thought it was working, but then I would find some critical aspect of sound that didn't work or an upgrade would break it a day or two later and sound would disappear. Even those moments when it was partially working, sound was always out of sync and choppy and consumed heavy CPU resources.
I always de-install the damned thing, and then suddenly sound works perfectly. It's like an extra component that's insanely complex and designed especially to BREAK sound in Linux.
STOP . AMERICA . NOW
Programs (especially daemons and services) that communicate with other programs (especially over pipes, streams, and network connections) should have a protocol. The protocol should be designed and standardized (even if a one person effort) and the implementation designed around that (and around whatever else it is involved with). Many bugs I have seen in programs are ones where the program failed to correctly implement the protocol. But many more bugs I have seen in programs are ones where the program is also creating the protocol at the same time, and the protocol is whatever happens to come out of the program. You can tell when you have one of these bad boys when the author(s) say to "read the source" when asking about the protocol. So, where is the protocol ... documentation (it's not so much the answer, but how this gets answered, that provides the clues to many issues).
now we need to go OSS in diesel cars
Not really containing less bugs, not really fast, not really working well, not really simple, not really flexible,... :)
It's really like reading about OSS vs. Proprietary battle...or say s/Proprietary/Pulseaudio/
Video playback with an audio lag of several seconds?
Latency != Audio desynchronization.
He specifically says that you need accurate timing information to compensate for audio latency, and display the video later so that it matches audio. Assuming that the latency is always less than 1ms and not compensating at all is NOT the way to get acceptable audio sync.
Those who would give up liberty to obtain working drivers, deserve neither liberty nor working drivers.
Now if we could only implement a beer sharing protocol that works over internet...
I've had three systems with audio problems. Two Ubuntu-based (8.04, 9.04), a third OpenSuSE-based. All with PulseAudio. All had oddities- ranging from the sound working only during X session startup/shutdown (and not in-between), through to the audio skipping, repeatedly, when changing the current desktop. These were on reasonably decent machines, by the way. Machines that should gobble up and spit this data so fast that it barely dents CPU usage.
In each case, disabling PulseAudio and using, well, anything else, caused the problem to go away. OSS, ALSA, didn't matter, they both worked. Sometimes it was easy to remove PulseAudio, and sometimes it took a bit of work. Ubuntu 9.04 was a challenge. No, scratch that, it was a fight.
I look around, I see horror stories and widespread problems with PulseAudio.
I see claims that it works, if you configure it "properly". You know, I heard the same vague defence regarding Windows' instability. I didn't believe it for Windows either.
I've heard that PulseAudio has a great set of features. However, I have no interest in digging into what these features might be. The core feature that I want above all else isn't supported by PulseAudio. That feature?
Playing seamless audio.
PulseAudio can't even get that right. Stutters and skips are the norm, audio systems that worked previously no longer do, and the backers of this abomination are in abject denial about it. There are widespread complaints about it across multiple applications and multiple operating systems, and still it "isn't configured properly". You can't be serious. Complaints about PulseAudio are not really shared by the majority of technical people? Oh, yes they are.
If you want to provide a reasonable sound system, a *core* focus has to be on providing a working sound system. Get the core functionality right, then move onto features. Stability, correctness. Get the basics right. Also understand that API users may stuff things up, and falling over and dying is not the correct thing to do. The infrastructure needs to be resilient, not fragile.
PulseAudio did *not* do this. Any of this.
The order of the day seems to be to blame everything *but* PulseAudio. The apps are broken, the drivers are broken, the operating system maintainers didn't integrate it properly, it's not configured properly for the user's machine, the people complaining wouldn't be complaining if they were more technical, a lot of distros have adopted it so it must be good. Did I miss anything here? This has been the argument thus far.
I'm going to be different. I'm not going to blame the developers, the applications, the users, the knowledge of the users, the operating system developers, or anyone else. I'm going to blame the one at fault, the *cause* of these problems. The one thing in common with this incredible list of problems.
PulseAudio is completely and utterly broken- in design, in implementation, and in application. It is horrendous, shameful, and embarrassing.
Dude, I'm not talking about lag, I'm talking about latency. Latency is the time it takes from inserting the data into the buffer for it to be heard. Lag may be bad, but high latency is certainly good.
Mediatomb is a deamon in itself and it's a totally different use case than the UPnP support in PA, so please don't compare apples to oranges.
Ya high latency may be on in a pure playback, non-interactive environment. Like playing a DVD or something. Ok, I suppose a couple seconds of latency would be fine, so long as everything is sync'd. If the video and audio are delayed such as to sync, the delay can be pretty high. Fine, but that has nothing to do with computers, an interactive medium. Here, latency is a very bad thing. The reason is that you want things to be responsive to user actions. If a user does something, you want an immediate response.
As such you need to keep latency as low as practical. Where precisely human perception on this kind of thing lies is a bit up for debate but it is well established as in the 10s of milliseconds. Thus you want to be able to dispatch data FAST. If you are taking a tenth of a second, you are taking too long.
What's more, there's no reason this can't be done. We see it done all the time on Windows and OS-X. They have no problems with low latency audio. Even when used "normally" meaning using something like DirectSound talking through all the software processing, you are talking maybe 30ms of latency. This works pretty well and seems to do fine for consumer stuff. However if you need better, for recording or something, you can go far lower using kernel streaming, or using a separate pro API like ASIO. Sub millisecond latencies are possible, though you do need a fast system to avoid dropouts.
This is all without any mucking about either. It just works. To the extent you configure anything it is in pro software and that is just the length of the buffer. You don't need a special kernel or the like.
Computers are fast these days, thus latency should be low. When a person does something, they should get immediate response from their perspective. That is good practice in general, but a total necessity in things like games.
What gets me in particular about people being defensive about this (like the grand parent) is that, as I said, Windows and OS-X do this and have done it for a long time. People aren't asking for something that is new, they aren't saying "Man I wish some OS could get this right, could Linux be the first?" They are asking for something that has been done by other OSes well for a long time. Heck they aren't even asking for Windows 7/X 10.6 level, they are asking for Windows 2000 level.
It should not be such a hard thing to have an API, or set of APIs, that programs can use to talk sound to the OS, and a spec for drivers to interface with that audio layer. The audio layer should then be able to handle simple tasks like volume control and more than one sound playing at a time, and it should be able to do so with a reasonably low latency and no skipping.
Yes there is: you don't want to be playing a game, and only seeing responses to your inputs seconds after you do things. Any noticeable input lag in a game ruins the experience. Ideally, you want no more than one frame of latency between reading inputs, running an iteration of your engine and getting it out to the display/speakers/haptics. Not all content is pre-recorded.
You're confusing synchronization and latency. There's no particular reason you can't buffer up a few seconds of audio, yet make sure that audio is played exactly when the video calls for it.
For many uses you can (and should) buffer few secs of audio and video, but there are definitely cases where it's not possible. One case for example is realtime audio effects. You get audio stream from audiocard input, do processing and send stuff to audiocard output. You just can't have latency of more than few ms between input and output. So no buffering
--Saval
One of the nice things about PulseAudio's design is that it allows you to combine large buffers for some tasks with very low latency for others.
You're assuming content is available a long time before it needs to be played. This just isn't the case. I want my games to feel snappy; when I drag iTunes' EQ sliders, I want to hear the difference immediately; I want to hear my trading terminal beep as soon as a new instrument is listed on the exchange. Striving for the lowest possible latency is the easiest way to achieve this.
"says such complaints and criticisms about PulseAudio in some Internet forums are not really shared by the vast majority of technical people."
Yes, actually they are.
I had Ubuntu running on our main home computer for more than a year. There were definitely some annoyances, but things were tolerable. Until I upgraded Ubuntu (I forget which version) and sound was broken hard - I spent hours fixing it, but got calls from home every few days asking me to "help fix the sound. it's broken again". Finally, I gave up and switched back to Windows.
Whatever happened to GStreamer? I thought that "circuit/pipeline" model for building audio systems would make it easy for developers, and foster a whole new generation of interfacing audio to apps, and people to each other by audio. Where did that catchy future go?
--
make install -not war
I suggest what is needed is to start over and design a new API and a new protocol ... completely separate from any implementations. Then you can have multiple implementations of the API, as needed (at least one per OS that wants to use it).
The API should, of course, be user space (the library implementation then translating to the kernel calls it needs to do, and maybe with kernel call changes if the kernel cannot now deal with the new needs). As for OO, that's fine for binding into an OO language. But the API design should specify its interface in all major languages, whether OO or not (do not just design it for a couple low level languages and hope all the higher level languages implementations cross bind the API the same way). The C++ interface should specify the exact classes while the C interface should be a non-OO specification around an OO design. Again, all the specification needs to come from the one source, or inconsistent variations can happen and ruin it.
The network interface should also be clearly specified before implemented (though not ruling out implementing concurrently with feedback to the protocol design). And there needs to be a renewed discussion of what format (codec) the audio needs to be in for the journey over the network. Ultimately that needs to be something negotiated over the protocol (as well as other things like sample rate, channels, resolution, etc).
And the network method should be designed to work over at least TCP and SCTP. UDP and DCCP would be a plus.
Audio is also a component of media in general. It would be even better if this design is treated as a multi-media design. Then you might have some hope of actually keeping audio and video in sync (something too many multi-media sources have failed to do) for content that has both.
now we need to go OSS in diesel cars
I highly doubt that: Windows and OS X have completely different audio architectures.
The bits on the bus go on and off... on and off... on and off...
And as I said, most applications seem to have this built in concept of "latency == bad"
Wrong.
Most applications have this concept that it doesnt matter, because for most applications it doesnt matter. You even went ahead and explained this yourself. Please.
There are *some* applications where Latency = Very Very Bad.
Will PulseAudio support them, ever?
That is the chasm Linux audio is standing in front of. On the one hand you got this nice group-think that the design of the audio api should have all these rerouting features and so forth, and on the other hand you have applications that absolutely cannot work with high latency.
I do not think that its in the best interests of the linux community to tell the people who demand high performance audio to go fuck themselves. I believe that its in the best interests of the linux community to get a nice solid high performance api working, then work to spread it to every distro until it is as ubiquitous as posix.
Only then should you build your monumental kitchen-sink api, and only do so on top of that now standard high-performance api.
"His name was James Damore."
That's the biggest load of crap I've seen. So it uses system timers and its own buffer management? That's sure looks to me like an overly complicated way of trying to get around poor primary interrupt latency in the OS kernel.
(That's one thing Apple got horribly wrong with MacOS, but fixed properly with OSX. MacOS didn't have predictable interrupt latency, and running any real-time applications was asking for trouble. How Avid, DigiDesign and Opcode succeeded is beyond me. However, OSX has the best primary interrupt latency of any OS right now, and the best audio stack. I really wish someone would leap-frog them to give them some incentive to make it better.)
Do you have any clue what you're talking about?
Forget the article: did you even finish the excerpt? Your post is just more know-nothingism from the audio crowd. What specifically about PA's buffering scheme doesn't make sense? It provides for low latency (especially when the PA daemon itself runs with realtime priority); it saves power; and it provides flexibility you'd expect from a modern operating system.
(Apparently, all these people here who never run more than one audio application over one output channel under one user would be happy back in 1995.)
And slow down interactive response such as seeking?
No, latency is _not_ good.
--- Hindsight is 20/20, but walking backwards is not the answer.
Okay, I don't use a normal "desktop" distro, so PulseAudio has pretty much slipped me by completely (good old ALSA, not broke, ain't gonna fix it) but the one line that scared the crap out of me was:
"For example, if a video is running in one application the system should automatically reduce the volume of everything else and increase it when the video is finished."
Er no. The system will damn well do what I tell it to. My volume levels are *my* domain, them being a user interface. I don't mind it being capable but the word "automatically" scares me. It also seems to add extremely unnecessary levels of complexity to a desktop system by literally abstracting every sound source and every output device (including network-audio) into separate entities - isn't the idea of a sound daemon of any kind to *merge* those entities seamlessly? That was the bit I liked hearing about PulseAudio - integration of esd, arts, alsa, oss, etc. into one place, but to then abstract out every program with it's own volume control seems daft (and adding another step into the "where the hell is that volume control that's making it so loud" process).
You know what I want? One damn volume control that controls the final output to my speakers (multiple independent speaker sets is an advanced configuration that I and most other people really don't care about, hotplugged or not). And everything *behind* that should be filtered and normalised so it's all the same volume unless I *specifically* say otherwise. Audio professionals are working *with* sound, so they have the tools to do what they like. 99% of desktop users just want their IM notifications to be heard as well as their MP3's without having to play with sliders all the time.
Newsflash!
+1 irony, you post bullshit FUD that has nothing to do with what OP is talking about, yet your sig bitches about SCO, the sad part is you get modded insightful round here!
IranAir Flight 655 never forget!
yeah, pulseaudio not working here. /dev/dsp or pulseaudio refuses connections and I have to restart it. Effects are: webbrowser hanging because flash can't send audio. Or youtube videos playing, but in silence.
Well it works almost all the time though, after I installed about 20 more pulseaudio packages not installed by default in ubuntu.
Still it happens that suddenly either the pulseaudio deamon looses access to
If /dev/dsp is not supposed to be opened directly by user programs why the hell does it still exist? /dev/pulsedsp and then the /dev/dsp is created by pulseaudio and manages all the legacy crap.
Why is there no
It's all bad design, really.
Also a good distribution should include only compliant audio applications (including IM and stuff) or adapt those programs so that they work with the chosen audio infrastructure. Hey ubuntu, you want the desktop, well get your sound working!
This text typed on a dell PC where there is only sound on the headphone jack but not on the internal speaker (yes it's connected!)
Atari rules... ermm... ruled.
Yes. Quite a bit of clue.
Do you have an arguments that you would like to make, or is your claim to fame here that you just want to insinuate that you have one?
"His name was James Damore."
So, an audio framework telling a video player "Hold on a sec, I'm buffering" is OK?
"I also ensured that it is very easy to turn PA off if you don't want it"
Keep the good work : best thing about PA !
For the record, I never got it to output ANY sound on any Mandriva I tested, on which it was... never really got it working on any distro, by the way (either with integrated soundcard or on my M-Audio Delta Audiophile). Closest thing was on Fedora, where it was at best barely spitting some bits of sound each few seconds (at worst, no sound at all).
So, yeah : keep working on the ease of PA deactivation. Really keep on.
Remote Procedure Call is another 'WTF?' claim -- you know Unix is very big on these things called Pipes, right? What the hell do you think those are?
They're not RPC. RPC is a mechanism to model access to remote resources analogously to access to local resources. To hide the mechanism (pipes, sockets, packets, connections, TCP, NetBIOS, OSI, ...) under a synchronous call model.
Pipes are streams, at least on UNIX (I don't know what other operating systems might put under that name, we're talking about UNIX pipes here). They model access to remote resources through a serial I/O model.
The RPC model and the stream model each have their strengths and weaknesses, which I'd be happy to discuss if you want, but the point is that they are not the same thing at all.
Calling pipes "RPC" is a complete WTF.
It's [PA] structured the same way the audio systems on Windows and OS X are.
Like hell it is, and I say that as someone who has programmed audio and MIDI apps for OS X, Linux and NetBSD.
There should be no such distinction. Any "lower level" API should be an implementation detail of the application-level audio system, just as the PCI configuration space is an implementation detail as far as X clients are concerned. As for the traditional distinction between the audio deamon interface and the "lower level" one: it's an accident of history that we lived with that split so long. PA is a better world.
Last time I checked, PCI configuration was not time critical. As for the "accident of history", fact is you've got too much functionality in userspace.
As for POSIX real time scheduling? Just because the API exists doesn't mean it's implemented or configured on any of the major distributions, as it requires patches to the regular Linux kernel that would be detrimental to most peoples requirements. And my comment on switching users is no more anecdotal than Poettering's unsupported assertion that PA does what most users want.
PulseAudio is a source of many problems, yes, but it's no worse than all the other bandaids, like Esound, NAS, etc.
The reason why all these bandaids were introduced is because ALSA devs continue to refuse to make the kernel audio devices multi-open. In any sane world, opening an audio driver a second time would not fail or hang or stutter, but instead would AUTOMATICALLY connect all audio inputs to a kernel software mixer and hence work transparently.
Instead, because the ALSA devs are utterly insane, they require dmix to be configured up for ALSA apps in user-space, and provide no direct multi-open driver for legacy applications. As a result, audio in the Linux world is just borked. It doesn't have a hope of working in the presence of the billions of legacy audio apps or with proprietary crap like Flash for example (and if Flash works then something else won't, or a second instance of Flash will break, etc). And that's why crap like PulseAudio gets invented as a bandaid.
Sure, PulseAudio is a royal pain, but the people who deserve the worst kicking are the morons at ALSA, who for years have refused to add kernel multi-open to their audio drivers for no sensible reason.
If ALSA continues along its current path of total myopia, the best solution for Linux is probably to scrap ALSA and replace it with the latest OSS. Then no bandaids will be needed.
Then on to power consumption.
Why is this being done by PA not by ALSA? It really seams this should be implemented in ALSA not in a userspace tool
OSSv4 or older flavours simply does not have the API to deal with a modern linux desktop
Instead of getting into flamewars over APIs, could you explain why OSSv4's API can't handle the modren linux desktop.
...it really wouldn't be a proper solution (and guess what? it would need a daemon running anyway!!)
Audio APP->kernel-> seams like a nice solution, then IF something needs to be pushed back out into userspace, do it
Audio->userspace->kernel just adds more problems for 90% of users, it makes sense to me to have audio->kernel->userspace->kernel when required, the 10% that regularly use stuff that needs userspace action configure it themselves (much like people install jack if they need it).
One final point regarding APIs. Why should the standard API cover stuff like position dependent events when this could be handled by a wrapper/app?
More and more audio device *are* network based.
Then there is the whole concept of thin-clients.
Most users don't care, we've simply gone from something that worked to something that doesn't, but generally speaking most desktop audio is coming out of the speakers, this path should be a priority and if that means stuff gets a bit uglier for these devices/setups so be it. If the only way to handle them while keeping desktop audio sane is too ugly then the people that use these devices should configure PA when needed (or hal should), so that 90% of the time desktop audio (usually single app(+random event sounds)->speakers) is as simple as possible.
Then of course there is the mixer.
This is partly inherited from alsa but dear god do audio devs not understand that 0 = mute? If you must have an infinite scale then don't tell me my audio is at 0!
PulseAudio as an architecture is fast becoming the defacto standard
Terrible argument as soo many de facto standards suck. (not that it matters but de facto is two words, much like de jure)
In addition, rights access and management is a big issue.
I think this is a major strength of PA, however I am the only person that uses my desktop and when I switch to a root TTY I still want to listen to my audio alerts, is there an easy way to disable this feature. (e,g the bug that existed in alsa was a feature not a bug)
You've probably being using a distro that doesn't care to integrate PA properly
Funny i use Fedora, which AFAIK has it's PA maintained by Lennart, yet it still has many problems.
p.s thank you for the informative posts, while I disagree with parts of PA i do appreciate it and can't stand the level of FUD around it.
IranAir Flight 655 never forget!
How many people install a distro with PulseAudio, then disable it? I one of the first things I do on a new Fedora install is rip out PulseAudio. I know many many other people who do the same. Just because some Linux flavor "adopts" it and installs it by default, you can't assume that everyone using those distros actually uses the piece of crap.
pulseaudio?? I installed it before it was the default sound daemon in ubuntu and have had very minor issues, the only issues experienced were with flash, which was quickly resolved and networked audio over wifi, which seemed stutter but over Ethernet sound was perfect.
Use "pinfo" to read info pages: apt-get install pinfo
pinfo is the opposite of "info" in almost every respect:
And as a bonus, you can use it to read man pages too:
I see. That clears the confusion to me. PulseAudio was never tested by people who can hear. And the quoted "technical people" are most likely simply deaf.
Because even on most $5 "Made in China" speaker one can hear the cr*p coming from PulseAudio and even jitter of ALSA. Yes, $5 "Made in China" speakers improved that much in past years. And the PulseAudio creators must be really deaf to not to hear all the sh*t PulseAudio does to sound.
P.S. OR they test it exclusively with YouTube. That might be another explanation.
P.P.S. And do not get me started on PulseAudio configuration nightmares... (They blatantly discarded lessons of ESD/Artsd fiasco.) Configuration tools are simply dysfunctional and just as before trivial task of switching from one sounds card to another is a chore involving config editing on command line and couple of reboots.
All hope abandon ye who enter here.
Lag==Latency, and those are not the same as a buffer. I didn't know Pulse had a buffer, but from my standpoint it certainly acts like latency/lag, because I don't want an extra 200ms between me changing a tune and hearing the change. Never mind playing games like FretsonFire (or games at all, which shouldn't be buffered ever and should be as low latency as possible). Why is it that Windows and OSX seem to get this right (you can call then many things, but not deficient in the audio area)? I simply cannot understand how you could think high latency is certainly good, thats simply never ever the case.
In terms of playback, the digital side of things should be limited such that it can never clip out. Digital clipping sounds extremely bad, and can damage speakers if it happens at high playback levels. Your computer should function such that 100% on the volume slider is equivalent to 0dBFS, no attenuation. All volume should be attenuation only in the digital domain.
So how do you make things louder? Turn up the volume on your amp. Computer speakers have a volume dial, receivers have a volume dial, etc. Use that, control the volume on the amp, not the digital levels. People shouldn't have to worry about setting their controls such that it results in digital clipping.
Power consumption in alsa: In order to enable this mode you need to disable interrupts and then deal with the filling of the audio buffers via some kind of timer mechanism. This approach also requires that the whole mixing buffers are rewritten when needed (this is across all applications). This needs some kind of central process to manage all the audio from all applications, or a "sound server". The likelihood of this even occurring has to be offset with the overhead of remixing etc etc. but the tradeoff is generally fine unless you are skipping forward/back in audio tracks all the time etc.
The argument about writing for the most common path is not one I'd personally agree with. You have to design the architecture to handle all the cases that will be thrown at it. Sure, maybe make the common case pipeline a clear run through your architecture, but you can't really do things fundamentally different in difference cases. Typically a problem occurs when something changes half way through, you cannot tear down your "special setup" and restart in "generic setup" without letting the user know with a pop and a click.
0 == no attenuation in my book, not mute. A volume of 0dB is pretty much the max it can be.
And -inf dB attenuation != mute either. My volume can be pretty near 0dB and I can still have the thing muted... If I hit mute twice, I don't want to lose track of what my volume was at! In my book, mute state handling should be totally separate to volume. How it's presented to the user via GUI tools is perhaps another question tho'.
The fact that audio cuts out when you switch to a TTY is the domain of console-kit. There used to be a way do disable it via HAL but as HAL is dead now, that no longer seems to work, but I'm sure there is another way to do it. It's basically tweaking the console kit policy.
OSSv4 or older flavours simply does not have the API to deal with a modern linux desktop, plain and simple.
And yet for me it's the only system that will play multiple audio files at one time. ALSA/PA give the entire sound card to that paused youtube video loading in the background.
Pulse Audio's flexibility sounds cool. But I just want my 5.1 audio setup to work. It doesn't. Right now it's completely broken, audio skips and I have to use low level programs to get surround sound. The audio system should just pass the raw stream through to my very capable receiver. When I try to use PA to do this, the receiver shuts down. I've spent hours trying to configure this through random "guides." I'm technical but I've grown very tired of tweaking, I want a distro that just works for a very common case - multimedia.
PA is not designed for being used when you are recording and need low latency. Lennart will tell you (and has told me) to use JACK for recording situations where you can set the system for ridiculously low latencies. I do not want to be seen as defending PA (I think it was released to the masses long before it was close to the level of functionality of its predecessor) , but the devs have been working recently to make PA play nicely with JACK. When I start JACK, PA releases those devices and I do my recording, When I finish, I stop JACK and PA takes them over again. Its not perfect yet, but its working for me. I have my Zoom H4 usb microphone as audio input, usb midi for keyboard input and the ALC888 as the audio output and it works fine with no discernible lag for me. Still need to compile a reatime kernel, but thats next week. Matt
Lag != Latency. Lag is the time between two things that should be synchronised, but are not. Latency is the time taken between something going in to a black box, and it coming out.
If there is a buffer of 20 seconds, and I completely fill that up right at the start, the data going in will have between 0 and 20 seconds latency. The lag is completely different and as we have no idea what we're supposed to be synchronised with, I cannot comment about what lag could or could not be in this case.
It's this general misunderstanding that means that statements like: "I simply cannot understand how you could think high latency is certainly good, thats simply never ever the case." so completely wrong.
I'm not suggesting that games etc should have a ridiculously high lag between a visual event/user input and a sound event. Clearly this wants as close to lag=0 as possible. But you should really also consider that for many applications and use cases, latency IS a good thing due to the power savings it introduces, and thus the longer battery life.
If that's what you see, then your setup is wrong. Blame the distro or blame the close source crap that we can't fix.
I can use Firefox to watch a you tube video and play it out via my Bluetooth Hifi while listening to music on my built in card and move all those streams around at will. Ergo, the problem is with your setup, not PA. Complain to your distro.
thanks for the heads-up... I'll wait and see for the next LTS release... Ubuntu might have got it right by then...
Donald 'Duck' Dunn: We had a band powerful enough to turn goat piss into gasoline.
Worrying about network sound when it doesn't work properly locally is putting the cart before the horse. Though I don't see the need for a network transparent audio system (I mean I can play audio over a network without one just fine) I won't say it is something that shouldn't be done. What I will say is that if you are going to do it, fix the simple shit first. When you've got a rocking setup locally, then I'd love to hear about how you are going to make that work over the network. However if adding that network capability is going to cause trouble locally, then don't do it.
As you pointed out, most people just want a sound system that works well on their computers. This is obviously not an impossibility, Windows and OS-X do it without problem, and have for a long time. They also handle things like multiple devices, surround, devices being added and removed while a system is running, sample rate conversion and all the other things you might think to list. Finally, they do it all with a minimum of latency.
As such, show me that for Linux first, then show me it working over the network. Don't show me some broke ass thing that doesn't work well in a plethora of situation and claim it is "better" because it can do shit most people don't care about.
More features are NOT better if the features don't work well.
but I do have to say that Pulse Audio... well I have nothing good to say about it. OSS worked for me back in the day and I rarely had any issues. ALSA worked for me after some fidgeting but things got stable quite fast. Pulse Audio.... nothing but trouble since Fedora 9 and onward. Is it getting better? Possibly it is, but on all machines that I have used it on it always becomes excruciatingly painful with its odd volumes and.... ok I feel a rant coming along here and I don't want to really diss anything that I didn't actually pay for. But daym... I do have to say that if the rest of GNU/Linux was done this way we would not be here today PERIOD.
It's all very handy in the environment you describe but it can just be a source of weird bugs in a simpler environment. An odd one was multiple versions of Thunderbird, Seamonkey and even Netscape on gnome crashing every time the user tried to compose mail - no matter which version I put on there it just kept falling over if run locally but worked every time run remotely. The thing tried to make a noise, went looking for bluetooth hardware that didn't exist and then crashed the email client. Removing pulseaudio and reinstalling pulseaudio without bluetooth support fixed that.
Very nice but...
I shouldn't have to spend hours flailing around trying to get audio working in the year 2009. I have yet to get PA to work correctly on any hardware and on some systems I haven't been able to get it working at all.
It's ludicrous. All the finger pointing in the world won't change the fact that with Kubuntu and ALSA my audio worked out of the box almost every time. With Kubuntu and PA it's never worked correctly if at all.
Frankly it's as bad, or worse, than getting an ATI video card to work correctly.
Between video and audio I gave up on K/Ubuntu. It just wasn't worth the headaches.
If JACK can handle low latency and it works, what is the point of PA?
The only case where latency does not matter is media player ... and then only when the media is audio, and even then there are limits (~200-300ms max). Video must be pausable and seekable - without delay. VoIP is killed with 50ms delay as the codec will create additional delay.
And this is yet again, lumping all the problems of a distro at the door of PA without *any* specific justification other than it was there.
This is the problem of Linux development in my opinion: a little knowledge is a dangerous thing - e.g. knowing enough to know that there is something called pulseaudio installed and removing it makes things work ergo it is at fault as opposed to all the configuration and setup that is *supposed* to go part in parcel with it.
I'm not saying that the problem *wasn't* with pulse itself, it's just that all too often people jump to the conclusion that it is when really there is no evidence for or to the contrary.
Until a proper investigation shows where the problem really lies, I keep an open mind.
It will be the standard if it stops sucking, otherwise. Kiss it goodbye, the hordes will choose what works for them (OSS4 for me). I could give a shit less about network based audio. If you can't make my recording studio work without latency and hissing, you're worthless to me. I don't care if that's "ignorant in the extreme" either. My choices are purely pragmatic. I'll happily toil in ignorance if it is productive.
Pulse Audio does not meet my needs.
... I woulda stuck with aRTs.
Why can't anyone get this as right as *shudder* Windows?
Dare I dream of Mac audio?
Heck, why not just have a mixing driver for /dev/dsp that doesn't crash or drop out? That's probably what 90%+ of linux desktop users really want, and for the audio nerds let them deal with JACK et al on their own time..
OK, if we use your definition of latency and lag (which is fine by me, I simply meant lag by latency before then), and if latency is there because of power savings, how much power /does/ it save? I havent seen dramatic improvements because of it, on my laptops (which I presume are the 'many applications and use cases' you're talking about, have you, eg are there benchmarks on this?
Even so, Pulse certainly gives many users the perception of lag. Whether or not this is because of buffering or simply /is/ laggy, (which many of us infer) will you do anything about this? I use ALSA because for me it always Just Works, and in the cases Pulse does work, I percieve it to be laggy. No matter which way you slice it, there seems to be consensus on this, and I'd like to see stuff fixed.
The 'laggy experience' Pulse gives me and many other together with the fact that every article I read on the subject moans about the bad design of the total software stack you use with Pulse, gives me the impression Pulse is simply too big and complicated. Now, the software itself I admit I don't know jack shit and just restate the comments of other devs, but can you comment on that anyway? Do you really think Pulse has a sane design?
If I look at this article, it certainly seems to me OOSv4 has it right and Pulse not: http://insanecoding.blogspot.com/2009/06/state-of-sound-in-linux-not-so-sorry.html
An interesting side note on audio APIs: http://blogs.adobe.com/penguin.swf/linuxaudio.png
Man, not that bullshit again...
Let's break this down.
First you have platform independence layers - things like ClanLib, SDL, libao, PortAudio, Allegro, and Open AL. These would be present on any platform. That's the point of them. The diagram seems to go out of its way to mix these in with lower-level technologies, as if to make it less obvious that they're just included to pad out the diagram.
Then there's the trio of obsolete network audio servers: NAS, ESD, and aRts... I suppose if I were to fire up a quick game of xpilot then I might want NAS, but otherwise one can usually assume these days that these three servers aren't installed and don't need to be.
There's FFADO - which is relevant if you're using a firewire audio device... How many people do this? I guess it could be popular among musicians and sound techs - have audio hardware outside the computer's case, accessed via a bus that isn't USB... But this is a driver layer, not an API layer - and these days it seems FFADO provides an ALSA interface, so I think the complaint here is obsolete.
That leaves three modern sound servers (Jack, Pulse, and GStreamer) and two low-level APIs (Alsa and OSS). This is still a bit of an unfortunate mess IMO but nowhere near the rat's nest implied by the diagram.
Bow-ties are cool.
You were making a good point until you resorted to profanity, which shot you right down from the sky. Such a shame.
I think you accidentally switched on the grown-up internets today. Sometimes the people use the bad words there. It'll be OK.
Some people don't even think the words are "bad"...
Bow-ties are cool.
Talk about fail.
Please, talk about failure...
Bow-ties are cool.
For months every FC9 update would break sound (and there
was at least one update that broke sound every week). Either I could not listen to
YouTube sound or Skype would stop working. Or both. For a long time Pulse was
de-installed. Then I had to install it. Then I had to futz with controls (sometimes
system controls, sometimes things in an application).
Some weeks I could not get sound working till the next update.
Why is it such a nightmare?
Sure it is the distro's fault.. So? It's been really bad.
Look, I understand that getting this stuff right is a hard problem and takes some effort to get resolved, and that' s not necessarily the fault of the developer. But it's not my fault either. I don't have time for this kind of thing - while there was a day when I really enjoyed spending a bunch of time fiddling around with my computer to get it to work right, those days are mostly over for me now. I need sound to "just work", and if Pulseaudio doesn't, then I'm not using it.
JACK is designed for music production and very low latencies. It was not designed to keep batteries running on a portable device. It was not designed to "Just Work". I do not know all the pro's and cons to be honest. Typically only software for audio production interfaces with jack. It is possible to have PA as a Jack client. Therefore you can run jack and have PA as inputs so you can keep JACK going all the time and disconnect PA when you want to record. I was not able to get this stable on my system. i filed bug reports but was not able to meet the dev's report requests (running PA under gdb kills jack before you get interesting output). I have seen reports that it is working much better now. Matt
The same situation with me. But I solved it easily. I removed PulseAudio, cleaned things out and Ubuntu studio rocks! Do "aptitude purge pulseaudio" and you'll be on pure ALSA with all your Ubuntu fun up and running.
PA is so buggy itself and with Ubuntu installation, that it can not easily step back and allow Jackd work properly. The only solution is to remove PA.
cat > /dev/dsp
DONE
So, Lenart says that Ubuntu guys are so stupid that can not get PA right in 3 consequential releases. Who's smart to get it right? I spent a week trying get it right on Ubuntu 8.04, then on Fedora 10 and found only one solution. Get rig of PA and be happy.
I use recoding tools, MIDI tools and other music soft and PA drives me just crazy because it can not allow normal work of jackd.
So if Ubuntu guys are stupid, Fedora guys are stupid, and I am stupid, the only smart guy is Lennart. Let's make him a President of USA!
I am not a novice at this stuff, but neither am I an expert by any means. However, when I can't make heads-or-tails of all the config files it seems to take just to get sound working, it demonstrates to me why Windows is still leading the market. It figures out what hardware it has and configures it, period. Why is this so difficult for Linux developers to understand? Not all of us have the time nor expertise to mess with all these layers of audio crap. I just want to hear sounds from my computer! If people had to jump through these same hoops just to see an image on their monitor, I bet something would get done. Why not with soumd? Rediculous.
PulseAudio supports all of these devices right now (although I've not had time to try the uPNP stuff on my PS3 specifically so don't quote me on that!)
I'd like to try this out. I did a brief search for PA streaming via UPnP to a PS3 but didn't find anything. Could you point me in the right direction?
Thanks,
Tom...
I am amazed by the amount of hate being thrown here. Thank you for some clarification on a number of issues. When PA was first introduced into Ubuntu, I had some issues with it, but by the next release it worked perfectly for me with the default install. When I built my primary machine, I was very careful about what hardware went into it. I had a nightmare of a time trying to setup my audio a very particular under windows (when I still used windows years ago). In my (evidently lonely experience) PulseAudio works amazingly once it is setup. While getting it just the way I wanted might take a little bit of time, it is FAR better than my experience under Windows where opening or closing an application, plugging in or unplugging an audio device could reset or simply break my configuration. Of course it would be nice if everything just worked the way I want them to work, but it probably isn't what everyone else wants. Anyway, I am VERY happy with PulseAudio and just want to say thank you for your contribution, even if others won't take five minutes to google their problems.
This approach also requires that the whole mixing buffers are rewritten when needed (this is across all applications).
If computers running apps using pulseaudio's alsa emulation save power then why would all apps need a rewrite if this were implemented in alsa.
Perhaps i am misunderstanding this but currently I think what your describing:
app(s)->pulseaudio(mixes & buffers) ->ALSA->hw
I fail to see why this is better than
app(s)->pulseaudio(mixes) -> ALSA(buffers)->hw
I'm not suggesting that you do complex mixing in alsa, just that the buffering could (and as its a hardware related feature, not an audio one, should) be implemented in alsa.
0 == no attenuation in my book, not mute. A volume of 0dB is pretty much the max it can be.
It may simply be a case that every sounds system's GUI tools (from alsamixer to pavucontrol) suck at representing that but it really needs fixing because everything else (from amarok to windows) gives users the control the expect 0% = silence (something that is even falsely claimed in pavucontrol)
IranAir Flight 655 never forget!
Here we are, taking about playing sounds....
and the conversation goes from sound server choices to distros, to complex sound server software, buggy software, and then people with bad attitudes, and then goes all the way down to kernel latencies, real-time software, complex interfaces/APIs and multithreaded programming!
SAD!
Developer or user, I can go to my Windows or OSX box and merrily play video, synced with my sound and no problems, or I can play my internet radio and surf heavily with no problems. And write software to do audio mixing/fades with zero problems... with hardly any pre-configuration.
If I need to know a complex API, how the kernel works with real-time needs and have apps that constantly break my audio subsystem... What does that say about the state of Linux audio? Sorry to sound like a broken record, but it sounds pretty messed up to me as a 'developer lightweight'. The way Linux sound is being handled really helps bring it down a full notch compared to Windows and OSX and that's bad since Audio and Video are pretty much the things that can put Linux on top as a F/OSS offering, otherwise, it will always be a niche thing that corporations fork to create something that does work (Android and OSX for example).
At least video playback is getting better.
That's how my Linux sound works ... and it sucks. Whenever I press play, the video plays for a few seconds and then the audio kicks in. When I press pause, the video immediately stops, but I get to listen to the audio for a few more seconds.
And that's supposed to be a good thing?
So after my last bit of flamebait in this thread, I finally went and read TFA, and the nature of the problem immediately flew out and hit me in the face.
I'm sure Mr Poettering has extremely positive intentions, fundamentally; however the single thing he is guilty of here, is a violation of McIlroy's Law.
"Do one thing, and do it well."
The article mentions how Poetter has included multitudes of magical features which, on the face of it, sound absolutely wonderful. Everything including the kitchen sink has seemingly been added.
However, there's just one little problem.
Not all of us are audiophiles. Not all of us (in fact hardly any of us) need to be able to swap sound devices mid stream. Very few of us need client/server sound playback over a network, either.
All most of us really want, is something which will play our wav files, mp3s, and the soundtracks of our movies, in such a way that we can hear them well, without crackles, hisses, pops, or latency issues.
This apparently doesn't exist for Linux at the moment, so if the love and adulation of thousands of Linux users is what Mr. Poetter seeks, he doesn't need to give people all these extra features.
All he really needs to give us, is smooth sound playback on the single, local sound card we have in our machines. That's all.
There's no particular reason you can't buffer up a few seconds of audio, yet make sure that audio is played exactly when the video calls for it.
Games.
I click the mouse - I want to hear the gunshot and see the muzzle flash immediately.
fast forwarding will require rebuffering? neat...
So, an audio framework telling a video player "Hold on a sec, I'm buffering" is OK?
If the video player knows how to deal with this, then yes. :) Being informed of this state is better than not being informed of this state.
There are cases (network streaming, primarily) where a certain amount of latency is unavoidable. In such cases, performance is best if the applications can support this scenario, too. Some applications can tolerate this scenario very gracefully (again, video playing being a good example) if they are written to handle it. Others (like games, as another poster mentioned) cannot.
Bow-ties are cool.
Lag != Latency. Lag is the time between two things that should be synchronised, but are not. Latency is the time taken between something going in to a black box, and it coming out.
Lag is one possible effect of latency - but one that can be managed or negated in some cases by accounting for the known latency.
Bow-ties are cool.
"As soon as I got rid of PulseAudio? It started working."
You lucky bastad!
As soon as *I* got rid of pulseaudio, my sounds stopped working entirely. And my wireless. Headscratcher there:
http://ubuntuforums.org/showthread.php?t=1258063
My turnips listen for the soft cry of your love
Do you have any clue what you're talking about?
Do you have any clue what you're talking about?
Do you have... any... clue... what you're talking about?
Do you ha ve any clue wha t you're talking about?
Bow-ties are cool.
If that's what you see, then your setup is wrong. Blame the distro or blame the close source crap that we can't fix.
I can use Firefox to watch a you tube video and play it out via my Bluetooth Hifi while listening to music on my built in card and move all those streams around at will. Ergo, the problem is with your setup, not PA. Complain to your distro.
Actually, another possibility is that all his applications use /dev/dsp for their audio needs. Alsa only supports one /dev/dsp application at once, I believe, and I think Pulse is the same unless you use the padsp wrapper. Thus, running flash would tie up /dev/dsp, and any other program trying to use sound (via /dev/dsp) would fail. On my systems I use alsa with dmix - which means I've still got the one-program limit on /dev/dsp, but just about everything I use other than flash uses ALSA...
Bow-ties are cool.
Hi all... FreeBSD user, not really a Linux guy. What's the difference between our sound system and Linux, anyways? IIRC we're based on Open Sound System, but I could be mistaken. Sound still isn't configured by default in FreeBSD, but it seems to work quite nicely once the right kernal module is loaded. I can have any number of sound-using apps open. They all open /dev/dsp and get their own sound channel.
Anyways, just curious is someone who's familiar with both OS's can fill me in. This conversation has been really interesting.
/me laughs at the way /. has trimmed the subject to add the Re: prefix :p
You cannot separate the mixing from the buffering like that. Consider two apps, both playing audio tracks (it will sound terrible but let's not think about that!). Both apps have fed 10 seconds into the buffer so they can "spin down" and save power. All well and good. So the output is mixed and fed to the device buffer with the highest possible latency it supports. Again, all good. Now the user suddenly skips a track on player A. What happens here is that we have to throw away the 10s of pre-mixed audio, keep Player B's audio but remix it to new content provided by player A's decoding of the next track. So the mix+buffer has to be kept together, so that the buffer from a given app is not thrown away until we known that it's spent. AFAIK, these buffers can be passed in to PA under zero-copy and are only copied when the audio is mixed and then dumped into the device buffer. i.e. it's very low overhead.
As for the "implemented in alsa" stuff, it sadly isn't really a valid comparison. If it *were* implemented in alsa, we'd first of all need some kind of daemon to run and handle this mixing for us. We'd need something that has exclusive control of the real underlying hardware so that it can disable interrupts on it and feed the data into the device buffers under it's timing control, regardless of whether applications start or close inbetween. In the end you'll just design PulseAudio all over again but call it "alsad" instead. So the whole exercise is rather pointless!
And as for the comments about representing sound controls in GUIs this is actually a pretty complex task, especially when you take the concept of flat volumes into consideration. For every app there are effectively three volumes kicking around but it will only ever make sense to show the user a single unified volume.
When it's back online (currently that service is down due to Trac basically not handling things!) this article should be insightful: http://0pointer.de/blog/projects/writing-volume-control-uis.html
I don't know what the problem is for everyone else here, but I have yet to have any problems with PulseAudio. It "just worked" as the default on Ubuntu and Kubuntu 9.04, even in virtual machines. Before PulseAudio, I had to dig into config files to get my sound card working, and if I didn't do that, only one application would have sound at a time. So maybe I am missing something, but from where I am sitting, PulseAudio is definitely an improvement.
Interesting... while so many distros got sound right prior to PA, they all mostly now have a problem with PA in the mix. If all of your users are doing things the wrong way with your application, its probably your application that's at fault.
Fedora and Mandriva have the best PA implementations, according to the developers. Fedora 10 has a pretty old PulseAudio, by the standards of development (PA development is quite rapid, in partly to implement all the bug fixes people in this thread insist Lennart isn't interested in writing). F11 is better, and F12 will be rather better than that. F12 Beta comes out tomorrow. Mandriva 2010, which is nearly released, should be good also.
Flash also uses ALSA. I'm not sure why your version would be using /dev/dsp. Mine certainly uses ALSA.
What is a common problem on distros is installing 64 bit browsers but relying on 32 bit plugins.
When combined with PA under the default setup (ALSA redirected to PA), you need to also remember to install 32 bit versions of: libasound, alsa-plugins, libpulse. If you do not, then the firefox's use of ALSA will fail and (I'm guessing now as the source is closed and I can't look) Flash will fall back to OSS.
Like I say, the distros play a big part here. If this is the setup they distribute, they need to think about this kind of thing.
Also the 1 device per /dev/dsp can be solved by kernel 2.6.32 (maybe) + Fuse 2.0.x and osspd. More info here: http://www.kernel.org/pub/linux/kernel/people/tj/ossp/ when combined with a pulseaudio setup. It could be made to work without PA if someone wrote an appropriate proxy.
Just waiting for this kernel bug to be fixed: http://bugzilla.kernel.org/show_bug.cgi?id=14023
All that said, as OSS is disabled by defaul on Fedora, and other distros will follow suit soon, I suspect that most people will forget about OSS support before too long.
"I'd like to try this out. I did a brief search for PA streaming via UPnP to a PS3 but didn't find anything. Could you point me in the right direction? "
http://0pointer.de/blog/projects/oh-nine-sixteen.html
To be honest, I've not looked much at this specifically (hence my original disclaimer!). I just know the support is there. You essentially just run paprefs and tick the right boxes and your devices should show up. I'll probably have a proper play with this sometime soon, so if you're interested, subscribe to my blog and I'll post something about it when I've got more info.
Well, not really. It could point to a documentation problem or it could be to do with certain distros aversion to getting involved with upstream projects as much as they could.
There are numerous problems being represented that are all grouped under the same heading, and that then informs your "all ... have a problem with PA". Like I've said already, the majority of the problems lie with most applications creative use of the ALSA client API (which make it impossible for us to compensate for), the drivers not supporting accurate timing information that is needed for timer based scheduling, or poorly integrated distro. None of these (bar the last one maybe) is a "pulseaudio problem" per se. There are other problems that *are* of course (bugs get everywhere) but it's totally unfair to PA to group things up like that.
No reason, except that audio is often multiplexed in the same stream as the video (as in a DVD.)
Also the 1 device per /dev/dsp can be solved by kernel 2.6.32 (maybe) + Fuse 2.0.x and osspd.
Yeah, I remember that appeared as a story on Slashdot recently. It seems a bit hackish in a way but I like it - accessing /dev/dsp seems a pretty straightforward way to output audio, and I like that Linux support for it is improving. ...I could've sworn Flash still used /dev/dsp... <shrug>
Bow-ties are cool.
Clients are able to notify PA to overwrite the rest of the large buffer slightly forward from a hardware playback pointer, so it's possible to stop (or modify) sound and video with a very short lag.
When playback is (re)started, it shouldn't lag much because player will start filling sound buffer as fast as possible (there should be a certain pre-buffer required though before PA starts playing) and will stop when 2s of the buffer is filled, and then get periodically woken up each second to re-fill the 1s fragment again.
For games or interactive audio that's of course not acceptable, but then they can simply negotiate short wakeup periods for as-low-as-possible latency, although obviously not as short with specialized tool like jack - I guess jack turns on audio card interrupts to get even lower latencies?
I'm not completely sure about all above, but that's how I understood it from Lennart's blog.
If its not easy to figure out how to configure, its more than a documentation problem. I fail to see why anyone should be "getting involved upstream." It should be simple enough to figure out on its own.
You say its unfair to blame PA for problems, but most of those problems WERE NOT THERE prior to PA. I say its totally fair to blame PA.
Consumers don't care why it doesn't work,crash or whatever reason it becomes useless. They all want a product that just works,free or not free,makes no difference to them/me
Jack of all trades,master of none
This is why distros play an important job. Compiling your own kernel is a complex job that 90% of users shouldn't have to care about. Even with a shedloads of documentation, you still need to keep on top of kernel developments to ensure you're using the right options and the right approach. Ditto with configuring pulse. I don't deny that it's a complex beast to configure correctly, but that's why we have distros. Just like we vote in politicians to read policy and make decisions on our behalf (why everyone shouts "referendum" whenever anything vaguely complex comes up is beyond me - the people voting in referendums do not read the policy in question to make informed decisions - they read the red tops... insane), so we chose our distros to take care of this stuff for us. Users should not have to venture beyond a few ticky boxes.
And none of these problems were there before the Linux kernel, so obviously it's the one to *really* blame right?? Argument fail. :p
The problem with PA's low latency set up is that it consumes and inordinate amount of CPU. Lennart has admitted that. The problem with sound servers doing too much is that they will inevitably add latency. Paradox.
Here's all you really need to know:
The Linux world is converging on two sound solutions: JACK and PulseAudio. Both of them solve important problems.
When you want audio with absolute minimum latency, like for professional audio recording, you want JACK. You also want to be plugged in to the wall, not running on battery power, because JACK will keep your CPU busy.
If you want to run Linux on a modern laptop or netbook, you want PulseAudio. PA is designed to let your CPU sleep as much as possible, and thus save battery life.
I can hear some of you now saying "I don't want any sound daemon; I want to run my apps against the bare metal." In that case, I hope you never want to hear sounds from more than one app at a time. Modern motherboards tend to have very simple audio devices, with absolutely no hardware support for mixing audio, or even sample-rate-converting audio. You might have a single output device that accepts a single stream of samples at 24-bit 48000 Hz, full stop. "Oh, I'll just let ALSA Dmix handle it." Why is Dmix good and PulseAudio bad? Both are user-space solutions; and PulseAudio can do anything Dmix can do, plus more.
Or maybe: "I'll just run OSS4, which does sample-rate-conversion." Yeah -- in the kernel. Not the right place for it; kernel drivers are not supposed to use floating-point math. OSS4 tries to do everything in the kernel, and uses IOCTLs to set parameters in the driver. I don't want bugs in the audio stack to cause kernel panics; I want complicated audio mixing and conversion to happen in user space. (With realtime priority set, thank you very much.)
PulseAudio isn't perfect, but the basic ideas behind it are sound, which is why the whole Linux world is adopting it. We really do want a user-space daemon to do all the stuff that isn't appropriate for in-kernel drivers to do. If we wanted to throw away everything and start over from scratch, we would pretty much re-invent PulseAudio as the best solution; look at the user-space daemons used in Mac OS X and Microsoft Vista/Windows 7. Given that reality, how can we best proceed: by throwing out PulseAudio and starting over, or by fixing the remaining bugs in PulseAudio. I vote for fixing PulseAudio, and so has the rest of the Linux world, which is why PulseAudio is getting universally adopted.
The worst of the problems are over by now. To clean up the Linux audio mess, we have had to fix bugs in ALSA drivers, fix bugs in audio applications, fix bugs in PulseAudio, and get the distributions to setup PulseAudio correctly. It has been painful but we are well past the worst of it.
If you can solve your specific current needs on your specific current hardware by disabling PulseAudio, then fine, do that. But don't generalize this into thinking that PulseAudio should be removed from all systems and abandoned.
I think Lennart should release a new audio system called "Audio Daemon 7". Microsoft seems to be doing well with "Windows 7", by dropping the tainted name "Vista". At this point, the name "PulseAudio" seems pretty tainted. But PA itself is the Right Thing To Do and it's becoming the standard.
steveha
lf(1): it's like ls(1) but sorts filenames by extension, tersely
Colin, that's fine and dandy but... Your daemon can't even handle the fact when I use konsole and press backspace to trigger the beep several times will coredump the server. I will continue to remove PulseAudio from my systems until 1) its CPU usage is reasonable 2) It can let me control my hardware properly. Especially for me where the HW has no PCM capture (I have to use ALSA + jackd + jack_capture to get around this problem) 3) It does not crash so much causing me no end of pain with multiple apps requiring audio. Frankly I wish someone would push/convince Linus to get OSS4 into the kernel and help us get rid of ALSA (deprecate it) and then strip PulseAudio down to just network audio ONLY. We've had enough crap in the Linux Audio subsystem for so long, it's time to do the right thing and chunk the whole shit out. I'll accept more pain if we get it right, finally.
Everyone wants a Tux in their life.
Yeah, because *my* computer is so shit it can only decode the DVD audio in real time and there isn't any way that it could possible decode say 20 seconds worth of the audio, and pump it into the audio layer in anything under 20 seconds right???
This is *exactly* the point I'm making when people here the word latency, they assume completely the wrong thing. You go on to say "As such you need to keep latency as low as practical"... which is where I switch off, as from this comment it's clear you've not read my posts, so I'll just ask you to read them again.
Now, like I say, you do not want high latencies at all times. Certain circumstances mean that this is simply not possible, e.g recording sound and playing it back or some other interactive sounds, but there are also a lot of applications where it certainly is a good thing.
And all this "windows has done this for years" crap people keep spouting, should read up about some of the "new" features in Windows 7 audio stack that are features PulseAudio has had for a long time! They are playing catchup.
"You say its unfair to blame PA for problems, but most of those problems WERE NOT THERE prior to PA. I say its totally fair to blame PA."
Yes, they were. You not knowing they were there is not the same thing as them not being there.
Colin, that's fine and dandy but...
Your daemon can't even handle the fact when I use konsole and press backspace to trigger the beep several times will coredump the server.
Really? Your system sucks then because on mine it works fine! Have you submitted a backtrace for this issue? Even a bug report?
If you haven't then the bug doesn't exist, plain and simple.
1) its CPU usage is reasonable
Well, on my system (4 year old core2duo) it sits between 0 and 1% even when playing...
2) It can let me control my hardware properly. Especially for me where the HW has no PCM capture (I have to use ALSA + jackd + jack_capture to get around this problem)
Not heard of any problems here but is there a bug report about this?
3) It does not crash so much causing me no end of pain with multiple apps requiring audio.
I'm not experiencing any problems. It's been pretty stable for me for quite some time? What version have you been using?
Frankly I wish someone would push/convince Linus to get OSS4 into the kernel and help us get rid of ALSA (deprecate it)
If you even had a tiny clue about things, you'd realise how ridiculous this statement is. OSS is old news. The API is not going to help us move forward. Have you even seen some of the stuff from the latest Linux Plumbers conference? Paul "Jack/Ardour" Davis summary is probably the best one I've read about why OSS is not sufficient and these are decisions that were made years ago... where on earth do people get this "OSSv4 causes world peace and solves every problem ever" option from? They've clearly never actually *looked* at things for themselves that's for sure.
We've had enough crap in the Linux Audio subsystem for so long, it's time to do the right thing and chunk the whole shit out.
Yeah because that kind of code writes itself right? All we need to do is get everyone to catch a fairy at the bottom of their garden and then stuff it into their CD drive... the code will be there by morning!
There are probably about four people working on linux sound as a paid job... Lennart, Takashi, Jaroslav and Paul... Maybe a few other too, but typically in very specific disciplines/hardware, but certainly none of them are going to start working on OSS that's for sure. So where is this magical work going to come from?
I'll accept more pain if we get it right, finally.
This is us getting it right and this is that pain.
Do you publish patches or a git tree so that interested users can try out your changes?
In some situations, but hardly all. PulseAudio needs to stop billing itself as a jack-of-all-trades solution to audio on Linux. Based on what I've seen, it's only helpful for use cases that few average users are likely to presently encounter. It may become the basis for a large number of really cool things in the future, but right now it's doing more harm than good by shipping by default on the majority of Linux distributions.
Here's a useless anecdote: For months I was trying to get a decent music production system set up on Linux and it was an unmitigated disaster. No distribution had the correct mix of drivers, sound servers, and applications that would make everything just work. I should point out that PulseAudio was enabled by default on all of them, and PulseAudio had to be manually disabled on all of them just to get any sound moving through the system at all.
When I can play a chord on my MIDI keyboard and have it played, mixed, processed, and output through the speakers in less than 20ms with PulseAudio in the chain, give me a call.
I take it you haven't yet read Lennart Poettering's blog post today. In it, he basically says that Ubuntu is repeating the same kind of bonehead mistakes with packaging PA in Karmic that they've done with ever other Ubuntu release so far: "Not good, Ubuntu, really not good! And I'll get all the complaints for this f**up again. Thanks!"
Here's the deal. You've over-architected it! Way before you begin worrying about networking audio, UpNP, Bluetooth, and ACLs of who can play a sound where get the damn fucking thing to work in the first place! Ain't nobody ever died by having more than one sound come out at the same time. More often than not, due to all of this unmanaged complexity, the end user has no sound coming out at all. I still haven't managed to get my mic working. How how fucking hard is that?!? There's one plug, one microphone and it's plugged in. Why then can I not record anything with it? Why should there ever be any more than one selection for this fucking mic?!? Answer: There shouldn't be. It should just work. It isn't just working and it has been just working on other OSes for quite literally a decade or more. Get the fucking basics working, down cold and (get this - a new word for you) RELIABILY FIRST! There. I feel better now...
In Ubuntu 8.10 I had to install several add ons to control it and VLC sound was really broken. In Ubuntu 9.04 I had to remove it in order to listen something... Now in 9.10 I have sound, but I still don't have it over HDMI. PulseAudio and linux audio in general is a disgrace. It is in times like this I miss normalization and standards.
Math is beautiful... e^(pi*i)+1=0
Yup, just see the "About" page on my site. Some of the articles under the "KDE" tag have more info about the specific patches needed to make this all work. Feel free to comment etc. on the site and I'll try and get back to you.
Hello, this is Linus Torvalds, and I pronounce PulseAudio as Pu.psh.sAddia...u..psh..
Everything you've said is working FINE for me with PA. So whatever problem you're having, I can only assume it is outwith PA. As for "unmanaged" complexity... that's the problem right there? Did you just run "make install" or did you run a disto that managed the complexity for you? You should be doing the latter. If you distro doesn't manage that complexity for you, complain to them.
And for what it's worth UPnP and Bluetooth were very much plugged in later. The architecture allowed that to work with minimal hassle. For me that's good design, not over architecting.
For example, if a video is running in one application the system should automatically reduce the volume of everything else and increase it when the video is finished.
I'd be grateful if PulseAudio figured out that when Rhythmbox plays something, I might actually want to hear it, instead of routing it into some bitbucket. Heck, I'd be grateful if I could even figure out myself which of the dozens of screens and configuration options I need to press to make sound come out somewhere. As far as I'm concerned, PulseAudio is by far the worst component of the Gnome desktop.
All the big Linux distributions have adopted PulseAudio and it is an integral part of both the Palm Pre and the Nokia N900 devices, as well as Intel's Moblin.
Those devices are preconfigured for known hardware, so that's not so much of a problem. But on normal desktops, which often have multiple sources and sinks, trying to get sound out can be extremely frustrating.
So, where do they come from? Usually from users who are encountering problems when running PA in conjunction with particular hardware drivers, or higher-level software.
Exactly. And PulseAudio makes it a hair-raising experience to try and fix those problems.
As I mentioned in an earlier comment, there are several distributions which are specifically designed to give you a good audio creation environment out of the box. Ubuntu Studio is probably the most well-known:
http://ubuntustudio.org/
but there are others. If you want to do audio production, you do not want to be using PA. You want to be using JACK. This may change in future, but that's the situation right now. Ubuntu Studio's documentation on getting going with JACK: https://help.ubuntu.com/community/UbuntuStudio/JackQuickStart
Do I think pulse has a sane design? Yes I do for the most part, tho' I wont pretend to know it inside out.
The article you quote there (which was covered in /. before) has so many glaring errors I just don't know where to begin! If you're genuinely interested (and it sounds like you are), then I'd strongly recommend reading the comments on that thread, particularly the ones made by "dawhead" who I believe is actually Paul Davis who wrote Jack and Ardour and is about as much of an expert as you'd want on this stuff. He shows the patience of a saint in explaining (repeatedly) to the blog author where his analysis, opinions and criticisms are just plain wrong, providing very solid background as to why.
Paul is not a PulseAudio fanboi by any stretch of the imagination - he's clearly Mr Jack, but even he openly admits that some of the things going into pulseaudio are pretty smart. He doesn't believe it's necessarily the final ultimate solution, but certainly reckons that some parts of it could very well be used. With Linux it is all about evolution. Pulseaudio today is quite different to what it was a couple years ago, and I'm certain that it will continue to evolve and ensure that those good bits are matured and nurtured, and the missing bits are incubated.
The second or third last comment ("Executive Summary" on page 2 of the comments) also wraps things up nicely IMO.
Should have went with JACK audio server.
https://www.youtube.com/c/BrendaEM
[citation needed]
Are they actually worse than Ulrich Drepper? Apparently the man writes some fine code, but wow is he difficult to get along with.
Laws do not persuade just because they threaten. --Seneca
Are you a PA developer, QuoteMstr? What exactly is your agenda, here?
Is Linux capable of professional quality sound without glitching and problems? Absolutely! We already see Linux audio systems go hand in hand in the embeded market, and mobiles aside, even 100% rock solid pro gear like synthesisers. http://www.mvista.com/download/case_study_MontaVista_Linux_and_Yamaha.pdf Unfortunately for Linux until a reliable standard is settled upon that encourages the big boys to play, the Linux audio issues will continue. Who wants to assist a small market that cannot settle on a singular framework?
By default, sound doesn't go everywhere. Given that quieting a device is much easier than searching for the obscure knob needed to make it go, this is an idiotic default.
What I really need is something like iptables and friends for sound. Yep, in the kernel, routing every which way. If I want to route the console beep out over VoIP, I should be able to just issue a few commands to set up audio routing and tunneling to do that.
Truthfully, I'm now wishing I hadn't been so profane in this thread. Some of the Pulse supporters who've spoken here, come across as being genuinely well-intentioned people; they just apparently haven't experienced the problems we have. Colin Guthrie primarily comes to mind here, which is why I haven't attacked him.
The other problem, I realise now, with coming in here and swearing and nerd raging my head off, is that it just leaves Pulse's advocates feeling even more justified and sure of themselves. Steveha responded with a fairly long post about how my original statement to him was subjective and entirely baseless, and what a child I was for engaging in so much profane ad hominem.
As I think someone else said though, what many of you don't realise is, that for the first half dozen to a dozen times, a lot of us genuinely do try to be civil.
The profanity only really kicks in due to extreme frustration, after we've tried so many times to explain the problem, and we're still just met with the same responses. Denial, bogus rationalisation, and various forms of ad hominem directed at us, simply because we're saying things which, because you want to think that everything is fine, you don't want to hear.
I don't really want to engage in profane or otherwise hateful behaviour, and I realise that I shouldn't. Being angry, aggressive, and hateful just ends up making me feel ashamed of myself later, and probably doesn't leave the people I behave that way towards, feeling terribly good themselves. All I really want is to see problems solved, and most of all for the culture of denial to be reformed; and that isn't happening.
The tendency of Linux developers to stick their fingers in their ears and yell, "la la la I can't hear you!" when they're confronted with unfavourable feedback, is not going to help them. The thing which primarily antagonised me about Steveha's original post is that it seemed as though he was telling people to just shut up and accept how gloriously awesome Pulse supposedly was, in the face of the number of reports in this very thread (and elsewhere) about the degree of problems that people genuinely are experiencing.
I had a good read with those comments, didn't think of reading them before. It certainly sheds some light on why things are as they are right now. Too bad they're not really about Pulse, which may seem not so badly designed after all, still is not solving many problems we have. Apart from that it's implementation sucks still.
Do you care to elaborate on which parts of the implementation "sucks"? Is it the client/server model? The fact it uses a fully asynchronous, zero-copy, lock free core? Or something else?
I'd be interested to have a technical discussion about this, but obviously I'd need to more more than the equivalent of playground banter: "girls smell". :p
I'd like to thank you as well. I ended up hunting down your comments in this discussion. Very informative. I've been running Fedora 10 64 bit since its release with PA. I have had problems yes, but I can see how PA will solve some of the problems I've had in the past with Linux audio.
Thanks, i'll be trying that tonight.
> Paul "Jack/Ardour" Davis summary is probably the best one I've read about why OSS is not sufficient
Link please? I'd like to read his arguments for myself and get my own opinion on things. :)
systemd is not an init system. It's a GNU replacement.
http://lwn.net/Articles/355542/
I'm afraid I cannot provide you with that discussion (as I'm not even nearly technical enough to talk about it, would love to read such a discussion though). What I mean with 'sucks' is that I experience lag where ALSA doesn't and problems with using multiple programs (I admit the error may be in those programs not properly supporting Pulse) and sound just sometimes even drops when going to a few webpages with Flash for example (need to restart the system to fix that). I just appears very buggy and laggy to me, and judging from the chatter here and on forums etc I'm not alone in that.
I just looked into setting up pulse on Gentoo, Arch, and LFS... It's a freeking nightmare. Nowhere is it mentioned what needs to be done to have 2 users on the same system have sounds played at the same time out of the same sink. It seems like you need to set the system-wide daemon up, but no "in event of a multi user desktop do foo". Why do i need to set up ALSA when i use pulse? ohh so apps that don't have pulse support can talk ALSA. and what about all of the problems with Wine and Pulse? To me the biggest advantage of pulse would be per app volume control. Now what would be even better is if i could say set up a reference sound to a min and max volume, and then never touch a volume slider again because the system would just normalize my audio for me.
So lets see hours of setting up pulse to get per volume sliders(and hoping it works with wine) or stick with ALSA and have everything "just work".... hard choice that one.
All of the above was encrypted with a Quad ROT-13 method. Unauthorized decryption is in violation of the DMCA.
Well straight away, you're trying to do some kind of specialist setup, which is always going to mean you're going to have to look into things firther.
Also, PulseAudio is not something that is generally targeted at end users, it's targeted at distros who have the experience and knowledge to tie together all of the components.
You are also the first and only person who has complained that PulseAudio offers (for the most part) a drop in replacement for pure alsa via the use of an alsa plugin. This is *only* way that pulse could get any kind of acceptance at all. It's not expected that applications should need to write direct pulseaudio support, they should go through some kind of abstraction library. For the most part, libasound can serve that role well, provided you stick to the Safe ALSA API Subset that has been documented.
If all you want is per-app volume control, then I don't think it's all worth it for you, but if you want a proper multi-user desktop experience, where the sound follows the *active* user, not the inactive one (i.e. a standard desktop), reduced power consumption, bluetooth support, Apple Airtunes support, UPnP support etc. then PulseAudio is the way to go.
But free software is about choice. If it's not right for you, that's fine, don't use it, but there's no need to bitch about it either.
multi headed/multi VT where both me and my wife have use of the same machine somewhat at the same time. to be fair, try getting plugging in of a flash drive to work on the same set up. I hear consolekit/policykit are susposted to help.
Really the only advantage i see of Pulse is the per app volume control. NAS (http://www.radscan.com/nas.html) and ESD (http://www.tux.org/~ricdude/EsounD.html) both provide the ability to pipe sound across the network. Now if Pulse could set that networked sound up based on SSH connections, and had a decent console app to change which sink to use (idk i haven't looked), it would be worth alot more to me. or if it had sinks and sources for macOSX/windows, i would be even more likely to set it up. think storage server hooked up the the stereo with a mac mini running boxee playing the content. Even better say i buy a N900, i should be able to advertise my server/desktop connected to the nice sound as a sink on the network, and have it show up, and be able to pulse that when you see this sink, make it the default.
There still should be documentation for this kind of a thing for distros. Not all of them are backed by for profit companies(or wealth individuals). Also most of my complaint is spending 3 hours tinkering with sound, to get it working again, with the very real chance that i may have to revert because a few of the apps i depend on don't work right.
All of the above was encrypted with a Quad ROT-13 method. Unauthorized decryption is in violation of the DMCA.
Really? Your system sucks then because on mine it works fine! Have you submitted a backtrace for this issue? Even a bug report?
If you haven't then the bug doesn't exist, plain and simple.
I did, against *Buntu, I even used the PPA builds of PA, still crashed. I have the full crash dumps available on the bug: See: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/424551 This basically happened the same in Fedora also.
1) its CPU usage is reasonable
Well, on my system (4 year old core2duo) it sits between 0 and 1% even when playing...
Seems o be much higher on mu dual core2dual not even 1 year old.
Not heard of any problems here but is there a bug report about this?
3) It does not crash so much causing me no end of pain with multiple apps requiring audio.
I'm not experiencing any problems. It's been pretty stable for me for quite some time? What version have you been using?
Well, my typical use is like this: 1) KDE + audio, VirtualBox + audio, Second Life + audio.. PA keels over.
If you even had a tiny clue about things, you'd realise how ridiculous this statement is. OSS is old news. The API is not going to help us move forward. Have you even seen some of the stuff from the latest Linux Plumbers conference? Paul "Jack/Ardour" Davis summary is probably the best one I've read about why OSS is not sufficient and these are decisions that were made years ago... where on earth do people get this "OSSv4 causes world peace and solves every problem ever" option from? They've clearly never actually *looked* at things for themselves that's for sure.
Regardless, ALSA moves ever so slowly in the lack of resources. That's not to blame the developers at all. I've logged several bugs on this stupid Intel-HDA card and its PCM lack of capture. That wouldn't change with ALSA or OSSv4 if this is a hardware limitation.
We've had enough crap in the Linux Audio subsystem for so long, it's time to do the right thing and chunk the whole shit out.
Yeah because that kind of code writes itself right? All we need to do is get everyone to catch a fairy at the bottom of their garden and then stuff it into their CD drive... the code will be there by morning!
There are probably about four people working on linux sound as a paid job... Lennart, Takashi, Jaroslav and Paul... Maybe a few other too, but typically in very specific disciplines/hardware, but certainly none of them are going to start working on OSS that's for sure. So where is this magical work going to come from?
People have to write it...
I'll accept more pain if we get it right, finally.
This is us getting it right and this is that pain.
You might be, but, I remain unconvinced for now. My sense of PA is the dumbed down interface and lack of functionality that is missing. It's bad enough the microphone on this intel-HDA doesn't work properly by me having to adjust _3_ properties in order for someone to hear me and even then its either too loud or too soft. I don't see how PA will fix this problem.
Everyone wants a Tux in their life.
Yes consolekit is the bit to work on when dealing with multi-seat systems. Udev and consolekit very recently were changed to support seats a little better but there is more work needed in that area. Pulseaudio already integrates to consolekit, so using this system is the way to go.
In the mean time, if you have tow sounds cards (e.g. one for each of you) you can do a "poor mans" setup but each logging in once, and then being nice ot the other but loading pavucontrol and choosing the "Off" profile for the card not meant for you. This doesn't work if you swap seats tho', but for this kind of setup, I'm guessing that doesn't happen too often anyway. Like I say support in consolekit is coming.
NAS and ESD are both obsolete, so are no longer developed and should not be used.
PulseAudio does not have it's own SSH piggy back implementation like X11 but we do piggy back on to the X11 one. Really openssh needs to be refactored to make the X11 forwarding modular and we can then write a PulseAudio module for SSH so that it can all be done properly.
OSX support is also underway but it's done by those people who are interested and only two people are really interested right now, so the progress is a little slow, but getting there.
The routing policy you describe (when you see it, use it) is now implemented in PA git master with module-device-manager, although currently only a KDE gui for this is available (it's not the way Gnome want to work, but it is the way KDE want to work, so I accommodated that).
And the disto I do packaging for is certainly not backed by a wealthy individual. It just takes someone who actually cares to get the distro integration right, not money :)