Skip to content

Instantly share code, notes, and snippets.

@trancept trancept/asound.conf
Last active Sep 20, 2019

Embed
What would you like to do?
Project Alice confs
# UPDATED : seems to work but I have still some problems I think
# use samplerate to resample as speexdsp resample is bad
defaults.pcm.rate_converter "samplerate"
pcm.!default {
type asym
playback.pcm "playback"
capture.pcm "ac108"
}
pcm.playback {
type plug
slave.pcm "dmixed"
}
pcm.dmixed {
type dmix
# slave.pcm "hw:ALSA"
slave.pcm "hw:1"
slave.rate 16000
ipc_key 555555
ipc_perm 0666 # mixing for all users
}
pcm.ac108 {
type plug
slave.pcm "multiapps"
}
pcm.multiapps {
type dsnoop
#ac108-slavepcm "hw:seeed4micvoicec"
slave {
pcm "hw:0,0"
# format "S16_LE"
rate 16000
}
ipc_key 666666
ipc_perm 0666 # mixing for all users
}
[snips-audio-server]
mike = "ac108"
alsa_capture = "default"
alsa_playback = "default"
@Psychokiller1888

This comment has been minimized.

Copy link

Psychokiller1888 commented Sep 20, 2019

# 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"
    capture.pcm "ac108"
}

pcm.playback {
    type plug
    slave.pcm "dmixed"
}

pcm.dmixed {
    type dmix
    slave.pcm "hw:ALSA"
    ipc_key 555555 
}

pcm.ac108 {
    type plug
    slave.pcm "multiapps"
}

pcm.multiapps {
    type dsnoop
    ac108-slavepcm "hw:seeed4micvoicec"
    ipc_key 666666
}
@trancept

This comment has been minimized.

Copy link
Owner Author

trancept commented Sep 20, 2019

pi@projectalice:~ $ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default
playback
dmixed
ac108
multiapps
pi@projectalice:~ $ arecord -L
null
Discard all samples (playback) or generate zero samples (capture)
default
playback
dmixed
ac108
multiapps
sysdefault:CARD=seeed4micvoicec
seeed-4mic-voicecard,
Default Audio Device
dmix:CARD=seeed4micvoicec,DEV=0
seeed-4mic-voicecard,
Direct sample mixing device
dsnoop:CARD=seeed4micvoicec,DEV=0
seeed-4mic-voicecard,
Direct sample snooping device
hw:CARD=seeed4micvoicec,DEV=0
seeed-4mic-voicecard,
Direct hardware device without any conversions
plughw:CARD=seeed4micvoicec,DEV=0
seeed-4mic-voicecard,
Hardware device with all software conversions
pi@projectalice:~ $

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.