1# Copyright 2015 The Chromium OS Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5from autotest_lib.client.cros.audio import audio_test_data 6from autotest_lib.client.cros.chameleon import chameleon_audio_ids 7from autotest_lib.server import utils 8 9AUTHOR = "chromeos-chameleon" 10NAME = "audio_AudioQualityAfterSuspend.internal_speaker.mp3" 11PURPOSE = ("Remotely controlled internal_speaker AFTER SUSPEND " 12 "Chrome audio test.") 13CRITERIA = ("This test will fail if the captured audio does not " 14 "match original file.") 15TIME = "SHORT" 16TEST_CATEGORY = "Functional" 17TEST_CLASS = "audio" 18TEST_TYPE = "server" 19#ATTRIBUTES = "suite:chameleon_audio_unstable" 20DEPENDENCIES = "audio_box" 21JOB_RETRIES = 1 22PY_VERSION = 3 23 24DOC = """ 25This test remotely tests internal_speaker audio function against DUT after suspend. 26""" 27 28args_dict = utils.args_to_dict(args) 29chameleon_args = hosts.CrosHost.get_chameleon_arguments(args_dict) 30test_file = ('http://commondatastorage.googleapis.com/chromiumos-test-assets-' 31 'public/audio_test/chameleon/Speaker/test_512_16.mp3') 32 33def run(machine): 34 host = hosts.create_host(machine, chameleon_args=chameleon_args) 35 job.run_test("audio_AudioQualityAfterSuspend", host=host, 36 audio_test_data=audio_test_data.MEDIA_SPEAKER_TEST_FILE, 37 lowpass_freq=1000, 38 test_playback_file=test_file, 39 recorder=chameleon_audio_ids.ChameleonIds.MIC, 40 source=chameleon_audio_ids.CrosIds.SPEAKER, 41 audio_nodes=(['INTERNAL_SPEAKER'], ['INTERNAL_MIC']), 42 tag = "internal_speaker") 43 44parallel_simple(run, machines) 45