Merge "hal: Fix ANC headset for use with independent backend" into av-userspace.lnx.2.0-dev
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index bd48c4c..4b20544 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -660,6 +660,8 @@
{TO_NAME_INDEX(USECASE_VOLTE_CALL)},
{TO_NAME_INDEX(USECASE_QCHAT_CALL)},
{TO_NAME_INDEX(USECASE_VOWLAN_CALL)},
+ {TO_NAME_INDEX(USECASE_VOICEMMODE1_CALL)},
+ {TO_NAME_INDEX(USECASE_VOICEMMODE2_CALL)},
{TO_NAME_INDEX(USECASE_INCALL_REC_UPLINK)},
{TO_NAME_INDEX(USECASE_INCALL_REC_DOWNLINK)},
{TO_NAME_INDEX(USECASE_INCALL_REC_UPLINK_AND_DOWNLINK)},
diff --git a/policy_hal/AudioPolicyManager.cpp b/policy_hal/AudioPolicyManager.cpp
index 25d5db9..24d8f74 100644
--- a/policy_hal/AudioPolicyManager.cpp
+++ b/policy_hal/AudioPolicyManager.cpp
@@ -1095,6 +1095,7 @@
status_t AudioPolicyManagerCustom::startSource(sp<AudioOutputDescriptor> outputDesc,
audio_stream_type_t stream,
audio_devices_t device,
+ const char *address,
uint32_t *delayMs)
{
// cannot start playback of STREAM_TTS if any other output is being used
@@ -1157,7 +1158,7 @@
}
}
uint32_t muteWaitMs;
- muteWaitMs = setOutputDevice(outputDesc, device, force);
+ muteWaitMs = setOutputDevice(outputDesc, device, force, 0, NULL, address);
// handle special case for sonification while in call
if (isInCall()) {
diff --git a/policy_hal/AudioPolicyManager.h b/policy_hal/AudioPolicyManager.h
index 160fabc..6f47a54 100644
--- a/policy_hal/AudioPolicyManager.h
+++ b/policy_hal/AudioPolicyManager.h
@@ -100,6 +100,7 @@
status_t startSource(sp<AudioOutputDescriptor> outputDesc,
audio_stream_type_t stream,
audio_devices_t device,
+ const char *address,
uint32_t *delayMs);
status_t stopSource(sp<AudioOutputDescriptor> outputDesc,
audio_stream_type_t stream,