[pulseaudio-discuss] Gnome volume applet

Ritesh Kumar ritesh at cs.unc.edu
Fri Dec 21 13:11:02 PST 2007

On Dec 21, 2007 1:25 PM, Bill Moseley <moseley at hank.org> wrote:

> I've been trying to get a grasp of how all the parts work -- but ALSA
> and ESD and Pulse are all things I have not looked at before it's a
> bit of work to grok all at once.  Is there a "big picture" doc some
> place?  Knowing how things are hooked together would likely help quite
> a bit.
> So, the volume applet in GNOME doesn't work.  But, if I run alsamixer
> from the command line it only shows a single volume control and the
> device is listed as Pulse, and it works.
> http://pulseaudio.org/wiki/PerfectSetup has a few comments about
> GNOME.  It says to create this symlink:
>    $ ln -sf /usr/local/bin/esdcompat /usr/bin/esd
> Now, I'm not clear about that.  That link is set in the LTSP *client*
> only, not on the LTSP server.
> In LTSP, GNOME and the volume applet are running on the server.
> Should that link be on the LTSP server, instead?
> So in the client chroot:
> $ ls -l /opt/ltsp/i386/usr/bin/esdcompat
> -rwxr-xr-x 1 root root 2655 2007-06-28 10:02
> /opt/ltsp/i386/usr/bin/esdcompat
> $ ls -l /opt/ltsp/i386/usr/bin/esd
> lrwxrwxrwx 1 root root 9 2007-11-01 18:02 /opt/ltsp/i386/usr/bin/esd ->
> esdcompat
> And in the server:
> $ ls -l /usr/bin/esd
> ls: /usr/bin/esd: No such file or directory
> ls -l /usr/bin/esdcompat
> ls: /usr/bin/esdcompat: No such file or directory
> I tried creating that symlink on the server, restarted GNOME (logged
> out and back in) and still no luck.
> So, I need a bit more hand holding.
Unfortunately, I too haven't seen a big picture document anywhere. I
recently posted two blog articles about ALSA and Pulseaudio configuration...
you may find it helpful (http://defectivecompass.wordpress.com).

First thing, the lines ctl.!default { type pulse } redirects the alsa mixer
controls operations to pulseaudio. If you run alsamixer you will see the
sound device named "pulseaudio". This is a good thing in general but can
cause problems if pulseaudio is not able to figure out the correct mixer
control to use.
Your audio card supports a hardware mixer control. However, ALSA may or may
not name it "Master". For my intelHDA card I have "Front" as my hardware
mixing device. Pulseaudio will look for "Master" and then "PCM" as a
fallback. "PCM" is generally available on all cards but the default ALSA
configuration makes it unusable for direct hardware access on some cards.
You see... ALSA has this "softvol plugin" which allows you to add a software
volume control over the actual ALSA device. The default alsa configuration
mixes softvol + dmix (Alsa's own software audio stream mixing plugin) for
its default device and maps the "PCM" control to the softvol. Now if a
program like pulseaudio directly uses the hardware, but uses "PCM" for
volume and uses the alsa-pulse plugin to redirect ALSA mixer controls to
pulseaudio, your audio is no more going through dmix but directly through
the hardware (default for module-alsa-sink device is hw:0,0), however, the
mixer control is through "PCM" which controls the softvol for the "default"
ALSA dmix device. That does nothing to control the volume. The big picture
ain't that pretty, isn't it? :)
If you want a quick solution try adding a device=default in you
module-alsa-sink configuration. This is not optimal as it layer dmix below
pulseaudio instead of eliminating it from the pipeline.
What I recommend you do is ditch the default alsa configuration and make
your own. The first thing to do is to make your own virtual device and add a
"Master" softvol to it if necessary. Use the following as a guide line...
use your local ~/.asoundrc if you don't feel like modifying /etc/asound.conf

pcm.!default { type pulse }
ctl.!default { type pulse }
# Create softvol devices for intelHDA.
# For intelHDA, its "PCM" control controls its default (not used) softvol.
pcm.intelHDA {
        type softvol
        slave.pcm "hw:0,0"
        control.name "Master"
        control.card 0

# It seems we require these dummies as pulseaudio tries to look up mixer
ctl.intelHDA {
        type hw
        card 0

Then use intelHDA or whatever name you use above in your module-alsa-sink
configuration. Something like module-alsa-sink device=intelHDA

That should do the trick.

I am new to pulseaudio so I don't know how things work but I highly
recommend keeping a set of these configurations on the wiki for as many
cards as possible. To start I can put up configuration for intelHDA and iMic
devices on the wiki if somebody just creates a page and lays out a

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20071221/2b96013a/attachment.htm>

More information about the pulseaudio-discuss mailing list