Merge commit '8aab2bba26dde82efc77afdc001e32cc199e039d'
* commit '8aab2bba26dde82efc77afdc001e32cc199e039d':
liblights: Use constants instead of hard coded file paths.
Merge commit 'aa1d75e66a38efdce21e944b5ddbe42ad634480f'
* commit 'aa1d75e66a38efdce21e944b5ddbe42ad634480f':
Fix issue 2085911: Volume control is broken when A2DP headset is connected.
A regression on volume control was introduced by change 22899. When a volume change was requested on 2 different outputs for the same stream, the change on the second output was ignored because the requested value was the same as current one.
The fix consists in storing current stream volume for each output instead of globally for all outputs.
Modify AudioPolicyManager::setPhoneState() to force a routing command to audio output when call ends or starts even if the same device is selected.
Implement AudioHardware::setMode() to force routing change to be taken into account when phone state changes.
Merge commit 'ab33521bf196ab29cc308d745f53ecadfd4a4499'
* commit 'ab33521bf196ab29cc308d745f53ecadfd4a4499':
Fix issue 2045911: Camera Shutter tone does not play correctly while listening to music.
The problem is partly due to the fact that if music is playing in the headset, a routing change is done to play the shutter sound in both headset+speaker. When the shutter sound ends, the routing is reset to headset, but the change is immediate and there is still audio data pertaining to the shutter sound in the audio hardware buffer queue. As the shutter sound is short, sometimes none of it is output to the speaker before the audio path is reset to the headset.
Another factor is the long time taken by the audio hardware to execute some routing or volume change commands (especially in call volume). Current AudioPolicyManager design reapplies all stream volumes when the output device is changed which adds an unecessary delay in the routing command execution.
Another side problem is that althoough the music is muted while the shutter sound is played, the audio latency makes that some music is heard briefly before the shutter sound in the speaker.
In addition a regression in change 21083 broke the mute mechanism.
This fix consists in:
1 Delay the routing change when the shutter sound stops by a duration longer than the audio output latency.
2 Do not send unecessary volume changes by comparing current value with requested value.
3 Wait until the music is muted before proceding with the reset of the audio routing change when starting the shutter sound.
4 fix mute regression
Merge commit 'dae6f22eb3b062aee703886796645fa480c714aa'
* commit 'dae6f22eb3b062aee703886796645fa480c714aa':
fix a bug with RGBX_8888 surfaces would be rendered incorrectly by the MDP.
Merge commit 'e84bc637603d34b11a35658a7dbb511bc76aebda'
* commit 'e84bc637603d34b11a35658a7dbb511bc76aebda':
fix gralloc qsd8k. we actually don't need to use /pmem/gpu1, since the gpu is now able to use regular PMEM.
Merge commit 'bef8586620c3d4f74d6f624804253f70cf5fd767'
* commit 'bef8586620c3d4f74d6f624804253f70cf5fd767':
use the same magic value for native_handle in 7k and 8k, since the handles are actually identical
Merge commit 'e7d05d5e31803b94c2d468bddb0525c1cd3baafd'
* commit 'e7d05d5e31803b94c2d468bddb0525c1cd3baafd':
make gralloc_priv.h for msm7k and qsd8k identical and C friendly
Merge commit '878081087a3175f08d89452ac5af23609183e883'
* commit '878081087a3175f08d89452ac5af23609183e883':
add (disabled) support for partial updates and use MDP for single-buffer framebuffer updates. the reason for this change is to make the msm7k and qsd8k modules as identical as possible.
Merge commit '79c9ceea6ec3ac708ec7e27ab3af54ffdaf9338f'
* commit '79c9ceea6ec3ac708ec7e27ab3af54ffdaf9338f':
make gralloc-qsd8k closer to the generic gralloc so it's easier to maintain
Merge commit 'f882f8e29b6dca40cf93da467120e31b97e27d91'
* commit 'f882f8e29b6dca40cf93da467120e31b97e27d91':
update gralloc to match the generic version structure
AudioPolicyManager must prevent that VOICE_CALL stream volume is changed while BT SCO route is on for voice call and also that BLUETOOTH_SCO stream volume is changed when BT SCO route is off.
This rule was only applied to volume change requests coming from outside AudioPolicyManager.
Make sure that this rule applies also to internal requests.
Apparently the problem is caused by the fact that A2dpAudioStreamOut::standby() calls a2dp_stop() after the headset has been powered down.
The workaround consists in indicating to A2DP audio hardware that a close request is pending and that stanby() must be bypassed.