Skip to content

Instantly share code, notes, and snippets.

Created Jan 21, 2014
What would you like to do?
Create Dummy ALSA Devices (en mass)
Create Dummy ALSA Devices (en mass)
Written by Mike C. Fletcher on April 16, 2012 in Tuxedo.
Since this was a bit of a pain to track down, here's the process, on an Ubuntu Server 12.04 machine, to create many ALSA dummy devices:
$ cat /etc/modprobe.d/alsa-dummy.conf
options snd-dummy enable=1,1,1,1,1,1,1,1,1,1,1,1 pcm_devs=4,4,4,4,4,4,4,4,4,4,4,4 fake_buffer=0,0,0,0,0,0,0,0,0,0,0,0
$ modprobe snd-dummy
That sample creates 48 dummy devices (on 12 cards), though that's likely more than you'll ever need. The fake_buffer array means they should all have a real internal buffer. The "enable" array is specifying how many cards to create. The pcm_devs array specifies how many pcm devices to have on each card.
Note that dummy devices do not seem to work as the target of dmix. You can use a file plugin to send the audio sent to the dummy device into a file or pipe.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment