You are not logged in.
Pages: 1
Hi all,
I'm using two programs that uses directly alsa devices for playback. My issue is: when they try to play sounds simultaneously, I've an error complaining that the sound device is already used.
So I'm looking for a way to get this working.
I've tried to create a dummy sound card using snd-dummy module, so that one program is using the primary alsa device and the other is using the dummy one but the dummy one does not output anything (because it's dummy!)
So now I'm looking for a way to redirect the dummy soundcard playback to the primary card playback (hw:1,0 => hw:0,0)
Here is the result of aplay -l:
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC269VC Analog [ALC269VC Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Dummy [Dummy], device 0: Dummy PCM [Dummy PCM]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
Thanks for your help!
Offline
Welcome to Arch Linux. Did you see this article on dmix?
Also, is there a reason you are not using Pulseaudio?
Other possibilities would be to use Jack.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
Hi, thanks for replying
Yes, I've seen this article, but setting
pcm.dsp {
type plug
slave.pcm "dmix"
}
in ~/.asoundrc does not help.
The unit test I run is launch two mplayer simultaneously by specifying alsa device:
mplayer -ao alsa:device=hw=0.0 ~/wav.wav
The first plays but the second complains:
[AO_ALSA] alsa-lib: pcm_hw.c:1557:(snd_pcm_hw_open) open '/dev/snd/pcmC0D0p' failed (-16): Device or resource busy
[AO_ALSA] Playback open error: Device or resource busy
Offline
I'm not sure if that is the problem, but it seems you're still trying to make mplayer use the soundcard directly instead of using the dmix device. Sadly, I can't help you with the syntax of that.
Offline
See config in my sig, for surround-sound *proper* dmix. ALSA's normal dmix only supports stereo, and the 2nd audio-using app is at the mercy of the parameters that the first app to open the soundcard sets.
You *cannot* output to "hw" (hardware) and still use dmix. Must be outputting to default (stereo), or surround20, or surround51, etc.
Offline
Pages: 1