Initial C implementation for ALSA device. Can't handle reopen yet.