diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2020-01-08 02:05:06 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-01-08 02:05:06 +0000 |
commit | 6f8cba99a1338c70a57b639a5ee9545a180c9f48 (patch) | |
tree | fcbd0c1e50c83675f2640e8c7ac0a1b8e103eb93 | |
parent | 2f63868d37013764dbd82104462485e3411b0ff7 (diff) | |
parent | aa0557714885b9e99cec54fd30a16cef5f696d85 (diff) | |
download | android_hardware_qcom_audio-6f8cba99a1338c70a57b639a5ee9545a180c9f48.tar.gz android_hardware_qcom_audio-6f8cba99a1338c70a57b639a5ee9545a180c9f48.tar.bz2 android_hardware_qcom_audio-6f8cba99a1338c70a57b639a5ee9545a180c9f48.zip |
Snap for 6117658 from aa0557714885b9e99cec54fd30a16cef5f696d85 to qt-qpr2-release
Change-Id: If41eefd19ded38321c7af43ca214bcdd816c0146
-rw-r--r-- | post_proc/volume_listener.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/post_proc/volume_listener.c b/post_proc/volume_listener.c index ea26860d..f356cffc 100644 --- a/post_proc/volume_listener.c +++ b/post_proc/volume_listener.c @@ -764,9 +764,6 @@ static int vol_prc_lib_release(effect_handle_t handle) int status = -EINVAL; bool recompute_flag = false; int active_stream_count = 0; - uint32_t session_id; - uint32_t stream_type; - effect_uuid_t uuid; ALOGV("%s context %p", __func__, handle); @@ -774,32 +771,20 @@ static int vol_prc_lib_release(effect_handle_t handle) return status; } pthread_mutex_lock(&vol_listner_init_lock); - session_id = recv_contex->session_id; - stream_type = recv_contex->stream_type; - - if (recv_contex->desc == NULL) { - ALOGE("%s: Got NULL descriptor, session %u, stream type %u", - __func__, session_id, stream_type); - dump_list_l(); - pthread_mutex_unlock(&vol_listner_init_lock); - return status; - } - uuid = recv_contex->desc->uuid; // check if the handle/context provided is valid list_for_each_safe(node, temp_node_next, &vol_effect_list) { context = node_to_item(node, struct vol_listener_context_s, effect_list_node); - if ((memcmp(&(context->desc->uuid), &uuid, sizeof(effect_uuid_t)) == 0) - && (context->session_id == session_id) - && (context->stream_type == stream_type)) { + if (context == recv_contex) { ALOGV("--- Found something to remove ---"); - list_remove(node); PRINT_STREAM_TYPE(context->stream_type); if (valid_dev_in_context(context)) { recompute_flag = true; } + list_remove(&context->effect_list_node); free(context); status = 0; + break; } else { ++active_stream_count; } |