You are not logged in.
Pages: 1
Pulseaudio is a sound server for linux. It lets you do fun things like easily piping your audio to other machines on your network, having a system wide equalizer, or switching from internal analog to hdmi audio with 1 click. Pulseaudio has earned a bad reputation, mostly due to a bad implementation in several versions of Ubuntu. I have installed it on a couple of #! installs and the Debian implementation seems to be solid.
First we need to install the following packages. Note that this is a light install of pulseaudio, no bluetooth, no plugins for any programs, though this is easy to fix by opening synaptic and searching for pulse, and checking your audio application settings. For a heavier install check the links at the end of this post.
sudo apt-get install pulseaudio paprefs pavucontrol pulseaudio-module-hal pulseaudio-module-x11 pulseaudio-utils libasound2-plugins paman pavumeter pulseaudio-esound-compat libpulse0 libsdl1.2debian-pulseaudioNow save the following into /etc/asound.conf
pcm.pulse {
type pulse
}
ctl.pulse {
type pulse
}
pcm.!default {
type pulse
}
ctl.!default {
type pulse
}You should be able to run pulseaudio -D in a terminal now and have a running Pulseaudio setup. Execute pavucontrol to see if things are working. If not try rebooting your machine.
Now we need to apply one tweak to make volumeicon work better with Pulseaudio. If you click on Open Mixer in the menu it will still launch the alsa mixer. To make it launch the Pulseaudio mixer open $HOME/.config/volumeicon/volumeicon in your favorite text editor. Find the onclick= line and change it to read as follows:
onclick=pavucontrolIf your keyboard has media keys, your volume controls may not work. I was able to fix this by putting the following code into the <keyboard> section of $HOME/.config/openbox/rc.xml.
<keybind key="XF86AudioRaiseVolume">
<action name="Execute">
<command>amixer set Master 5%+</command>
</action>
</keybind>
<keybind key="XF86AudioLowerVolume">
<action name="Execute">
<command>amixer set Master 5%-</command>
</action>
</keybind>
<keybind key="XF86AudioMute">
<action name="Execute">
<command>amixer set Master toggle</command>
</action>
</keybind>Enjoy your new pulseaudio setup!
UPDATE March 23 2011:
SDL programs need a change to work with pulseaudio. This is included in the how to now, but if you need it here is how.
sudo apt-get install libsdl1.2debian-pulseaudioUPDATE April 30 2011:
Removed the pulseaudio -d added to autostart.sh as it was not needed, and to add a note about possibly needing to restart your machine to get things working. Thanks @ceph for pointing this out.
These instructions were largely stolen from the following sources:
Pulseaudio : The Perfect Setup
Debian Sid and Pulseaudio
Debian Forums - How-to:Pulseaudio
Last edited by hardran3 (2011-04-30 23:58:31)
Offline
Worked like a charm (after reboot), thanks for this!
Offline
What is the advantage of running pulseaudio over alsa?
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Github || Deviantart
Offline
@unia: hardran3 mentioned a few of the benefits in the first paragraph...basically alsa works more like a basic mixing board with a single main output channel; PuleaAudio is more complex, allowing for multiple output channels, send/return loops, yada.
while ( ! ( succeed = try() ) );
We've earned a reputation as a nice, friendly community; please help us keep it that way.
Offline
Yes but other than that, there's little to gain from using pulseaudio? I mean, I only play music/videos on my own laptop, so a simple alsa would suffice. Or is there something I´m missing?
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Github || Deviantart
Offline
afaik Pulse has per-app volume control. Which is almost enough to get me to switch.. 
Punch all your friends.
Offline
^ But don't most media apps have their own internal volume controls anyway? Is that redundant, or just redundant?
@Unia: I agree, for your usage (as well as mine
) alsa is more than adequate.
while ( ! ( succeed = try() ) );
We've earned a reputation as a nice, friendly community; please help us keep it that way.
Offline
I'm not inclined to use pulse either but none the less this is a nice howto 
Offline
One possible advantage to having PulseAudio on a laptop, if you frequently use the laptop with external speakers, would be to (for example) send your music player's output to the external speaker jack, but have audio from Youtube videos go to the internal speakers. I haven't been able to do this with alsa.
while ( ! ( succeed = try() ) );
We've earned a reputation as a nice, friendly community; please help us keep it that way.
Offline
@pvsage, I hadn't thought of that..
but maybe it's like a new paradigm someone's trying to setup...of course I don't really know, this is all just relayed from blog posts! 
Punch all your friends.
Offline
I'm not inclined to use pulse either but none the less this is a nice howto
Thanks omns! All my threads will come in handy when I have to reinstall 
@Unia
ALSA will probably suffice in your situation. In fact most people will not need pulseaudio, but it has some nice features. I use it to send my audio to an Airport Express, and my netbook has HDMI so being able to switch outputs easily is nice.
Offline
So hadran3, would you say that as long as I have a single laptop with one set of speakers, I wouldn't need pulse? b/c I was thinking about switching but I have a knack for screwing things up 
Punch all your friends.
Offline
So hadran3, would you say that as long as I have a single laptop with one set of speakers, I wouldn't need pulse? b/c I was thinking about switching but I have a knack for screwing things up
hadran3
No, you probably don't need pulse, and where I come from, screwing things up is called learning. Take whatever you want from that 
Offline
screwing things up is called learning
Hah, I forgot about that!
Thanks 
Punch all your friends.
Offline
Hi, very good tutorial, but after this i cannot set up multimedia keys work properly.
alsamixer shows: card: pulseaudio and only one channel: Master. For me that incorrect and cannot adjust volume.
So, my suggestion:
Run killall pulseaudio -- Kills pulseaudio
In /etc/asound.conf change to your sound card:
pcm.V8237 {
type pulse
}
ctl.V8237 {
type pulse
}
pcm.V8237 {
type pulse
}
ctl.V8237 {
type pulse
}To get sound card:
cat /proc/asound/cardsMines says:
0 [V8237 ]: VIA8237 - VIA 8237
VIA 8237 with CMI9761A+ at 0xd000, irq 22So in .conf i use V8237
And make sure irq exist, that's your real card !
In terminal type pulseaudio -D
After this i can set PCM channel work with multimedia keys
And other issue witch i figured out how to fix: then using multimedia keys than master channel 0% others channels go to 0% too. More info about that + properly explained: http://askubuntu.com/questions/15069/ho … xer-levels
Issue two may not exist in your system so fix doesn't needed.
Last edited by suf3r (2011-03-19 15:42:22)
Offline
Thanks for this, works great!!
Offline
Just for others doing this, I had to restart my machine to get pulseaudio to work. I also didn't need to add it to my autostart.sh, the pulseaudio daemon was initialised on startup automatically.
If you have noticed this notice you may have noticed that this notice is not worth noticing
Offline
Nice tut hardran3
Does pulse work better with Intel hd audio? Alsa seems to be lacking when it comes to audio output.
Offline
This came in handy today, thanks for doing it, hardran3! I've installed Pulseaudio a couple of times before but this made it go really quick on a new install. It was pretty helpful on cleanup for an existing install also. I switched the audio card back to onboard to move the good one to the newer PC so what I did was refresh PA using your apt-get string (it pulled in a couple of things that were missing even though PA ran anyway, if a bit quirky at times) and replaced my existing asound.conf with the one you posted.
In case anyone else runs into this if they switch cards, if you get "connection refused" errors, what worked for me was removing the .pulse directory (off home) and deleting .pulse-cookie
PA has gotten better than it used to be (or it could be the difference in implementation). I need it for LiVES on one box and to get xbmc to play nice with everything else on another and even though it had a really rough start (I got bit by the Ubuntu/Hardy implementation good so after that switched to OSSv4 for a long time) it seems pretty much alright now.
Thanks again for posting this!
Last edited by chillicampari (2011-05-19 01:02:37)
Offline
nvm, reverted to alsa, pulse gives out horrible choppy sound in videos.
Last edited by el_koraco (2011-07-30 09:45:04)
Offline
Thanx Hardran3 worked like a charm ... Even got my Macally 2.1 usb speaker/cooling fan thumpin...kewl beanz!
Offline
Helped SO much, learned a bit too 
sound glitches i'v been getting with my attempt to install pulse audio are gone
Thanks!
Offline
Thanks! This helped a lot me too.
I have dist-upgraded my Waldorf from Statler, and in Waldorf repos, there are no libsdl1.2debian-pulseaudio and pulseaudio-module-hal packages, but it seems like they are not needed. Just libsdl1.2debian instead of libsdl1.2debian-pulseaudio seems to do the trick. The other packages are the same.
I have also noticed that on my system this works fine also WITHOUT the /etc/asound.conf file.
I only had problems with my mute/unmute button on keyboard, which muted, but couldn't unmute back...
hardran3's suggestion on multimedia buttons helped too.
Now, the only remaining issue is that unmuting from the Volume Icon doesn't work (muting does). And I think that, at least on my system, this is connected to the multimedia buttons issue. Because before the hardran3's fix they were acting the same way the Volume Icon acts stil now...
But (un)muting from the Icon is something I almost never do, so I probably just shouldn't bother...
Omnia sunt communia.
Offline
Pages: 1
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.