Merge "Audio: 8x16 concurrency changes"
diff --git a/policy_hal/AudioPolicyManager.cpp b/policy_hal/AudioPolicyManager.cpp
index cb810c8..5142353 100644
--- a/policy_hal/AudioPolicyManager.cpp
+++ b/policy_hal/AudioPolicyManager.cpp
@@ -656,7 +656,8 @@
if (device2 == AUDIO_DEVICE_NONE) {
device2 = mAvailableOutputDevices & AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET;
}
- if ((device2 == AUDIO_DEVICE_NONE) && (strategy != STRATEGY_SONIFICATION)) {
+ if ((strategy != STRATEGY_SONIFICATION) && (device == AUDIO_DEVICE_NONE)
+ && (device2 == AUDIO_DEVICE_NONE)) {
// no sonification on aux digital (e.g. HDMI)
device2 = mAvailableOutputDevices & AUDIO_DEVICE_OUT_AUX_DIGITAL;
}
@@ -666,12 +667,14 @@
device2 = mAvailableOutputDevices & AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET;
}
#ifdef AUDIO_EXTN_FM_ENABLED
- if ((strategy != STRATEGY_SONIFICATION) && (device2 == AUDIO_DEVICE_NONE)) {
+ if ((strategy != STRATEGY_SONIFICATION) && (device == AUDIO_DEVICE_NONE)
+ && (device2 == AUDIO_DEVICE_NONE)) {
device2 = mAvailableOutputDevices & AUDIO_DEVICE_OUT_FM_TX;
}
#endif
#ifdef AUDIO_EXTN_AFE_PROXY_ENABLED
- if ((strategy != STRATEGY_SONIFICATION) && (device2 == AUDIO_DEVICE_NONE)) {
+ if ((strategy != STRATEGY_SONIFICATION) && (device == AUDIO_DEVICE_NONE)
+ && (device2 == AUDIO_DEVICE_NONE)) {
// no sonification on WFD sink
device2 = mAvailableOutputDevices & AUDIO_DEVICE_OUT_PROXY;
}
diff --git a/post_proc/reverb.c b/post_proc/reverb.c
index 4fc8c83..d104073 100644
--- a/post_proc/reverb.c
+++ b/post_proc/reverb.c
@@ -236,9 +236,14 @@
void reverb_set_preset(reverb_context_t *context, int16_t preset)
{
+ bool enable;
ALOGV("%s: preset: %d", __func__, preset);
context->next_preset = preset;
offload_reverb_set_preset(&(context->offload_reverb), preset);
+
+ enable = (preset == REVERB_PRESET_NONE) ? false: true;
+ offload_reverb_set_enable_flag(&(context->offload_reverb), enable);
+
if (context->ctl)
offload_reverb_send_params(context->ctl, context->offload_reverb,
OFFLOAD_SEND_REVERB_ENABLE_FLAG |