Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

While trying to get my sound to work, I was wondering about the roles of ALSA and PulseAudio. I have both installed and was wondering, for example, which of them needs to know about my sound card.

Both seem to be able to use each other, there's a pulseaudio plugin for ALSA, and on my system, alsa shows up as a sound card in pulseaudio.

Which of the two does what, are they alternatives or complementary?

share|improve this question

1 Answer

up vote 6 down vote accepted

ALSA is the kernel level sound mixer, it manages your sound card directly. ALSA is a crap (seriously) and it can handle a few (sometimes just one) channel. PulseAudio is a software mixer, on top of the userland (like you'd run an app). When it runs, it uses Alsa's channel and manages EVERY mixing stuff, devices, network devices, everything by itself. (It's like one more unneeded layer) Actually you can run only ALSA, but you might get mixing problems and Ubuntu comes with PA support/PA dependence. (Some apps are hard coded to use PulseAudio, with custom patches and so on.) (PulseAudio also consumes much more CPU than OSS or ALSA.)

Whats the point? People say for networking it is good, and it solves the multi-channel misery, easy to develop apps for PA, easy to select new devices, to control volume by app, etc etc. However, in my opinion there is no point in PulseAudio. Okay, networking is OK. But for a simple user, its just an insane fat stuff on the system. It adds latency, it runs NOT in the kernel (Okay I won't list all the problems with it). They should write an ALSA2 (Pick out the solutions from PA and add the essential ones into Alsa). OSS solves the problem, however its not GPL, they don't like it. (The open source ...uhm... 'leaders'..) That's why they say (game developers, app developers) that they hate writing apps for Linux because the whole sound system is a messy hell.

Illustration:
Typical sound system nowadays, like Ubuntu:
KERNEL:{alsa} -> {alsa-channel} -> user:{pulseaudio} -> user:app1,app2,app3
Simple ALSA:
KERNEL:{alsa} -> dmix (it "runs in the kernel") -> user:app1,app2,app3
OSS:
KERNEL:{OSS(module)} -> user: app1,app2,app3

share|improve this answer
Actually, everytime I found Pulseaudio I found PROBLEMS! Funny thing is that it seems (at least based on my experiences) to have problem also with the RT version of the kernel, that is to say...do you want an easy linux environment to play music? Are you thinking about the new UbuntuStudio? Well, think again... :D – dag729 May 24 '10 at 12:40
There is an rt (daemon) argument for PA, try launching with that. You have to add your user to "pulse-rt" group (at least on Arch) in order to be able to use it like that. Well. For Audio studio stuff, use JACK audio connector. (Jesus... a new system again? :)) Or stick to OSS. – Shiki May 24 '10 at 13:33
I wonder why sound is so complicated in Linux. Graphics or networking hardware support seems to be much less diversified. – Hanno Fietz May 24 '10 at 15:07
2  
Oh don't think. Graphics are also a pile of.. Linux is NOT for desktop use to put it simply and bluntly. Xorg is a X server so you basically start a SERVER and you WATCH it (what a nonsense? yeah). On MAC, Windows, Haiku, GUI runs from the kernel (okay its inside the kernel). Well. It would make sense doesnt it? Also, there is no native interface. Like on Windows, Windows.Forms. On MAC Cocoa. Here, you can only use FAT toolkits, like GTK, Qt.| Network is agreed, its in kernel, its OK (okay if the manufacturer provides good driver like Intel does)... so thats it. – Shiki May 24 '10 at 15:24
1  
On MAC, Windows, Haiku, GUI runs from the kernel (okay its inside the kernel). Well. It would make sense doesnt it? Actually it doesn't. Remember the bad old days of "NT 4 video drivers that crapped out the system"? Yeah, that's what caused it - running crappy drivers in kernel space. Why do you think Microsoft suddenly went all up-in-arms about getting signed drivers into Windows? Bingo! Because crummy drivers were causing system crashes. Getting them signed meant getting them vetted, and a smidgeon of QA goes a long ways... – Avery Payne May 24 '10 at 17:14
show 4 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.