LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-29-2009, 10:37 AM   #1
brasem
LQ Newbie
 
Registered: Aug 2009
Posts: 1

Rep: Reputation: 0
Pulseaudio, did i grasp the idea?


Hello,

This question comes forth out of my confusion with the different sound systems used in Linux. I've read through some documentation and i'd like to find out if my conclusions are right. If right, this could be a useful summary for other newcomers (like me) that are confused about the sound system.

So basically, ALSA is the base of the sound system in modern linux installations. It replaces the old OSS drivers. ALSA has a kernel layer that takes care of the communication with the hardware and a layer that provides the API for the software to communicate with.

The goal of pulseaudio is to let all the sound streams go through it. Some programs directly contact ALSA. In order to also send these sound streams through pulseaudio you can make a virtual device in ALSA. (see http://www.pulseaudio.org/wiki/PerfectSetup under 'Third Party Applications', make pulse the default output device). All the sound streams that directly reach ALSA are rerouted to pulse this way.

All the sound streams will go through pulse this way, either directly or from the redirect in ALSA. Pulse can manage all the soundstreams this way. The result is sent to ALSA again, which contacts the hardware for the real sound output.

Is this a good summary of the basic pulse functionality ?

One thing which does confuse me is the fact that if i change the volumes in ALSA directly, the sound also changes even though i relayed everything to pulseaudio. Or do the volume settings in ALSA affect the resulting sound because it passes through ALSA in the end because ALSA provides the kernel ? I'm not too knowledgable about these things yet so i may be overlooking something..

kind regards, Bram
 
Old 08-29-2009, 02:31 PM   #2
mushroomboy
Member
 
Registered: Jan 2006
Distribution: Debian Testing ALWAYS!!!
Posts: 363

Rep: Reputation: 43
I think when you change pulse sound levels your actually changing alsa sound levels, pulse is just a sound server like esound for mixing.

http://www.pulseaudio.org/wiki/WikiStart#Whatisit

Code:
PulseAudio is a sound server for POSIX and Win32 systems. A sound server is basically a proxy for your sound applications. It allows you to do advanced operations on your sound data as it passes between your application and your hardware. Things like transferring the audio to a different machine, changing the sample format or channel count and mixing several sounds into one are easily achieved using a sound server.
Your correct on pulse just managing sound streams from multiple sources. That is it's goal, though the sound settings... I have 2 probable ideas for this as I don't use pulseaudio and I refuse to.

1) Pulse controlls ALSA sound levels and doesn't set it's own.

2) Pulse and ALSA have seperate sound levels... You could compare this to computer > reciever > speakers. computer being pulse, reciever being alsa and speakers being the end result. AKA you can controll the computer (pulse) which gives a certain line frequency, then you can controll the reciver which amplifies that (alsa) which gives a whole new frequency. Now you may think "yeah that doesn't work that way" but it's no different than using a normalized wave upposed to a regular wave. Output levels are all math based anyways, so if one program is setting certain number levels and another program is multiplying those levels for a higher result you get a louder sound.

Those are the 2 results I could think of, you can test it by messing with the volume controlls. If you raise pulse's mixer does it raise the alsa mixer? If pulse is raised to max does the alsa mixer still change volume? Basicallly do both of the mixers increase/decrease volume independently? If so the answer is 2, if they don't do it independently then it's answer 1.
 
Old 08-29-2009, 05:40 PM   #3
yaarappa
Member
 
Registered: Aug 2008
Location: Cumbria, UK
Distribution: OpenSuse 11
Posts: 148

Rep: Reputation: 16
Thank you for this post Brasem. So Mushroomboy what sound system do you use? Because I am having problems with my pulseaudio. Everytime I switch on the computer I have to configure the sound through Yast2 to listen to music or play video's stored on my pc. Still I cannot play dvd's only the picture plays without sound. I opened a thread for this but the replies were not helpful. BTW I am using opensuse 11 and VLC player at the moment. mplayer or smplayer did not work.

Cheers,
 
Old 08-30-2009, 02:21 AM   #4
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Pulseaudio is simply not needed under most circumstances.

I've never used it and I don't know what's so special about it. All the linux software can use alsa directly, adding another layer of complexity is just a nonsense unless it's for a very specific purpose (and then I'd rather use jack than pulse). Alsa can do mixing from multiple sources via the dmix plugin, which is always enabled for these cards that can't do hardware mixing (most cheap cards nowadays).

So, for me, pulse is just another source of problems. The less layers, the less hassle. I am not saying that it hasn't a purpose, sure it has (though I certainly don't know which one), but 99% of the desktop users can live without pulse.
 
Old 08-30-2009, 04:04 AM   #5
mushroomboy
Member
 
Registered: Jan 2006
Distribution: Debian Testing ALWAYS!!!
Posts: 363

Rep: Reputation: 43
Quote:
Originally Posted by i92guboj View Post
Pulseaudio is simply not needed under most circumstances.

