Make sure ALSA properly loads, and fix the thread stop condition