diff options
author | Eric Laurent <elaurent@google.com> | 2014-09-09 17:00:14 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2014-09-09 17:00:14 -0700 |
commit | f8fd8d6daab5ced86ce950be68070d27c24d487f (patch) | |
tree | 4ccbca767b6711112f9aacdaf72ca40fa7473e06 /services | |
parent | 8270e1d13a101fa946848871b9903b31ff11981f (diff) | |
download | frameworks_av-f8fd8d6daab5ced86ce950be68070d27c24d487f.zip frameworks_av-f8fd8d6daab5ced86ce950be68070d27c24d487f.tar.gz frameworks_av-f8fd8d6daab5ced86ce950be68070d27c24d487f.tar.bz2 |
audioflinger: fix audio patch release
Fix error in PatchPanel:releaseAudioPatch() causing
the wrong patch handle to be passed to the audio HAL.
Bug: 17368621.
Change-Id: I037fd2e6273508c830414b5900d07c0178b96dae
Diffstat (limited to 'services')
-rw-r--r-- | services/audioflinger/PatchPanel.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/services/audioflinger/PatchPanel.cpp b/services/audioflinger/PatchPanel.cpp index 2d0a25f..7544052 100644 --- a/services/audioflinger/PatchPanel.cpp +++ b/services/audioflinger/PatchPanel.cpp @@ -593,10 +593,10 @@ status_t AudioFlinger::PatchPanel::releaseAudioPatch(audio_patch_handle_t handle status = BAD_VALUE; break; } - status = thread->sendReleaseAudioPatchConfigEvent(mPatches[index]->mHalHandle); + status = thread->sendReleaseAudioPatchConfigEvent(removedPatch->mHalHandle); } else { audio_hw_device_t *hwDevice = audioHwDevice->hwDevice(); - status = hwDevice->release_audio_patch(hwDevice, mPatches[index]->mHalHandle); + status = hwDevice->release_audio_patch(hwDevice, removedPatch->mHalHandle); } } else { sp<ThreadBase> thread = audioflinger->checkRecordThread_l( @@ -632,7 +632,7 @@ status_t AudioFlinger::PatchPanel::releaseAudioPatch(audio_patch_handle_t handle } AudioHwDevice *audioHwDevice = audioflinger->mAudioHwDevs.valueAt(index); if (audioHwDevice->version() >= AUDIO_DEVICE_API_VERSION_3_0) { - status = thread->sendReleaseAudioPatchConfigEvent(mPatches[index]->mHalHandle); + status = thread->sendReleaseAudioPatchConfigEvent(removedPatch->mHalHandle); } else { AudioParameter param; param.addInt(String8(AUDIO_PARAMETER_STREAM_ROUTING), 0); |