How to replace PULSEAUDIO with ALSA in XFCE?

Asked by Uqbar on 2011-03-14

I would like to have an XFCE anvironment using ALSA instead of Pulse Audio.
How can I accomplish such a thing?
I'm running XFCE ad the desktop environment.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu pulseaudio Edit question
Assignee:
No assignee Edit question
Solved by:
Uqbar
Solved:
2011-04-01
Last query:
2011-04-01
Last reply:
2011-03-14

You can head into sound prefs and make the switch

Uqbar (uqbar) said : #2

This kind of answers is really annoying, actionparsnip.
Have you ever seen the XFCE "preferences" screen?
Well, there's no "audio/sound/music" section!

Uqbar (uqbar) said : #4

Do you mean that if I choose "ALSA" I disable Pulse Audio and use ALSA instead?
I though it was a simple mixer application able to either change ALSA or Pulse properties, not to disable either one.
So can I uninstall the pulse stuff once I "select" the ALSA?

Sam_ (and-sam) said : #5

In Ubuntu we have gstreamer-properties to change audio-video output module.
I don't use xfce, in Ubuntu pulseaudio is an essential. If there is enough disk space why not just leave it.
No idea what happens, but if you note what you uninstall you can reinstall it in case sound is broken afterwards.

https://help.ubuntu.com/community/SoundTroubleshooting

Uqbar (uqbar) said : #6

@Sam_ The mixer doesn't disable anything. It "Supports for different sound systems at the same time" (quoting from the mentioned XFCE wiki).

Uqbar (uqbar) said : #7

By installing gstreamer-properties I've been able to do the magics.

Paul Perkins (catmatist) said : #8

How to replace PULSEAUDIO with ALSA? In 2008, this was a reasonable thing to do. In 2012, things have shifted a lot, and the best answer is, you do not want to do that. Not by starting with a desktop distribution that was designed and tested with PULSEAUDIO as an essential part of its audio subsystem, like Ubuntu or Kubuntu or Xubuntu. You will break lots of stuff, and probably not have any effect on whatever problem you are actually trying to fix.

If you really just want to run a PULSEAUDIO-less system, the easiest way is to start with a distribution that does not use PULSEAUDIO by default. Within the Ubuntu family, I think Lubuntu thru version 11.10 is still built that way.

And by the way, there is no getting rid of ALSA in Linux, as the sound hardware drivers are all part of ALSA or written to interface through it. PULSEAUDIO only replaces part of ALSA and sits "on top of" the rest in the Linux audio "stack".

David Huber (f-mail-m) said : #9

Sorry to say, but your not right. Pulseaudio has the problem to resample everything. On my livingroom machine a pentium 4 dualcore 2800MHz computer I have serious trouble playing videos with high sample rates. My external audiointerface, a Echo2 by Echoaudio can handle 24bit 192kHz audio, so why wasting processor power for resampling? I use fxce4 and uninstalled pulseaudio, created a .asoundrc file in my homefolder (important is to have any other card than hw:0 as your default, otherwise mplayer for example didn't play anything over hw:1 even when configured in the audiosettings in smplayer). I use the qamixer and configured it's config file in the .config folder, all in my home folder, and it works fine. If you want to enable duplex and sound mixing from differnt programs you should have a .asoundrc like that one:

pcm.Echo2 {
    type hw
    card 1
    device 0
}

ctl.Echo2 {
    type hw
    card 1
    device 0
}

pcm.!default {
    type plug
    slave.pcm "Echo2"
}

# Das dmix-Plugin wird definiert.
pcm.dmixer {
    type dmix # pcm.NAME: der Name jedes Gerätes kann angepasst werden
    ipc_key 1024
    ipc_perm 0666 # Andere Benutzer können ebenfalls dmix gleichzeitig nutzen
    slave.pcm "Echo2"
    slave {
        channels 2
    }
}

ctl.dmixer {
    type hw
    card 1
}

# Das dsnoop-Plugin, welches es erlaubt, mehrere Programme gleichzeitig aufnehmen zu lassen.
pcm.dsnooper {
    type dsnoop
    ipc_key 2048
    ipc_perm 0666
    slave.pcm "Echo2"
    slave
    {
        channels 2
    }
}

# Dies definiert unser Fullduplex-Plugin als Standard für alle ALSA-Programme.
pcm.duplex {
    type asym
    playback.pcm "dmixer" #natürlich muss dann auch das passende Gegenstück angepasst werden
    capture.pcm "dsnooper"
}

pcm.!default {
    type plug
    slave.pcm "duplex"
}

Echo2 is the alias for my soundcard and card1 is in my case my external audiointerface.
My computer benefited a lot by getting rid of pulse audio.

Michał Małecki (michalus) said : #10

I agree with David Huber. After uninstalling Pulseaudio youtube video stop tearing (it was causing audio and video tearing too) and allow to watch it normally.

Hardware: Asus Eee PC 1101HA, Intel Atom Z520 1,3GHz, 2GB RAM.

Paul Perkins (catmatist) said : #11

I think the ALSA config-file gubble David Huber posted above serves to illustrate why you might not want to deal with ALSA directly unless all else has failed for you. If you are pushing the limits of what your CPU can do, you clearly want to eliminate any needless resampling, but any set-up is going to resample if you have different parts of it set to use different rates. If you understand your hardware and like constructing ALSA config files, have at it, by all means. For my part I use either Pulse Audio or JACKD depending on what I'm trying to accomplish. Not usually both at once, though. What can I say, it works for me.