I had a hard time getting pulseaudio running on Wheezy raspbian (2012-10-28) using the analog output. The following is what I did just to get it working in per-session mode (not system mode). System mode may work as well, I haven't attempted it. Setting up server will require some more work. I found this information in various places, hopefully gathering it here will help someone.
Install pulseaudio and make sure user (e.g. eric) is part of the audio group:
sudo apt-get install pulseaudio pulseaudio-utils
sudo adduser eric audio
Change /etc/asound.conf look like the following. This sets up pulseaudio to be used as an alsa device by default so applications use it without any additional configuration. The first two declarations (including the commented one) was in the original file.
pcm.mmap0 {
type mmap_emul;
slave {
pcm "hw:0,0";
}
}
#pcm.!default {
# type plug;
# slave {
# pcm mmap0;
# }
#}
pcm.pulse { type pulse }
ctl.pulse { type pulse }
pcm.!default { type pulse }
ctl.!default { type pulse }
Add the following lines to /etc/pulse/daemon.conf:
default-sample-rate = 48000
resample-method = trivial
trivial
is the lowest quality method, but uses about 6% cpu. src-sinc-fastest
also worked for me, but use about 25% CPU. Others may work as well. This later bit I don't quite understand the need for, but it seemed to be the magic ingredient. You can read more about it here.
Finally, to silence the audio pops between song plays, comment out this line in /etc/pulse/default.pa as follows:
#load-module module-suspend-on-idle
There is still some dropouts when two sources play at once, if I discover a remedy for that I'll add to this answer.