From 4a53ab3fe266330ce1fe79661954512540874ebd Mon Sep 17 00:00:00 2001 From: Yihui Xiong Date: Wed, 6 Sep 2017 17:56:00 +0800 Subject: [PATCH] add alsa configuration enable dmix and dsnoop. Now we can play and record with multiple application simultaneously. --- asound.conf | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 asound.conf diff --git a/asound.conf b/asound.conf new file mode 100644 index 0000000..4b13cb1 --- /dev/null +++ b/asound.conf @@ -0,0 +1,34 @@ +# The IPC key of dmix or dsnoop plugin must be unique +# If 555555 or 666666 is used by other processes, use another one + +pcm.!default { + type asym + playback.pcm "playback" + capture.pcm "capture" +} + +pcm.playback { + type plug + slave.pcm "dmixed" +} + +pcm.capture { + type plug + slave.pcm "array" +} + +pcm.dmixed { + type dmix + slave.pcm "hw:0,0" + ipc_key 555555 +} + +pcm.array { + type dsnoop + slave { + pcm "hw:0,0" + channels 2 + } + ipc_key 666666 +} +