ALSA with Pulseaudio in Debian Etch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 15, 2007 at 02:06:52PM -0500, Paul Jones wrote:
> Wow! I would like to thank everyone for replying so quickly and so well.
> These are the quickest replies I have ever received.
> 
> Anyway, I checked my ALSA base and Plugins and they are both new enough
> versions, so I am pretty sure I have the Pulse plugin.
> 
> When I use aplay with /.asoundrc, regardless of whether the Pulseaudio
> server is running I get the following error.
> 
> Paul:/home/paul# aplay -D pulse /usr/share/sounds/startup3.wav
> ALSA lib pcm.c:2143:(snd_pcm_open_noupdate) Unknown PCM pulse
> aplay: main:550: audio open error: No such file or directory
> 
> However, out of curiosity I copied ./asoundrc to /etc/asound.conf, then
> tried aplay with Pulseaudio running and it worked, but if Pulseaudio is not
> running, I recieve the following error message.

Are you sure you had the right filename? The user specific ALSA
configuration file should be ~/.asoundrc (i.e. /home/paul/.asoundrc).
(AFAIK, I only use /etc/asound.conf here)

> Paul:/home/paul# aplay -D pulse /usr/share/sounds/startup3.wav
> *** PULSEAUDIO: Unable to connect: Connection refused
> aplay: main:550: audio open error: Connection refused

This is to be expected if PulseAudio is not running. If you use Gnome you
can install pulseaudio-esound-compat and check the "Enable ESD" checkbox in
Desktop->Preferences->Sound. That will make Gnome start PulseAudio
automatically on every login. You also have the option of auto starting the
PulseAudio server whenever a client tries to connect. That can be configured
in /etc/pulse/client.conf (the autospawn option).

> I also get this error message if I stop and then start the message again.
> So, the aplay command only works using /etc/asound.conf and when I first
> start the computer. (Pulseaudio automatically starts too.)
> 
> I always believed my soundcard was capable of hardware mixing, but it is
> possible that I have been living a lie. Is there anyway I can find out for
> sure? I have a Guillemot Hercules Gamesurround Muse XL, if that helps.

If you can't use other ALSA applications while PulseAudio is running then
your card (or at least the ALSA *drivers* for your card) doesn't support
hardware mixing. Recent ALSA version enable dmix for the "default" ALSA
device for cards that don't support hardware mixing. PulseAudio doesn't use
the "default" device unless manually told to do so. To force PulseAudio to
use the default ALSA device put this in your /etc/pulse/default.pa file:

load-module module-alsa-sink device=default
load-module module-alsa-source device=default

and comment out the "load-module module-hal-detect" and "load-module
module-detect" lines. If "device=default" doesn't work, you can also try
"device=plug:dmix" to specifically request the dmix ALSA plugin. Note
though, that dmix (AFAIK) messes with PulseAudio's (and ALSA's for that
matter) latency calculation. So videos and such may be a fraction out of
sync with their audio.  The best solution IMHO is not to use dmix, but force
all ALSA applications to output to PulseAudio via pulse's ALSA plugin. See
the section on ALSA Applictions at
http://www.pulseaudio.org/wiki/PerfectSetup for more info.

> Let's say that I don't have hardware mixing and I have to use dmix. How
> would I set up ALSA/dmix/Pulseaudio for maximum speed to solve any type of
> stuttering problems, etc.

To eliminate all stuttering you have to run PulseAudio with realtime
priority. To do this with Debian's PulseAudio packages all you need to do is
add yourself to the pulse-rt group. Please read
/usr/share/doc/pulseaudio/README.Debian on your system for more details.

-- 
CJ van den Berg

mailto:cj at vdbonline.com
  xmpp:cj at vdbonline.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20070215/af8582a3/attachment.pgp>


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux