How-To: Pulseaudio

Share your own howto's etc. Not for support questions!

How-To: Pulseaudio

Postby Mrbigshot08 » 2007-02-21 04:38

This is an updated version of the How-To I used to have on these forums. I found my How-To cited on various websites around the internet and I felt awful for not updating it in so long, so I finally gathered up all the new information and edited my How-to. The old version was heavily outdated. If for any reason you regularly referenced that How-To and you need the information that was on it, I'm hosting it on my website, only because I have so much web space and I don't know what to do with it all. You can access it here:
http://www.raptorman18.110mb.com/Linux/ ... udio1.html

Pulseaudio is a sound server which acts as drop in replacement for Esound. It allows users without a sound card capable of hardware mixing to playback multiple sounds at once. It also allows users to send sounds over a network. Learn more here:
http://pulseaudio.org/

If you're wondering why one should switch to Pulseaudio, consider reading this article by Nathan Willis on Linux.com, where he mentions this very How-To.
http://www.linux.com/feature/119926

This article talks about some of the many features Pulseaudio has.
http://arstechnica.com/journals/linux.a ... y-to-linux

On with the How-To:

Pulseaudio has always been easy to configure, as it is intended to neatly replace esd. It is even easier to configure now. Just install the packages, run the command and presto.

Before we can begin we have to install Pulseaudio in the first place. You can go into synaptic and search for Pulseaudio and install every package by that name, which will work, or you can try this:

Code: Select all
sudo apt-get install pulseaudio libao2 paprefs libpulse-mainloop-glib0 pulseaudio-module-jack pavucontrol alsaplayer-alsa pulseaudio-module-hal pulseaudio-module-x11 libgstreamer-plugins-pulse0.10-0 pulseaudio-module-lirc pulseaudio-utils pulseaudio-module-zeroconf libasound2-plugins padevchooser paman pulseaudio-module-gconf libgconfmm-2.6-1c2 libpulse-browse0 pavumeter libglademm-2.4-1c2a pulseaudio-esound-compat libpulse0 libpulse-dev


Obviously all those are not needed but who cares. Please note that entering the above command will uninstall Esound!

After you have installed pulseaudio, copy the following into /etc/asound.conf. You must create the file! As we go along we will add some settings to this file in order to extend its functionality. On some systems the appropriate file may be /home/user/.asoundrc

Code: Select all
pcm.pulse {
    type pulse
}

ctl.pulse {
    type pulse
}

pcm.!default {
    type pulse
}

ctl.!default {
    type pulse
}


Once everything is installed and the asound.conf file is in place, start the pulseaudio server with the following command:
Code: Select all
pulseaudio -D


I'm pretty sure Pulseaudio should autostart by default, but if it doesn't, you may want to enable software sound mixing, this is done in gnome by going to system>preferences>sound then go to the sound tab and click the check box to enable software sound mixing. If you do not want system sounds, you can always disable each system sound individually, but this will start pulseaudio automatically at boot. You could also go to sessions and add the pulseaudio -D command to begin at startup, and this too will start pulseaudio automatically. There are other ways to do this as well.

I used to have multiple setups on this page, but those setups have become obsolete due to the development of pulseaudio. Many application run out-of-the-box with pulseaudio. My current setup only consists of additions I have made to etc/asound.conf to create virtual dmix devices which enable multiple sounds through Alsa. We keep the Pulseaudio devices but add the dmix devices. Much of this is from the Dmix Wiki and it is my current personal setup. This enables me to get pulseaudio to work with some applications it wouldn't normally work with, specifically applications using OpenAl.

Code: Select all
# Part I directly from ALSA Dmix Wiki

pcm.paul { # paul is my name, you can use your name, just make sure you use it below too
    type dmix
    ipc_key 1024
    slave {
        pcm "hw:0,0"     
        period_time 0
        period_size 1024
        buffer_size 8192
       #format "S32_LE"
       #periods 128
        rate 44100
    }
}

pcm.dsp0 {
    type plug
    slave.pcm "paul"
}

# This following device can fool some applications into using pulseaudio
pcm.dsp1 {
    type plug
    slave.pcm "pulse"
}

ctl.mixer0 {
    type hw
    card 0
}

# Part II directly from Pulseaudio Wiki

pcm.pulse {
    type pulse
}

ctl.pulse {
    type pulse
}

# Optional, set defaults

pcm.!default {
    type pulse
}

ctl.!default {
    type pulse
}


This creates virtual devices in Alsa which applications which cannot use Pulseaudio directly to play sounds. The default device is still Pulseaudio however. This setup will play every application on my system. Including Audacity.

I would like to mention one of the newest and most useful developments in the Pulseaudio sound server and that is the pasuspend or pasuspender feature. This new feature enables Pulseaudio to automatically suspend it's lock of the audio device in order to allow other application to control the audio device. Whenever Pulseaudio is idle, meaning any application using sound is not running, it automatically suspends it's lock of the audio device, which will allow the user to open an application such as Audacity which does not natively use Pulseaudio, and Audacity will work through the ALSA sound system.

It is also possible for the user to force Pulseaudio to relinquish it's lock of the audio device. Just precede the command of the program you wish to start with the pasuspender command. For instance:

Code: Select all
pasuspender audacity


This will cause Pulseaudio to suspend it's control of the sound device and allow Audacity to run through ALSA as if Pulseaudio didn't exist. Pasuspender will work with any application that does not support Pulseaudio but support ALSA.

Because Pulseaudio automatically relinquishes control of the sound device and allows applications to use ALSA, this could cause a situation where you think the sound is going through Pulseaudio when it is actually going directly through ALSA. (Does that make sense?).

Well, the best idea is to check to make sure that Pulseaudio is running and that the sound is running through Pulseaudio, and there are many ways to do this.

1. If your notice that your system sounds stopped running, then the Pulseaudio daemon must not be running.

2. If you open up two application using sound simultaneously, the second one will not be able to access the sound card.

3. Open up the Pulseaudio Manager, in Applications>Sound and Video>Pulseaudio Manager, it will say if it is connected or not.

4. Run the command
Code: Select all
ps_ax | grep pulseaudio

Which should return something similar to the following if Pulseaudio is running properly.
Code: Select all
3319 ?        Sl     1:31 /usr/bin/pulseaudio --log-target=syslog
3322 ?        S      0:00 /usr/lib/pulseaudio/pulse/gconf-helper
26493 pts/1    R+     0:00 grep pulseaudio


5. You could always check if it is running through the system monitor, which is the same thing as the ps_ax command above.

Network Audio
Playing Sounds on other computers

Mac has airport which allows you to stream Itunes to speakers that are connected to airport. Well, rather than spend some insane amount of money for airport, we can do better with Pulseaudio. Lennart Pottering the developer of Pulseaudio, is also a developer of Avahi, the network discovery daemon. So as long as the other computer is shared on the home network, Pulseaudio should be able to play sounds on it.

The catch is, first make sure you can view the network shares of both computers from the other computer. This way you can be sure that the computers can see each other. My home network works fine, so I didn't have to worry about this, so I don't know what will happen, but make sure the computers can atleast ping each other before trying anything.

Both computers must both be running Pulseaudio. I have only tried it on Linux computers, but it should work with any computer that runs Pulseaudio including Mac and Windows, but you may run into problems unique to those systems. Also you must make sure Pulseaudio is configured to share its server.

To configure Pulseaudio to share its server, you need to go into Pulseaudio Preferences which is located in System>Preferences>Pulseaudio Preferences. Then you need to enable all the options for network discovery. Here is what mine looks like.

Then you must do the same process on the networked computer you wish to share audio on. When you are done the process the Pulseaudio Preferences tray icon should appear.

The final step is to click on the Pulseaudio Preferences tray icon, and from there you can change the default Pulseaudio Server on the computer you are sitting at, to the Pulseaudio server on your networked computer, and all sounds played on the computer you are sitting at will play through the speakers on your networked computer. It is that easy!!

Applications
Getting specific applications to work with Pulseaudio.

