[pulseaudio-discuss] Can't get pulseaudio to use alsa/dmix?

Marc MERLIN marc_pulse at merlins.org
Sat Oct 13 14:49:19 PDT 2007


On Sat, Oct 13, 2007 at 12:39:35AM +0200, Lennart Poettering wrote:
> You have two options: 
> 
> 1. What I recommend: install the pa plugin for libasound, like people
> on the ML already suggested.
 
Thanks, I have that working, and long term, it looks like the right way to
go if I can get all my stuff working through it.
In the meantime, while I sort everything out, I would like my sound to
continue working for all my apps.

> 2. What I do not recommend: configure pa to pass your data through
> dmix. For doing that comment the module-hal-detect line in default.pa
> and instead add a "load-module module-alsa-sink" line. However, that
> takes away hotplug support, trashes your latencies and generally will
> speed of global warming!

If I promise to ride a bike to work, will you lend me a hand trying that
config, at least for a while? :)


I've tried to simplify my config to be:
> My .asoundrc looks like this for now:
> pcm.dmixer {
>     type dmix
>     slave {
>         pcm "hw:0,0"
>         period_time 0
>     }
>     bindings {
>         0 0
>         1 1
>     }
> }
> ctl.dmixer {
>     type hw
>     card 0
> }
> pcm.!default {
>     type plug
>     slave.pcm "dmixer"
> }
> pcm.dsp0 {
>     type plug
>     slave.pcm "dmixer"
> }
> and alsa dmix works fine.

/etc/pulse/default.pa:
> add-autoload-sink output module-alsa-sink device=dmixer sink_name=output
> add-autoload-sink output2 module-oss device=/dev/dsp record=0
> sink_name=output2
> add-autoload-source input module-alsa-source device=hw:0 source_name=input
> load-module module-esound-protocol-unix
> load-module module-simple-protocol-unix
> load-module module-native-protocol-unix
> load-module module-cli-protocol-unix
> set-default-sink output
> set-default-source input
> .nofail
> load-sample-lazy /usr/share/sounds/gaim/al
 
gandalf:~$ pulseaudio -v
caps.c: dropping root rights.
module.c: Loaded "module-esound-protocol-unix" (index: #0; argument: "").
module.c: Loaded "module-simple-protocol-unix" (index: #1; argument: "").
protocol-native.c: loading cookie from disk.
module.c: Loaded "module-native-protocol-unix" (index: #2; argument: "").
module.c: Loaded "module-cli-protocol-unix" (index: #3; argument: "").
module.c: Loaded "module-x11-bell" (index: #4; argument: "sample=x11-bell").
alsa-util.c: Using mixer control "PCM".
sink.c: created 0 "output" with sample spec "s16le 2ch 44100Hz"
source.c: created 0 "output.monitor" with sample spec "s16le 2ch 44100Hz"
module-alsa-sink.c: using 2 fragments of size 16384 bytes.
module.c: Loaded "module-alsa-sink" (index: #5; argument: "device=dmixer
sink_name=output").
main.c: Daemon startup complete.
module-alsa-sink.c: *** ALSA-XRUN (playback) ***
module-alsa-sink.c: *** ALSA-XRUN (playback) ***
module-alsa-sink.c: *** ALSA-XRUN (playback) ***
(...)

So, things work for alsa, but pulse seems unhappy. Going through pulse
with esd causes sound that skips a lot (on a high speed dual core duo 2Ghz)

Is there a subtle thing I'm missing to make pulse happy?

Thanks
Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/  



More information about the pulseaudio-discuss mailing list