Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Pulseaudio vs ALSA

  1. #1
    Join Date
    Nov 2009
    Location
    Croatia/Hrvatska
    Beans
    494
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Pulseaudio vs ALSA

    Using Ubuntu for over a year now and i'm beginning to wonder, why is pulseaudio used over alsa?
    alsa has better latency and better sound and whenever i can, i tell my apps to use alsa.
    so, why does ubuntu use pulseaudio? why is it better than alsa? if alsamixer had nice gui, it could be easy to use just like pulseaudio (if we are going that way in ubuntu - gui everything)...

  2. #2
    Join Date
    Aug 2008
    Beans
    1,835
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Pulseaudio vs ALSA

    Quote Originally Posted by marin123 View Post
    Using Ubuntu for over a year now and i'm beginning to wonder, why is pulseaudio used over alsa?
    alsa has better latency and better sound and whenever i can, i tell my apps to use alsa.
    so, why does ubuntu use pulseaudio? why is it better than alsa? if alsamixer had nice gui, it could be easy to use just like pulseaudio (if we are going that way in ubuntu - gui everything)...
    Pulseaudio is a sound server which allows multiple sound sources to be fed through to one or more sinks. AFAIK Alsa only works with one source at a time.... Actually I think that is wrong and Alsa does support multiple concurrent sources.

    Found this diagram showing what it does:



    Appears that pulseaudio is as well as, rather than instead of alsa.
    Last edited by alphacrucis2; July 1st, 2011 at 12:28 PM.

  3. #3
    Join Date
    Nov 2010
    Beans
    16

    Re: Pulseaudio vs ALSA

    It's not down to an easy choice between pulse and alsa. I once read a lenghty article about linux sound and it can leave you confused. Someone could write a book about it. What's needed is a cleanup but I'm not sure how that would end up.

  4. #4
    Join Date
    Mar 2009
    Beans
    Hidden!

    Re: Pulseaudio vs ALSA

    Quote Originally Posted by marin123 View Post
    alsa has better latency and better sound and whenever i can, i tell my apps to use alsa.
    thanks, i've just solved an "audio sync" problem i had, using alsa instead of pulseaudio.

  5. #5
    Join Date
    Jul 2011
    Location
    /Europe/Netherlands
    Beans
    400
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Pulseaudio vs ALSA

    What I find strange when looking to that diagram: PulseAudio depends on ALSA to get the sound to the sound card. When I let mpd (music player daemon) output to ALSA other programs cannot play sound. When I send the ouput to pulse they can. However it is still directed to ALSA only via pulse. So the same multiple sound sources still end up being played with ALSA.
    "I believe humans get a lot done, not because we're smart, but because we have thumbs so we can make coffee." --Flash Rosenberg

  6. #6
    Join Date
    Nov 2009
    Location
    Croatia/Hrvatska
    Beans
    494
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Pulseaudio vs ALSA

    i guess pulseaudio handles multiple sources, does the mixing and then sends one signal to alsa which passes it to sound card.

  7. #7
    Join Date
    Dec 2005
    Location
    Western Australia
    Beans
    11,480
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Pulseaudio vs ALSA

    Pulseaudio can do things smarter. It does per-application volume controls (for instance, turn Empathy down when listening to DVDs), supports switching of sound sources on the fly as they get plugged in and unplugged, streams your computer audio across a network, And cleans up the "audio blocking" problems that used to exist on Linux.

    Pulseaudio, as far as I know, can support multiple OSes. Alsa is Linux-only. An application developer can target Pulseaudio and the program will compile for BSD and Solaris as well as Linux.
    I try to treat the cause, not the symptom. I avoid the terminal in instructions, unless it's easier or necessary. My instructions will work within the Ubuntu system, instead of breaking or subverting it. Those are the three guarantees to the helpee.

  8. #8
    Join Date
    Aug 2009
    Beans
    34

    Re: Pulseaudio vs ALSA

    The Linux sound system is a strange, complex and potentially conflicted place to be.
    Personally, I would prefer it if OSS4 got more development and more distros supported it (or at least stopped removing OSS support from their kernels) as at the moment OSS4 is a tad bit less user-friendly to use and can be hard to install, but does support a lot of applications (directly or through ALSA emulation of sorts), allows for multiple sources and generally doesn't have the issues Pulse does.

    Of course, OSS4 is still lacking in a few areas, especially regarding some drivers (especially when it comes to recording sound) and application support can sometimes be a pain, but it is supported across multiple *nixes, not just Linux.
    Ideally if more work could be done on OSS4 (better integration, easier to install, more support, better/more drivers, automatically changing from speaker output to headphones when they are plugged in, etc) I think the audio problem could be solved in a simpler, more efficient way.

    I may be very much wrong in my view and perhaps there are some good reasons why we continue to struggle with ALSA and ALSA+Pulseaudio beyond "OSS3 was replaced by ALSA a long time ago due to license issues".
    Any thoughts?

  9. #9
    Join Date
    Jun 2007
    Location
    Truck stop somewhere USA
    Beans
    741
    Distro
    Kubuntu Development Release

    Re: Pulseaudio vs ALSA

    several releases ago after ubuntu went pulseaudio but kubuntu had not yet, installing pulseaudio was the only way i could get my sound to work with usb sound speakers and firefox.

    also i was using teamspeak linux client, which ONLY had OSS support, when it was running it took control of the sound card and nothing else could have sound. Pulseaudio fixed this by running as the sound server making teamspeak linux client only think it had control of the card when in fact it was pulseaudio. ever since teampeak linux client will run with the sound of everything else running along with it.

    Ive been very happy with the decision to use pulsaudio myself... when something better comes along I'll be all for it, but until then.... hey! this is linux, install what you want/need
    Dev Testing since 6.10 Edgy Eft. YES I KNOW WHAT THAT DOES!!!

  10. #10
    Join Date
    Jun 2005
    Beans
    343
    Distro
    Kubuntu 12.10 Quantal Quetzal

    Re: Pulseaudio vs ALSA

    by and large pulseaudio works though some games aren't keen on it

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •