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