Compare commits

...

1 commit

Author SHA1 Message Date
8d70c7bfc6
Use patcl to adjust the volume for speaker-test
Needed due to the switch to pipewire and pulseaudio.
2022-07-09 20:05:38 -07:00

View file

@ -23,14 +23,17 @@ def audio_test_linux() -> None:
LOG.info('Audio Test')
# Set volume
for source in ('Master', 'PCM'):
cmd = f'amixer -q set "{source}" 80% unmute'.split()
run_program(cmd, check=False)
commands = (
'pactl set-sink-mute @DEFAULT_SINK@ off',
'pactl set-sink-volume @DEFAULT_SINK@ 80%',
)
for cmd in commands:
run_program(cmd.split(), check=False)
# Run audio tests
for mode in ('pink', 'wav'):
cmd = f'speaker-test -c 2 -l 1 -t {mode}'.split()
run_program(cmd, check=False, pipe=False)
cmd = f'speaker-test -c 2 -l 1 -t {mode}'
run_program(cmd.split(), check=False, pipe=False)
if __name__ == '__main__':