diff options
author | vivek mehta <mvivek@codeaurora.org> | 2015-08-11 17:59:12 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2015-08-20 15:22:27 -0700 |
commit | 4c1b10d3b67414b7931ffcbdbd6de2776d251ef2 (patch) | |
tree | 642d922eddd92462ec7ccb198d9e168b014ea01d | |
parent | 65ad12de29cc94d65b2efc76588ae69ba941ba98 (diff) | |
download | hardware_qcom_audio-4c1b10d3b67414b7931ffcbdbd6de2776d251ef2.tar.gz hardware_qcom_audio-4c1b10d3b67414b7931ffcbdbd6de2776d251ef2.tar.bz2 hardware_qcom_audio-4c1b10d3b67414b7931ffcbdbd6de2776d251ef2.zip |
hal: MBDRC: send MBDRC step level only for speaker device
- set MBDRC level only for speaker device. Ignore combo device
- this will fix printing wrong failure log in case Headphone is connect
and alarm / notification is played.
BUG=23362209
Change-Id: I675dfa1da0546483068f737d61ca0f2dd311ce52
-rw-r--r-- | post_proc/volume_listener.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/post_proc/volume_listener.c b/post_proc/volume_listener.c index e0193dde..2759bea6 100644 --- a/post_proc/volume_listener.c +++ b/post_proc/volume_listener.c @@ -420,7 +420,7 @@ static int vol_effect_command(effect_handle_t self, // After changing the state and if device is speaker // recalculate gain dep cal level - if (context->dev_id & AUDIO_DEVICE_OUT_SPEAKER) { + if (context->dev_id == AUDIO_DEVICE_OUT_SPEAKER) { check_and_set_gain_dep_cal(); } @@ -447,7 +447,7 @@ static int vol_effect_command(effect_handle_t self, // After changing the state and if device is speaker // recalculate gain dep cal level - if (context->dev_id & AUDIO_DEVICE_OUT_SPEAKER) { + if (context->dev_id == AUDIO_DEVICE_OUT_SPEAKER) { check_and_set_gain_dep_cal(); } @@ -478,8 +478,8 @@ static int vol_effect_command(effect_handle_t self, __func__, context->dev_id, new_device); // check if old or new device is speaker - if ((context->dev_id & AUDIO_DEVICE_OUT_SPEAKER) || - (new_device & AUDIO_DEVICE_OUT_SPEAKER)) { + if ((context->dev_id == AUDIO_DEVICE_OUT_SPEAKER) || + (new_device == AUDIO_DEVICE_OUT_SPEAKER)) { recompute_gain_dep_cal_Level = true; } @@ -504,7 +504,7 @@ static int vol_effect_command(effect_handle_t self, goto exit; } - if (context->dev_id & AUDIO_DEVICE_OUT_SPEAKER) { + if (context->dev_id == AUDIO_DEVICE_OUT_SPEAKER) { recompute_gain_dep_cal_Level = true; } @@ -682,7 +682,7 @@ static int vol_prc_lib_release(effect_handle_t handle) ALOGV("--- Found something to remove ---"); list_remove(&context->effect_list_node); PRINT_STREAM_TYPE(context->stream_type); - if (context->dev_id && AUDIO_DEVICE_OUT_SPEAKER) { + if (context->dev_id == AUDIO_DEVICE_OUT_SPEAKER) { recompute_flag = true; } free(context); |