diff options
| author | Li-Hao Liao (Leon Liao) <leon.liao@canonical.com> | 2020-07-23 15:03:46 +0800 |
|---|---|---|
| committer | Li-Hao Liao (Leon Liao) <leon.liao@canonical.com> | 2020-10-12 15:29:35 +0800 |
| commit | eaf611e91a68bd3ad4c09f181e17a5088f7d446f (patch) | |
| tree | f0b4e7c934fc938e1429132194ceb120ac739edc /units/suspend | |
| parent | f2c2e6d3b23779abefe7d9a4128be13164b49a85 (diff) | |
bin/audio_test.py: Fix the "Unable to control recording volume..." bug
Fix: 1. Remove the method parameter from PAVolumeController.__init__(): Assum PAVolumeController class only be used in this audio_test.py. 2. Don't check the return value of self.method(command): In PAVolumeController._pactl_output(), when failed to execute the pactl command the exception will be thrown. 3. When pactl command fail (after retry 3 times), let audio_test stop. Original issue: In PAVolumeController class: In set_volume() and mute(), the self.method(command) returns a zero-length string. So, the set_volume() and mute() always return False. Then, in get_volume(), the self._volume always won't be set. This is the root cause of the "Unable to control recording volume..." issue. More detail: 1. There is no ouptu from the `pactl set-souerce-volume ...` command. 2. The PAVolumeController._pactl_output fucntion will return subprocess.check_output(). The subprocess.check_output function return the output of "command". LP: #1890526
Diffstat (limited to 'units/suspend')
0 files changed, 0 insertions, 0 deletions
