diff options
author | Paul McLean <pmclean@google.com> | 2014-08-28 20:44:57 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-08-28 20:44:57 +0000 |
commit | 8962e08c4989368d2c821b64f42632b6f5fb016e (patch) | |
tree | 75860946cf504bbc07193f1000799025aaa07dfe /services | |
parent | 47f64f2ed14839a00b3b148d490dc0394282eb54 (diff) | |
parent | 5c477aa6205e2ebafec237411900d89a510cc105 (diff) | |
download | frameworks_av-8962e08c4989368d2c821b64f42632b6f5fb016e.zip frameworks_av-8962e08c4989368d2c821b64f42632b6f5fb016e.tar.gz frameworks_av-8962e08c4989368d2c821b64f42632b6f5fb016e.tar.bz2 |
Merge "Fix audio dropouts with multiple playback streams." into lmp-dev
Diffstat (limited to 'services')
-rw-r--r-- | services/audiopolicy/AudioPolicyManager.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/services/audiopolicy/AudioPolicyManager.cpp b/services/audiopolicy/AudioPolicyManager.cpp index 569dc46..06dd22c 100644 --- a/services/audiopolicy/AudioPolicyManager.cpp +++ b/services/audiopolicy/AudioPolicyManager.cpp @@ -271,7 +271,13 @@ status_t AudioPolicyManager::setDeviceConnectionState(audio_devices_t device, return INVALID_OPERATION; } - ALOGV("setDeviceConnectionState() disconnecting device %x", device); + ALOGV("setDeviceConnectionState() disconnecting output device %x", device); + + // Set Disconnect to HALs + AudioParameter param = AudioParameter(address); + param.addInt(String8(AUDIO_PARAMETER_DEVICE_DISCONNECT), device); + mpClientInterface->setParameters(AUDIO_IO_HANDLE_NONE, param.toString()); + // remove device from available output devices mAvailableOutputDevices.remove(devDesc); @@ -368,8 +374,17 @@ status_t AudioPolicyManager::setDeviceConnectionState(audio_devices_t device, ALOGW("setDeviceConnectionState() device not connected: %d", device); return INVALID_OPERATION; } + + ALOGV("setDeviceConnectionState() disconnecting input device %x", device); + + // Set Disconnect to HALs + AudioParameter param = AudioParameter(address); + param.addInt(String8(AUDIO_PARAMETER_DEVICE_DISCONNECT), device); + mpClientInterface->setParameters(AUDIO_IO_HANDLE_NONE, param.toString()); + checkInputsForDevice(device, state, inputs, address); mAvailableInputDevices.remove(devDesc); + } break; default: |