# $Id: .asoundrc,v 1.3 2012/03/08 19:19:31 raman Exp raman $
# {{{ Device media --- a mixer --- is default

#Note hw:1,0 on this laptop
# rate  defaults to 48000, enables hrtf on mplayer
# buffer_size has to be period_size*4 to avoid clicks

pcm.media  {
    type dmix
    ipc_key 1024
    slave {
        pcm "hw:1,0"
        period_size 1024
        buffer_size 8192
    }
}

pcm.!default {
    type asym
    playback.pcm "plug:media"
    capture.pcm "sysdefault:CARD=PCH"
}

ctl.!default {
    type hw
    card 1
}

# }}}
# {{{bs2b:

# See /usr/share/doc/bs2b-ladspa/asound.conf.example for inspiration

pcm.crossfeed {
    type plug
    slave.pcm {
        type ladspa
        slave.pcm "plug:media" # Set this line to match your configuration
        path "/usr/lib/ladspa/"
        plugins [
            {
                label bs2b
                input {
                    #Defaults: 725Hz crossover frequency and 4.5dB rolloff
                    controls [ 725 4.5 ] 
                }
            }]
    }
}

# }}}
# {{{tap_reverb:

pcm.tap_reverb {
    type plug
    slave.pcm {
        type ladspa
        slave.pcm "plug:media" # Set this line to match your configuration
        path "/usr/lib/ladspa/"
        plugins [{
                    label tap_reverb
                    input {
                        controls [2400 0 -13 1 1 1 1 4] # Ambiance
                    }
                }]
    }
}

# }}}
# {{{reverb_crossfeed

#tap_reverb -> bs2b
pcm.reverb_crossfeed {
    type plug
    slave.pcm {
        type ladspa
        slave.pcm "plug:media"
        path "/usr/lib/ladspa/"
        plugins [
            {label tap_reverb #ambiance thick (hd)
             input {controls [2400 0 -14 1 1 1 1 4]}
            }
            {label bs2b
             input {controls [ 725 4.5 ]}
            }]
    }
}

# }}}
# {{{tts_crossfeed:

 pcm.tts_crossfeed{
   type rate 
slave{
  pcm "crossfeed"
  rate 48000
}
}

# }}}
# {{{tts_reverb:

pcm.tts_reverb {
   type rate 
slave{
  pcm "tap_reverb"
  rate 48000
}
}

# }}}
# {{{tts_reverb_crossfeed:

pcm.tts_reverb_crossfeed {
   type rate 
slave{
  pcm "reverb_crossfeed"
  rate 48000
}
}

# }}}
# {{{TTS Mono:

#  The Route plugin routes audio among channles using a TTable .
#TTable is a transfer table.
# Matrix of Source->Destination values
# Unspecified entries default to 0.
# Format: Source.Destination = Value

pcm.tts_mono_right {
    type plug
    slave.pcm {
        type route
        slave.pcm "media"
        ttable {
            0.0 =  0.03
            0.1 = 1
            1.0 =  0.03
            1.1 = 1
        }
    }
}

pcm.tts_mono_left {
    type plug
    slave.pcm {
        type route
        slave.pcm "media"
        ttable {
            0.0 =  1
            0.1 = 0.03
            1.0 =  1
            1.1 = 0.03
        }
    }
}

pcm.tts_mono_mid_left {
    type plug
    slave.pcm {
        type route
        slave.pcm "media"
        ttable {
            0.0 =  0.66
            0.1 = 0.33
            1.0 =  0.66
            1.1 = 0.33
        }
    }
}

pcm.tts_mono_mid_right {
    type plug
    slave.pcm {
        type route
        slave.pcm "media"
        ttable {
            0.0 =  0.33
            0.1 = 0.66
            1.0 =  0.33
            1.1 = 0.66
        }
    }
}

# }}}
# {{{end of file

# local variables:
# mode: sh
# folded-file: t
# end:

# }}}
