On Dec 21, 2007 1:25 PM, Bill Moseley <<a href="mailto:moseley@hank.org">moseley@hank.org</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I've been trying to get a grasp of how all the parts work -- but ALSA<br>and ESD and Pulse are all things I have not looked at before it's a<br>bit of work to grok all at once. Is there a "big picture" doc some
<br>place? Knowing how things are hooked together would likely help quite<br>a bit.<br><br>So, the volume applet in GNOME doesn't work. But, if I run alsamixer<br>from the command line it only shows a single volume control and the
<br>device is listed as Pulse, and it works.<br><br><br><a href="http://pulseaudio.org/wiki/PerfectSetup" target="_blank">http://pulseaudio.org/wiki/PerfectSetup</a> has a few comments about<br>GNOME. It says to create this symlink:
<br><br> $ ln -sf /usr/local/bin/esdcompat /usr/bin/esd<br><br>Now, I'm not clear about that. That link is set in the LTSP *client*<br>only, not on the LTSP server.<br><br>In LTSP, GNOME and the volume applet are running on the server.
<br>Should that link be on the LTSP server, instead?<br><br><br>So in the client chroot:<br><br>$ ls -l /opt/ltsp/i386/usr/bin/esdcompat<br>-rwxr-xr-x 1 root root 2655 2007-06-28 10:02 /opt/ltsp/i386/usr/bin/esdcompat<br>
<br>$ ls -l /opt/ltsp/i386/usr/bin/esd<br>lrwxrwxrwx 1 root root 9 2007-11-01 18:02 /opt/ltsp/i386/usr/bin/esd -> esdcompat<br><br>And in the server:<br><br>$ ls -l /usr/bin/esd<br>ls: /usr/bin/esd: No such file or directory
<br><br>ls -l /usr/bin/esdcompat<br>ls: /usr/bin/esdcompat: No such file or directory<br><br><br>I tried creating that symlink on the server, restarted GNOME (logged<br>out and back in) and still no luck.<br><br>So, I need a bit more hand holding.
<br><div><div></div><div class="Wj3C7c"><br></div></div></blockquote><div><br>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 (
<a href="http://defectivecompass.wordpress.com">http://defectivecompass.wordpress.com</a>).<br><br>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.
<br>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? :)
<br>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.<br>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
<br><br>pcm.!default { type pulse }<br>ctl.!default { type pulse }<br># Create softvol devices for intelHDA.<br># For intelHDA, its "PCM" control controls its default (not used) softvol.<br>pcm.intelHDA {<br> type softvol
<br> slave.pcm "hw:0,0"<br> <a href="http://control.name">control.name</a> "Master"<br> control.card 0<br>}<br><br>
# It seems we require these dummies as pulseaudio tries to look up mixer devices.<br>ctl.intelHDA {<br> type hw<br> card 0<br>}<br><br>Then use intelHDA or whatever name you use above in your module-alsa-sink configuration. Something like module-alsa-sink device=intelHDA
<br><br>That should do the trick.<br><br>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 structure.
<br><br>Ritesh<br>
<br><br></div></div>