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. 1. Connect DUT with fixture. 2. Press ``SPACE`` to start testing. 3. 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: .. test_list:: generic_audio_examples:AudioTests.AudioQuality (Optional) Use pytest `download_from_factory_drive.py <./download_from_factory_drive.html>`_ to download parameters from factory server. See `audio_loop.py <./audio_loop.html>`_ for more details about how to set ``output_dev``. Test Arguments -------------- .. list-table:: :widths: 20 10 60 :header-rows: 1 :align: left * - Name - Type - Description * - initial_actions - list - (optional; default: ``[]``) List of [card, actions], and card can be card index number or card name * - input_dev - list - (optional; default: ``['0', '0']``) Input ALSA device. [card_name, sub_device].For example: ["audio_card", "0"]. * - output_dev - list - (optional; default: ``['0', '0']``) Output ALSA device. [card_name, sub_device].For example: ["audio_card", "0"]. * - loop_type - str - (optional; default: ``'sox'``) Audio loop type: sox, looptest, tinyloop, hwloop * - use_multitone - bool - (optional; default: ``False``) Use multitone * - loop_buffer_count - int - (optional; default: ``10``) Count of loop buffer * - fixture_param - list - (optional; default: ``['audio/audio_md5', 'audio/audio.zip']``) Fixture parameters * - network_setting - dict - (optional; default: ``{}``) Network setting to define *local_ip*, *port*, *gateway_ip* * - audio_conf - str, None - (optional; default: ``None``) Audio config file path * - wav_file - str, None - (optional; default: ``None``) Wav file path for playback_wav_file command. * - keep_raw_logs - bool - (optional; default: ``True``) Whether to attach the log by Testlog.