I've never used it and I don't know what's so special about it. All the linux software can use alsa directly, adding another layer of complexity is just a nonsense unless it's for a very specific purpose (and then I'd rather use jack than pulse). Alsa can do mixing from multiple sources via the dmix plugin, which is always enabled for these cards that can't do hardware mixing (most cheap cards nowadays).

So, for me, pulse is just another source of problems. The less layers, the less hassle. I am not saying that it hasn't a purpose, sure it has (though I certainly don't know which one), but 99% of the desktop users can live without pulse.
I can't agree with you more!!! So many of the others say it's a blessing and gets sooooo much to work... I haven't seen an audio card that ALSA doesn't work with... And people saying that pulse "fixes" their audio problems??? Well the huge secret is that pulse uses alsa which is what...what is making your soundcard work!!! OH MY!!! =( I hate pulse, just another layer of problems. Yeah the only thing I could see nice about it is sound control for each application but if an application bothers me I mute it, though most of the time I just ignore it.

You don't need pulseaudio, it's like buying a mixer for a mixer.... instead of creating pulseaudio why didn't they fix dmixer instead? It baffles me.

Use ALSA and get rid of anything pulseaudio related... Remove everything you can that is pulseaudio related that won't remove other packages. Though now is a good time to install OSSv4!!! It's been very promising so far, and works better than ALSA. It's a little new though, heh a new version of an old system... Anyways remove pulseaudio and you might get rid of your problems.

[edit] Oh I forgot to correct you, dmixer is included in most versions of ALSA now... It's pretty much part of the package when you install it.

Last edited by mushroomboy; 08-30-2009 at 04:06 AM.
 
Old 08-30-2009, 04:33 AM   #6
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Interesting how there seems to be problems related to pulseaudio..I admit I've had numerous problems with audio, but I've had them before pulseaudio too and I bet a lot of others have too. ALSA isn't a saint either, it has given me headache over the years too, so if pulseaudio does, it's still no worse. The situation is a little like "what do you need a graphical user interface for, if 99% of the users can live with out it?"

There's nothing wrong with principles and if you really do find (by experience) pulseaudio bad for you personally, all right. But don't freak out the potential new users by saying that the sound system they get by default is complete garbage, and especially don't tell them to "remove everything related to it". They just might do it without a second thought, possibly getting from bad to worse, if the new configuration didn't magically work. In the worst case somebody could go through all that trouble even if the existing system worked, thinking that it's better to get rid of it simply because somebody said so.
 
Old 08-30-2009, 04:46 AM   #7
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by mushroomboy View Post
Oh I forgot to correct you, dmixer is included in most versions of ALSA now... It's pretty much part of the package when you install it.
I didn't say the opposite, dmix is an alsa plugin and it's a standard part of the alsa packages. I said that it's automatically enabled when it's needed, rendering one of the main selling features of arts, esound, pulse and others pointless.
 
Old 08-30-2009, 04:57 AM   #8
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by b0uncer View Post
Interesting how there seems to be problems related to pulseaudio..I admit I've had numerous problems with audio, but I've had them before pulseaudio too and I bet a lot of others have too. ALSA isn't a saint either, it has given me headache over the years too
I am not an alsa lover, in fact I'd be using oss4 if it wasn't because some programs I use don't have proper support for it. I know very well how crappy alsa can be. But pulseaudio will not fix anything that's alsa related. It's just one more layer where bugs can pile up. Most of the times anyway, as said, I am sure that pulse has genuine uses, but most users will not need it for anything.

Quote:
, so if pulseaudio does, it's still no worse.
Teh point is that it doesn't do any good. Why use it by default? I don't know.

Quote:
The situation is a little like "what do you need a graphical user interface for, if 99% of the users can live with out it?"
I think your are bending the lenses here to fit your argument. In fact, 99% of users can't live without it, which is why most distros ship it by default. The remaining 1% know very well what to do to disable it so they don't have a problem.

With pulse it's the same. 99% of users don't need it, so it should be disabled by default. The remaining 1% will have no problems finding how to enable it.

Now everything fits better

Quote:
There's nothing wrong with principles and if you really do find (by experience) pulseaudio bad for you personally, all right. But don't freak out the potential new users by saying that the sound system they get by default is complete garbage, and especially don't tell them to "remove everything related to it". They just might do it without a second thought, possibly getting from bad to worse, if the new configuration didn't magically work. In the worst case somebody could go through all that trouble even if the existing system worked, thinking that it's better to get rid of it simply because somebody said so.
I am not telling anyone what they should do. I have been asked and I am answering. Period. What they do is up to them. I didn't tell anyone to remove pulseaudio. So, please, feel free to disagree as I am free to speak my opinion, but don't put words on my mouth that I didn't say.

Specially, note the use of the words "for me" in my other post.

Kindly, please, let's not argue. It's totally uncalled for.

Last edited by i92guboj; 08-30-2009 at 04:58 AM. Reason: fix quote
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Technology's Reach and Security's Grasp LXer Syndicated Linux News 0 08-28-2009 12:42 PM
LXer: Microsoft tries evading new GPL grasp LXer Syndicated Linux News 0 07-07-2007 06:01 AM
Good idea/bad idea: interface colors introuble General 5 10-30-2006 01:33 PM
LXer: Freespire: Great Idea? Awful Idea? LXer Syndicated Linux News 1 05-04-2006 06:10 AM
Slackware 10.1 - Still trying to grasp networking fell Linux - Newbie 10 05-11-2005 03:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration