Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
What's pulseaudio for and why it is so popular?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Zarhan
l33t
l33t


Joined: 27 Feb 2004
Posts: 997

PostPosted: Thu Sep 10, 2009 8:14 pm    Post subject: What's pulseaudio for and why it is so popular? Reply with quote

Ok, upon reading slashdot I came onto posts like these: http://linux.slashdot.org/comments.pl?sid=1363849&cid=29377623 - so, uhm, until now I didn't even really know what Pulseaudio *is*, much less that it's needed. Only "sound daemon" that I have even used has been Arts and haven't needed that either in long time. I just have plain alsa, nothing else.

So just in case I have missed out on something: Is there some benefits for setting up Pulseaudio? Why are all the "distributions" using it? I mean, *every* app I use (Whole of KDE, mplayer, some games including UQM) seems to work just fine with plain Alsa, especially since dmix came enabled by default about 2 years ago. (Before then I had to set up .asoundrc with dmix enabled - not a big deal)
Back to top
View user's profile Send private message
Erdie
Advocate
Advocate


Joined: 20 May 2004
Posts: 2586
Location: Heidelberg - Germany

PostPosted: Fri Sep 11, 2009 7:17 am    Post subject: Reply with quote

I think one of the key features of pulseaudio is the network transparency, which really seemed to work compared to arts. Just my opinion.
_________________
Desktop AMD Ryzen 9 5900X 32GB RAM, Asus GF GTX 1060.
Notebook Tuxedo Pulse 15 Gen1 AMD Ryzen 7 4800H mit Radeon Vega 7
Raspberry Pi 1 + 2 + 3B+ + Zero W
Back to top
View user's profile Send private message
energyman76b
Advocate
Advocate


Joined: 26 Mar 2003
Posts: 2048
Location: Germany

PostPosted: Fri Sep 11, 2009 1:19 pm    Post subject: Reply with quote

for just listening to music on your desktop, pulseaudio is not needed.

there is a lot of noise around pa - because gnome still depends on sounddeamons and everything is better than esd. people are touching themselves - until they realize that pa sucks for gamers (just for example).

For 99% of all users there is no good reason. But hey, just because something is a bad idea does not mean you can not hype it.
_________________
Study finds stunning lack of racial, gender, and economic diversity among middle-class white males

I identify as a dirty penismensch.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Fri Sep 11, 2009 1:30 pm    Post subject: Reply with quote

In my humble opinion:

Going with pulseaudio by default is the silliest thing that major distros have done in the last few years, besides all the hal nonsense. 99% of the users don't need it, and the remaining 1% are *FAR* better with jack. It's amazing how people like to stack layers with no concrete purpose other than putting to a use their 8GB or ram, for no real gain (except in latency, there you will gain a lot :lol: ).

Pulseaudio is *useless* for most users, as war esound, as was arts, and those needing it should be able to setup it by themselves. But you know, humans are the only animals that stumble two times, and even a thousand, on the same damned obstacle.
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Fri Sep 11, 2009 2:08 pm    Post subject: Reply with quote

I use alsa + sox

To enable it in KDE -> Use external Player -> command = play

It works great. :)


Last edited by Mike Hunt on Fri Sep 11, 2009 3:34 pm; edited 1 time in total
Back to top
View user's profile Send private message
Zarhan
l33t
l33t


Joined: 27 Feb 2004
Posts: 997

PostPosted: Fri Sep 11, 2009 2:45 pm    Post subject: Reply with quote

Thanks for comments. I hope that this does not mean that at some point in the future it does really become a requirement to use PA (by inertia of some major Gnome release or from all these distros), since clearly it's not needed.
Back to top
View user's profile Send private message
BrummieJim
l33t
l33t


Joined: 22 Jul 2005
Posts: 683

PostPosted: Fri Sep 11, 2009 3:05 pm    Post subject: Reply with quote

Genuine Question Alert! How do Apple do it and why aren't we copying them? They use a Unix based OS, albeit on well characterised hardware, and have absolutely professional low latency results.

From what i've seen on Fedora Pulse Audio is to be avoided.

Yes, I think it's planned as being necessary for Gnome in the future.


Last edited by BrummieJim on Fri Sep 11, 2009 3:13 pm; edited 1 time in total
Back to top
View user's profile Send private message
energyman76b
Advocate
Advocate


Joined: 26 Mar 2003
Posts: 2048
Location: Germany

PostPosted: Fri Sep 11, 2009 3:09 pm    Post subject: Reply with quote

BrummieJim wrote:
Genuine Question Alert! How do Apple do it and why aren't we copying them? They use a Unix based OS, albeit on well characterised hardware, and have absolutely professional low latency results.

From what i've seen on Fedora Pulse Audio is to be avoided.


you answered your question. Fixed hardware. Also, if you want low latency you just use rt-kernel+jack.
_________________
Study finds stunning lack of racial, gender, and economic diversity among middle-class white males

I identify as a dirty penismensch.
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Fri Sep 11, 2009 3:23 pm    Post subject: Reply with quote

I'm happy this thread popped up... I also ran into a slashdot comment about a month ago bashing pulseaudio, and I really had no idea what it was.

I've been using a system driven by alsa for a number of years now (was using arts a while back when I used KDE), and I've never had any sound problems... in fact, things seem better than ever with alsa sound and Linux. I'm not sure why we need a deamon to run audio playback.
Back to top
View user's profile Send private message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 924
Location: US-FL-EST

PostPosted: Fri Sep 11, 2009 10:09 pm    Post subject: Reply with quote

i92guboj wrote:
In my humble opinion:

Going with pulseaudio by default is the silliest thing that major distros have done in the last few years, besides all the hal nonsense. 99% of the users don't need it, and the remaining 1% are *FAR* better with jack. It's amazing how people like to stack layers with no concrete purpose other than putting to a use their 8GB or ram, for no real gain (except in latency, there you will gain a lot :lol: ).

Pulseaudio is *useless* for most users, as war esound, as was arts, and those needing it should be able to setup it by themselves. But you know, humans are the only animals that stumble two times, and even a thousand, on the same damned obstacle.


OK - I'll bite. I agree that the current default set up in most distros seems overly complex. Back in the day, I was relieved and happy to dispense with ARTS as it seemed to cause nothing but problems. So my ultimate question is what step by step instructions should I follow to set up just alsa+jack?

It's not rhetorical because I'm thoroughly confused from all the assorted independent instructions with alsa, jack, pulseaudio, esd yada-yada-yada.

If you start with a default installation of Gentoo, what do you need to do to simplify your audio setup?

As background, my primary desktops are KDE-4.3 and XFCE4. I use FF, Midori, SeaMonkey and Konqeror as web browsers whish means lots of flash.

I play all major audio and video formats: ogg flac wmv wma mkv avi mpeg divx rm ram {old stuff} aac mov mp4 ... and so on and so forth.

I don't directly stream audio/video over my internal network. I do run a central server which contains all of my music and video files which are accessed both through samba and nfs.

Players include amarok2, audacious, vlc, smplayer, kmplayer, mplayer {yes, I know some are simply wrappers. However, supported functions are different between them ...}, k3b and more.

Other software I use with potential sound related issues include nxserver/nxclient and vmware-workstation.

I've looked at the "plugins" or "output" preferences/options settings of the various players that have such thing and most of them are set at "auto" or equivalent.

Currently, "rc-update show" displays "alsasound" and "pulseaudio" as the only directly sound related services that start.

"ls /etc/init.d" displays "alsasound", "esound", "timidity" and "pulseaudio" as the currently installed sound related services.

So what do I unmerge? What USE flags should I set? Is it enough to "rc-update del pulseaudio"? How do I set up 'jack'? How does"hal", "udev" and "dbus" play into all of this? Do I need to set up custom rules and if so, are there any examples I can use/look at?

I'm really serious about this. There are too many independent sound projects with corresponding documentation which is essentially self centered to each respective project. I've seen no real documentation which shows examples/explaining the integration of multiple packages and how to set them up to play nice with each other. Frankly, reading all the disparate documentation and attempting to figure out a reasonable configuration has been giving me substantial headaches and I _hate_ that.

Guidance would be very much appreciated.

I'm all for simplifying my setup. I just don't know enough to be able to do that in a smart, informed manner.
_________________
People whom think M$ is mediocre, don't know the half of it.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Fri Sep 11, 2009 10:22 pm    Post subject: Reply with quote

dufeu wrote:
So what do I unmerge? What USE flags should I set? Is it enough to "rc-update del pulseaudio"? How do I set up 'jack'? How does"hal", "udev" and "dbus" play into all of this? Do I need to set up custom rules and if so, are there any examples I can use/look at?


hal, udev and co. have nothing to do here. To disable pulseaudio and esound just USE="-pulseaudio -esound". Timidity is a midi synth via software, you will most likely need it if you want midi support, because most cards nowadays don't have a proper synth themselves. Once you set up the flags, emerge -auDvN world to update the relevant packages. Then run revdep-rebuild, just in case. Once done that, try emerge --ask --depclean, pulseaudio and esound should be listed as packages to uninstall if your system is sane. If not, ask back.

Jack is another thing, do you really need it? If affirmative, I'd start a new thread, Otherwise, we're going to mix two different conversations in the thread, which will be very difficult to follow.
Back to top
View user's profile Send private message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 924
Location: US-FL-EST

PostPosted: Fri Sep 11, 2009 11:09 pm    Post subject: Reply with quote

First of all, thank you for the quick reply. I'm leaving for a road trip tomorrow so I won't be able to try your suggestion(s) until I reach one or another of my intermediate destinations.

i92guboj wrote:
Jack is another thing, do you really need it? If affirmative, I'd start a new thread, Otherwise, we're going to mix two different conversations in the thread, which will be very difficult to follow.


I don't know if I need "jack". And after thinking of it, I agree a new thread would be more appropriate. So on to a new thread! :)
_________________
People whom think M$ is mediocre, don't know the half of it.
Back to top
View user's profile Send private message
energyman76b
Advocate
Advocate


Joined: 26 Mar 2003
Posts: 2048
Location: Germany

PostPosted: Sat Sep 12, 2009 7:18 am    Post subject: Reply with quote

why using a sound daemon at all?

they were introduced as a hack to enable several apps to play a sound at the same time.

That is not needed anymore for YEARS.

So there is no need for them.

Oh - and networked sound. Which as much as nobody uses.

So 99% of all users don't need a sound daemon. Just alsa with dmix. And dmix is set up by default. You have nothing to do to get it running.

PA&co are solutions in a need of a problem. Solutions which make the whole mess WORSE.
_________________
Study finds stunning lack of racial, gender, and economic diversity among middle-class white males

I identify as a dirty penismensch.
Back to top
View user's profile Send private message
Cyker
Veteran
Veteran


Joined: 15 Jun 2006
Posts: 1746

PostPosted: Sat Sep 12, 2009 9:46 am    Post subject: Reply with quote

Ironically I had a genuine need for pulseaudio, trying to forward sound from my soundcardless VNC server to my Windows machine but I never got it to work :lol:
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8938

PostPosted: Sat Sep 12, 2009 10:56 am    Post subject: Reply with quote

pulsewhat?
Back to top
View user's profile Send private message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 924
Location: US-FL-EST

PostPosted: Sat Sep 12, 2009 8:43 pm    Post subject: Reply with quote

i92guboj wrote:
To disable pulseaudio and esound just USE="-pulseaudio -esound". Timidity is a midi synth via software, you will most likely need it if you want midi support, because most cards nowadays don't have a proper synth themselves. Once you set up the flags, emerge -auDvN world to update the relevant packages. Then run revdep-rebuild, just in case. Once done that, try emerge --ask --depclean, pulseaudio and esound should be listed as packages to uninstall if your system is sane. If not, ask back.

Did as instructed and sound in general is much more stable. Thank you very much!!
_________________
People whom think M$ is mediocre, don't know the half of it.
Back to top
View user's profile Send private message
Zarhan
l33t
l33t


Joined: 27 Feb 2004
Posts: 997

PostPosted: Sat Sep 12, 2009 9:46 pm    Post subject: Reply with quote

Concerning with "distributions" - is there any of the "major" binary distros that *doesn't* use pulseaudio?

Basically, a friend has asked me to set up a desktop Linux computer for personal use, and I'm pretty sure any of the "usual ones" (Ubuntu, Fedora, Mandriva, etc) would be easy enough for her to do the basic maintenance using provided GUI tools (e.g. install automatic security updates). Since I don't want to be stuck on constant tech support duty running emerge -uvDaN world I'm not inclined to install Gentoo there even though I'm happy to run it with my own systems.

However, I would like the system to be as close to Gentoo as possible without any extra crap such as PA, so that when there's some more esoteric problem I can just SSH in and not having to wonder what is this bunch of extra daemons I have never seen before. So are any major binary distros that haven't jumped on the PA bandwagon?
Back to top
View user's profile Send private message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 924
Location: US-FL-EST

