diff options
author | Weiyin Jiang <wjiang@codeaurora.org> | 2015-07-21 11:26:02 +0800 |
---|---|---|
committer | Rashed Abdel-Tawab <rashed@linux.com> | 2015-10-09 18:28:45 -0400 |
commit | 8825dae9aad21daebbbcba83c713b19ae3212bff (patch) | |
tree | 98f89e236cc4c5ccb40480c459c0419159efbb30 | |
parent | 1605a18347b2de64611db9fe18e988ee0b9c7d35 (diff) | |
download | hardware_qcom_audio-8825dae9aad21daebbbcba83c713b19ae3212bff.tar.gz hardware_qcom_audio-8825dae9aad21daebbbcba83c713b19ae3212bff.tar.bz2 hardware_qcom_audio-8825dae9aad21daebbbcba83c713b19ae3212bff.zip |
post_proc: explicitly disable virtualizer module if strength is 0
0 stength in DSP virtualizer is not equivalent to disable state as down
mix is still happening for multichannel inputs.
For better user experience, explicitly disable virtualizer module when
strength is 0.
Change-Id: Ic2884ac7010e4f835df871719d546c0c05173f4b
CRs-Fixed: 872772
-rw-r--r-- | post_proc/virtualizer.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/post_proc/virtualizer.c b/post_proc/virtualizer.c index 27485684..3874f0b4 100644 --- a/post_proc/virtualizer.c +++ b/post_proc/virtualizer.c @@ -56,6 +56,15 @@ int virtualizer_set_strength(virtualizer_context_t *context, uint32_t strength) ALOGV("%s: ctxt %p, strength: %d", __func__, context, strength); context->strength = strength; + /* + * Zero strength is not equivalent to disable state as down mix + * is still happening for multichannel inputs. + * For better user experience, explicitly disable virtualizer module + * when strength is 0. + */ + offload_virtualizer_set_enable_flag(&(context->offload_virt), + ((strength > 0) && !(context->temp_disabled)) ? + true : false); offload_virtualizer_set_strength(&(context->offload_virt), strength); if (context->ctl) offload_virtualizer_send_params(context->ctl, &context->offload_virt, |