summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwjiang <wjiang@codeaurora.org>2014-08-06 08:03:14 +0800
committerSteve Kondik <steve@cyngn.com>2016-04-19 02:32:50 -0700
commit410cbfb755fb115ab883613f0bfe59837d592480 (patch)
tree4e4dff8e49b52c8748c2c3510c312641853430f7
parentdb738c05e228b95f378e821d516d46e95871a11a (diff)
downloadandroid_hardware_qcom_audio-410cbfb755fb115ab883613f0bfe59837d592480.tar.gz
android_hardware_qcom_audio-410cbfb755fb115ab883613f0bfe59837d592480.tar.bz2
android_hardware_qcom_audio-410cbfb755fb115ab883613f0bfe59837d592480.zip
post_proc: Fix bassboost/virtualizer not disabled on speaker
When output is unintended device, there's no need to query enable_flag before setting effect to disabled state. There's possiblity that enable_flag is 0 as initialized value, which hinder effects from being disabled. Change-Id: Ib90c0ad0982dc8274129bb1bed7861e11670fbdb
-rw-r--r--post_proc/bass_boost.c9
-rw-r--r--post_proc/reverb.c2
2 files changed, 2 insertions, 9 deletions
diff --git a/post_proc/bass_boost.c b/post_proc/bass_boost.c
index 1cb68e3c..ac65dcc3 100644
--- a/post_proc/bass_boost.c
+++ b/post_proc/bass_boost.c
@@ -163,11 +163,8 @@ int bassboost_set_device(effect_context_t *context, uint32_t device)
OFFLOAD_SEND_BASSBOOST_ENABLE_FLAG);
}
bass_ctxt->temp_disabled = true;
- if (bass_ctxt->ctl)
- offload_bassboost_send_params(bass_ctxt->ctl,
- &bass_ctxt->offload_bass,
- OFFLOAD_SEND_BASSBOOST_ENABLE_FLAG);
}
+ ALOGI("%s: ctxt %p, disabled based on device", __func__, bass_ctxt);
} else {
if (bass_ctxt->temp_disabled) {
if (effect_is_active(&bass_ctxt->common)) {
@@ -178,10 +175,6 @@ int bassboost_set_device(effect_context_t *context, uint32_t device)
OFFLOAD_SEND_BASSBOOST_ENABLE_FLAG);
}
bass_ctxt->temp_disabled = false;
- if (bass_ctxt->ctl)
- offload_bassboost_send_params(bass_ctxt->ctl,
- &bass_ctxt->offload_bass,
- OFFLOAD_SEND_BASSBOOST_ENABLE_FLAG);
}
}
offload_bassboost_set_device(&(bass_ctxt->offload_bass), device);
diff --git a/post_proc/reverb.c b/post_proc/reverb.c
index 07086005..2e5769a8 100644
--- a/post_proc/reverb.c
+++ b/post_proc/reverb.c
@@ -230,7 +230,7 @@ int16_t reverb_get_density(reverb_context_t *context)
void reverb_set_density(reverb_context_t *context, int16_t density)
{
- ALOGV("%s: density: %d", __func__, density);
+ ALOGV("%s: ctxt %p, density: %d", __func__, context, density);
context->reverb_settings.density = density;
offload_reverb_set_density(&(context->offload_reverb), density);
if (context->ctl)