CRAS: Add methods to show snapshots in cras_test_client
Add option "--dump_events" in cras_test_client which will call
show_audio_thread_snapshots.
Function show_audio_thread_snapshots will use
audio_thread_snapshots as a callback function to call
cras_client_update_audio_thread_snapshots and print out audio thread
snapshots in snapshot buffer.
BUG=chromium:866240
TEST=Apply full patch set to run
$ cras_test_client --playback_file /dev/zero --playback_delay_us
10000
and input 'i' and 'key_enter' to cause underrun event. Then using
$ cras_test_client --dump_e"
could see the audio thread snapshot for that event.
Change-Id: I685b9c4ee813cfaaad3300866d780b030a16bb26
Reviewed-on: https://chromium-review.googlesource.com/1148086
Commit-Ready: Chih-Yang Hsia <paulhsia@chromium.org>
Tested-by: Chih-Yang Hsia <paulhsia@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
1 file changed