ADDED alsa recovery function
Merge pull request #4443 from at-visions/GothamAlsaRecover

Added error recovery if snd_pcm_writei fails