I will only mention applications which do not appear at the Pulseaudio Wiki or that I am unhappy with the Pulseaudio Wiki's explination of. http://pulseaudio.org/wiki/PerfectSetup
The methods used in this section were performed using the "Default Setup" from above.

OpenAl

I know there are some requests on this site to get games using the OpenAl sound system to run. The program I use that utilizes the OpenAl system is Mednafen a Nintendo emulator. In order to get this to run, first you need the OpenAl utilities, which should already be taken care for you when you install whatever program utilizes OpenAl. (isn't automatic dependency resolution wonderful :)) Anyway, if it isn't search through synaptic or some other package management system.

Then, try to force whatever program you are using to make use of the pcm.dsp1 device I created earlier in my asound.conf. In Mednafen I simply specify -sounddevice pcm.dsp1 and mednafen will then output through pulseaudio. However, sometime the audio can stutter and be poor, so what I do is increase the sound buffer size slightly. (The default buffersize in Mednafen is 32). This may not be needed in other applications that use OpenAl but I thought I would mention that here.

This is the command I use in Mednafen to use OpenAl through Pulseaudio

Code: Select all
mednafen -sounddriver alsa -sounddevice pcm.dsp1 -soundbufsize 64 -vdriver 0 -nes.stretch 1 -fs 1 -nes.input.port1 gamepad "$rom"


Avidemux

This one is easy, specify "Pulse" [no quotes] as the Alsa device in Edit,Preferences,Audio. Or you can tell Avidemux to use OSS and then start the application using "padsp Avidemux"
(Make sure you are using "Xvideo Accel" in Edit,Preferences,Video)

Audacity

Audacity is not compatible with Pulseaudio. There are plans to make it in the future but as of right now it does not work. The previous common practice was to kill the Pulseaudio server in order to use Audacity.

Now as I mentioned previously, one can use pasuspend.

Just close all applications using sound, and open Audacity.

Or if it doesn't work you can always force it with the command:
Code: Select all
pasuspender audacity


Or you can always run audacity with only oss driver with

Code: Select all
padsp audacity


But I highly recommend pasuspender, as it will also work for any application that doesn't work with Pulseaudio.

Iceweasel

With iceweasel, you may need to get used to having your flash player crash from time to time, and the frequency of crashes seems to vary with the version of flash player, the version of iceweasel, and even the extensions that you are running, but you can minimize the crashes by following some of these suggestions. As of right now, things are pretty stable with the latest version of flash player and libflashsupport.so.

The problem is that flash player 9 does not call pulseaudio properly, so pulseaudio needs to use a special library to get sound to play through iceweasel. Flash player has been causing problems in Linux for as long as I can remember, it doesn't even use alsa properly as far as I know.

Anyway, I'm assuming you already have flash player 9 installed and working. From there the next step is to compile libflashsupport to allow pulseaudio to work with flash. I like to compile the latest version available from git, and to do that we need to install the following dependencies.

Code: Select all
sudo apt-get install build-essential automake1.9 autoconf libtool libes0-dev libpulse-dev libssl-dev git git-core


Then, we can download and compile.

Code: Select all
wget http://pulseaudio.vdbonline.net/flashplugin-nonfree-pulse_0.1~000.tar.gz
tar xvfz flashplugin-nonfree-pulse_0.1~000.tar.gz
cd flashplugin-nonfree-pulse-0.1~000
make
sudo make install


Then edit your /etc/iceweasel/iceweaselrc and change a line to look like this:

Code: Select all
ICEWEASEL_DSP="padsp"


Now, flash should work, and work pretty well too. (I have youtube videos perfectly in sync (as if it matters)).

You may also choose to begin testing the new flash player 10 beta, which properly calls the pcm_pulse. However, I seem to experience approximately the same amount of crashes in flash player 10 as I did in flash player 9, in the few days since I have made the switch. But I'm think I'm going to continue using flash player 10 so that I can help make sure Adobe gets this one right. Hopefully the upcoming release of Firefox/Icewesel 3 may bring added stability in this area, if we get enough people testing this stuff together.

To install flash player 10, is a pretty straight forward process, just go to the site, download the archive, extract it, and replace the flash plugin that is currently on your system. WARNING: You may want to back up flash player 9 before begining this upgrade.

For me, the flash plugin was located in /home/paul/.mozilla/plugins/flashplayer.so, for others it may be located in /usr/lib/flashplugin-nonfree/libflashplayer.so, or maybe somewhere else completely.

After you install flash player 10, be sure to delete /usr/lib/libflashsupport.so, if you have it installed from before, and then just restart iceweasel, and flash player 10 should be your new flash player.

There are some problems which may arise if you use a video card with composite or what not. Go here for a solution:http://ubuntuforums.org/showthread.php?t=75527

Basically it says edit /usr/bin/iceweasel

find where it looks like this:

##
## Variables
##
MOZ_DIST_BIN="/usr/lib/mozilla-firefox"
MOZ_PROGRAM="/usr/lib/mozilla-firefox/firefox-bin"

and make it look like this



##
## Variables
##
##Added for composite extension to work
export XLIB_SKIP_ARGB_VISUALS=1
MOZ_DIST_BIN="/usr/lib/mozilla-firefox"
MOZ_PROGRAM="/usr/lib/mozilla-firefox/firefox-bin"

I would not recommend it if you are not using composite, but it does seem to reduce the frequency of flash player crashes.

Or you may want to consider switching browsers. Epiphany seems to crash with the same frequency as iceweasel, but when flash player crashes in Opera, the entire browser does not crash, just the flash player, and all I have to do is reload the page. But I still use iceweasel.

Tinkering
Getting Applications to work with Pulseaudio.

If your application does not work with Pulseaudio, I would try the following steps in this order. But before you try on your own, check the applications section of this How-To and the Pulseaudio wiki http://pulseaudio.org/wiki/PerfectSetup for directions for specific applications.

1.Try to specify that the program use the device "Pulse" [no quotes]
2.Try to specify that the program use the device "pcm.pulse" [always without quotes]
3.Try to specify that the program use the device "pcm.dsp1" (You must have an asound.conf that I created (or similar))
4.Try to specify that the program use the device "pcm.paul" or "paul" (or whatever name you used in your asound.conf)
5.Try to specify that the program use "dmix"
6.Try to specify that the program use the OSS sound driver. Then wrap the program with "padsp" [no quotes] (padsp is similar to aoss, except that it outputs to Pulseaudio and it seems to work much faster.)
7.Use the pasuspender command
Code: Select all
pasuspender program


Troubleshooting

1.Make sure the Pulseaudio Daemon is currently running. Check gstreamer-properties (Multimedia Systems Selector) to be sure. It may have crashed or whatever.
2.Make sure you copied the asound.conf exactly.
3.Try copying the asound.conf to /.asoundrc (this means make a file in your home directory called .asoundrc and put the same contents as you /etc/asound.conf into it.) The file will be a hidden file. For me only asound.conf works but it may be different for other people especially if you are not on debian.
4.Try a restart
5.Try the commands "sudo dpkg-reconfigure pulseaudio" and "sudo dpkg-reconfigure pulseaudio-utils" to set things back to default.
6.Try a different device as stated in the Tinkering section.
7."sudo apt-get alsa-utils gnome-audio" then type the command "aplay -D pulse /usr/share/sounds/startup3.wav" This will check if Pulseaudio is running and that your asound.conf or /.asoundrc is correct. Again, no quotes.

Notes

I have tried the oss2pulse daemon which emulates oss devices. It creates fake OSS devices that naturally output to Pulseaudio, which allows old OSS application to run easily through Pulseaudio. This is still alpha software, very much in the testing phase, but worth mentioning.

Acknowledgements/Sources

By the way, Pulseaudio is in rapid devleopment. It used to be a difficult task to get sound that originates on one computer, to play on another computer over the internet. Now that process, is really simple, and uses a great GUI. It's called Pulseaudio Device Chooser. It works really well if you have multiple computers using Pulseaudio. I just though I would mention how awesome that is, and acknowledge the great work the Pulseaudio developers are doing.

A special thanks to all the guys at the Pulseaudio Mailing List, without whom I would not even have Pulseaudio working.

Thanks to the forum member Rickh.

http://ubuntuforums.org/showthread.php?t=75527
http://pulseaudio.revolutionlinux.com/PulseAudio
http://www.adobe.com/shockwave/download ... omoid=BIOW
http://pulseaudio.org/wiki/PerfectSetup
http://pulseaudio.org/
http://alsa.opensrc.org/index.php?title ... Dmix_Howto
http://gentoo-wiki.com/HOWTO_ALSA_sound_mixer_aka_dmix
http://pulseaudio.vdbonline.net/libflashsupport/
http://ubuntuforums.org/showthread.php?p=4928900
http://labs.adobe.com/downloads/flashplayer10.html

I hope this How-To is helpful. I'm always available for questions, comments, additions, or positive feedback.

And maybe a little constructive criticism. :wink:
Last edited by Mrbigshot08 on 2008-12-20 21:32, edited 9 times in total.
User avatar
Mrbigshot08
 
Posts: 180
Joined: 2006-09-07 01:30

Postby rickh » 2007-02-21 04:47

I certainly didn't do anything to deserve the recognition, but I swear, I will tackle this thing within a week. Looks excellent.
Debian-Lenny/Sid 32/64
Desktop: Generic Core 2 Duo, EVGA 680i, Nvidia
Laptop: Generic Intel SIS/AC97
User avatar
rickh
 
Posts: 3477
Joined: 2006-06-29 02:13
Location: Albuquerque, NM USA

How-To: Pulseaudio: works!!

Postby zasf » 2007-03-04 12:35

thanks for this howto, I just wanted to confirm that it even works on Ubuntu Feisty!

BTW the first apt-get command contains esound wich conflicts with pulseaudio, you could remove it from the command
zasf
 
Posts: 5
Joined: 2007-03-04 12:32

Re: How-To: Pulseaudio: works!!

Postby Mrbigshot08 » 2007-03-05 19:52

zasf wrote:thanks for this howto, I just wanted to confirm that it even works on Ubuntu Feisty!

BTW the first apt-get command contains esound wich conflicts with pulseaudio, you could remove it from the command


Hey, thanks for the comment. Glad it helped.

Thanks for noticing the mistake. What happend was, I used a list from synaptic of program that were installed and uninstalled and then wrote it out in the form of that command, but I forgot to take out Esound (since it was removed in the same process and therefore showed up on the list). :lol:

Thanks, again.

PS. If you use Iceweasel and flash i would be interested in finding out how well it is working for you. I have the most recent versions of both flash and iceweasel and it is currently very stable, but some people have had trouble and even I had trouble until I made certain I completely purged all previous versions of flash/gnash/swf.

I can basically watch as many youtube videos in a row as I want with out it crashing! :P
User avatar
Mrbigshot08
 
Posts: 180
Joined: 2006-09-07 01:30

Postby zasf » 2007-03-09 19:46

I don't have flash installed yet, this is a feisty test partition. I'll install it shortly but I'd like to solve a problem with esound first.

The problem with esound is that I cannot hear gnome sounds.. actually esound applications do not work. Can you help me with that?

I did everything according to the pulseaudio perfect setup

Code: Select all
$ vdir /usr/bin/esd
lrwxrwxrwx 1 root root 18 Mar  8 14:28 /usr/bin/esd -> /usr/bin/esdcompat

$ cat /etc/pulse/default.pa | grep esound                     
.ifexists /usr/lib/pulse-0.9/modules/module-esound-protocol-unix.so
### Load esound protocol
load-module module-esound-protocol-unix

$ gconftool -g /system/gstreamer/0.10/default/audiosink         
pulsesink
$ gconftool -g /system/gstreamer/0.10/default/audiosrc
pulsesrc


If i run rhythmbox, the application crashes with
Code: Select all
(rhythmbox:6074): Rhythmbox-WARNING **: Couldn't find an x overlay

[1]+  Segmentation fault      rhythmbox


Thanks,
Matteo
zasf
 
Posts: 5
Joined: 2007-03-04 12:32

Postby zasf » 2007-03-09 20:07

sometimes apps are really slow.. it looks like they do not react instantaneously to my command. It seems that something is going wrong in background.

If I run
Code: Select all
$ gthumb &
[1] 4259
matteo@burnt:~$ /home/matteo/.themes/Gilouche/gtk-2.0/gtkrc:42: Clearlooks configuration option "menuitemstyle" is not supported and will be ignored.
/home/matteo/.themes/Gilouche/gtk-2.0/gtkrc:43: Clearlooks configuration option "listviewitemstyle" is not supported and will be ignored.
/home/matteo/.themes/Gilouche/gtk-2.0/gtkrc:44: Clearlooks configuration option "progressbarstyle" is not supported and will be ignored.
Usage:program_name [address][:port]Usage:program_name [address][:port]Usage:program_name [address][:port]Usage:program_name [address][:port]Usage:program_name [address][:port]Usage:program_name [address][:port]Usage:program_name [address][:port]Usage:program_name [address][:port]Usage:program_name [address][:port]Usage:program_name [address][:port]Usage:program_name [address][:port]
[1]+  Done                    gthumb


apart the clearlooks warning, wich app is saying this ???
Code: Select all
Usage:program_name [address][:port]


Thanks,
Matteo
zasf
 
Posts: 5
Joined: 2007-03-04 12:32

Postby Mrbigshot08 » 2007-03-10 08:39

zasf wrote:I don't have flash installed yet, this is a feisty test partition. I'll install it shortly but I'd like to solve a problem with esound first.

The problem with esound is that I cannot hear gnome sounds.. actually esound applications do not work. Can you help me with that?

I did everything according to the pulseaudio perfect setup

Code: Select all
$ vdir /usr/bin/esd
lrwxrwxrwx 1 root root 18 Mar  8 14:28 /usr/bin/esd -> /usr/bin/esdcompat

$ cat /etc/pulse/default.pa | grep esound                     
.ifexists /usr/lib/pulse-0.9/modules/module-esound-protocol-unix.so
### Load esound protocol
load-module module-esound-protocol-unix

$ gconftool -g /system/gstreamer/0.10/default/audiosink         
pulsesink
$ gconftool -g /system/gstreamer/0.10/default/audiosrc
pulsesrc


If i run rhythmbox, the application crashes with
Code: Select all
(rhythmbox:6074): Rhythmbox-WARNING **: Couldn't find an x overlay

[1]+  Segmentation fault      rhythmbox


Thanks,
Matteo



Alright, for the gnome sounds. The output of those commands appear to be right. I checked them against mine and they are indeed identical.

I have the gnome sounds working and I didn't change anything to get them to work. They work pretty much out of the box for me. However, if I remember correctly, I did have problems with gnome sounds when I used to use Ubuntu, but that was without Pulseaudio obviously.

Anyway, with Pulseaudio and Debian I didn't do much to get the sounds running. All I did is I went into System Sounds Settings Window and I made sure that both boxes were checked. "Enable Software Sound Mixing" and "Play System Sounds" both must be enababled. But for some reason the system sounds did not take effect until I rebooted. ( I do not know why but that is just the way it is)

As for the other two problems you listed, your guess is as good as mine. But I don't think they look like Pulseaudio problems. The Rythmbox problem says something about an X screen so thats out of my realm, and I do not use Rythymbox anyway. Did it suddenly just stop working? If it did maybe you want to try dpkg-reconfigure or a complete uninstall and reinstall. Thats what I would try.

And your other problem is almost complete gibberish to me. :D
User avatar
Mrbigshot08
 
Posts: 180
Joined: 2006-09-07 01:30

Postby zasf » 2007-03-12 20:45

Mrbigshot08 wrote:Anyway, with Pulseaudio and Debian I didn't do much to get the sounds running. All I did is I went into System Sounds Settings Window and I made sure that both boxes were checked. "Enable Software Sound Mixing" and "Play System Sounds" both must be enababled. But for some reason the system sounds did not take effect until I rebooted. ( I do not know why but that is just the way it is)


I did the same but they do not work :(

Mrbigshot08 wrote:As for the other two problems you listed, your guess is as good as mine. But I don't think they look like Pulseaudio problems. The Rythmbox problem says something about an X screen so thats out of my realm, and I do not use Rythymbox anyway. Did it suddenly just stop working? If it did maybe you want to try dpkg-reconfigure or a complete uninstall and reinstall. Thats what I would try.


I'm even more confident that these are esd problems, if I run esd manually I get the same output
Code: Select all
Usage:program_name [address][:port]


over and over, I tried to install plain esound, it works and the comp is much reactive.. I believe there is something with pulseaudio-esound-replacement that just doesn't work.. I still don't know what!
zasf
 
Posts: 5
Joined: 2007-03-04 12:32

Postby Mrbigshot08 » 2007-03-14 08:29

I did some research on rhythymbox and found the following link. It appears to be an identical problem to yours.

https://answers.launchpad.net/ubuntu/+ticket/3735

I do have some suggestions to get the system sounds to play. As I remember there are some dependencies to get the sounds to play. As far as I know the sound files that are necessary do not even exist until you install them. If you could find some type of Ubuntu how-to for system sounds I would follow it exactly and it should still work even if you are using pulseaudio.

If you can't find one these are the packages that I think you may need.

gstreamer-esd ( or something like that, its the esd gstreamer plugin if you do not already have it installed)

linux-sound-base (i believe that is what it is called)

gnome-audio ( this is the package that contains the sound files i believe)

then restart and see if you got system sounds, of course make sure the pulseaudio server is started as it should on startup

once again if you can find some ubuntu documentation on system sounds i suggest you follow it, it should still work with pulseaudio.
User avatar
Mrbigshot08
 
Posts: 180
Joined: 2006-09-07 01:30

Thank You!!

Postby praka123 » 2007-11-18 16:57

sorry for bumping!but the thread is very useful for me and other debian users too hopefully.
Well,im running debian sid :D
praka123
 
Posts: 10
Joined: 2007-06-23 08:11
Location: Kerala,India

Postby Mrbigshot08 » 2007-11-18 22:07

Hey, Thanks!! :D

I really should update it, I have a lot more new tips and Pulseaudio has a lot more new interesting features.
:D

I plan to play around with my setups when Thanksgiving break starts, hopefully I can update then.

One interesting new feature is call pasuspend (or something like that) it allows you to temporarily deactivate pulseaudio so that it can drop back to standard alsa, so that you can run applications such as audacity.

P.S. If there are still problems running iceweasel with pulseaudio you might want to consider Opera, it is very stable! and Feature Rich! :D
http://pulseaudio.org/
Registered User #444844
Debian Sid
User avatar
Mrbigshot08
 
Posts: 180
Joined: 2006-09-07 01:30

Pulse audio works!though..

Postby praka123 » 2007-11-23 07:41

I have my Debian Sid working fine with pulseaudio and i have compiled and installed libflashsupport.so to /usr/lib/ as per pulse audio wiki.
sound works pretty well.
Only problem is when in a flash site like youtube playing a flash video,if i right click>settings, Iceweasel exits with some failed assertion error in terminal trace.i hope this is an alsa error.
BTW,I use flash9beta.
edit:the error i got as is below:
Code: Select all
$ iceweasel
firefox-bin: pcm_params.c:2351: sndrv_pcm_hw_params: Assertion `err >= 0' failed.
Aborted

^some help?
Also,the processor gets heated up(temp from 37 to 59degrees!) when pulseaudio is used with flashplayer9 beta.
praka123
 
Posts: 10
Joined: 2007-06-23 08:11
Location: Kerala,India

Postby hellfire[bg] » 2007-11-24 12:31

Do you experience any slowness when using pulse audio. I followed this howto and when i used pulse audio my system was quite slow. The problem came from mplayer rhythmbox and all applications that use audio. For example when i use alsa and esd mplayer takes about 5% cp usage. When i use pulse audio it takes about 50-60%. I tought that the reason for this was that i did something wrong but it was the same in Fedora.
...to boldly go where no one has gone before...
User avatar
hellfire[bg]
 
Posts: 397
Joined: 2006-06-21 19:15
Location: Sliven, Bulgaria

Re: Pulse audio works!though..

Postby Mrbigshot08 » 2007-11-26 16:18

praka123 wrote:I have my Debian Sid working fine with pulseaudio and i have compiled and installed libflashsupport.so to /usr/lib/ as per pulse audio wiki.
sound works pretty well.
Only problem is when in a flash site like youtube playing a flash video,if i right click>settings, Iceweasel exits with some failed assertion error in terminal trace.i hope this is an alsa error.
BTW,I use flash9beta.
edit:the error i got as is below:
Code: Select all
$ iceweasel
firefox-bin: pcm_params.c:2351: sndrv_pcm_hw_params: Assertion `err >= 0' failed.
Aborted

^some help?
Also,the processor gets heated up(temp from 37 to 59degrees!) when pulseaudio is used with flashplayer9 beta.


Yeah, Flash is a definite problem area right now. The problem Adobe doesn't support anything besides OSS, and obviously the code is closed source so there is nothing anyone can do but to file bug reports to Adobe and pray that they will fix their linux sound support for the next version of the flash player.

I'm assuming that your have everything working but it crashes upon starting a youtube video?

This can be annoying and it is something that seems to be getting worse instead of better. At one point in time, I had pulseaudio and flash working with an acceptable crash rate, say 1 crash for every 10 videos, and no crashes when not using flash. But at some point iceweasel got to the point where I can hardly even play a youtube video without it crashing. And it is tough for me to isolate the problem because I am using a strange OpenGl graphics setup which probably adds to the instability.

In the short term I would recommend trying Opera, it is very stable, there are still problems with flash videos, but if the flash player crashes, only the video crashes on that page, and all you have to do is reload the page and the video will work fine, instead of crashing the entire browser when a flash video crashes like in iceweasel.

You could also try to just let iceweasel use alsa and aoss. Since pulseaudio (since version 0.97 which is in Sid) has pasuspender, it should be very easy. ( I was going to add this to the How-To but I'll write it here too.) Pulseaudio also has a new feature where, when Pulseaudio is idle, it unlocks its hold on the sound card allowing you to access the sound card with other methods.

For instance, it is no longer necessary to kill pulseaudio to start audacity. Just close all other applications, and audacity should start using Alsa. Or you could use the command
Code: Select all
pasuspender audacity

which would also work, I think, i can't verify that at the moment.

So, if you really need flash videos, you can either switch to Opera or Epiphany, or use them just for flash videos or you can edit your /etc/iceweasel/iceweaselrc and go back to aoss (make sure you have it installed and see if you can get Alsa to work with stability on your flash videos.
http://pulseaudio.org/
Registered User #444844
Debian Sid
User avatar
Mrbigshot08
 
Posts: 180
Joined: 2006-09-07 01:30

Postby Mrbigshot08 » 2007-11-26 16:24

hellfire[bg] wrote:Do you experience any slowness when using pulse audio. I followed this howto and when i used pulse audio my system was quite slow. The problem came from mplayer rhythmbox and all applications that use audio. For example when i use alsa and esd mplayer takes about 5% cp usage. When i use pulse audio it takes about 50-60%. I tought that the reason for this was that i did something wrong but it was the same in Fedora.


Are you using some type of real time scheduling and are you using Pulseaudio directly, i.e. no Dmix (I'm gonna delete that part of the How-To, I think).

Pulseaudio is suppossed to be low latency, and I have never noticed a problem. I do know that mplayer and rhythmbox have produced problems in the past as their support has been a little scratchy.
http://pulseaudio.org/
Registered User #444844
Debian Sid
User avatar
Mrbigshot08
 
Posts: 180
Joined: 2006-09-07 01:30

Next

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 1 guest