Updated hw-diags-audio
This commit is contained in:
parent
c501c8b23f
commit
b1786e088c
1 changed files with 27 additions and 26 deletions
|
|
@ -12,31 +12,32 @@ from functions.common import *
|
||||||
init_global_vars()
|
init_global_vars()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
try:
|
||||||
|
# Prep
|
||||||
|
clear_screen()
|
||||||
|
print_standard('Hardware Diagnostics: Audio\n')
|
||||||
|
|
||||||
|
# Set volume
|
||||||
try:
|
try:
|
||||||
# Prep
|
run_program('amixer -q set "Master" 80% unmute'.split())
|
||||||
clear_screen()
|
run_program('amixer -q set "PCM" 90% unmute'.split())
|
||||||
print_standard('Hardware Diagnostics: Audio\n')
|
except subprocess.CalledProcessError:
|
||||||
|
print_error('Failed to set volume')
|
||||||
|
|
||||||
# Set volume
|
# Run tests
|
||||||
try:
|
for mode in ['pink', 'wav']:
|
||||||
run_program('amixer -q set "Master" 80% unmute'.split())
|
run_program(
|
||||||
run_program('amixer -q set "PCM" 90% unmute'.split())
|
cmd = 'speaker-test -c 2 -l 1 -t {}'.format(mode).split(),
|
||||||
except subprocess.CalledProcessError:
|
check = False,
|
||||||
print_error('Failed to set volume')
|
pipe = False)
|
||||||
|
|
||||||
# Run tests
|
# Done
|
||||||
for mode in ['pink', 'wav']:
|
#print_standard('\nDone.')
|
||||||
run_program(
|
#pause("Press Enter to exit...")
|
||||||
cmd = 'speaker-test -c 2 -l 1 -t {}'.format(mode).split(),
|
exit_script()
|
||||||
check = False,
|
except SystemExit:
|
||||||
pipe = False)
|
pass
|
||||||
|
except:
|
||||||
# Done
|
major_exception()
|
||||||
#print_standard('\nDone.')
|
|
||||||
#pause("Press Enter to exit...")
|
|
||||||
exit_script()
|
|
||||||
except SystemExit:
|
|
||||||
pass
|
|
||||||
except:
|
|
||||||
major_exception()
|
|
||||||
|
|
||||||
|
# vim: sts=2 sw=2 ts=2
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue