audio hal: initialize audio patch handle

Initialize audio patch handle to avoid
uninitialized value causing validation
failure in vendor hal audio patch.

Bug: 36994757
Test: Initiate voice call, no audio heard from other end

Change-Id: I4cf57210432430af89109f605813645ff332bfbb
This commit is contained in:
Derek Chen 2017-04-03 19:00:50 -04:00 committed by Steve Paik
parent de173893c8
commit ab24ecd952

View file

@ -225,7 +225,7 @@ Return<void> Device::createAudioPatch(
if (version() >= AUDIO_DEVICE_API_VERSION_3_0) {
std::unique_ptr<audio_port_config[]> halSources(HidlUtils::audioPortConfigsToHal(sources));
std::unique_ptr<audio_port_config[]> halSinks(HidlUtils::audioPortConfigsToHal(sinks));
audio_patch_handle_t halPatch;
audio_patch_handle_t halPatch = AUDIO_PATCH_HANDLE_NONE;
retval = analyzeStatus(
"create_audio_patch",
mDevice->create_audio_patch(