Refactor error management in Write. Use snd_pcm_recover and don't retry snd_pcm_writei