Refactor ALSA mixer code a bit.