Skip to content

Instantly share code, notes, and snippets.

@ga2arch
Created January 21, 2014 20:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ga2arch/8547483 to your computer and use it in GitHub Desktop.
Save ga2arch/8547483 to your computer and use it in GitHub Desktop.
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