PostPosted: Sat Sep 12, 2009 10:41 pm    Post subject: Reply with quote

Zarhan wrote:
Concerning with "distributions" - is there any of the "major" binary distros that *doesn't* use pulseaudio?

... I would like the system to be as close to Gentoo as possible without any extra crap such as PA, so that when there's some more esoteric problem I can just SSH in and not having to wonder what is this bunch of extra daemons I have never seen before. So are any major binary distros that haven't jumped on the PA bandwagon?


I don't know of any available search which will allow you to indicated packages you want excluded in a distro. distrowatch.com has a fairly complete search page, but it's not geared towards exclusionary searches.

In answer to your original query regarding "What is pulseaudio and why ...?", you might find this page interesting: http://www.pulseaudio.org/wiki/PerfectSetup

It was last updated in July so it is pretty current. It goes a long way towards explaining why many if not most distros are now including pulseaudio by default.

As for a distro to install for your friend. I would recommend the KDE version of LinuxMint. It's what I'm now using for netbook installs and for nearly all 'Linux for Family and Friends' {LFFAF - laugh cubed (c)(tm)}. It permits ssh, rsync and nano out of the box and is kept reasonably current. Works very well w/regards to allowing users to keep current with updates.
_________________
People whom think M$ is mediocre, don't know the half of it.
Back to top
View user's profile Send private message
energyman76b
Advocate
Advocate


Joined: 26 Mar 2003
Posts: 2048
Location: Germany

PostPosted: Sat Sep 12, 2009 10:53 pm    Post subject: Reply with quote

that page does not answer 'why'. It only shows that pulseaudio is an unholy mess needing a shitload of stuff setup and edited.

For what? Sound output?
_________________
Study finds stunning lack of racial, gender, and economic diversity among middle-class white males

I identify as a dirty penismensch.
Back to top
View user's profile Send private message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 924
Location: US-FL-EST

PostPosted: Sun Sep 13, 2009 1:41 am    Post subject: Reply with quote

energyman76b wrote:
that page does not answer 'why'. It only shows that pulseaudio is an unholy mess needing a shitload of stuff setup and edited.

For what? Sound output?

Agreed that the page does not explicitly say "Why?"

However, "Why?" can be construed from context. And the unstated "Why?" is much more revealing and meaningful. i.e. Rather than a description of what "pulseaudio" is, the page provides examples of configuration and usage of "pulseaudio".

Before I continue - a caveat. Please note the following: I don't have an opinion as to whether "pulseaudio" is a good thing or a bad thing. Please do not assume that I am either defending or promoting "pulseaudio".

The OP originally asked "Why?". Follow on discussion here has been interesting in how people feel about it and opinions as to it's relevancy to most people's local systems.

Back to construing "Why?" - an example:

Under heading "PulseAudio Device Chooser": Note the automatic support of streaming over a network. As far as my very limited knowledge goes {and I freely admit I know very little}, ALSA doesn't support direct streaming over one's network. That appears to be one of the points of a sound server.

Further in the page, there are discussions of different software packages and the associated configuration issues. You look at these as see a completely stupid mess. I agree it gives every appearance of a mess. You'll get no argument from me on that. I look at these and see different independent software packages that perform different manipulations of sound streams for different purposes.

When someone asks "Why do I need this or that?", what they're really asking is this or that relevant to my situation. If such a user peruses the page and comes across software they know they need or would like to use, this page can give them pointers about "Why?" from their specific context. That's a much more important "Why?" than a general description. There is enough information on the page for many people to, in fact, derive a contextual answer specific to their individual situation.

Other contextual but unstated points which can be taken from this page include:

1) The "pulseaudio" situation is obviously a "work in progress". Many package specific patches require SVN access. i.e. to your point, depending on need, things can be a real mess.

2) Several quite disparate package developers apparently see a need to talk to a common black box. In theory, I laud their efforts to simplify their lives by reducing complexity in interfaces. Given point 1), many of them are probably worse off currently because their respective packages are in transition and therefore they need to support multiple competing interfaces which do pretty much the same thing. Of course, all the attendant increases in complexity apply. More breakage, more latency, more chances for things to go wrong, more Murphy.

3) If a user does use one of these packages where the package actually does work better in conjunction with "pulseaudio", then they better have this page on tap in order to be able to fix everything else they may have installed or to at least understand what they risk breaking. And yes, this does address "Why?" because it gives the reader countervailing "Why Don't Install?"

