Software audio mixing (simultaneous audio streams) in Slackware?
If you have a "proper" sound card like a Sound Blaster X-Fi, like I do in my desktop, then you have hardware mixing support. This means that when simultaneous audio streams are used, they are actually played simultaneously -- and the hardware itself provides this functionality.
If you have audio functionality integrated in the chipset, chances are hardware mixing is not supported, or at least not implemented in the drivers you will see in GNU/Linux. Thus this must be done in software instead.
The latter is the case for my laptop, which has a:
Code:
Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
Which uses the snd-hda-intel driver.
My question is, what do I need to do in order to allow for software mixing as the device clearly does not have hardware mixing supported?
I.e. I want to be able to play audio with xmms simultaneously while I play audio from e.g. mplayer, or Firefox/flash.
I see that the dmix plugin for ALSA is supposedly able to provide this, but what configuration do I need? I've tried all of the examples at Dmix - ALSA wiki in my ~/.asoundrc and /etc/alsa.conf.
The error I receive when I try to play simultaneous audio streams is as follows:
(From mplayer when xmms has hooked the audio device)
Code:
[AO OSS] audio_setup: Can't open audio device /dev/dsp: Device or resource busy
[AO_ALSA] alsa-lib: pcm_hw.c:1293:(snd_pcm_hw_open) open '/dev/snd/pcmC0D0p' failed (-16): Device or resource busy
[AO_ALSA] alsa-lib: pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
[AO_ALSA] Playback open error: Device or resource busy
[AO ESD] esd_open_sound failed: Connection timed out
[AO SDL] Samplerate: 44100Hz Channels: Stereo Format s16le
[AO_ALSA] alsa-lib: pcm_hw.c:1293:(snd_pcm_hw_open) open '/dev/snd/pcmC0D0p' failed (-16): Device or resource busy
[AO_ALSA] alsa-lib: pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
[AO SDL] Unable to open audio: No available audio device