plugin: shell 
name: audio/list_devices
requires:
 device.category == 'AUDIO'
 package.name == 'alsa-base'
command: cat /proc/asound/cards
description: Test to detect audio devices
description-ar.UTF-8: اختبار الكشف عن أجهزة الصوت
description-ast.UTF-8: Prueba pa deteutar preseos d'audio
description-az.UTF-8: Audio avadanlıqları təyin etmək üçün test
description-bn.UTF-8: অডিও ডিভাইস সনাক্ত করতে পরীক্ষা করুন
description-bs.UTF-8: Test za detekciju zvučnih uređaja
description-ca.UTF-8: Prova per detectar dispositius d'àudio
description-ca@valencia.UTF-8: Prova per detectar dispositius d'àudio
description-cs.UTF-8: Testovat přítomnost audio zařízení
description-da.UTF-8: Test af detektering af lydenheder
description-de.UTF-8: Test zur Erkennung von Audio-Geräten
description-el.utf-8: Έλεγχος για ανίχνευση συσκευών ήχου
description-en_AU.UTF-8: Test to detect audio devices
description-en_GB.UTF-8: Test to detect audio devices
description-es.UTF-8: Prueba para detectar dispositivos de audio
description-fi.UTF-8: Testi äänilaitteiden havaitsemiseen
description-fr.UTF-8: Testez la détection des périphériques audio
description-gd.UTF-8: Deuchainn lorg innleachdan claisneach
description-gl.UTF-8: Proba para detectar os dispositivos de son
description-he.UTF-8: בדיקה לאיתור התקני שמע
description-hi.UTF-8: ऑडियो उपकरणों का पता लगाने के लिए टेस्ट
description-hu.UTF-8: Teszt a hangeszközök felismerésére
description-it.UTF-8: Test per rilevare periferiche audio.
description-ja.UTF-8: オーディオデバイス検出テストを実行する
description-km.UTF-8: សាកល្បង​ដើម្បី​រក​ឧបករណ៍​អូឌីយ៉ូ
description-ko.UTF-8: 검색되는 오디오 장치를 테스트합니다
description-lv.UTF-8: Pārbaudi, lai noteiktu audio ierīces
description-ms.UTF-8: Uji untuk kesan peranti audio
description-my.UTF-8: အသံကိရိယာများတပ်ဆင်ထားမှု့ကိုစမ်းသပ်မည်
description-nl.UTF-8: Test om audio-apparaten te detecteren
description-oc.UTF-8: Tèst per detectar de periferics àudio
description-pt.UTF-8: Teste para detectar dispositivos de  audio
description-pt_BR.UTF-8: Teste para detectar dispositivos de áudio
description-ro.UTF-8: Test pentru detectarea dispozitivelor audio
description-ru.UTF-8: Проверка определения звуковых устройств
description-sk.UTF-8: Test pre detekciu zvukových zariadení
description-sl.UTF-8: Preizkusi zaznavo zvočnih naprav
description-sq.UTF-8: Testo për të dalluar pajisjet audio
description-sv.UTF-8: Test för att upptäcka ljudenheter
description-ta.UTF-8: ஒலி சாதனங்களுக்கான கண்டறிதலுக்கான சோதனை
description-tr.UTF-8: Ses aygıtlarını bulmak için sına
description-ug.UTF-8: ئۈن ئۈسكۈنىسىنى تېپىشنى سىناش
description-uk.UTF-8: Перевірити наявність аудіо пристроїв
description-zh_CN.UTF-8: 检测音频设备的测试
description-zh_TW.UTF-8: 偵測音效裝置的測試

plugin: manual
name: audio/playback_auto
depends: audio/list_devices
requires:
 device.category == 'AUDIO'
 package.name == 'alsa-base'
 package.name == 'gir1.2-gst-plugins-base-0.10' or package.name == 'gir1.2-gst-plugins-base-1.0'
 package.name == 'pulseaudio-utils'
command: audio_settings store --file=$CHECKBOX_DATA/pulseaudio_settings; audio_settings set --device=pci --volume=50; gst_pipeline_test -t 2 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'; EXIT_CODE=$?; audio_settings restore --file=$CHECKBOX_DATA/pulseaudio_settings; exit $EXIT_CODE
description:
 PURPOSE:
     This test will check that internal speakers work correctly
 STEPS:
     1. Make sure that no external speakers or headphones are connected
        If testing a desktop, external speakers are allowed
     2. Click the Test button to play a brief tone on your audio device
 VERIFICATION:
     Did you hear a tone?

