xref: /aosp_15_r20/external/autotest/client/site_tests/desktopui_MediaAudioFeedback/control (revision 9c5db1993ded3edbeafc8092d69fe5de2ee02df7)
1# Copyright (c) 2012 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# TEST SOON TO BE DISABLED UNTIL MIGRATED TO PYTHON 3.
6# For instructions on how to: go/tauto-py3-migration
7# To re-enable migrate to Python 3.
8# If the test is not migrated by 1/14/22 it will be deleted.
9
10AUTHOR = "Chromium OS Project"
11NAME = "desktopui_MediaAudioFeedback"
12PURPOSE = "Verify sound from media files is audible"
13CRITERIA = """
14This test will fail if media files sound is not audible.
15"""
16ATTRIBUTES = ""
17TIME = "SHORT"
18TEST_CATEGORY = "General"
19TEST_CLASS = "desktopui"
20TEST_TYPE = "client"
21DEPENDENCIES = 'audio_loopback_dongle'
22
23DOC = """
24Test that the sound from media files can be heard by recording from mic in.
25Each audio channel is tested independently and currently there is no accurate
26comparison with the input data. Instead the test passes when
27a) the silent signal is sufficiently weak and (TODO: [email protected])
28b) the captured audio from each media replay is sufficiently loud.
29
30NOTE: For this test to pass you need to have the line out looped back to mic-in.
31This can be through a 3.5mm male-to-male cable or a loopback dongle depending on
32your device.
33"""
34
35# Media formats to be tested. The length of these audio are all 5 seconds.
36TEST_DURATION = 5
37TEST_FILES = ['sine440.mp3',
38              'sine440.mp4',
39              'sine440.wav',
40              'sine440.ogv',
41              'sine440.webm']
42
43constraints = ['%s_rms_value > 0.05' % s.replace('.', '_') for s in TEST_FILES]
44
45job.run_test('desktopui_MediaAudioFeedback',
46             test_files=TEST_FILES,
47             test_duration=TEST_DURATION,
48             constraints=constraints)
49