From 9a9f4368b43bbd6b7d117947fc9671f87b97425e Mon Sep 17 00:00:00 2001 From: Baozhu Zuo Date: Tue, 24 Jul 2018 11:28:55 +0800 Subject: [PATCH] use card id to identify cards --- asound_2mic.conf | 8 ++++-- asound_4mic.conf | 27 +++++++++++--------- asound_6mic.conf | 66 ++++++++++++++++++++---------------------------- 3 files changed, 48 insertions(+), 53 deletions(-) diff --git a/asound_2mic.conf b/asound_2mic.conf index 4b13cb1..2e26f0d 100644 --- a/asound_2mic.conf +++ b/asound_2mic.conf @@ -1,6 +1,10 @@ # The IPC key of dmix or dsnoop plugin must be unique # If 555555 or 666666 is used by other processes, use another one + +# use samplerate to resample as speexdsp resample is bad +defaults.pcm.rate_converter "samplerate" + pcm.!default { type asym playback.pcm "playback" @@ -19,14 +23,14 @@ pcm.capture { pcm.dmixed { type dmix - slave.pcm "hw:0,0" + slave.pcm "hw:seeed2micvoicec" ipc_key 555555 } pcm.array { type dsnoop slave { - pcm "hw:0,0" + pcm "hw:seeed2micvoicec" channels 2 } ipc_key 666666 diff --git a/asound_4mic.conf b/asound_4mic.conf index d3cb82c..12d2ab8 100644 --- a/asound_4mic.conf +++ b/asound_4mic.conf @@ -1,6 +1,9 @@ # The IPC key of dmix or dsnoop plugin must be unique # If 555555 or 666666 is used by other processes, use another one +# use samplerate to resample as speexdsp resample is bad +defaults.pcm.rate_converter "samplerate" + pcm.!default { type asym playback.pcm "playback" @@ -9,22 +12,22 @@ pcm.!default { pcm.playback { type plug - slave.pcm "hw:0,0" + slave.pcm "hw:ALSA" } -pcm.dmixed { - type dmix - slave.pcm "hw:0,0" - ipc_key 555555 -} +# pcm.dmixed { +# type dmix +# slave.pcm "hw:0,0" +# ipc_key 555555 +# } pcm.ac108 { type plug - slave.pcm "multiapps" + slave.pcm "hw:seeed4micvoicec" } -pcm.multiapps { - type dsnoop - ac108-slavepcm "hw:1,0" - ipc_key 666666 -} +# pcm.multiapps { +# type dsnoop +# ac108-slavepcm "hw:1,0" +# ipc_key 666666 +# } diff --git a/asound_6mic.conf b/asound_6mic.conf index 180aac0..9d2a19a 100644 --- a/asound_6mic.conf +++ b/asound_6mic.conf @@ -1,68 +1,56 @@ # The IPC key of dmix or dsnoop plugin must be unique # If 555555 or 666666 is used by other processes, use another one +# use samplerate to resample as speexdsp resample is bad +defaults.pcm.rate_converter "samplerate" + pcm.!default { type asym - playback.pcm "playback" + playback.pcm "ac101" capture.pcm "ac108" } -pcm.playback { - type plug - slave { - rate 48000 - format S32_LE - pcm "hw:1,0" - } -} - -pcm.dmixed { - type dmix - slave.pcm "hw:0,0" - ipc_key 555555 -} pcm.ac108 { type plug - slave.pcm "multiapps" -} - -pcm.multiapps { - type dsnoop slave { rate 48000 format S32_LE - pcm "hw:1,0" + pcm "hw:seeed8micvoicec" } - ipc_key 666666 } +# pcm.multiapps { +# type dsnoop +# slave { +# rate 48000 +# format S32_LE +# pcm "hw:seeed8micvoicec" +# } +# ipc_key 666666 +# } + pcm.ac101 { type plug slave { pcm { - type dmix - ipc_key 1048576 - slave { - pcm "hw:1,0" + type route + slave { + pcm "hw:seeed8micvoicec" format S32_LE - # rate 16000 channels 8 } - bindings { - # map 2 channels input to - # first 2 channels of 8 output - 0 0 - 1 1 - 0 2 - 1 3 - 0 4 - 1 5 - 0 6 - 1 7 - } + ttable.0.0 1 + ttable.1.1 1 + ttable.0.2 1 + ttable.1.3 1 + ttable.0.4 1 + ttable.1.5 1 + ttable.0.6 1 + ttable.1.7 1 } channels 2 + rate 48000 } }