CRAS: Log the UI gain of input devices

It is used for tracing the user behavior on the gain setting.
When the device is closed, submit the UI gain to the UMA server.

The original UI gain scaler is between 0 to 10. CRAS will multiply this
value by 100 to get more precise number.

BUG=b:183676276
TEST=Record audio and check the chrome://histograms

Change-Id: I263943ac56c2f806a743d957b7a6fad42714360d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/adhd/+/2784379
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Commit-Queue: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Tested-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
3 files changed