use card id to identify cards

This commit is contained in:
Baozhu Zuo 2018-07-24 11:28:55 +08:00
parent 3d56af9d3c
commit 9a9f4368b4
3 changed files with 48 additions and 53 deletions

View file

@ -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

View file

@ -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
# }

View file

@ -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
type route
slave {
pcm "hw:1,0"
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
}
}