audio_quality¶
Source code: audio_quality.py
Audio Quality Test the use audio fixture.
Description¶
This test case is used to communicate with audio fixture and parse the result of CLIO which is audio quality analysis software. DUT will connect to 2 subnets, one is for factory server and the other is for fixture.
This pytest starts a socket server listening on port 8888 (can be overridden by
argument network_setting
). Third party fixture will connect to this port
and communicate with this pytest in a special protocol. See
HandleConnection
and setupLoopHandler
for more details.
The test flow is controlled by the third party fixture, this pytest is command driven, it does whatever third party fixture asks it to do.
Test Procedure¶
This test does not require operator interaction.
Connect DUT with fixture.
Press
SPACE
to start testing.The test will judge PASS / FAIL result by itself.
Dependency¶
No extra dependency.
Examples¶
Here is an example, set your audio card name in test list constants or device data:
{
"pytest_name": "audio_quality",
"label": "Audio Quality",
"related_components": [
"test_tags.TestCategory.AUDIOCODEC",
"test_tags.TestCategory.SMART_SPEAKER_AMPLIFIER",
"test_tags.TestCategory.SPEAKERAMPLIFIER"
],
"args": {
"input_dev": [
"eval! device.component.audio_card_name or constants.audio.card_name",
"99"
],
"output_dev": [
"eval! device.component.audio_card_name or constants.audio.card_name",
"0"
],
"wav_file": "/usr/local/factory/third_party/SPK48k.wav"
}
}
(Optional) Use pytest download_from_factory_drive.py to download parameters from factory server.
See audio_loop.py for more details about how to set
output_dev
.
Test Arguments¶
Name |
Type |
Description |
---|---|---|
initial_actions |
list |
(optional; default: |
input_dev |
list |
(optional; default: |
output_dev |
list |
(optional; default: |
loop_type |
str |
(optional; default: |
use_multitone |
bool |
(optional; default: |
loop_buffer_count |
int |
(optional; default: |
fixture_param |
list |
(optional; default: |
network_setting |
dict |
(optional; default: |
audio_conf |
str, None |
(optional; default: |
wav_file |
str, None |
(optional; default: |
keep_raw_logs |
bool |
(optional; default: |