Linux – Why can’t I play audio from two or more sources

alsaaudiodebianlinux

When I installed on my desktop mpd and mpc, I found that I can't hear other sources (like Amarok, Flash player etc.) at the time when mpc or other client is playing music. If I try to start an audio stream with two Flash players in two tabs, I have the same problem.

How to solve it?
I have installed PulseAudio with default system settings and Jackd. How do I configure it for multiple sound sources?

gigam@bird:~$ aplay -l
List of PLAYBACK Hardware Devices
card 0: Intel [HDA Intel], device 0: ALC888 Analog [ALC888 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC888 Digital [ALC888 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0

I'm using ALSA and PulseAudio as it was installed automatically.

P.S.
Hmmm… I have one additional error from PulseAudio:
pacmd:

>> load-module module-alsa-sink
Module load failed.

But in directory "/usr/lib/pulse-2.0/modules" I have it:
module-alsa-sink.so

Best Answer

Try the solution posted here. Add these lines to /etc/asound.conf:

pcm.pulse {
    type pulse
}
ctl.pulse {
    type pulse
}
pcm.!default {
    type pulse
}
ctl.!default {
    type pulse
}
Related Question