# Dmix with 6 channels.
 
pcm.dmix51 {
type dmix
ipc_key 1024 # must be unique
slave {
pcm "hw:0,0" # you cannot use a "plug" device here.
channels 6
rate 44100
period_time 0
period_size 1024
buffer_size 4096
periods 128
}
 
#channel corrections
bindings {
0 0 # from 0 => to 0
1 1
2 4
3 5
4 2
5 3
}
}

pcm.duplex {
type asym
playback.pcm "dmix51"
capture.pcm "dsnoop"
}
 
# Mix the 2 stereo channels to the 6 5.1 channels
pcm.51mix {
type route


slave.pcm "duplex"
ttable.0.0 1
ttable.1.1 1
ttable.0.2 1
ttable.1.3 1

ttable.0.4 0.5
ttable.1.4 0.5

ttable.0.5 0.8
ttable.1.5 0.8

}
 

pcm.!default {
type plug
slave.pcm "51mix"
}
 
# Drfault 5.1 input
pcm.!surround51 {
type copy
slave.pcm "duplex" # use our new PCM here
}
 

ctl.mixer0 {
type hw
card 0}
