test_server: Add utils to record from DUT headphone

Add two handy functions to connect audio path and copy the file from
Chameleon to local.

Example usage:

>>>ConnectCrosToLineIn()
>>>p.StartCapturingAudio(6)

(do someting on DUT to play audio to headphone)

>>>s = p.StopCapturingAudio(6)
>>>GetAndConvertRecordedFile(s[0])

Then the recorded raw file and wav file will be in current directory.

BUG=None
TEST=Follow above example.

Change-Id: I080618b2b43a349e8b0534b58eb57c6a187b3673
Reviewed-on: https://chromium-review.googlesource.com/412602
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
1 file changed