CRAS: rate_estimator - Don't reset when input buffer is zero

Current behavior resets rate_estimator when seeing zero buffer
level in iodev. This makes sense to output because underrun is
a rarely happened error case so we reset rate_estimator hoping
to drop unreliable result. However we shouldn't do this for
input iodev, because:
(1) Input level==0 is a very common case and it's not error at
all.
(2) Bug is found that, when rate_estimator happens to return
estimated rate 15998 for 16KHz hardware. And unluckily in the
following many windows it hits level==0 and got reset, fmt_conv
will keep using this smaller rate(15998) to resample buffers
and cause buffer level deviate between multiple input iodev.

BUG=chromium:862047
TEST=Run two Jabra recording, and verify buffer leve doesn't
deviate over long time.

Change-Id: Id8b979e609ccd998db9611a596294a056955f002
Reviewed-on: https://chromium-review.googlesource.com/1134707
Commit-Ready: Hsinyu Chao <hychao@chromium.org>
Tested-by: Hsinyu Chao <hychao@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
2 files changed