#6934 LOW Never A: Setting volume in GST/ALSA sometimes doesn't work

Zarro Boogs per Child bugtracker at laptop.org
Fri Apr 25 17:36:18 EDT 2008


#6934: Setting volume in GST/ALSA sometimes doesn't work
--------------------+-------------------------------------------------------
 Reporter:  mtd     |       Owner:  mtd               
     Type:  defect  |      Status:  new               
 Priority:  low     |   Milestone:  Never Assigned    
Component:  sugar   |     Version:  Git as of bug date
 Keywords:          |    Verified:  0                 
 Blocking:          |   Blockedby:                    
--------------------+-------------------------------------------------------
 Sugar's hardware/hardwaremanager.py's set_volume() function sometimes has
 problems setting the gst/alsa volume; the volume is set to zero instead.

 Steps to reproduce:

 1) add appropriate debugging to sugar/hardware/hardwaremanager.py:
 {{{
         #sometimes alsa sets one/more channels' volume to zero instead
         # of what we asked for, so try a few times
         last_volumes_read = [0]
         read_count = 0
         while (0 in last_volumes_read) and (read_count < 3):
             if read_count > 0:
                 import logging
                 logging.debug("failed setting volume to %s (instead got
 %s)" % (volume_list, last_volumes_read))
             self._mixer.set_volume(self._master, tuple(volume_list))
             last_volumes_read = self._mixer.get_volume(self._master)
             read_count += 1
 }}}
 2) Restart sugar and tail its shell.log similar to:
 {{{
 tail -f /home/olpc/.sugar/default/logs/shell.log
 }}}
 3) Change the volume rapidly, for example by invoking Sugar's frame,
 focusing the scaler/slider of the speaker icon, and holding down the left
 or right arrow key.

 One will observe some volumes not being set to the requested values.

 Expected behavior:
 Volumes are set the requested values.

 This bug should become a tracker for an upstream bug once such an upstream
 bug has been filed.

-- 
Ticket URL: <http://dev.laptop.org/ticket/6934>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list