CRAS: alsa_io - Propagate error for severe underrun

Previously, cras_alsa_get_avail_frames masks underrun and only
logs an error message.
This patch sets a threshold for severe underrun.
If severe underrun happens, the error should be propagated to audio
thread.
The following commit will reset the device so device can be recovered
from severe underrun.

BUG=chromium:662786
TEST=make check

Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
Change-Id: Ib2a385a808936d0673590c0c0ab73c4ed97ada89
Reviewed-on: https://chromium-review.googlesource.com/411022
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
6 files changed