These are the reasons I mentioned the link.

From a personal standpoint, I don't see any reason to install "pulseaudio" on any of my systems. I see some potential in the future on a possible specific purpose system I may build someday, but nothing currently. I'm glad the OP asked the question and the resulting thread was helpful for resolving some of the issues I've encountered since the last round of upgrades I went through going from KDE-4.2.4 to KDE-4.3 and contemporaneous other package upgrades.

Thank you OP and everyone else whom participated.
_________________
People whom think M$ is mediocre, don't know the half of it.
Back to top
View user's profile Send private message
energyman76b
Advocate
Advocate


Joined: 26 Mar 2003
Posts: 2048
Location: Germany

PostPosted: Sun Sep 13, 2009 1:54 am    Post subject: Reply with quote

no, a why can not be constructed from context.

The site shows that pulseaudio is a solution in need of a problem. A bad solution.

So alsa can not directly stream sound over network. Who needs that? Really?

And even if one in hundred uses this feature - they can always install that package and crap into all the config files if they really want to. Why punsih the rest?
_________________
Study finds stunning lack of racial, gender, and economic diversity among middle-class white males

I identify as a dirty penismensch.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Sun Sep 13, 2009 7:15 am    Post subject: Reply with quote

The fact that most binary distros use it by default does not make it any better. Remember, 500 years ago people used to think that the Earth was flat, which didn't make it true. The only Pulse audio I like is from a band called Pink Floyd.
Back to top
View user's profile Send private message
red-wolf76
l33t
l33t


Joined: 13 Apr 2005
Posts: 714
Location: Rhein-Main Area

PostPosted: Sun Sep 13, 2009 8:32 am    Post subject: Reply with quote

Ho-hum...

The only reason I see for major distros to go churning out their standard fare with sound daemons is pure laziness. And for me (I actually use pulseaudio, because so far, I've never gotten sound to work properly in Gnome without one) it does work. I think I still have one of those cruddy old NForce2 chipsets that actually don't support hardware mixing.
Code:
00:06.0 Multimedia audio controller: nVidia Corporation nForce2 AC97 Audio Controler (MCP) (rev a1)
   Subsystem: Micro-Star International Co., Ltd. Device 5700
   Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 21
   I/O ports at d800 [size=256]
   I/O ports at dc00 [size=128]
   Memory at d3002000 (32-bit, non-prefetchable) [size=4K]
   Capabilities: [44] Power Management version 2
   Kernel driver in use: Intel ICH
   Kernel modules: snd-intel8x0

So do I need it? I don't know. Maybe not, but so far, every HOWTO I read either included esound or pulseaudio, with the trend going to the latter. I've seen jack but never decided to risk breakage to try it... Maybe I'll look in 6thpink's thread...
_________________
0mFg, G3nt00 r0X0r$ T3h B1g!1111 ;)

Use sane CFLAGS! If for no other reason, do it for the lulz!
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Sun Sep 13, 2009 8:47 am    Post subject: Reply with quote

red-wolf76 wrote:
Ho-hum...

The only reason I see for major distros to go churning out their standard fare with sound daemons is pure laziness. And for me (I actually use pulseaudio, because so far, I've never gotten sound to work properly in Gnome without one) it does work.


Ummm, "gnome doesn't support audio", ok, I guess you mean sounds for window events and the like, otherwise, it's the application which must support it (totem, mplayer, vlc or whatever you use), the desktop or window manager has nothing to do with that.

Quote:
I think I still have one of those cruddy old NForce2 chipsets that actually don't support hardware mixing.


That has nothing to do with nforce. *Most* sound chips *do not* do mixing in hardware, that's why dmix exist in alsa.

Quote:

So do I need it?


If you don't know, you don't need it.
Back to top
View user's profile Send private message
red-wolf76
l33t
l33t


Joined: 13 Apr 2005
Posts: 714
Location: Rhein-Main Area

PostPosted: Sun Sep 13, 2009 9:20 am    Post subject: Reply with quote

Thanks for the pointers. Yeah, I did talk about the window event sounds... Apps usually work alright, regardless which WM I use. But a couple didn't until I installed pulseaudio. For example Gnome-Mplayer had trouble, mplayer by itself did not. :roll:

I'll try without and let you know about mileage. :wink:
_________________
0mFg, G3nt00 r0X0r$ T3h B1g!1111 ;)

Use sane CFLAGS! If for no other reason, do it for the lulz!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum