diff options
author | Glenn Kasten <gkasten@google.com> | 2012-01-09 09:40:36 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2012-02-08 17:01:49 -0800 |
commit | 6637baae4244aec731c4014da72418d330636ae1 (patch) | |
tree | 5244135379ecfdd8ce7394ccfed0b363ccabcf56 /include/common_time | |
parent | 98ec94c5854daccc3474758524e7f4adfe535ce0 (diff) | |
download | frameworks_av-6637baae4244aec731c4014da72418d330636ae1.zip frameworks_av-6637baae4244aec731c4014da72418d330636ae1.tar.gz frameworks_av-6637baae4244aec731c4014da72418d330636ae1.tar.bz2 |
Fix races related to volume and mute
Fix race conditions when setting master volume, master mute, stream
volume, stream mute for a playback thread, and when reading stream
volume of a playback thread. Lock order is AudioFlinger, then thread.
Rename streamVolumeInternal to streamVolume_l, comment, and use it to
implement streamVolume().
Code size reduction:
- Remove dead code: AudioFlinger::PlaybackThread::masterVolume, masterMute, streamMute.
- Change return type of non-binder methods that always succeed from status_t to void.
- Remove virtual from volume and mute methods that don't need it.
This change saves 228 bytes but decreases performance of binder operations
due to the added locks.
Change-Id: Iac75abc1f54784873a667d1981b2e08f8f31e5c9
Diffstat (limited to 'include/common_time')
0 files changed, 0 insertions, 0 deletions