Code review comment for ~stanley31/checkbox-support:0909_modify_audio_settings

Revision history for this message
StanleyHuang (stanley31) wrote :

Two commits for this MR.

first one is to change the way to parse audio volumes.
second one is to unified the format string method.

And it has been tested on my laptop with stereo and mono audio devices.
the stereo logs:
>>> print(get_audio_settings("source"))
{'name': 'alsa_input.pci-0000_00_1f.3.analog-stereo', 'muted': 'no', 'volumes': {'front-left': 26, 'front-right': 26}, 'max_volume': 26}
>>> print(get_audio_settings("sink"))
{'name': 'alsa_output.pci-0000_00_1f.3.hdmi-stereo-extra1', 'muted': 'no', 'volumes': {'front-left': 88, 'front-right': 88}, 'max_volume': 88}

the mono logs:
>>> print(get_audio_settings("source"))
{'name': 'bluez_source.74_5C_4B_D4_EB_94.headset_head_unit', 'muted': 'no', 'volumes': {'mono': 59}, 'max_volume': 59}
>>> print(get_audio_settings("sink"))
{'name': 'bluez_sink.74_5C_4B_D4_EB_94.headset_head_unit', 'muted': 'no', 'volumes': {'mono': 69}, 'max_volume': 69}

« Back to merge proposal