CRAS: Expose snapshot update and get function for cras_client

Function cras_client_update_audio_thread_snapshots is for updating
snapshots with callback function.

Function cras_audio_thread_snapshot_buffer is for cras_client to get
snapshot_buffer pointer from the shared memory with server.

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: I9195f9bee6c690bd76a5c1ba0f40e2ca62ade533
Reviewed-on: https://chromium-review.googlesource.com/1148084
Commit-Ready: Chih-Yang Hsia <paulhsia@chromium.org>
Tested-by: Chih-Yang Hsia <paulhsia@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
2 files changed