[autotest] audio_AudioBasicInternalMicrophone: Use 1330 Hz test data
On auron_yuna, the response at 440 Hz is flaky. Use 1330 Hz instead.
BUG=chromium:661669
TEST=run audio_AudioBasicInternalMicrophone test on
chromeos9-audiobox4-host1 for 5 times. All passed.
Change-Id: I5d92fd275aa074e22757a989568c2605e8f38075
Reviewed-on: https://chromium-review.googlesource.com/502788
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
Reviewed-by: Kalin Stoyanov <kalin@chromium.org>
diff --git a/client/cros/audio/audio_test_data.py b/client/cros/audio/audio_test_data.py
index b64d60b..87c917b 100644
--- a/client/cros/audio/audio_test_data.py
+++ b/client/cros/audio/audio_test_data.py
@@ -239,6 +239,21 @@
rate=48000),
frequencies=[440, 440])
+"""
+This test data contains fixed frequency sine wave in two channels.
+Left and right channel are both 1330 Hz. The duration is 10 seconds.
+The file format is two-channel raw data with each sample being a signed
+16-bit integer in little-endian with sampling rate 48000 samples/sec.
+The volume is 0.1. The small volume is to avoid distortion when played
+on Chameleon.
+"""
+SIMPLE_FREQUENCY_TEST_1330_FILE = AudioTestData(
+ path=os.path.join(AUDIO_PATH, 'fix_1330_16.raw'),
+ data_format=dict(file_type='raw',
+ sample_format='S16_LE',
+ channel=2,
+ rate=48000),
+ frequencies=[1330, 1330])
"""
This test data contains fixed frequency sine wave in two channels.
diff --git a/client/cros/audio/fix_1330_16.raw b/client/cros/audio/fix_1330_16.raw
new file mode 100644
index 0000000..3d420b9
--- /dev/null
+++ b/client/cros/audio/fix_1330_16.raw
Binary files differ
diff --git a/server/site_tests/audio_AudioBasicInternalMicrophone/audio_AudioBasicInternalMicrophone.py b/server/site_tests/audio_AudioBasicInternalMicrophone/audio_AudioBasicInternalMicrophone.py
index ce4fff7..e22273a 100644
--- a/server/site_tests/audio_AudioBasicInternalMicrophone/audio_AudioBasicInternalMicrophone.py
+++ b/server/site_tests/audio_AudioBasicInternalMicrophone/audio_AudioBasicInternalMicrophone.py
@@ -33,7 +33,7 @@
if not audio_test_utils.has_internal_microphone(host):
return
- golden_file = audio_test_data.SIMPLE_FREQUENCY_TEST_FILE
+ golden_file = audio_test_data.SIMPLE_FREQUENCY_TEST_1330_FILE
chameleon_board = host.chameleon
factory = remote_facade_factory.RemoteFacadeFactory(