[Chameleon_audio] Add a test to check volume works |
|||
Issue descriptionTo catch issue like https://bugs.chromium.org/p/chromium/issues/detail?id=585272 We need to add volume check. The test utils are already there, just need to add a test. I will add a test audio_AudioVolume and pass different args to it for different audio devices. This will also demonstrate the usage of sharing the same test logic across different audio devices.
,
Mar 4 2016
remote: https://chromium-review.googlesource.com/330480 [autotest] chameleon: Refactor methods related to EDID remote: https://chromium-review.googlesource.com/330481 [autotest] audio_widget: Add ChameleonHDMIInputWidgetHandler remote: https://chromium-review.googlesource.com/330482 [autotest] Chameleon: Encapsulate EDID and extra plug/unplug to HDMI link remote: https://chromium-review.googlesource.com/330570 [autotest] audio_facade: Implement stop_playback remote: https://chromium-review.googlesource.com/330571 [autotest] audio_widget: Implement stop_playback on CrosOutputWidgetHandler remote: https://chromium-review.googlesource.com/330572 [autotest] audio_test_utils: Add utils to check output node remote: https://chromium-review.googlesource.com/330573 [autotest] audio_test_utils: Add utils to switch to HSP remote: https://chromium-review.googlesource.com/330574 [autotest] audio_test_utils: return dominant frequency and its coefficient remote: https://chromium-review.googlesource.com/330575 [autotest] audio_test_utils: Ignore harmonics in spectral analysis remote: https://chromium-review.googlesource.com/330576 [autotest] chameleon_audio_helpers: Let bind_widgets be more flexible remote: https://chromium-review.googlesource.com/330577 [autotest] audio_AudioVolume: add volume test for all output devices This patch series should work. It is really nice to see the same test shared by all output devices. /tmp/test_that_results_FTv2xn/results-1-audio_AudioVolume.headphone [ PASSED ] /tmp/test_that_results_FTv2xn/results-1-audio_AudioVolume.headphone/audio_AudioVolume.headphone [ PASSED ] /tmp/test_that_results_FTv2xn/results-2-audio_AudioVolume.hdmi [ PASSED ] /tmp/test_that_results_FTv2xn/results-2-audio_AudioVolume.hdmi/audio_AudioVolume.hdmi [ PASSED ] /tmp/test_that_results_FTv2xn/results-3-audio_AudioVolume.a2dp [ PASSED ] /tmp/test_that_results_FTv2xn/results-3-audio_AudioVolume.a2dp/audio_AudioVolume.a2dp [ PASSED ] /tmp/test_that_results_FTv2xn/results-4-audio_AudioVolume.a2dp [ PASSED ] /tmp/test_that_results_FTv2xn/results-4-audio_AudioVolume.a2dp/audio_AudioVolume.a2dp [ PASSED ] /tmp/test_that_results_FTv2xn/results-5-audio_AudioVolume.speaker [ PASSED ] /tmp/test_that_results_FTv2xn/results-5-audio_AudioVolume.speaker/audio_AudioVolume.speaker [ PASSED ] /tmp/test_that_results_FTv2xn/results-6-audio_AudioVolume.usb [ PASSED ] /tmp/test_that_results_FTv2xn/results-6-audio_AudioVolume.usb/audio_AudioVolume.usb [ PASSED ] /tmp/test_that_results_FTv2xn/results-7-audio_AudioVolume.hsp [ PASSED ] /tmp/test_that_results_FTv2xn/results-7-audio_AudioVolume.hsp/audio_AudioVolume.hsp [ PASSED ]
,
Mar 7 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/02a9c105411d7c2d6bbdf96a5edae1e42d62e9b9 commit 02a9c105411d7c2d6bbdf96a5edae1e42d62e9b9 Author: Cheng-Yi Chiang <cychiang@chromium.org> Date: Fri Mar 04 16:05:10 2016 [autotest] audio_AudioVolume: add volume test for all output devices Add volume test for all output device. The test logic is shared among different audio output devices passed in from control file. The test process includes: - Set a low volume, play a golden file, record the audio using Chameleon. - Set a high volume, play a golden file, record the audio using Chameleon. - Checks the low/high magnitude ratio is lower than a threshold. The golden file depends on the channels of the audio device to be tested. Internal speaker and bluetooth HSP use 440Hz sine tone on two channel, others use 2K and 1K sine tone on two channel. In each playback/record, the recorded audio needs to match the expected frequency of that channel of the golden file. BUG= chromium:591641 TEST=run e:audio_AudioVolume.* tests on auron_paine at chromeos1-row5-rack4-host1. Change-Id: I74c3987288689cfc1ce8bab541c971e6a75a1467 Reviewed-on: https://chromium-review.googlesource.com/330577 Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org> Tested-by: Cheng-Yi Chiang <cychiang@chromium.org> Reviewed-by: Kalin Stoyanov <kalin@chromium.org> [add] https://crrev.com/02a9c105411d7c2d6bbdf96a5edae1e42d62e9b9/server/site_tests/audio_AudioVolume/audio_AudioVolume.py [add] https://crrev.com/02a9c105411d7c2d6bbdf96a5edae1e42d62e9b9/server/site_tests/audio_AudioVolume/control.hsp [add] https://crrev.com/02a9c105411d7c2d6bbdf96a5edae1e42d62e9b9/server/site_tests/audio_AudioVolume/control.speaker [add] https://crrev.com/02a9c105411d7c2d6bbdf96a5edae1e42d62e9b9/server/site_tests/audio_AudioVolume/control.a2dp [add] https://crrev.com/02a9c105411d7c2d6bbdf96a5edae1e42d62e9b9/server/site_tests/audio_AudioVolume/control.headphone [add] https://crrev.com/02a9c105411d7c2d6bbdf96a5edae1e42d62e9b9/server/site_tests/audio_AudioVolume/control.usb [add] https://crrev.com/02a9c105411d7c2d6bbdf96a5edae1e42d62e9b9/server/site_tests/audio_AudioVolume/control.hdmi
,
Mar 7 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/8a47f4459b0dbac1680ee83c7a4a0303a00ec171 commit 8a47f4459b0dbac1680ee83c7a4a0303a00ec171 Author: Cheng-Yi Chiang <cychiang@chromium.org> Date: Fri Mar 04 15:48:11 2016 [autotest] chameleon_audio_helpers: Let bind_widgets be more flexible Let bind_widgets accept binder as None so it is easier for user to share test logic among different paths. BUG= chromium:591641 TEST=not used yet Change-Id: I1f865d94be6810178e6cb1ab7d37ca805910eeb2 Reviewed-on: https://chromium-review.googlesource.com/330576 Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org> Tested-by: Cheng-Yi Chiang <cychiang@chromium.org> Reviewed-by: Kalin Stoyanov <kalin@chromium.org> [modify] https://crrev.com/8a47f4459b0dbac1680ee83c7a4a0303a00ec171/client/cros/chameleon/chameleon_audio_helper.py
,
Mar 7 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/a8b20b80f1a78e1720af32948c9cb1497bfc850f commit a8b20b80f1a78e1720af32948c9cb1497bfc850f Author: Cheng-Yi Chiang <cychiang@chromium.org> Date: Fri Mar 04 15:36:19 2016 [autotest] audio_test_utils: Ignore harmonics in spectral analysis There will be harmonics, that is, multiples of fundamental frequency due to imperfect sine wave. Ignore those harmonics so the test is more stable. Otherwise, some harmonics will get higher than second peak ratio sometimes. BUG= chromium:591641 TEST=run audio_AudioBasicInternalSpeaker test Change-Id: I7ba693ec5b52962077f170a62a06bca1cf09ee97 Reviewed-on: https://chromium-review.googlesource.com/330575 Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org> Tested-by: Cheng-Yi Chiang <cychiang@chromium.org> Reviewed-by: Hsinyu Chao <hychao@chromium.org> [modify] https://crrev.com/a8b20b80f1a78e1720af32948c9cb1497bfc850f/client/cros/chameleon/audio_test_utils.py
,
Mar 7 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/c76df63e6aa2bc434e1e3ccfb4f4e3c0e29a4b35 commit c76df63e6aa2bc434e1e3ccfb4f4e3c0e29a4b35 Author: Cheng-Yi Chiang <cychiang@chromium.org> Date: Fri Mar 04 15:04:24 2016 [autotest] audio_test_utils: return dominant frequency and its coefficient Returns dominant frequency and its coefficient in each channel so user can use it to measure volume. BUG= chromium:591641 TEST=not used yet. Change-Id: Ie215a6d312c101b8e48f89b53507c90dd975849f Reviewed-on: https://chromium-review.googlesource.com/330574 Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org> Tested-by: Cheng-Yi Chiang <cychiang@chromium.org> Reviewed-by: Hsinyu Chao <hychao@chromium.org> [modify] https://crrev.com/c76df63e6aa2bc434e1e3ccfb4f4e3c0e29a4b35/client/cros/chameleon/audio_test_utils.py
,
Mar 7 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/402987603ba90733f65cc346a71f17024366d8bd commit 402987603ba90733f65cc346a71f17024366d8bd Author: Cheng-Yi Chiang <cychiang@chromium.org> Date: Fri Mar 04 12:44:42 2016 [autotest] audio_test_utils: Add utils to switch to HSP Switch to HSP by selecting bluetooth microphone and start a recording process on Cros device. BUG= chromium:591641 TEST=not used yet. Change-Id: I418aed2e4c199fb88a4dd647fb8d0c06425f9525 Reviewed-on: https://chromium-review.googlesource.com/330573 Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org> Tested-by: Cheng-Yi Chiang <cychiang@chromium.org> Reviewed-by: Hsinyu Chao <hychao@chromium.org> [modify] https://crrev.com/402987603ba90733f65cc346a71f17024366d8bd/client/cros/chameleon/audio_test_utils.py
,
Mar 7 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/eeadab4a09028539c86328f9d3637eba01628d75 commit eeadab4a09028539c86328f9d3637eba01628d75 Author: Cheng-Yi Chiang <cychiang@chromium.org> Date: Fri Mar 04 12:43:06 2016 [autotest] audio_test_utils: Add utils to check output node Add a utils check_output_port to check output node selected on Cros device based on port id. BUG= chromium:591641 TEST=not used yet. Change-Id: Id6b8d77576cc8e8e4bed12ed0ded7afec87e8170 Reviewed-on: https://chromium-review.googlesource.com/330572 Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org> Tested-by: Cheng-Yi Chiang <cychiang@chromium.org> Reviewed-by: Hsinyu Chao <hychao@chromium.org> [modify] https://crrev.com/eeadab4a09028539c86328f9d3637eba01628d75/client/cros/chameleon/audio_test_utils.py
,
Mar 7 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/7ef61c3c533fb78c654059880975f11b7f44da27 commit 7ef61c3c533fb78c654059880975f11b7f44da27 Author: Cheng-Yi Chiang <cychiang@chromium.org> Date: Fri Mar 04 12:15:20 2016 [autotest] audio_widget: Implement stop_playback on CrosOutputWidgetHandler Now that audio_facade implements stop_playback, we can use it on CrosOutputWidgetHandler, and thus user can call stop_playback on output widget which uses CrosOutputWidgetHandler. This helps user controls non-blocking playback, which is needed in volume test because we need to play audio twice in the test. BUG= chromium:591641 TEST=not used yet. Change-Id: I3094378711be84b0b75069cb9cf1e8404e0f7daf Reviewed-on: https://chromium-review.googlesource.com/330571 Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org> Tested-by: Cheng-Yi Chiang <cychiang@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@chromium.org> [modify] https://crrev.com/7ef61c3c533fb78c654059880975f11b7f44da27/client/cros/chameleon/audio_widget.py
,
Mar 7 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/8f199734d555dd90daf766de350c3db2eaa4299e commit 8f199734d555dd90daf766de350c3db2eaa4299e Author: Cheng-Yi Chiang <cychiang@chromium.org> Date: Fri Mar 04 12:12:46 2016 [autotest] audio_facade: Implement stop_playback Add a Player class to control playback process. Implement stop_playback function by terminating the playback process. Also, cleanup the resources in player and recorder. BUG= chromium:591641 TEST=not used yet. Change-Id: I240329e85aa71c455296cc0de6be07e1cf9fd4ec Reviewed-on: https://chromium-review.googlesource.com/330570 Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org> Tested-by: Cheng-Yi Chiang <cychiang@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@chromium.org> [modify] https://crrev.com/8f199734d555dd90daf766de350c3db2eaa4299e/server/cros/multimedia/audio_facade_adapter.py [modify] https://crrev.com/8f199734d555dd90daf766de350c3db2eaa4299e/client/cros/multimedia/audio_facade_native.py
,
Mar 7 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/c27db0580a365096813aa03ce3d8b413d5ba1064 commit c27db0580a365096813aa03ce3d8b413d5ba1064 Author: Cheng-Yi Chiang <cychiang@chromium.org> Date: Fri Mar 04 02:05:23 2016 [autotest] Chameleon: Encapsulate EDID and extra plug/unplug to HDMI link Move logic of setting EDID and extra plug/unplug quirk into HDMIWidgetLink. Override connect/disconnect methods to set EDID and do extra plug/unplug in connect. Restores EDID in disconnect. The connect and disconnect of a link is in widget binder's with clause so EDID will be restored in the end even if test fails. This refactoring helps test user to share common test logic among different audio devices. BUG= chromium:591641 TEST=run audio_AudioBasicHDMI test on peach_pit which needs plug/unplug quirk. Change-Id: Icd448e028c9fee910da57b7e6106650b76286f95 Reviewed-on: https://chromium-review.googlesource.com/330482 Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org> Tested-by: Cheng-Yi Chiang <cychiang@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@chromium.org> [modify] https://crrev.com/c27db0580a365096813aa03ce3d8b413d5ba1064/client/cros/chameleon/audio_widget_link.py [modify] https://crrev.com/c27db0580a365096813aa03ce3d8b413d5ba1064/server/site_tests/audio_AudioBasicHDMI/audio_AudioBasicHDMI.py [modify] https://crrev.com/c27db0580a365096813aa03ce3d8b413d5ba1064/client/cros/chameleon/audio_test_utils.py [delete] https://crrev.com/fa029e520ff28d6caa761060e1b78d868901d67c/server/site_tests/audio_AudioBasicHDMI/test_data/edids/HDMI_DELL_U2410.txt [modify] https://crrev.com/c27db0580a365096813aa03ce3d8b413d5ba1064/client/cros/chameleon/chameleon_audio_helper.py
,
Mar 7 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/fa029e520ff28d6caa761060e1b78d868901d67c commit fa029e520ff28d6caa761060e1b78d868901d67c Author: Cheng-Yi Chiang <cychiang@chromium.org> Date: Fri Mar 04 01:55:13 2016 [autotest] audio_widget: Add ChameleonHDMIInputWidgetHandler Add a class ChameleonHDMIInputWidgetHandler to handle HDMI input on Chameleon. This widget handler provides methods to set EDID on this port. It needs access to display_facade so it can find video port and set/restore EDID through video port. BUG= chromium:591641 TEST=Run audi_AudioBasicHDMI test. Methods related to EDID will be used in the next CL. Change-Id: Ibaa56d5d207631636115a97d188da8e67a22a624 Reviewed-on: https://chromium-review.googlesource.com/330481 Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org> Tested-by: Cheng-Yi Chiang <cychiang@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@chromium.org> [modify] https://crrev.com/fa029e520ff28d6caa761060e1b78d868901d67c/client/cros/chameleon/audio_widget.py [modify] https://crrev.com/fa029e520ff28d6caa761060e1b78d868901d67c/client/cros/chameleon/chameleon_audio_helper.py
,
Mar 7 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/5d1bce15c62c1bf68ab26a6182fc367de9484215 commit 5d1bce15c62c1bf68ab26a6182fc367de9484215 Author: Cheng-Yi Chiang <cychiang@chromium.org> Date: Fri Mar 04 01:43:44 2016 [autotest] chameleon: Refactor methods related to EDID Expose set_edid, set_edid_from_file, and restore_edid methods so user can take care of restoring EDID in its own with clause. The current usage of use_edid remains the same. BUG= chromium:591641 TEST=run display_StressEdid test Change-Id: I8943dae48e53dd51d43c2df97fd03ea0ae649c4a Reviewed-on: https://chromium-review.googlesource.com/330480 Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org> Tested-by: Cheng-Yi Chiang <cychiang@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@chromium.org> [modify] https://crrev.com/5d1bce15c62c1bf68ab26a6182fc367de9484215/client/cros/chameleon/chameleon.py
,
Mar 8 2016
,
Mar 14 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/5bd9c3ac543bfb4c257d6ccae0e851a347705c7d commit 5bd9c3ac543bfb4c257d6ccae0e851a347705c7d Author: Cheng-Yi Chiang <cychiang@chromium.org> Date: Mon Mar 14 01:27:28 2016 autotest-server-tests: Add audio_AudioVolume test Add audio_AudioVolume test. BUG= chromium:591641 TEST=None Change-Id: Ic182c85355f354b900d1d811aa25756defdfcd7f Reviewed-on: https://chromium-review.googlesource.com/332550 Commit-Ready: Dan Shi <dshi@google.com> Tested-by: Cheng-Yi Chiang <cychiang@chromium.org> Reviewed-by: Hsinyu Chao <hychao@chromium.org> Reviewed-by: Kalin Stoyanov <kalin@chromium.org> [modify] https://crrev.com/5bd9c3ac543bfb4c257d6ccae0e851a347705c7d/chromeos-base/autotest-server-tests/autotest-server-tests-9999.ebuild
,
Feb 14 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by cychiang@chromium.org
, Mar 4 2016