diff options
-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); |