CRAS: audio_thread - Correct capture timestamp if buffer split.

The capture timestamp should be for the first sample in the shared
memory buffer.  Avoid resetting it if the buffer is filled across two
wake ups by checking if there are already samples queued.

BUG=chromium:265873
TEST=hangout on pixel and check remote end for echo.

Change-Id: I8a800defbe2503c24bcc53e68b2ae381ef090681
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/63873
Reviewed-by: Chih-Chung Chang <chihchung@chromium.org>
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
1 file changed