diff --git a/.bin/Scripts/hw-diags-audio b/.bin/Scripts/hw-diags-audio new file mode 100755 index 00000000..531ccb92 --- /dev/null +++ b/.bin/Scripts/hw-diags-audio @@ -0,0 +1,39 @@ +#!/bin/python3 +# +## Wizard Kit: HW Diagnostics - Audio + +import os +import sys + +# Init +os.chdir(os.path.dirname(os.path.realpath(__file__))) +sys.path.append(os.getcwd()) +from functions.common import * +init_global_vars() + +if __name__ == '__main__': + try: + # Prep + clear_screen() + + # Set volume + try: + run_program('amixer -q set "Master" 80% unmute'.split()) + run_program('amixer -q set "PCM" 90% unmute'.split()) + except subprocess.CalledProcessError: + print_error('Failed to set volume') + + # Run tests + run_program('speaker-test -c 2 -l 1 -t pink'.split(), check=False) + #run_program('speaker-test -c 2 -l 1 -t sine'.split(), check=False) + run_program('speaker-test -c 2 -l 1 -t wav'.split(), check=False) + + # Done + #print_standard('\nDone.') + #pause("Press Enter to exit...") + exit_script() + except SystemExit: + pass + except: + major_exception() + diff --git a/.bin/Scripts/linux-old/hw-diags-audio b/.bin/Scripts/linux-old/hw-diags-audio deleted file mode 100755 index 814eaf3a..00000000 --- a/.bin/Scripts/linux-old/hw-diags-audio +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -# -## Wizard Kit: HW Diagnostics - Audio - -# Unmute and set volume -amixer -q set "Master" 80% unmute -amixer -q set "PCM" 90% unmute - -speaker-test -c 2 -l 1 -t pink -# speaker-test -c 2 -l 1 -t sine -speaker-test -c 2 -l 1 -t wav -