plugin: manual
name: audio/playback_hdmi
requires:
 device.category == 'AUDIO'
 package.name == 'alsa-base'
 package.name == 'gir1.2-gst-plugins-base-0.10' or package.name == 'gir1.2-gst-plugins-base-1.0'
 package.name == 'pulseaudio-utils'
command:
 audio_settings store --file=$CHECKBOX_DATA/pulseaudio_settings; audio_settings set --device=hdmi --volume=50; gst_pipeline_test -t 2 --device hdmi 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'; EXIT_CODE=$?; audio_settings restore --file=$CHECKBOX_DATA/pulseaudio_settings; exit $EXIT_CODE
description:
 PURPOSE:
    HDMI interface verification
 STEPS:
    1. Plug an external HDMI device with sound (Use second port if you have more than one hdmi interface)
    2. Click the Test button
 VERIFICATION:
    Did you hear the sound from the HDMI device?

plugin: manual
name: audio/playback_headphones
depends: audio/list_devices
requires:
 device.category == 'AUDIO'
 package.name == 'alsa-base'
 package.name == 'gir1.2-gst-plugins-base-0.10' or package.name == 'gir1.2-gst-plugins-base-1.0'
 package.name == 'pulseaudio-utils'
command: audio_settings store --file=$CHECKBOX_DATA/pulseaudio_settings; audio_settings set --device=pci --volume=50; gst_pipeline_test -t 2 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'; EXIT_CODE=$?; audio_settings restore --file=$CHECKBOX_DATA/pulseaudio_settings; exit $EXIT_CODE
description:
 PURPOSE:
     This test will check that headphones connector works correctly
 STEPS:
     1. Connect a pair of headphones to your audio device
     2. Click the Test button to play a sound to your audio device
 VERIFICATION:
     Did you hear a sound through the headphones and did the sound play without any distortion, clicks or other strange noises from your headphones?

plugin: manual
name: audio/alsa_record_playback_internal
depends: audio/playback_auto
requires:
 device.category == 'AUDIO'
 package.name == 'alsa-base'
 package.name == 'pulseaudio-utils'
 package.name == 'gstreamer1.0-plugins-good' or package.name == 'gstreamer0.10-plugins-good'
command: audio_settings store --file=$CHECKBOX_DATA/pulseaudio_settings; audio_settings set --device=pci --volume=50; alsa_record_playback; EXIT_CODE=$?; audio_settings restore --file=$CHECKBOX_DATA/pulseaudio_settings; exit $EXIT_CODE
description:
 PURPOSE:
     This test will check that recording sound using the onboard microphone works correctly
 STEPS:
     1. Disconnect any external microphones that you have plugged in
     2. Click "Test", then speak into your internal microphone
     3. After a few seconds, your speech will be played back to you.
 VERIFICATION:
     Did you hear your speech played back?

plugin: manual
name: audio/alsa_record_playback_external
depends: audio/playback_headphones
requires:
 device.category == 'AUDIO'
 package.name == 'alsa-base'
 package.name == 'pulseaudio-utils'
 package.name == 'gstreamer1.0-plugins-good' or package.name == 'gstreamer0.10-plugins-good'
command: audio_settings store --file=$CHECKBOX_DATA/pulseaudio_settings; audio_settings set --device=pci --volume=50; alsa_record_playback; EXIT_CODE=$?; audio_settings restore --file=$CHECKBOX_DATA/pulseaudio_settings; exit $EXIT_CODE
description:
 PURPOSE:
     This test will check that recording sound using an external microphone works correctly
 STEPS:
     1. Connect a microphone to your microphone port
     2. Click "Test", then speak into the external microphone
     3. After a few seconds, your speech will be played back to you
 VERIFICATION:
     Did you hear your speech played back?

plugin: manual
name: audio/alsa_record_playback_usb
requires:
 device.category == 'AUDIO'
 package.name == 'alsa-base'
 package.name == 'pulseaudio-utils'
 package.name == 'gstreamer1.0-plugins-good' or package.name == 'gstreamer0.10-plugins-good'
command: audio_settings store --file=$CHECKBOX_DATA/pulseaudio_settings; audio_settings set --device=usb --volume=50; alsa_record_playback; EXIT_CODE=$?; audio_settings restore --file=$CHECKBOX_DATA/pulseaudio_settings; exit $EXIT_CODE
description:
 PURPOSE:
     This test will check that a USB audio device works correctly
 STEPS:
     1. Connect a USB audio device to your system
     2. Click "Test", then speak into the microphone
     3. After a few seconds, your speech will be played back to you
 VERIFICATION:
     Did you hear your speech played back through the USB headphones?

plugin: shell
name: audio/alsa_record_playback_automated
requires:
 package.name == 'python-gst0.10'
 package.name == 'alsa-base'
 device.category == 'AUDIO'
command: audio_test
description:
 Play back a sound on the default output and listen for it on the 
 default input.

plugin: shell
name: audio/alsa_info_collect
command: alsa_info --no-dialog --no-upload --output ${CHECKBOX_DATA}/alsa_info.log
description:
 Collect audio-related system information. This data can be used to
 simulate this computer's audio subsystem and perform more detailed tests
 under a controlled environment.

plugin: attachment
name: audio/alsa_info_attachment
depends: audio/alsa_info_collect
command: [ -e ${CHECKBOX_DATA}/alsa_info.log ] && cat ${CHECKBOX_DATA}/alsa_info.log
description:
 Attaches the audio hardware data collection log to the results.

plugin: manual
name: audio/channels
command: speaker-test -c 2 -l 1 -t wav
description:
 PURPOSE:
     Check that the various audio channels are working properly
 STEPS:
     1. Click the Test button
 VERIFICATION:
     You should clearly hear a voice from the different audio channels

plugin: shell
name: audio/check_volume
requires:
 package.name == 'pulseaudio-utils'
 device.category == 'AUDIO'
command: volume_test --minvol 1 --maxvol 100
description:
 This test will verify that the volume levels are at an acceptable level on
 your local system.  The test will validate that the volume is greater than
 or equal to minvol and less than or equal to maxvol for all sources (inputs)
 and sinks (outputs) recognized by PulseAudio.  It will also validate that the
 active source and sink are not muted.  You should not manually adjust the 
 volume or mute before running this test.

plugin: manual
name: audio/playback_displayport
requires:
 device.category == 'AUDIO'
 package.name == 'gir1.2-gst-plugins-base-0.10' or package.name == 'gir1.2-gst-plugins-base-1.0'
command:
 gst_pipeline_test -t 2 'audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink'
description:
 PURPOSE:
     Display Port audio interface verification
 STEPS:
     1. Plug an external Display Port device with sound
     2. Open system sound preferences
     3. Click on Output and Select Display Port
     4. Run sound test
 VERIFICATION:
     Did you hear a sound?

plugin: manual
name: audio/external-lineout
description:
 PURPOSE:
      Check that external line out connection works correctly
 STEPS:
      1. Insert cable to speakers (with built-in amplifiers) on the line out port
      2. Open system sound preferences, 'Output' tab, select 'Line-out' on the connector list. Click the Test button
      3. On the system sound preferences, select 'Internal Audio' on the device list and click 'Test Speakers' to check left and right channel
 VERIFICATION:
      1. Do you hear a sound in the speakers? The internal speakers should *not* be muted automatically
      2. Do you hear the sound coming out on the corresponding channel?

plugin: manual
name: audio/external-linein
requires:
 device.category == 'AUDIO'
 package.name == 'alsa-base'
 package.name == 'pulseaudio-utils'
 package.name == 'gstreamer1.0-plugins-good' or package.name == 'gstreamer0.10-plugins-good'
command: audio_settings store --file=$CHECKBOX_DATA/pulseaudio_settings; audio_settings set --device=pci --volume=50; alsa_record_playback; EXIT_CODE=$?; audio_settings restore --file=$CHECKBOX_DATA/pulseaudio_settings; exit $EXIT_CODE
description:
 PURPOSE:
     Check that external line in connection works correctly
 STEPS:
     1. Use a cable to connect the line in port to an external line out source.
     2. Open system sound preferences, 'Input' tab, select 'Line-in' on the connector list. Click the Test button
     3. After a few seconds, your recording will be played back to you.
 VERIFICATION:
     Did you hear your recording?
