[AE] ALSA: Fix waiting before writing data to pcm device

snd_pcm_wait sometimes does not wait until we have at least
periodSize buffer free to write in.
This fixes flooding the log with snd_pcm_writei errors
(http://trac.xbmc.org/ticket/13381).

The commit also removes second attempt to call snd_pcm_writei.

Much thanks to @fritsch for help in debugging.
@anssih: If you have some time, please review