Using the Total Bithead with ALSA on Arch Linux

2013-01-12*
linux, sound, alsa, arch, hardware

So I got HeadRoom’s “Total Bithead” USB DAC (digital-to-analog converter) and micro amplifier. The problem is, when I plug it into my Linux desktop, mplayer/firefox still recognizes the onboard sound on my motherboard as the default device. After some searching, I found some resources to (1) use it as the default sound device and (2) enable mixing on it (different applications can simultaneously use the Total Bithead).

The Setup

We need to manually call a script every time the Total Bithead is connected. The script, called switch_audio.sh, looks like this:

#!/bin/zsh

if [[ -e /proc/asound/card1 ]]; then
case $HOST in k0) ln -sf ~/syscfg/alsa/cfg-k0 ~/.asoundrc ;; k1) ln -sf ~/syscfg/alsa/cfg-k1 ~/.asoundrc ;; *) echo "Unknown host \$HOST'" ;;
fi
where k0 is my desktop and k1 is my laptop. cfg-k0 looks like this: