Merge lp://qastaging/~d.filoni/indicator-sound/pulse_fix_set_volume_role into lp://qastaging/indicator-sound

Proposed by Devid Antonio Filoni
Status: Needs review
Proposed branch: lp://qastaging/~d.filoni/indicator-sound/pulse_fix_set_volume_role
Merge into: lp://qastaging/indicator-sound
Diff against target: 38 lines (+7/-1)
1 file modified
src/volume-control-pulse.vala (+7/-1)
To merge this branch: bzr merge lp://qastaging/~d.filoni/indicator-sound/pulse_fix_set_volume_role
Reviewer Review Type Date Requested Status
Xavi Garcia Approve
Indicator Applet Developers Pending
Review via email: mp+302579@code.qastaging.launchpad.net

Description of the change

ONLY FOR TOUCH

Trying to find a fix for bug #1544477 (this commit could fix it too), I found a behavior which is similar to what described in bug #1379618 . When you change too fast active role (for example typing a phone number in dialer-app when listening music in background) sometimes the volume of the old role is set to the new one. This is a concurrency issue with DBus async calls.

TEST CASE (mako):
0 - rm /home/phablet/.config/pulse/ubuntu-phablet-stream-volumes.tdb and restart (I don't know why looks like this step is required each time you reproduce the issue)
1 - Open dialer-app
2 - Type a digit (you should hear a sound)
3 - Set volume to low using buttons, do not set it to mute (you're changing alert role volume)
4 - Sound indicator icon should show two gray waves
5 - Open uRadio and play a station
6 - Set volume to a higher value using buttons (you're changing multimedia role volume)
7 - Sound indicator icon should show two white waves (maybe since step 5)
8 - Switch to dialer-app
9 - Type a digit (if you hear the digit sound then you reproduced the issue because alert role volume was the lowest)
10 - Switch to uRadio and stop and start the station (if notification icon doesn't change then you reproduced the issue, icon should change on play/stop action to show multimedia/alert role change, looks like volume levels are the same)
11 - Repeat step 9, 10 and 8 until issue id reproduced. You may have noticed when pressing the key in step 9 that uRadio volume is lower than before, it is the correct behaviour, music volume gets restored after few seconds, you could try type a digit in dialer-app (step 9) after volume is higher again, if volume is not lowered after typing, type another digit. You can also try skipping step 10 (and so 8).

I've uploaded the same patch on my mako PPA to test it and I'm not able to reproduce above issue anymore.

To post a comment you must log in.
Revision history for this message
Devid Antonio Filoni (d.filoni) wrote :

Please review this patch carefully, I'm not a vala developer and maybe there are better ways to fix the issue.

Revision history for this message
Jim Hodapp (jhodapp) wrote :

Thanks for the MR Devid. I'll ping the maintainer of indicator-sound to review this MR as soon as possible.

Revision history for this message
Xavi Garcia (xavi-garcia-mena) wrote :

Looks good to me

review: Approve

Unmerged revisions

540. By Devid Antonio Filoni

volume-control-pulse: handle a concurrency issue in role volume set. In particular circumstances indicator-sound changes the volume of a role using the previous set role one, this happens when it intercepts an external volume change signal (from example from AccountsService) while reading new role from pulse (which requires two DBus calls). Both Vala methods (set_volume_active_role and update_active_sink_input) are async.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches