pcm.device{
	format S16_LE
	rate 48000
	type hw
	card 0
	device 0
}

#playback  channel  ############################################################

pcm_slave.play {
	pcm "device"
	rate 48000
	channels 2
	period_size 1024
	buffer_size 8192
}

pcm.play_ch1 {
	type plug
	slave.pcm {
		type dmix
		ipc_key 234881
		slave play
		bindings.0 0
	}
}


#record channel  ############################################################

pcm_slave.record {
	pcm "device"
	rate 48000
	channels 2
	period_size 1024
	buffer_size 8192
}


pcm.record_ch1 {
	type plug
	slave.pcm {
		type dsnoop
		ipc_key 12342
		slave record
		bindings.0 0
	}
}


#loopback channel  ############################################################

pcm_slave.loop {
	pcm "hw:Loopback,0,0"
    rate 48000
	channels 2
    period_size 1024 # must be power of 2
    buffer_size 8192
}

pcm.loopch1 {
	type plug
	slave.pcm {
		type dmix
		ipc_key 1234
		slave loop
		bindings.0 0
	}
}



pcm.multi1 {
  type multi
  slaves.a.pcm pcm.play_ch1
  slaves.a.channels 1
  slaves.b.pcm pcm.loopch1
  slaves.b.channels 1
  bindings.0.slave a
  bindings.0.channel 0
  bindings.1.slave b
  bindings.1.channel 0
}

pcm.mplay_ch1 {
  type plug
  slave
  {
	pcm multi1
	rate 48000	
  }
  route_policy "duplicate"
}


#loopback record  ############################################################

pcm_slave.loop_record {
	pcm "hw:Loopback,1,0"
	rate 48000
	channels 2
	period_size 1024
	buffer_size 8192
}


pcm.loop_record_ch1 {
	type plug
	slave.pcm {
		type dsnoop
		ipc_key 1235
		slave loop_record
		bindings.0 0
	}
}



#bidirectional channel  ############################################################

#and this is the real magic
pcm.asymed_ch1 {
   type asym
   playback.pcm "mplay_ch1"
   capture.pcm "record_ch1"
}




