* changes:
Fix bug 2146274. Modify the Audio Policy Manager to support dynamic rerouting of STREAM_VOICE_CALL streams when using AudioManager.setSpeakerphoneOn(bool) even when not in call.
to support dynamic rerouting of STREAM_VOICE_CALL streams when using
AudioManager.setSpeakerphoneOn(bool) even when not in call.
The setSpeakerphoneOn() method is mapped in the AudioPolicyManager to
a call to setForceUse for the AudioSystem::FOR_COMMUNICATION usage.
This was only updating the output device when the current mode
was MODE_IN_CALL. The change consists in changing the routing
also when there is an active stream of type AudioSystem::VOICE_CALL
as we allow that stream type to be used not just for telephony streams,
but for communications in general.
The kernel will only do it for images with an alpha plane.
Change-Id: Idcba41945ed7d17daae0a5bcc48c64a82a49dded
Signed-off-by: Dima Zavin <dima@android.com>
Merge commit 'c96a375c6ad3551f1294a5c9b293c464a9b90d76'
* commit 'c96a375c6ad3551f1294a5c9b293c464a9b90d76':
Fix issue 2118500: Ringer volume control broken after a call is terminated while a ring tone is playing and a BT headset is connected.
Merge commit 'dc4d5ad6482f97e33366f32ad2afd2a304810fb7' into eclair-plus-aosp
* commit 'dc4d5ad6482f97e33366f32ad2afd2a304810fb7':
Fix issue 2118500: Ringer volume control broken after a call is terminated while a ring tone is playing and a BT headset is connected.
There was a problem in the special management of notifications while incall when using a duplicated output (with A2DP headset connected). When in call, the notifications are not played on both A2DP + speaker outputs but replaced by a tone in the device used for in call audio. When the call ends while a notification or ring tone is playing, the notification was not moved back to duplicated output (A2DP+speaker).
We must also make sure that the code that unmutes notification playback and stops the tone is called before the notification stream is moved back to duplicated output as it handles the volume and routing on hardware output only.
Also fixed a potential problem in active tracks counting when moving DTMF stream from A2DP output to hardware output when changing cal
l state.
Merge commit '91205c41286a28a9714e8147e6a996e5dd56cd9a'
* commit '91205c41286a28a9714e8147e6a996e5dd56cd9a':
Fix issue 2100324: Limit ringtone and notifications volume when a headset is connected.
Merge commit '56357dc98d4b886dcaa7218fe9286eae8bb6b8ad' into eclair-plus-aosp
* commit '56357dc98d4b886dcaa7218fe9286eae8bb6b8ad':
Fix issue 2100324: Limit ringtone and notifications volume when a headset is connected.
Merge commit 'c9410082453abfb6eaaf43e6c97e04711d0751c0' into eclair-plus-aosp
* commit 'c9410082453abfb6eaaf43e6c97e04711d0751c0':
libcopybit: Fix typo, and the build
Apply the following rules to ring tones and notifications to avoid sound level bursts in user's ears:
- always attenuate ring tones and notifications volume by 6dB
- if music is playing, always limit the volume to current music volume, with a minimum threshold at -36dB so that notification is always perceived.
Merge commit '67bfa63fae1e80d8aedd966c6f0a0e823c93f0b1'
* commit '67bfa63fae1e80d8aedd966c6f0a0e823c93f0b1':
liblights: fix LED transitions when an amber LED is supported
Merge commit '7aa42c0bfbf8ac67588adc4a6674731c9f36cb94'
* commit '7aa42c0bfbf8ac67588adc4a6674731c9f36cb94':
libaudio-qsd8k: very rough cut of 8k audio support
Mute media streams during 2 seconds while the music is being switched from A2DP output to hardware output and before it is paused by the music application.
Also improve code readability by using pointers to output descriptors.
Merge commit '74f248ff46374b7ea3084ed7ed5926f3d39ac506'
* commit '74f248ff46374b7ea3084ed7ed5926f3d39ac506':
Fix issue 2085730: AudioPolicyManager: The A2DP output descriptor is not released if the associated duplicated output cannot be opened.
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.
The fix consists in deallocating the A2DP output descriptor when the duplicated output opening fails in AudioPolicyManager::setDeviceConnectionState().
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.