Failed to store audio setting on the system with mono audio channel

Bug #1940391 reported by StanleyHuang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Support Library
Expired
Undecided
Unassigned

Bug 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 <module>
    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

Revision history for this message
StanleyHuang (stanley31) wrote :

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

Revision history for this message
Maksim Beliaev (beliaev-maksim) wrote :

Bug was migrated to GitHub: https://github.com/canonical/checkbox/issues/190.
Bug is no more monitored here.

Changed in checkbox-support:
status: New → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.