[pulseaudio-discuss] Can't get pulseaudio to use alsa/dmix?
Marc MERLIN
marc_pulse at merlins.org
Fri Oct 12 12:09:23 PDT 2007
On Fri, Oct 12, 2007 at 11:23:08AM -0700, Alex Malinovich wrote:
> I'm not sure if it's a problem or not, but I've noticed that you have
> both module-oss and module-alsa set to autoload. I suppose it might be
> possible that pulse is actually using the OSS emulated device from ALSA,
> but that's just speculation on my part.
That's what I found in a howto, but that's a fair point, I'll turn it off
Unfortunately, that didn't do it. See below
> On the other hand, if your soundcard doesn't do hardware mixing on its
> own and requires the use of dmix, from personal experience I'd suggest
>From what I read on the net, dmix is now built in alsa.
Either way, I showed in my previous Email that I can play 3 alsa streams
at the same time with alsaplayer just fine:
for i in 1 2 3; do alsaplayer file.mp3 & done
I'm pretty sure it's dmix in alsa, but it might also be hw mixing inside
alsa.
> ditching dmix altogether and going with pulse for everything instead.
> Pulse is much quicker at doing stream mixing in my experience. I
> recently tried using a combination of pulse and dmix by setting up my
> front two channels (which show up as a separate device from the rear two
> through alsa) to be dedicated to pulse, while using dmix to allow
> multiple apps access to the rear channels, and the delay on the rear was
> quite noticeable. I then tried setting up dmix for both front and rear
> without even using pulse at all, and I still ended up getting delays
> between the front and rear. Made watching a surround-sound movie very...
> interesting... :)
I see :)
But in that case, I can only use apps that can either talk to pulse
directly, or use esd. I'm not sure I really want that. For instance
mythfrontend can't work that way, unless I use one of those ugly oss
wrappers. It seems kind of bad when it speaks alsa natively.
> So I've just been using pulse for everything with my default alsa device
> in my .asoundrc set to the pulse device and everything works great.
> There are a couple of apps which don't use the virtual ALSA device
> properly (notably virtualbox), but almost all the rest are just fine.
> While mplayer has a native pulse driver now, doing mplayer -ao alsa
> works just fine as well, going through the virtual alsa device.
Ah, I see. Do you have a pointer to the alsa config I should be using to get
that?
BTW, here's the output I got from pulseaudio. Does that explain why it takes
over alsa exclusively? Is it somehow bypassing dmix despite my ocnfig file
saying the contrary?
> add-autoload-sink output module-alsa-sink sink_name=output device=dmix
gandalf:~/public_html/notes/misc$ pulseaudio -v
caps.c: dropping root rights.
module-hal-detect.c: Trying capability 0 (alsa)
alsa-util.c: Using mixer control "PCM".
sink.c: created 0 "alsa_output.pci_8086_27d8_alsa_playback_0" with sample spec "s16le 2ch 44100Hz"
source.c: created 0 "alsa_output.pci_8086_27d8_alsa_playback_0.monitor" with sample spec "s16le 2ch 44100Hz"
module-alsa-sink.c: using 8 fragments of size 1408 bytes.
module.c: Loaded "module-alsa-sink" (index: #0; argument: "device=hw:0 sink_name=alsa_output.pci_8086_27d8_alsa_playback_0").
alsa-util.c: Using mixer control "Capture".
source.c: created 1 "alsa_input.pci_8086_27d8_alsa_capture_0" with sample spec "s16le 2ch 44100Hz"
module-alsa-source.c: using 12 fragments of size 1408 bytes.
module.c: Loaded "module-alsa-source" (index: #1; argument: "device=hw:0 source_name=alsa_input.pci_8086_27d8_alsa_capture_0").
module-hal-detect.c: loaded 2 modules.
module.c: Loaded "module-hal-detect" (index: #2; argument: "").
module.c: Loaded "module-esound-protocol-unix" (index: #3; argument: "").
protocol-native.c: loading cookie from disk.
module.c: Loaded "module-native-protocol-unix" (index: #4; argument: "").
module-volume-restore.c: starting with empty ruleset.
module.c: Loaded "module-volume-restore" (index: #5; argument: "").
module.c: Loaded "module-rescue-streams" (index: #6; argument: "").
module.c: Loaded "module-x11-bell" (index: #7; argument: "sample=x11-bell").
module.c: Loaded "module-x11-publish" (index: #8; argument: "").
module.c: Loaded "module-gconf" (index: #9; argument: "").
main.c: Daemon startup complete.
module-alsa-source.c: *** ALSA-XRUN (capture) ***
client.c: created 0 "EsounD client (UNIX socket client)"
client.c: created 1 "EsounD client (UNIX socket client)"
client.c: client 1 changed name from "EsounD client (UNIX socket client)" to "MPlayer"
sink-input.c: created 0 "MPlayer" on alsa_output.pci_8086_27d8_alsa_playback_0 with sample spec s16le 2ch 44100Hz
module-volume-restore.c: Creating new entry for <pulsecore/protocol-esound.c$MPlayer>
client.c: freed 0 "EsounD client (UNIX socket client)"
client.c: freed 1 "MPlayer"
sink-input.c: freed 0 "MPlayer"
sink-input.c: created 1 "sample:x11-bell" on alsa_output.pci_8086_27d8_alsa_playback_0 with sample spec s16le 1ch 44100Hz
sink-input.c: freed 1 "sample:x11-bell"
client.c: created 2 "EsounD client (UNIX socket client)"
client.c: created 3 "EsounD client (UNIX socket client)"
client.c: client 3 changed name from "EsounD client (UNIX socket client)" to "MPlayer"
module-volume-restore.c: Restoring volume for <pulsecore/protocol-esound.c$MPlayer>
module-volume-restore.c: Restoring sink for <pulsecore/protocol-esound.c$MPlayer>
sink-input.c: created 2 "MPlayer" on alsa_output.pci_8086_27d8_alsa_playback_0 with sample spec s16le 2ch 44100Hz
client.c: freed 2 "EsounD client (UNIX socket client)"
client.c: freed 3 "MPlayer"
sink-input.c: freed 2 "MPlayer"
--
"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