[audiotest] Add option to loopback_latency to write zeros to a device when audio playback starts.

Additionally, prints reported output and input latencies individually.

This is intended to be used with a USB UART device, so that end-to-end
output latency can be measured using an oscilloscope.

This follows the technique described here (but using UART instead of an LED):
https://source.android.com/devices/audio/latency_measure

When audio output is measured from a loopback dongle, the full loopback
latency can be measured alongside the end-to-end output latency,
allowing any fixed latencies introduced by eg the DSP to be estimated.

BUG=chromium:818112

Change-Id: I85a37d3a2b8665392ff2ccc897219e785af1be5b
Reviewed-on: https://chromium-review.googlesource.com/908255
Commit-Ready: Louis Collard <louiscollard@chromium.org>
Tested-by: Louis Collard <louiscollard@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
1 file changed
tree: 81ac4be38658643fd2270a92e08e015e56bc7d00
  1. include/
  2. src/
  3. Android.mk
  4. common.mk
  5. CPPLINT.cfg
  6. LICENSE
  7. Makefile
  8. README.txt