• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.headphone.mp3"
11PURPOSE = "Remotely controlled headphone AFTER SUSPEND Chrome audio test."
12CRITERIA = ("This test will fail if the captured audio does not "
13            "match original file.")
14TIME = "SHORT"
15TEST_CATEGORY = "Functional"
16TEST_CLASS = "audio"
17TEST_TYPE = "server"
18#ATTRIBUTES = "suite:chameleon_audio_unstable"
19DEPENDENCIES = "chameleon, audio_board, test_audiojack"
20JOB_RETRIES = 2
21
22DOC = """
23This test remotely tests headphone audio function against DUT after suspend.
24"""
25
26args_dict = utils.args_to_dict(args)
27chameleon_args = hosts.CrosHost.get_chameleon_arguments(args_dict)
28test_file = ('http://commondatastorage.googleapis.com/chromiumos-test-assets-'
29             'public/audio_test/chameleon/Headphone/test_256_16.mp3')
30
31def run(machine):
32    host = hosts.create_host(machine, chameleon_args=chameleon_args)
33    job.run_test("audio_AudioQualityAfterSuspend", host=host,
34                 audio_test_data=audio_test_data.MEDIA_HEADPHONE_TEST_FILE,
35                 lowpass_freq=4000,
36                 test_playback_file=test_file,
37                 bind_from=chameleon_audio_ids.CrosIds.HEADPHONE,
38                 bind_to=chameleon_audio_ids.ChameleonIds.LINEIN,
39                 audio_nodes=(['HEADPHONE'],[ 'MIC']), tag="headphone")
40
41parallel_simple(run, machines)
42