canonical / checkbox

Checkbox is a testing framework used to validate device compatibility with Ubuntu Linux. It’s the testing tool developed for the purposes of the Ubuntu Certification program.
https://checkbox.readthedocs.io
GNU General Public License v3.0
33 stars 49 forks source link

LP1940391: Failed to store audio setting on the system with mono audio channel #190

Open beliaev-maksim opened 1 year ago

beliaev-maksim commented 1 year ago

This issue was migrated from https://bugs.launchpad.net/checkbox-support/+bug/1940391

Summary

Status Created on Heat Importance Security related
New 2021-08-18 07:49:52 6 Undecided False

Description

Description: Failed to parse the audio volume on the system with audio mono channel. The scripts would raise an AttributeError as following: Traceback (most recent call last): File "/tmp/nest-0tcihe6t.3361f09f54625130ca8353599d2d0b04ec843608119aba04070f3a0948f151e7/audio_settings.py", line 9, in sys.exit(main()) File "/usr/lib/python3/dist-packages/checkbox_support/scripts/audio_settings.py", line 368, in main store_audio_settings(settings_file) File "/usr/lib/python3/dist-packages/checkbox_support/scripts/audio_settings.py", line 237, in store_audio_settings volume = int(volume_regex.search(entry).group(1).strip()) AttributeError: 'NoneType' object has no attribute 'group'

Here is the audio data through pactl command Cmd> pactl list sources ... Source #2 State: RUNNING Name: alsa_input.usb-C-Media_Electronics_Inc._Cmedia_Audio-00.analog-mono Description: Cmedia Audio Analog Mono Driver: module-alsa-card.c Sample Specification: s24le 1ch 48000Hz Channel Map: mono Owner Module: 8 Mute: no Volume: mono: 42967 / 66% / -11.00 dB balance 0.00

Attachments

No attachments

Tags: []

beliaev-maksim commented 1 year ago

This thread was migrated from launchpad.net

https://launchpad.net/~stanley31 wrote on 2021-09-09 07:16:03:

I made a fix for this issue, and it works well with my BT headset with mono audio.

https://code.launchpad.net/~stanley31/checkbox-support/+git/checkbox-support/+ref/0909_modify_audio_settings