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
Loading
Please register or sign in to comment