Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
125 lines (105 sloc) 2.62 KB
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Hardware devices
# USB soundcard line output (playback)
pcm.line_out {
type hw
card CODEC # UCA-202 usb soud card
}
# USB soundcard line input (capture)
pcm.line_in {
type hw
card CODEC # UCA-202 usb soud card
}
# Channel bindings?
bindings {
0 0 # from 0 => to 0
1 1 # from 1 => to 1
}
# Hardware control device
ctl.mixer0 {
type hw
card CODEC # UCA-202 usb soud card
}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Loopback capture devices (to be routed to line_out with alsaloop)
pcm.squeeze_loop {
type hw
card Loopback # snd-aloop device
device 1
subdevice 1
}
pcm.airpogo_loop {
type hw
card Loopback # snd-aloop device
device 1
subdevice 2
}
pcm.default_loop {
type hw
card Loopback # snd-aloop device
device 1
subdevice 0
}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Application plug devices
# flow: app > PLUG > PLUG_loop > alsaloop > line_out
#
# The Loopback devices allow us to use alsaloop as a source-switch, routing a
# single audio source to line_out. Each app can connect and stream to its plug
# device even when its audio is not being routed to line_out. This is done to
# avoid dmix with its fixed sample rate and extra latency. With this setup,
# sample rates are chosen by the source application and are unchanged all the
# way to the sound card.
pcm.squeeze {
type plug
slave {
# no softvol because SqueezeLite has a volume control
pcm "hw:Loopback,0,1"
format S16_LE
}
}
pcm.airpogo {
type plug
slave {
pcm {
# softvol because level from shairport is too high
type softvol
slave.pcm "hw:Loopback,0,2"
control {
name "AirPogo"
card 0
}
}
format S16_LE
}
}
# Plug to line_out with volume control. Enables a line-level device (with no
# volume control of its own) to be routed from line_in to line_out without
# annoying the neighbors.
# flow: line_in > alsaloop > line > line_out
pcm.line {
type plug
slave.pcm {
type softvol
slave.pcm "line_out"
control {
name "Line in"
card 0
}
}
}
# Default device (is it needed?)
pcm.!default {
type plug
slave {
pcm {
type softvol
slave.pcm "hw:Loopback,0,0"
control {
name "Default"
card 0
}
}
format S16_LE
}
}