Restructure ALSA device to prepare for pure C thread implementation.