tizenaudio-policy: Revise logs 50/139750/2
authorSangchul Lee <sc11.lee@samsung.com>
Thu, 20 Jul 2017 09:01:17 +0000 (18:01 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Thu, 20 Jul 2017 09:12:33 +0000 (18:12 +0900)
Remove function name in logs.
Revise printing log format.

[Version] 5.0.164
[Issue Type] Log

Change-Id: Ia8c0f66f669382c98674e4b9e7fefe0eaf85a3f9
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/pulseaudio-modules-tizen.spec
src/module-tizenaudio-policy.c
src/stream-manager-dbus.c
src/stream-manager-restriction.c
src/stream-manager-volume.c
src/stream-manager.c
src/subscribe-observer.c

index cb38eedef70db7a1113c2b8023f49331cc2b2f94..fea097864df1a6115dc591e2d61ad00aa5b00121 100644 (file)
@@ -1,6 +1,6 @@
 Name:             pulseaudio-modules-tizen
 Summary:          Pulseaudio modules for Tizen
-Version:          5.0.163
+Version:          5.0.164
 Release:          0
 Group:            Multimedia/Audio
 License:          LGPL-2.1+
index bf55947ba7e26314293ebf5d55ecf68a20fb9b2a..60fab2e7781cac4f51d66b679484ef6a923c3849 100644 (file)
@@ -554,7 +554,7 @@ static pa_hook_result_t select_proper_sink_or_source_hook_cb(pa_core *c, pa_stre
     pa_assert(data);
     pa_assert(u);
 
-    pa_log_info("[SELECT] select_proper_sink_or_source_hook_cb is called. (%p), stream_type(%d), stream_role(%s), device_role(%s), route_type(%d)",
+    pa_log_info("[SELECT] data(%p), stream_type(%d), stream_role(%s), device_role(%s), route_type(%d)",
                 data, data->stream_type, data->stream_role, data->device_role, data->route_type);
 
     null_sink = (pa_sink*)pa_namereg_get(u->core, SINK_NAME_NULL, PA_NAMEREG_SINK);
@@ -989,7 +989,7 @@ static pa_hook_result_t route_change_hook_cb(pa_core *c, pa_stream_manager_hook_
     pa_assert(data);
     pa_assert(u);
 
-    pa_log_info("[ROUTE] route_change_hook_cb is called. (%p), stream_type(%d), stream_role(%s), route_type(%d)",
+    pa_log_info("[ROUTE] data(%p), stream_type(%d), stream_role(%s), route_type(%d)",
                 data, data->stream_type, data->stream_role, data->route_type);
 
     if (data->stream == NULL) {
@@ -1286,8 +1286,7 @@ static pa_hook_result_t update_info_hook_cb(pa_core *c, pa_stream_manager_hook_d
     pa_assert(u);
 
     if (pa_streq(data->stream_role, STREAM_ROLE_LOOPBACK)) {
-        pa_log_info("[UPDATE] update_info_hook_cb is called. stream_role(%s) [name(%s)/value(%d)]",
-            data->stream_role, data->name, data->value);
+        pa_log_info("[UPDATE] stream_role(%s) [name(%s)/value(%d)]", data->stream_role, data->name, data->value);
         if (pa_streq(data->name, MSG_FOR_LOOPBACK_ARG_LATENCY))
             u->loopback_args.latency_msec = data->value;
         else if (pa_streq(data->name, MSG_FOR_LOOPBACK_ARG_ADJUST_TIME))
@@ -1346,7 +1345,7 @@ static pa_hook_result_t device_connection_changed_hook_cb(pa_core *c, pa_tz_devi
 
     device_direction = pa_tz_device_get_direction(conn->device);
 
-    pa_log_info("[CONN] device_connection_changed_hook_cb is called. conn(%p), is_connected(%d), device(%p), direction(0x%x)",
+    pa_log_info("[CONN] conn(%p), is_connected(%d), device(%p), direction(0x%x)",
                 conn, conn->is_connected, conn->device, device_direction);
 
     update_cached_connected_devices(pa_tz_device_get_type(conn->device), device_direction, conn->is_connected);
index 7830acb32c8b7fd42a1169ed9e5d71996a148065..a80d5e1d6cfd31ba8aa932049fc3932b859be35c 100644 (file)
@@ -254,7 +254,7 @@ static void handle_get_stream_list(DBusConnection *conn, DBusMessage *msg, void
 
     pa_assert_se(dbus_message_get_args(msg, NULL,
                                        DBUS_TYPE_INVALID));
-    pa_log_info("handle_get_stream_list() dbus method is called");
+    pa_log_info("get stream list");
 
     memset(&list, 0, sizeof(stream_list));
     pa_assert_se((reply = dbus_message_new_method_return(msg)));
@@ -284,7 +284,7 @@ static void handle_get_stream_info(DBusConnection *conn, DBusMessage *msg, void
     pa_assert_se(dbus_message_get_args(msg, NULL,
                                        DBUS_TYPE_STRING, &type,
                                        DBUS_TYPE_INVALID));
-    pa_log_info("handle_get_stream_info(), type[%s]", type);
+    pa_log_info("type[%s]", type);
 
     memset(&info, 0, sizeof(stream_info_per_type));
     pa_assert_se((reply = dbus_message_new_method_return(msg)));
@@ -414,7 +414,7 @@ static void handle_set_stream_route_devices(DBusConnection *conn, DBusMessage *m
                                        DBUS_TYPE_ARRAY, DBUS_TYPE_UINT32, &in_device_list, &list_len_in,
                                        DBUS_TYPE_ARRAY, DBUS_TYPE_UINT32, &out_device_list, &list_len_out,
                                        DBUS_TYPE_INVALID));
-    pa_log_info("handle_set_stream_route_devices(), id[%u], in_device_list[%p]:length[%d], out_device_list[%p]:length[%d]",
+    pa_log_info("id[%u], in_device_list[%p]:length[%d], out_device_list[%p]:length[%d]",
         id, in_device_list, list_len_in, out_device_list, list_len_out);
 
     pa_assert_se((reply = dbus_message_new_method_return(msg)));
@@ -500,7 +500,7 @@ static void handle_set_stream_route_option(DBusConnection *conn, DBusMessage *ms
                                        DBUS_TYPE_STRING, &name,
                                        DBUS_TYPE_INT32, &value,
                                        DBUS_TYPE_INVALID));
-    pa_log_info("handle_set_stream_route_option(), name[%s], value[%d]", name, value);
+    pa_log_info("name[%s], value[%d]", name, value);
 
     pa_assert_se((reply = dbus_message_new_method_return(msg)));
 
@@ -564,7 +564,7 @@ static void handle_set_volume_level(DBusConnection *conn, DBusMessage *msg, void
                                        DBUS_TYPE_STRING, &type,
                                        DBUS_TYPE_UINT32, &level,
                                        DBUS_TYPE_INVALID));
-    pa_log_info("handle_set_volume_level(), direction[%s], type[%s], level[%u]", direction, type, level);
+    pa_log_info("direction[%s], type[%s], level[%u]", direction, type, level);
 
     pa_assert_se((reply = dbus_message_new_method_return(msg)));
 
@@ -613,7 +613,7 @@ static void handle_get_volume_level(DBusConnection *conn, DBusMessage *msg, void
                                        DBUS_TYPE_STRING, &direction,
                                        DBUS_TYPE_STRING, &type,
                                        DBUS_TYPE_INVALID));
-    pa_log_info("handle_get_volume_level(), direction(%s), type(%s)", direction, type);
+    pa_log_info("direction[%s], type[%s]", direction, type);
 
     pa_assert_se((reply = dbus_message_new_method_return(msg)));
 
@@ -656,7 +656,7 @@ static void handle_get_volume_max_level(DBusConnection *conn, DBusMessage *msg,
                                        DBUS_TYPE_STRING, &direction,
                                        DBUS_TYPE_STRING, &type,
                                        DBUS_TYPE_INVALID));
-    pa_log_info("handle_get_volume_max_level(), direction[%s], type[%s]", direction, type);
+    pa_log_info("direction[%s], type[%s]", direction, type);
 
     pa_assert_se((reply = dbus_message_new_method_return(msg)));
 
@@ -699,7 +699,7 @@ static void handle_set_volume_mute(DBusConnection *conn, DBusMessage *msg, void
                                        DBUS_TYPE_STRING, &type,
                                        DBUS_TYPE_UINT32, &do_mute,
                                        DBUS_TYPE_INVALID));
-    pa_log_info("handle_set_volume_mute(), direction[%s], type[%s], do_mute[%u]", direction, type, do_mute);
+    pa_log_info("direction[%s], type[%s], do_mute[%u]", direction, type, do_mute);
 
     pa_assert_se((reply = dbus_message_new_method_return(msg)));
 
@@ -738,7 +738,7 @@ static void handle_get_volume_mute(DBusConnection *conn, DBusMessage *msg, void
                                        DBUS_TYPE_STRING, &direction,
                                        DBUS_TYPE_STRING, &type,
                                        DBUS_TYPE_INVALID));
-    pa_log_info("handle_get_volume_mute(), direction[%s], type[%s]", direction, type);
+    pa_log_info("direction[%s], type[%s]", direction, type);
 
     pa_assert_se((reply = dbus_message_new_method_return(msg)));
 
@@ -782,7 +782,7 @@ static void handle_get_current_volume_type(DBusConnection *conn, DBusMessage *ms
     pa_assert_se(dbus_message_get_args(msg, NULL,
                                        DBUS_TYPE_STRING, &direction,
                                        DBUS_TYPE_INVALID));
-    pa_log_info("handle_get_current_volume_type(), direction[%s]", direction);
+    pa_log_info("direction[%s]", direction);
 
     pa_assert_se((reply = dbus_message_new_method_return(msg)));
 
@@ -853,7 +853,7 @@ static void handle_get_current_media_routing_path(DBusConnection *conn, DBusMess
     pa_assert_se(dbus_message_get_args(msg, NULL,
                                        DBUS_TYPE_STRING, &direction,
                                        DBUS_TYPE_INVALID));
-    pa_log_info("handle_get_current_media_routing_path(), direction[%s]", direction);
+    pa_log_info("direction[%s]", direction);
 
     pa_assert_se((reply = dbus_message_new_method_return(msg)));
 
@@ -919,7 +919,7 @@ static void handle_update_focus_status(DBusConnection *conn, DBusMessage *msg, v
                                        DBUS_TYPE_UINT32, &id,
                                        DBUS_TYPE_UINT32, &acquired_focus_status,
                                        DBUS_TYPE_INVALID));
-    pa_log_info("handle_update_focus_status(), id[%u], acquired_focus_status[0x%x]", id, acquired_focus_status);
+    pa_log_info("id[%u], acquired_focus_status[0x%x]", id, acquired_focus_status);
 
     pa_assert_se((reply = dbus_message_new_method_return(msg)));
 
@@ -978,7 +978,7 @@ static void handle_update_focus_status_by_focus_id(DBusConnection *conn, DBusMes
                                        DBUS_TYPE_INT32, &id,
                                        DBUS_TYPE_UINT32, &acquired_focus_status,
                                        DBUS_TYPE_INVALID));
-    pa_log_info("handle_update_focus_status_by_focus_id(), id[%d], acquired_focus_status[0x%x]", id, acquired_focus_status);
+    pa_log_info("id[%d], acquired_focus_status[0x%x]", id, acquired_focus_status);
 
     pa_assert_se((reply = dbus_message_new_method_return(msg)));
 
@@ -1019,7 +1019,7 @@ static void handle_update_restriction(DBusConnection *conn, DBusMessage *msg, vo
                                        DBUS_TYPE_STRING, &name,
                                        DBUS_TYPE_UINT32, &value,
                                        DBUS_TYPE_INVALID));
-    pa_log_info("handle_update_restriction(), name[%s], value[%u]", name, value);
+    pa_log_info("name[%s], value[%u]", name, value);
 
     pa_assert_se((reply = dbus_message_new_method_return(msg)));
 
@@ -1049,7 +1049,7 @@ static void handle_set_filter(DBusConnection *conn, DBusMessage *msg, void *user
                                        DBUS_TYPE_STRING, &filter_group,
                                        DBUS_TYPE_STRING, &stream_type,
                                        DBUS_TYPE_INVALID));
-    pa_log_info("handle_set_filter(), filter_name[%s], filter_parameters[%s], filter_group[%s], stream_type[%s]", filter_name,
+    pa_log_info("filter_name[%s], filter_parameters[%s], filter_group[%s], stream_type[%s]", filter_name,
                 filter_parameters, filter_group, stream_type);
 
     pa_assert_se((reply = dbus_message_new_method_return(msg)));
@@ -1081,7 +1081,7 @@ static void handle_unset_filter(DBusConnection *conn, DBusMessage *msg, void *us
     pa_assert_se(dbus_message_get_args(msg, NULL,
                                        DBUS_TYPE_STRING, &stream_type,
                                        DBUS_TYPE_INVALID));
-    pa_log_info("handle_unset_filter(), stream_type[%s]", stream_type);
+    pa_log_info("stream_type[%s]", stream_type);
 
     pa_assert_se((reply = dbus_message_new_method_return(msg)));
 
@@ -1114,8 +1114,7 @@ static void handle_control_filter(DBusConnection *conn, DBusMessage *msg, void *
                                        DBUS_TYPE_STRING, &filter_controls,
                                        DBUS_TYPE_STRING, &stream_type,
                                        DBUS_TYPE_INVALID));
-    pa_log_info("handle_control_filter(), filter_name[%s], filter_controls[%s], stream_type[%s]", filter_name, filter_controls,
-                stream_type);
+    pa_log_info("filter_name[%s], filter_controls[%s], stream_type[%s]", filter_name, filter_controls, stream_type);
 
     pa_assert_se((reply = dbus_message_new_method_return(msg)));
 
@@ -1144,7 +1143,7 @@ static bool check_stream_exist_by_pid(pa_stream_manager *m, uint32_t pid, const
     pa_assert(m);
     pa_assert(stream_role);
 
-    pa_log_info("check_stream_exist_by_pid(), pid[%u], role[%s], type[%d]", pid, stream_role, type);
+    pa_log_info("pid[%u], role[%s], type[%d]", pid, stream_role, type);
 
     PA_IDXSET_FOREACH(stream, (type == STREAM_SINK_INPUT) ? m->core->sink_inputs : m->core->source_outputs, idx) {
         role = pa_proplist_gets(GET_STREAM_PROPLIST(stream, type), PA_PROP_MEDIA_ROLE);
@@ -1204,7 +1203,7 @@ static void handle_check_stream_exist_by_pid(DBusConnection *conn, DBusMessage *
                                        DBUS_TYPE_STRING, &type,
                                        DBUS_TYPE_STRING, &direction,
                                        DBUS_TYPE_INVALID));
-    pa_log_info("handle_check_stream_exist_by_pid(), pid[%u], type[%s], direction[%s]", pid, type, direction);
+    pa_log_info("pid[%u], type[%s], direction[%s]", pid, type, direction);
 
     pa_assert_se((reply = dbus_message_new_method_return(msg)));
 
@@ -1290,7 +1289,7 @@ static void send_volume_changed_signal(DBusConnection *conn, const char *directi
     pa_assert(direction);
     pa_assert(volume_type);
 
-    pa_log_debug("Send volume changed signal: direction(%s), type(%s), level(%d)", direction, volume_type, volume_level);
+    pa_log_debug("direction[%s], type[%s], level[%d]", direction, volume_type, volume_level);
 
     pa_assert_se(signal_msg = dbus_message_new_signal(STREAM_MANAGER_OBJECT_PATH, STREAM_MANAGER_INTERFACE, STREAM_MANAGER_SIGNAL_NAME_VOLUME_CHANGED));
     dbus_message_iter_init_append(signal_msg, &msg_iter);
@@ -1311,7 +1310,7 @@ void send_command_signal(DBusConnection *conn, const char *name, int value) {
     pa_assert(conn);
     pa_assert(name);
 
-    pa_log_debug("Send command signal: name(%s), value(%d)", name, value);
+    pa_log_debug("name[%s], value[%d]", name, value);
 
     pa_assert_se(signal_msg = dbus_message_new_signal(STREAM_MANAGER_OBJECT_PATH, STREAM_MANAGER_INTERFACE, STREAM_MANAGER_SIGNAL_NAME_COMMAND));
     dbus_message_iter_init_append(signal_msg, &msg_iter);
index bdd8ecfe584aee9a993792d42d62338bfc7857e1..fa5ec5804e973a53a5e7e7ab37962897bd0809a0 100644 (file)
@@ -35,7 +35,7 @@ int32_t handle_restrictions(pa_stream_manager *m, const char *name, uint32_t val
 
     if (pa_streq(name, STREAM_MANAGER_METHOD_ARGS_BLOCK_RECORDING_MEDIA) ) {
         if (value == 1) {
-            pa_log_info("block recording(media)");
+            pa_log_info("block MEDIA recording");
             m->restrictions.block_recording_media = true;
             PA_IDXSET_FOREACH(s, m->core->source_outputs, idx) {
                 role = pa_proplist_gets(GET_STREAM_PROPLIST(s, STREAM_SOURCE_OUTPUT), PA_PROP_MEDIA_ROLE);
@@ -45,7 +45,7 @@ int32_t handle_restrictions(pa_stream_manager *m, const char *name, uint32_t val
                 }
             }
         } else if (value == 0) {
-            pa_log_info("recording(media) is now available");
+            pa_log_info("MEDIA recording is now available");
             m->restrictions.block_recording_media = false;
         } else {
             pa_log_error("unknown value");
@@ -68,7 +68,7 @@ bool check_restrictions(pa_stream_manager *m, void *stream, stream_type_t type)
     if (m->restrictions.block_recording_media && type == STREAM_SOURCE_OUTPUT) {
         role = pa_proplist_gets(GET_STREAM_NEW_PROPLIST(stream, type), PA_PROP_MEDIA_ROLE);
         if (pa_safe_streq(role, "media")) {
-            pa_log_warn("recording(media) is not allowed");
+            pa_log_warn("MEDIA recording is not allowed");
             return true;
         }
     }
index 8a7cb4ab4c04481a988c2397c49048d8e3c625c6..34379cba165dab6d916d12448e64c53c36d8741c 100644 (file)
@@ -221,7 +221,7 @@ static int get_volume_value(pa_stream_manager *m, stream_type_t stream_type, boo
 
     *volume_value = volume_linear;
 
-    pa_log_debug("get_volume_value() : stream_type[%d], volume_type[%s], level[%u], value[%f]",
+    pa_log_debug("stream_type[%d], volume_type[%s], level[%u], value[%f]",
                  stream_type, volume_type, volume_level, volume_linear);
 
     return 0;
@@ -263,7 +263,7 @@ int32_t set_volume_level_by_type(pa_stream_manager *m, stream_type_t stream_type
 
     /* Check if it is related to HAL volume */
     if (is_hal_volume_by_type(m, volume_type, &is_hal_volume)) {
-        pa_log_error("failed to is_hal_volume_by_type(), volume_type(%s)", volume_type);
+        pa_log_error("failed to is_hal_volume_by_type(), volume_type[%s]", volume_type);
         return -1;
      }
 
@@ -274,12 +274,12 @@ int32_t set_volume_level_by_type(pa_stream_manager *m, stream_type_t stream_type
     volumes = m->volume_infos;
 
     if (!(v = pa_hashmap_get(volumes, volume_type))) {
-        pa_log_error("could not get volume_info, stream_type(%d), volume_type(%s)", stream_type, volume_type);
+        pa_log_error("could not get volume_info, stream_type[%d], volume_type[%s]", stream_type, volume_type);
         return -1;
     }
 
     if (pa_streq(volume_type, MASTER_VOLUME_TYPE) && MASTER_VOLUME_LEVEL_MAX < volume_level) {
-        pa_log_error("could not set volume level of MASTER type, out of range(%u)", volume_level);
+        pa_log_error("could not set volume level of MASTER type, out of range[%u]", volume_level);
         return -1;
     }
 
@@ -306,7 +306,7 @@ int32_t set_volume_level_by_type(pa_stream_manager *m, stream_type_t stream_type
                     if (m->volume_modifiers) {
                        if ((modifier_gain_value = pa_hashmap_get(m->volume_modifiers, modifier_gain))) {
                             volume_linear *= (*modifier_gain_value);
-                            pa_log_info("set_volume_level_by_type() : apply the modifier for the gain value(%s=>%f), result volume_linear(%f)",
+                            pa_log_info("apply the modifier for the gain value[%s=>%f], result volume_linear[%f]",
                                         modifier_gain, *modifier_gain_value, volume_linear);
                         }
                     }
@@ -339,7 +339,7 @@ int32_t set_volume_level_by_type(pa_stream_manager *m, stream_type_t stream_type
                 if (m->volume_modifiers) {
                    if ((modifier_gain_value = pa_hashmap_get(m->volume_modifiers, modifier_gain))) {
                         volume_linear *= (*modifier_gain_value);
-                        pa_log_info("set_volume_level_by_type() : apply the modifier for the gain value(%s=>%f), result volume_linear(%f)",
+                        pa_log_info("set_volume_level_by_type() : apply the modifier for the gain value[%s=>%f], result volume_linear[%f]",
                                     modifier_gain, *modifier_gain_value, volume_linear);
                     }
                 }
@@ -352,7 +352,7 @@ int32_t set_volume_level_by_type(pa_stream_manager *m, stream_type_t stream_type
         }
     }
 
-    pa_log_debug("set_volume_level_by_type() : stream_type[%d], volume_type[%s], level[%u], value[%f]",
+    pa_log_debug("stream_type[%d], volume_type[%s], level[%u], value[%f]",
                  stream_type, volume_type, volume_level, volume_linear);
 
     return 0;
@@ -369,7 +369,7 @@ int32_t get_volume_level_by_type(pa_stream_manager *m, pa_volume_get_command_t c
 
     /* Check if it is related to HAL volume */
     if (is_hal_volume_by_type(m, volume_type, &is_hal_volume)) {
-        pa_log_error("failed to is_hal_volume_by_type(), volume_type(%s)", volume_type);
+        pa_log_error("failed to is_hal_volume_by_type(), volume_type[%s]", volume_type);
         return -1;
     }
 
@@ -384,7 +384,7 @@ int32_t get_volume_level_by_type(pa_stream_manager *m, pa_volume_get_command_t c
         } else {
             /* from stream-manager */
             if (!(v = pa_hashmap_get(volumes, volume_type))) {
-                pa_log_error("could not get volume_info, stream_type(%d), volume_type(%s)", stream_type, volume_type);
+                pa_log_error("could not get volume_info, stream_type[%d], volume_type[%s]", stream_type, volume_type);
                 return -1;
             }
             *volume_level = v->values[stream_type].current_level;
@@ -406,7 +406,7 @@ int32_t get_volume_level_by_type(pa_stream_manager *m, pa_volume_get_command_t c
                 if (v && v->values[stream_type].idx_volume_values)
                     *volume_level = pa_idxset_size(v->values[stream_type].idx_volume_values);
                 else {
-                    pa_log_error("could not get volume_info, stream_type(%d), volume_type(%s)", stream_type, volume_type);
+                    pa_log_error("could not get volume_info, stream_type[%d], volume_type[%s]", stream_type, volume_type);
                     return -1;
                 }
             }
@@ -435,7 +435,7 @@ int32_t set_volume_level_by_idx(pa_stream_manager *m, stream_type_t stream_type,
 
     /* Check if it is related to HAL volume */
     if (is_hal_volume_by_type(m, volume_type_str, &is_hal_volume)) {
-        pa_log_error("failed to is_hal_volume_by_type(), volume_type(%s)", volume_type_str);
+        pa_log_error("failed to is_hal_volume_by_type(), volume_type[%s]", volume_type_str);
         return -1;
      }
 
@@ -450,7 +450,7 @@ int32_t set_volume_level_by_idx(pa_stream_manager *m, stream_type_t stream_type,
         if (modifier_gain) {
             if ((modifier_gain_value = pa_hashmap_get(m->volume_modifiers, modifier_gain))) {
                 volume_linear *= (*modifier_gain_value);
-                pa_log_info("set_volume_level_by_idx() : apply the modifier for the gain value(%s=>%f), result volume_linear(%f)",
+                pa_log_info("apply the modifier for the gain value[%s=>%f], result volume_linear[%f]",
                             modifier_gain, *modifier_gain_value, volume_linear);
             }
         }
@@ -460,7 +460,7 @@ int32_t set_volume_level_by_idx(pa_stream_manager *m, stream_type_t stream_type,
         else if (stream_type == STREAM_SOURCE_OUTPUT)
             pa_source_output_set_volume((pa_source_output*)s, &cv, true, true);
     }
-    pa_log_debug("set_volume_level_by_idx() : stream_type[%d], idx[%u]=>volume_type[%s], level[%u], value[%f]",
+    pa_log_debug("stream_type[%d], idx[%u]=>volume_type[%s], level[%u], value[%f]",
                  stream_type, idx, volume_type_str, volume_level, volume_linear);
 
     return 0;
@@ -483,7 +483,7 @@ int32_t set_volume_level_with_new_data(pa_stream_manager *m, void *stream, strea
 
     /* Check if it is related to HAL volume */
     if (is_hal_volume_by_type(m, volume_type_str, &is_hal_volume)) {
-        pa_log_error("failed to is_hal_volume_by_type(), volume_type(%s)", volume_type_str);
+        pa_log_error("failed to is_hal_volume_by_type(), volume_type[%s]", volume_type_str);
         return -1;
      }
 
@@ -499,7 +499,7 @@ int32_t set_volume_level_with_new_data(pa_stream_manager *m, void *stream, strea
             double *modifier_gain_value = NULL;
             if ((modifier_gain_value = pa_hashmap_get(m->volume_modifiers, modifier_gain))) {
                 volume_linear *= (*modifier_gain_value);
-                pa_log_info("set_volume_level_by_idx() : apply the modifier for the gain value(%s=>%f), result volume_linear(%f)",
+                pa_log_info("apply the modifier for the gain value[%s=>%f], result volume_linear[%f]",
                             modifier_gain, *modifier_gain_value, volume_linear);
             }
         }
@@ -509,7 +509,7 @@ int32_t set_volume_level_with_new_data(pa_stream_manager *m, void *stream, strea
         else if (stream_type == STREAM_SOURCE_OUTPUT)
             pa_source_output_new_data_set_volume((pa_source_output_new_data*)stream, &cv, true);
     }
-    pa_log_debug("set_volume_level_with_new_data() : stream_type[%d], volume_type[%s], level[%u], value[%f]",
+    pa_log_debug("stream_type[%d], volume_type[%s], level[%u], value[%f]",
                  stream_type, volume_type_str, volume_level, volume_linear);
 
     return 0;
@@ -528,7 +528,7 @@ int32_t set_volume_mute_by_type(pa_stream_manager *m, stream_type_t stream_type,
 
     /* Check if it is related to HAL volume */
     if (is_hal_volume_by_type(m, volume_type, &is_hal_volume)) {
-        pa_log_error("failed to is_hal_volume_by_type(), volume_type(%s)", volume_type);
+        pa_log_error("failed to is_hal_volume_by_type(), volume_type[%s]", volume_type);
         return -1;
      }
 
@@ -538,7 +538,7 @@ int32_t set_volume_mute_by_type(pa_stream_manager *m, stream_type_t stream_type,
 
     /* Set mute */
     if (!(v = pa_hashmap_get(m->volume_infos, volume_type))) {
-        pa_log_error("could not get volume_info, stream_type(%d), volume_type(%s)", stream_type, volume_type);
+        pa_log_error("could not get volume_info, stream_type[%d], volume_type[%s]", stream_type, volume_type);
         return -1;
     }
 
@@ -558,7 +558,7 @@ int32_t set_volume_mute_by_type(pa_stream_manager *m, stream_type_t stream_type,
         }
     }
 
-    pa_log_info("pa_stream_manager_volume_set_mute, stream_type:%d volume_type:%s mute:%d", stream_type, volume_type, volume_mute);
+    pa_log_info("stream_type[%d], volume_type[%s], mute[%d]", stream_type, volume_type, volume_mute);
 
     return 0;
 }
@@ -573,13 +573,13 @@ int32_t get_volume_mute_by_type(pa_stream_manager *m, stream_type_t stream_type,
 
     /* Get mute */
     if (!(v = pa_hashmap_get(m->volume_infos, volume_type))) {
-        pa_log_error("could not get volume_info, stream_type(%d), volume_type(%s)", stream_type, volume_type);
+        pa_log_error("could not get volume_info, stream_type[%d], volume_type[%s]", stream_type, volume_type);
         return -1;
     }
 
     *volume_mute = v->values[stream_type].is_muted;
 
-    pa_log_info("pa_stream_manager_volume_get_mute, volume_type:%s mute:%d", volume_type, *volume_mute);
+    pa_log_info("volume_type[%s], mute[%d]", volume_type, *volume_mute);
 
     return 0;
 }
@@ -594,7 +594,7 @@ int32_t set_volume_mute_by_idx(pa_stream_manager *m, uint32_t stream_idx, stream
     pa_assert(m);
     pa_assert(m->volume_infos);
 
-    pa_log_info("set_volume_mute_by_idx, stream_idx:%u stream_type:%d mute:%d", stream_idx, stream_type, volume_mute);
+    pa_log_info("stream_idx[%u], stream_type[%d], mute[%d]", stream_idx, stream_type, volume_mute);
 
     if (!(s = pa_idxset_get_by_index((stream_type == STREAM_SINK_INPUT) ? m->core->sink_inputs : m->core->source_outputs, stream_idx))) {
         pa_log_warn("stream[%u] doesn't exist", stream_idx);
@@ -643,7 +643,7 @@ int32_t get_volume_mute_by_idx(pa_stream_manager *m, uint32_t stream_idx, stream
     if (!s)
         return -1;
 
-    pa_log_info("get_volume_mute_by_idx, stream_idx:%u stream_type:%d mute:%d", stream_idx, stream_type, *volume_mute);
+    pa_log_info("stream_idx[%u], stream_type[%d], mute[%d]", stream_idx, stream_type, *volume_mute);
 
     return 0;
 }
@@ -655,7 +655,7 @@ int32_t set_volume_mute_with_new_data(pa_stream_manager *m, void *stream, stream
     pa_assert(m);
     pa_assert(stream);
 
-    pa_log_info("set_volume_mute_with_new_data, stream_type:%d mute:%d", stream_type, volume_mute);
+    pa_log_info("stream_type[%d], mute[%d]", stream_type, volume_mute);
 
     if (!(volume_type_str = pa_proplist_gets(GET_STREAM_NEW_PROPLIST(stream, stream_type), PA_PROP_MEDIA_TIZEN_VOLUME_TYPE))) {
         pa_log_debug("new_data[%p] doesn't have volume type", stream);
@@ -664,7 +664,7 @@ int32_t set_volume_mute_with_new_data(pa_stream_manager *m, void *stream, stream
 
     /* Check if it is related to HAL volume */
     if (is_hal_volume_by_type(m, volume_type_str, &is_hal_volume)) {
-        pa_log_error("failed to is_hal_volume_by_type(), volume_type(%s)", volume_type_str);
+        pa_log_error("failed to is_hal_volume_by_type(), volume_type[%s]", volume_type_str);
         return -1;
      }
 
@@ -741,7 +741,7 @@ int32_t init_volumes(pa_stream_manager *m) {
                 pa_log_error("failed to get volume level of the vconf[%s]", vconf_vol_type_addr);
             else {
                 set_volume_level_by_type(m, STREAM_SINK_INPUT, volume_type, (uint32_t)level);
-                pa_log_debug("type(%s), current level(%u)", volume_type, v->values[STREAM_DIRECTION_OUT].current_level);
+                pa_log_debug("type[%s], current level[%u]", volume_type, v->values[STREAM_DIRECTION_OUT].current_level);
             }
         }
     }
@@ -792,7 +792,7 @@ int32_t pa_stream_manager_volume_get_max_level(pa_stream_manager *m, stream_type
 
     ret = get_volume_level_by_type(m, GET_VOLUME_MAX_LEVEL, stream_type, volume_type, volume_level);
 
-    pa_log_info("pa_stream_manager_volume_get_max_level, type:%s max_level:%u, ret:%d", volume_type, *volume_level, ret);
+    pa_log_info("type[%s], max_level[%u], ret[%d]", volume_type, *volume_level, ret);
 
     return ret;
 }
@@ -805,7 +805,7 @@ int32_t pa_stream_manager_volume_get_level(pa_stream_manager *m, stream_type_t s
 
     ret = get_volume_level_by_type(m, GET_VOLUME_CURRENT_LEVEL, stream_type, volume_type, volume_level);
 
-    pa_log_info("pa_stream_manager_volume_get_level, type:%s level:%u, ret:%d", volume_type, *volume_level, ret);
+    pa_log_info("type[%s], level[%u], ret[%d]", volume_type, *volume_level, ret);
 
     return ret;
 }
@@ -818,7 +818,7 @@ int32_t pa_stream_manager_volume_set_level(pa_stream_manager *m, stream_type_t s
 
     ret = set_volume_level_by_type(m, stream_type, volume_type, volume_level);
 
-    pa_log_info("pa_stream_manager_volume_set_level, type:%s level:%u, ret:%d", volume_type, volume_level, ret);
+    pa_log_info("type[%s], level[%u], ret[%d]", volume_type, volume_level, ret);
 
     return ret;
 }
index 2a97e1b7a97a77a823e35a8cb2772dd4a417f8df..9032f9f84c5d1325d61ab27667b0f985004f89e9 100644 (file)
@@ -189,7 +189,7 @@ int32_t get_stream_info(pa_stream_manager *m, const char *stream_role, stream_in
     char *name;
     int i = 0;
     stream_info *s = NULL;
-    pa_log_info("get_stream_info : role[%s]", stream_role);
+    pa_log_info("role[%s]", stream_role);
     if (m->stream_infos) {
         s = pa_hashmap_get(m->stream_infos, stream_role);
         if (s) {
@@ -201,26 +201,32 @@ int32_t get_stream_info(pa_stream_manager *m, const char *stream_role, stream_in
             }
             PA_IDXSET_FOREACH(name, s->idx_avail_in_devices, idx) {
                 pa_log_debug("  avail-in-device[%d] name  : %s", idx, name);
-                if (idx < AVAIL_DEVICES_MAX)
+                if (idx < AVAIL_DEVICES_MAX) {
                     info->avail_in_devices[idx] = name;
-                else
+                } else {
                     pa_log_error("  avail-in-devices, out of range, [%d]", idx);
+                    return -1;
+                }
             }
             info->num_of_in_devices = pa_idxset_size(s->idx_avail_in_devices);
             PA_IDXSET_FOREACH(name, s->idx_avail_out_devices, idx) {
                 pa_log_debug("  avail-out-device[%d] name  : %s", idx, name);
-                if (idx < AVAIL_DEVICES_MAX)
+                if (idx < AVAIL_DEVICES_MAX) {
                     info->avail_out_devices[idx] = name;
-                else
+                } else {
                     pa_log_error("  avail-out-devices, out of range, [%d]", idx);
+                    return -1;
+                }
             }
             info->num_of_out_devices = pa_idxset_size(s->idx_avail_out_devices);
             PA_IDXSET_FOREACH(name, s->idx_avail_frameworks, idx) {
                 pa_log_debug("  avail-frameworks[%d] name  : %s", idx, name);
-                if (idx < AVAIL_FRAMEWORKS_MAX)
+                if (idx < AVAIL_FRAMEWORKS_MAX) {
                     info->avail_frameworks[idx] = name;
-                else
+                } else {
                     pa_log_error("  avail-frameworks, out of range, [%d]", idx);
+                    return -1;
+                }
             }
             info->num_of_frameworks = pa_idxset_size(s->idx_avail_frameworks);
         } else {
@@ -247,7 +253,6 @@ int32_t get_available_streams(pa_stream_manager *m, stream_list *list) {
     char *role = NULL;
     int i = 0;
 
-    pa_log_info("get_available_streams");
     if (m->stream_infos) {
         while ((s = pa_hashmap_iterate(m->stream_infos, &state, (const void**)&role))) {
             if (i < AVAIL_STREAMS_MAX) {
@@ -1171,8 +1176,7 @@ static bool update_the_highest_priority_stream(pa_stream_manager *m, process_com
         cur_max_stream = m->cur_highest_priority.source_output;
     }
 
-    pa_log_debug("update_the_highest_priority_stream(), stream_type(%d), role(%s), command(%d), is_new_data(%d)",
-        type, role, command, is_new_data);
+    pa_log_debug("stream_type(%d), role(%s), command(%d), is_new_data(%d)", type, role, command, is_new_data);
     if (command == PROCESS_COMMAND_CHANGE_ROUTE_BY_STREAM_STARTED) {
         /* get focus status, route type */
         if (is_new_data) {
@@ -1450,7 +1454,7 @@ static void fill_device_info_to_hook_data(pa_stream_manager *m, void *hook_data,
 
     pa_assert(m);
     pa_assert(hook_data);
-    pa_log_debug("fill_device_info_to_hook_data() for %s", notify_command_type_str[command]);
+    pa_log_debug("command: %s", notify_command_type_str[command]);
 
     switch (command) {
     case NOTIFY_COMMAND_SELECT_PROPER_SINK_OR_SOURCE_FOR_INIT: {
@@ -1539,7 +1543,7 @@ ret_msg_t do_notify(pa_stream_manager *m, notify_command_type_t command, stream_
     ret_msg_t ret = RET_MSG_OK;
 
     pa_assert(m);
-    pa_log_debug("do_notify(%s): type(%d), is_new_data(%d), user_data(%p)", notify_command_type_str[command], type, is_new_data, user_data);
+    pa_log_debug("[%s]: type(%d), is_new_data(%d), user_data(%p)", notify_command_type_str[command], type, is_new_data, user_data);
 
     switch (command) {
     case NOTIFY_COMMAND_SELECT_PROPER_SINK_OR_SOURCE_FOR_INIT: {
@@ -1768,8 +1772,8 @@ process_stream_result_t process_stream(pa_stream_manager *m, void *stream, strea
     const char *ch_str = NULL;
     filter_info *f = NULL;
 
-    pa_log_info(">>> process_stream(%s): stream(%p), stream_type(%d), is_new_data(%d)",
-        process_command_type_str[command], stream, type, is_new_data);
+    pa_log_info(">>> [%s]: stream(%p), stream_type(%d), is_new_data(%d)",
+                process_command_type_str[command], stream, type, is_new_data);
 
     pa_assert(m);
     pa_assert(stream);
@@ -1977,7 +1981,7 @@ process_stream_result_t process_stream(pa_stream_manager *m, void *stream, strea
                 do_notify(m, NOTIFY_COMMAND_CHANGE_ROUTE_END, type, false, NULL);
 
         } else {
-            pa_log_error("role is null, skip it");
+            pa_log_warn("role is null, skip it");
         }
 
     } else if (command == PROCESS_COMMAND_CHANGE_ROUTE_BY_STREAM_FOCUS_CHANGED) {
@@ -2010,7 +2014,7 @@ process_stream_result_t process_stream(pa_stream_manager *m, void *stream, strea
                 do_notify(m, NOTIFY_COMMAND_CHANGE_ROUTE_END, type, false, NULL);
 
         } else {
-            pa_log_error("role is null, skip it");
+            pa_log_warn("role is null, skip it");
         }
 
     } else if (command == PROCESS_COMMAND_UPDATE_VOLUME && is_new_data) {
@@ -2083,7 +2087,7 @@ process_stream_result_t process_stream(pa_stream_manager *m, void *stream, strea
     }
 
 finish:
-    pa_log_debug("<<< process_stream(%s): result(%d), stream(%p)", process_command_type_str[command], result, stream);
+    pa_log_debug("<<< [%s]: result(%d), stream(%p)", process_command_type_str[command], result, stream);
     return result;
 }
 
@@ -2105,7 +2109,7 @@ static void remove_sink_input_from_muted_streams(pa_stream_manager *m, pa_sink_i
 static pa_hook_result_t sink_input_new_cb(pa_core *core, pa_sink_input_new_data *new_data, pa_stream_manager *m) {
     pa_core_assert_ref(core);
 
-    pa_log_debug("start sink_input_new_cb");
+    pa_log_debug("sink-input-new-data(%p)", new_data);
 
     process_stream(m, new_data, STREAM_SINK_INPUT, PROCESS_COMMAND_PREPARE, true);
     process_stream(m, new_data, STREAM_SINK_INPUT, PROCESS_COMMAND_UPDATE_BUFFER_ATTR, true);
@@ -2119,7 +2123,7 @@ static pa_hook_result_t sink_input_put_cb(pa_core *core, pa_sink_input *i, pa_st
     pa_core_assert_ref(core);
     pa_sink_input_assert_ref(i);
 
-    pa_log_debug("start sink_input_put_cb, i(%p, index:%u)", i, i->index);
+    pa_log_info("sink-input(%p, index:%u)", i, i->index);
 
     process_stream(m, i, STREAM_SINK_INPUT, PROCESS_COMMAND_ADD_PARENT_ID, false);
     process_stream(m, i, STREAM_SINK_INPUT, PROCESS_COMMAND_APPLY_FILTER, false);
@@ -2135,7 +2139,7 @@ static pa_hook_result_t sink_input_unlink_cb(pa_core *core, pa_sink_input *i, pa
     pa_core_assert_ref(core);
     pa_sink_input_assert_ref(i);
 
-    pa_log_debug("start sink_input_unlink_cb, i(%p, index:%u)", i, i->index);
+    pa_log_info("sink-input(%p, index:%u)", i, i->index);
 
     if (stream_is_call_family(PA_OBJECT(i))) {
         m->on_call = false;
@@ -2155,7 +2159,7 @@ static pa_hook_result_t sink_input_state_changed_cb(pa_core *core, pa_sink_input
     pa_assert(m);
 
     state = pa_sink_input_get_state(i);
-    pa_log_debug("start sink_input_state_changed_cb(), sink-input(%p), state(%d)", i, state);
+    pa_log_debug("sink-input(%p, index:%u), state(%d)", i, i->index, state);
 
     switch (state) {
     case PA_SINK_INPUT_CORKED:
@@ -2180,7 +2184,7 @@ static pa_hook_result_t sink_input_move_start_cb(pa_core *core, pa_sink_input *i
     if (core->state == PA_CORE_SHUTDOWN)
         return PA_HOOK_OK;
 
-    pa_log_debug("sink_input_move_start_cb, i(%p, index:%u)", i, i->index);
+    pa_log_debug("sink-input(%p, index:%u)", i, i->index);
 
     set_volume_mute_by_idx(m, i->index, STREAM_SINK_INPUT, true);
 
@@ -2195,7 +2199,7 @@ static pa_hook_result_t sink_input_move_finish_cb(pa_core *core, pa_sink_input *
     if (core->state == PA_CORE_SHUTDOWN)
         return PA_HOOK_OK;
 
-    pa_log_debug("sink_input_move_finish_cb, i(%p, index:%u)", i, i->index);
+    pa_log_debug("sink-input(%p, index:%u)", i, i->index);
 
     set_volume_mute_by_idx(m, i->index, STREAM_SINK_INPUT, false);
 
@@ -2205,7 +2209,7 @@ static pa_hook_result_t sink_input_move_finish_cb(pa_core *core, pa_sink_input *
 static pa_hook_result_t source_output_new_cb(pa_core *core, pa_source_output_new_data *new_data, pa_stream_manager *m) {
     pa_core_assert_ref(core);
 
-    pa_log_info("start source_output_new_new_cb");
+    pa_log_debug("source-output-new-data(%p)", new_data);
 
     process_stream(m, new_data, STREAM_SOURCE_OUTPUT, PROCESS_COMMAND_PREPARE, true);
     if (check_restrictions(m, new_data, STREAM_SOURCE_OUTPUT))
@@ -2221,7 +2225,7 @@ static pa_hook_result_t source_output_put_cb(pa_core *core, pa_source_output *o,
     pa_core_assert_ref(core);
     pa_source_output_assert_ref(o);
 
-    pa_log_info("start source_output_put_cb, o(%p, index:%u)", o, o->index);
+    pa_log_info("source-output(%p, index:%u)", o, o->index);
 
     update_mirroring_streams(m, o, true);
     process_stream(m, o, STREAM_SOURCE_OUTPUT, PROCESS_COMMAND_ADD_PARENT_ID, false);
@@ -2237,7 +2241,7 @@ static pa_hook_result_t source_output_unlink_cb(pa_core *core, pa_source_output
     pa_core_assert_ref(core);
     pa_source_output_assert_ref(o);
 
-    pa_log_info("start source_output_unlink_cb, o(%p, index:%u)", o, o->index);
+    pa_log_info("source-output(%p, index:%u)", o, o->index);
 
     if (stream_is_call_family(PA_OBJECT(o))) {
         m->on_call = false;
@@ -2257,7 +2261,7 @@ static pa_hook_result_t source_output_state_changed_cb(pa_core *core, pa_source_
     pa_assert(m);
 
     state = pa_source_output_get_state(o);
-    pa_log_debug("start source_output_state_changed_cb(), source-output(%p), state(%d)", o, state);
+    pa_log_debug("source-output(%p, index:%u), state(%d)", o, o->index, state);
 
     switch (state) {
     case PA_SOURCE_OUTPUT_CORKED:
@@ -2281,7 +2285,7 @@ static pa_hook_result_t source_output_move_start_cb(pa_core *core, pa_source_out
     if (core->state == PA_CORE_SHUTDOWN)
         return PA_HOOK_OK;
 
-    pa_log_debug("source_output_move_start_cb, o(%p, index:%u)", o, o->index);
+    pa_log_debug("source-output(%p, index:%u)", o, o->index);
 
     set_volume_mute_by_idx(m, o->index, STREAM_SOURCE_OUTPUT, true);
 
@@ -2296,7 +2300,7 @@ static pa_hook_result_t source_output_move_finish_cb(pa_core *core, pa_source_ou
     if (core->state == PA_CORE_SHUTDOWN)
         return PA_HOOK_OK;
 
-    pa_log_debug("source_output_move_finish_cb, o(%p, index:%u)", o, o->index);
+    pa_log_debug("source-output(%p, index:%u)", o, o->index);
 
     set_volume_mute_by_idx(m, o->index, STREAM_SOURCE_OUTPUT, false);
 
@@ -2748,7 +2752,7 @@ static void apply_volume_factor_to_streams(pa_idxset *all_streams, pa_idxset **a
     pa_assert(all_streams);
     pa_assert(applied_streams);
 
-    pa_log_info("apply_volume_factor_to_streams is called");
+    pa_log_debug("apply volume factor");
 
     vol.channels = 1;
     pa_parse_volume("0%", &vol.values[0]);
@@ -2768,7 +2772,7 @@ static void clear_volume_factor_from_streams(pa_idxset *applied_streams) {
 
     pa_assert(applied_streams);
 
-    pa_log_info("clear_volume_factor_from_streams is called");
+    pa_log_debug("clear volume factor");
 
     PA_IDXSET_FOREACH(i, applied_streams, idx) {
         pa_idxset_remove_by_data(applied_streams, i, NULL);
@@ -2786,7 +2790,7 @@ static void timed_unmute_cb(pa_mainloop_api *a, pa_time_event *e, const struct t
     pa_assert(m);
     pa_assert(m->time_event_for_unmute == e);
 
-    pa_log_info("timed_unmute_cb is called");
+    pa_log_info("time event(%p)", e);
 
     PA_HASHMAP_FOREACH(applied_streams, m->muted_streams, state) {
         clear_volume_factor_from_streams(applied_streams);
@@ -2823,7 +2827,7 @@ static void mute_sink_inputs_as_device_disconnection(pa_stream_manager *m, uint3
 
     pa_assert(m);
 
-    pa_log_info("mute_sink_inputs_as_device_disconnection(), event_id(%u), mute(%d) is called", event_id, need_to_mute);
+    pa_log_info("event_id(%u), need_to_mute(%d)", event_id, need_to_mute);
 
     if (need_to_mute) {
         if (!streams_of_disconnected_device) {
@@ -2854,7 +2858,7 @@ static pa_hook_result_t event_fully_handled_hook_cb(pa_core *c, pa_subscribe_obs
     pa_assert(event_handled_hook_data);
     pa_assert(m);
 
-    pa_log_info("[SM][HANDLED] event_fully_handled_hook_cb is called. event-id(%u), event-type(%d)",
+    pa_log_info("[SM][HANDLED] event-id(%u), event-type(%d)",
                 event_handled_hook_data->event_id, event_handled_hook_data->event_type);
 
     /* un-mute streams */
@@ -2886,7 +2890,7 @@ static pa_hook_result_t device_connection_changed_hook_cb(pa_core *c, pa_tz_devi
     device_id = pa_tz_device_get_id(data->device);
     use_internal_codec = pa_tz_device_is_use_internal_codec(data->device);
 
-    pa_log_info("[SM][CONN] device_connection_changed_hook_cb is called. evend_id(%u), is_connected(%d), device(%p, %s, %u), direction(0x%x), use_internal_codec(%d)",
+    pa_log_info("[SM][CONN] evend_id(%u), is_connected(%d), device(%p, %s, %u), direction(0x%x), use_internal_codec(%d)",
                 data->event_id, data->is_connected, data->device, device_type, device_id, device_direction, use_internal_codec);
 
     /* mute all the streams belong to this device, those will be un-muted in event_fully_handled_hook_cb */
@@ -3090,7 +3094,7 @@ static int32_t init_ipc(pa_stream_manager *m) {
     if ((init_dbus(m)))
       return -1;
 #else
-    pa_log_error("DBUS is not supported\n");
+    pa_log_error("DBUS is not supported");
     return -1
 #endif
     return 0;
index 366d53125364086d011eed76637912b4d76be7c4..c565a36baacd86ef562d226d3665380a6ceb41a3 100644 (file)
@@ -96,7 +96,7 @@ static int convert_event_name_to_type(const char *event_name, pa_tizen_event_t *
 }
 
 static int convert_event_type_to_name(pa_tizen_event_t event_type, const char **event_name) {
-    if (event_type < 0 || event_type >= PA_TIZEN_EVENT_MAX)
+    if (event_type >= PA_TIZEN_EVENT_MAX)
         return -1;
 
     if (event_type == PA_TIZEN_EVENT_DEVICE_CONNECTION_CHANGED)
@@ -267,7 +267,7 @@ static void unregister_subscriber(pa_hashmap *subscribers, pa_tizen_event_t even
         if (pa_idxset_remove_by_data(event_subscribers, &subscriber_tmp, NULL))
             pa_log_debug("Subscriber(%u, %u) removed from subscriber set for %s", subscriber_pid, subscription_id, event_name);
         else
-            pa_log_error("No subscriber(%u, %u) in subscriber set for %s", subscriber_pid, subscription_id, event_name);
+            pa_log_warn("No subscriber(%u, %u) in subscriber set for %s", subscriber_pid, subscription_id, event_name);
 
     } else {
         /* Remove subscriber (subscriber_pid, *) */
@@ -278,7 +278,7 @@ static void unregister_subscriber(pa_hashmap *subscribers, pa_tizen_event_t even
                 if (pa_idxset_remove_by_index(event_subscribers, subscriber_idx))
                     pa_log_debug("Subscriber(%u, %u) removed from subscriber set for %s", subscriber_pid, subscriber_item->subs_id, event_name);
                 else
-                    pa_log_error("No subscriber(%u, %u) in subscriber set for %s", subscriber_pid, subscriber_item->subs_id, event_name);
+                    pa_log_warn("No subscriber(%u, %u) in subscriber set for %s", subscriber_pid, subscriber_item->subs_id, event_name);
             }
         }
     }