CRAS: cras_iodev - Record the highest hardware level of device

We records the highest hardware level in device buffer when it is in
NORMAL_RUN state. It can be showed by command "cras_test_client --dump_a".
It is useful to check whether hardware level is increasing.

For input device, update the highest hardware level before reading from
the device to ensure it is the largest one. For output device, update
after writing into device because of the same reason.

BUG=b:116066435
TEST=Can show highest hw_level correctly on peppy.

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