OSDN Git Service

Add a mechanism for handling audio device configuration change
authorPavlin Radoslavov <pavlin@google.com>
Tue, 27 Dec 2016 02:57:22 +0000 (18:57 -0800)
committerPavlin Radoslavov <pavlin@google.com>
Wed, 28 Dec 2016 22:35:01 +0000 (14:35 -0800)
commitf862bc6a7a35054e38cb50fa16ae7a07f683ee01
tree12f33970e876ba71df008d7e38a58984c5b357b5
parenta05da2eea41306d526ce645ea44aa2e05054f651
Add a mechanism for handling audio device configuration change

* Added new call handleDeviceConfigChange() to the Media Framework.
  That call can be used when there are device configuration changes
  (e.g., Bluetooth A2DP codec configuration has changed).
* Added new method AudioPolicyManager::handleDeviceConfigChange().
  That method toggles the UNAVAILABLE/AVAILABLE connection state of the
  device, so it can be reconfigured as appropriate - e.g., the audio
  feeding parameters can be updated.
* Fix ALOGVV compilation errors when extra logging is enabled.

Test: A2DP streaming to headsets
Bug: 30958229
Change-Id: I388abbbb3ec4d1a003b441cb0c77e00d80cad668
include/media/AudioSystem.h
include/media/IAudioPolicyService.h
media/libaudioclient/AudioSystem.cpp
media/libaudioclient/IAudioPolicyService.cpp
services/audiopolicy/AudioPolicyInterface.h
services/audiopolicy/managerdefault/AudioPolicyManager.cpp
services/audiopolicy/managerdefault/AudioPolicyManager.h
services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
services/audiopolicy/service/AudioPolicyService.h