Skip to content

Instantly share code, notes, and snippets.

@x5f3759df
Created August 25, 2013 20:02
Show Gist options
  • Save x5f3759df/6335959 to your computer and use it in GitHub Desktop.
Save x5f3759df/6335959 to your computer and use it in GitHub Desktop.
Sound configuration for using microphone from Realtek HDA and sound output from usb sound card. Also using alsa downmixing and input/output sharing.
# high quality resampling
defaults.pcm.rate_converter "samplerate_best"
# alsa fix to play many sounds
pcm.output {
type asym
playback.pcm {
type dmix
ipc_key 5678293
ipc_perm 0660
ipc_gid audio
slave {
channels 2
pcm {
format S16_LE
rate 44100
type hw
card 2
device 0
}
period_size 1024
buffer_size 8192
}
bindings {
0 0
1 1
}
}
}
# alsa fix to record many sounds
pcm.input {
type dsnoop
ipc_key 1027
slave {
pcm "hw:0,0"
channels 2
}
}
# set default inputs and outputs
pcm.!default {
type asym
playback.pcm {
type plug
slave.pcm "output"
}
capture.pcm {
type plug
slave.pcm "input"
}
}
# downmixing
pcm.!surround51 {
type vdownmix
slave.pcm "output"
}
pcm.!surround40 {
type vdownmix
slave.pcm "output"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment