CRAS: cras_alsa_helpers - remove underrun counter in some functions

Because we computed underrun twice in alsa_output_underrun. We can
remove underruns counter from other functions so that we can get more
accurate underrun count. We remove underruns from:
(1) cras_alsa_mmap_begin
It's not underrun.
(2) cras_alsa_mmap_commit
It's not underrun.
(3) cras_alsa_get_avail_frames
For capture stream, frames >= buf_size is overrun but not underrun.
For playback, we already have other place to count underruns more
accurately.

Because we moved underrun counter to alsa_output_underrun, there are some
functions calling frames_queued might be affected.
(1) adjust_appl_ptr_samples_remaining
(2) possibly_enter_free_run
(3) default_no_stream_playback
We also check underrun in these functions.

BUG=b:77485214
TEST=CRAS works well on peppy and coral for a day.

Change-Id: I9fe118f241352fc9439a2c1e89903a52106b1e61
Reviewed-on: https://chromium-review.googlesource.com/1146623
Commit-Ready: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Tested-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
6 files changed