sound-player, tizen-audio-policy, stream-manager: Adjust log level 56/83056/1
authorSangchul Lee <sc11.lee@samsung.com>
Tue, 9 Aug 2016 03:03:31 +0000 (12:03 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Tue, 9 Aug 2016 03:05:28 +0000 (12:05 +0900)
[Version] 5.0.65
[Profile] Common
[Issue Type] Log

Change-Id: I35d7b45d64c468f6fb5906334bb901c970cb90f8
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/pulseaudio-modules-tizen.spec
src/module-sound-player.c
src/module-tizenaudio-policy.c
src/stream-manager.c

index ea0e369..abe407f 100644 (file)
@@ -1,6 +1,6 @@
 Name:             pulseaudio-modules-tizen
 Summary:          Pulseaudio modules for Tizen
-Version:          5.0.64
+Version:          5.0.65
 Release:          0
 Group:            Multimedia/Audio
 License:          LGPL-2.1+
index b8949c2..fb9660a 100644 (file)
@@ -403,7 +403,7 @@ static void send_signal_for_eos(struct userdata *u, int32_t stream_idx) {
 
     pa_assert(u);
 
-    pa_log_debug("Send EOS signal for stream_idx(%d)", stream_idx);
+    pa_log_info("Send EOS signal for stream_idx(%d)", stream_idx);
 
     pa_assert_se(signal_msg = dbus_message_new_signal(SOUND_PLAYER_OBJECT_PATH, SOUND_PLAYER_INTERFACE, SOUND_PLAYER_SIGNAL_EOS));
     pa_assert_se(dbus_message_append_args(signal_msg, DBUS_TYPE_INT32, &stream_idx, DBUS_TYPE_INVALID));
@@ -425,7 +425,7 @@ static int init_ipc(struct userdata *u) {
 #endif
     pa_assert(u);
 
-    pa_log_info("Initialization for IPC");
+    pa_log_debug("Initialization for IPC");
 
     pre_mask = umask(0);
     if (mknod(KEYTONE_PATH, S_IFIFO|0660, 0) < 0)
@@ -467,7 +467,7 @@ static int init_ipc(struct userdata *u) {
         pa_log_error("Unable to contact D-Bus system bus: %s: %s", err.name, err.message);
         goto fail;
     } else
-        pa_log_notice("Got dbus connection");
+        pa_log_debug("Got dbus connection");
 
     u->dbus_conn = conn;
     pa_assert_se(dbus_connection_register_object_path(pa_dbus_connection_get(conn), SOUND_PLAYER_OBJECT_PATH, &vtable, u));
@@ -559,7 +559,7 @@ static pa_hook_result_t sink_input_unlink_cb(pa_core *core, pa_sink_input *i, st
     pa_core_assert_ref(core);
     pa_sink_input_assert_ref(i);
 
-    pa_log_info("start sink_input_unlink_cb, i(%p, index:%u)", i, i->index);
+    pa_log_debug("start sink_input_unlink_cb, i(%p, index:%u)", i, i->index);
 
 #ifdef HAVE_DBUS
     PA_IDXSET_FOREACH(stream_idx, u->stream_idxs, idx) {
index a095937..6db0eb0 100644 (file)
@@ -272,7 +272,7 @@ static pa_hook_result_t select_proper_sink_or_source_hook_cb(pa_core *c, pa_stre
         conn_devices = pa_device_manager_get_device_list(u->device_manager);
         if (data->route_type == STREAM_ROUTE_TYPE_AUTO || data->route_type == STREAM_ROUTE_TYPE_AUTO_ALL) {
             PA_IDXSET_FOREACH(device_type, data->idx_avail_devices, idx) {
-                pa_log_info("[SELECT][AUTO(_ALL)] avail_device[%u] for this role[%-16s]: type[%-16s]", idx, data->stream_role, device_type);
+                pa_log_debug("[SELECT][AUTO(_ALL)] avail_device[%u] for this role[%-16s]: type[%-16s]", idx, data->stream_role, device_type);
                 if (cached_connected_devices[convert_device_type_str(device_type)][CONVERT_TO_DEVICE_DIRECTION(data->stream_type)-1] == 0)
                     continue;
                 PA_IDXSET_FOREACH(device, conn_devices, conn_idx) {
@@ -301,7 +301,7 @@ static pa_hook_result_t select_proper_sink_or_source_hook_cb(pa_core *c, pa_stre
             }
         } else if (data->route_type == STREAM_ROUTE_TYPE_AUTO_LAST_CONNECTED) {
             PA_IDXSET_FOREACH(device_type, data->idx_avail_devices, idx) {
-                pa_log_info("[SELECT][AUTO_LAST_CONN] avail_device[%u] for this role[%-16s]: type[%-16s]", idx, data->stream_role, device_type);
+                pa_log_debug("[SELECT][AUTO_LAST_CONN] avail_device[%u] for this role[%-16s]: type[%-16s]", idx, data->stream_role, device_type);
                 if (cached_connected_devices[convert_device_type_str(device_type)][CONVERT_TO_DEVICE_DIRECTION(data->stream_type)-1] == 0)
                     continue;
                 PA_IDXSET_FOREACH(device, conn_devices, conn_idx) {
@@ -658,7 +658,7 @@ static pa_hook_result_t route_change_hook_cb(pa_core *c, pa_stream_manager_hook_
         conn_devices = pa_device_manager_get_device_list(u->device_manager);
         if (data->route_type == STREAM_ROUTE_TYPE_AUTO || data->route_type == STREAM_ROUTE_TYPE_AUTO_ALL) {
             PA_IDXSET_FOREACH(device_type, data->idx_avail_devices, idx) {
-                pa_log_info("[ROUTE][AUTO(_ALL)] avail_device[%u] for this role[%-16s]: type[%-16s]", idx, route_info.role, device_type);
+                pa_log_debug("[ROUTE][AUTO(_ALL)] avail_device[%u] for this role[%-16s]: type[%-16s]", idx, route_info.role, device_type);
                 if (cached_connected_devices[convert_device_type_str(device_type)][CONVERT_TO_DEVICE_DIRECTION(data->stream_type)-1] == 0)
                     continue;
                 PA_IDXSET_FOREACH(device, conn_devices, conn_idx) {
@@ -794,7 +794,7 @@ static pa_hook_result_t route_change_hook_cb(pa_core *c, pa_stream_manager_hook_
             }
         } else if (data->route_type == STREAM_ROUTE_TYPE_AUTO_LAST_CONNECTED) {
             PA_IDXSET_FOREACH(device_type, data->idx_avail_devices, idx) {
-                pa_log_info("[ROUTE][AUTO_LAST_CONN] avail_device[%u] for this role[%-16s]: type[%-16s]", idx, data->stream_role, device_type);
+                pa_log_debug("[ROUTE][AUTO_LAST_CONN] avail_device[%u] for this role[%-16s]: type[%-16s]", idx, data->stream_role, device_type);
                 if (cached_connected_devices[convert_device_type_str(device_type)][CONVERT_TO_DEVICE_DIRECTION(data->stream_type)-1] == 0)
                     continue;
                 PA_IDXSET_FOREACH(device, conn_devices, conn_idx) {
index 1fa9adc..c591342 100644 (file)
@@ -1693,7 +1693,7 @@ static bool check_role_to_skip(pa_stream_manager *m, const char *role) {
     if ((s = pa_hashmap_get(m->stream_infos, role)))
         ret = false;
 
-    pa_log_info("role is [%s], skip(%d)", role, ret);
+    pa_log_debug("role is [%s], skip(%d)", role, ret);
 
     return ret;
 }
@@ -1902,7 +1902,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_info("update_the_highest_priority_stream(), stream_type(%d), role(%s), command(%d), is_new_data(%d)",
+    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);
     if (command == PROCESS_COMMAND_CHANGE_ROUTE_BY_STREAM_STARTED) {
         /* get focus status, route type */
@@ -2185,7 +2185,7 @@ static void fill_device_info_to_hook_data(pa_stream_manager *m, void *hook_data,
                     else
                         pa_log_warn("  -- failed to get the stream parent of idx(%u)", parent_idx);
                 } else
-                    pa_log_warn("  -- could not get the parent id of this stream, but keep going...");
+                    pa_log_debug("  -- could not get the parent id of this stream, but keep going...");
             }
         } else
             pa_log_error("  -- could not find (%s)", route_data->stream_role);
@@ -2341,7 +2341,7 @@ static void do_notify(pa_stream_manager *m, notify_command_type_t command, strea
                                                                              ((pa_source_output*)s)->source->outputs;
             fill_device_info_to_hook_data(m, &hook_call_route_data, command, type, s, is_new_data);
         } else {
-            pa_log_info("no stream for this type(%d), need to unset route", type);
+            pa_log_debug("no stream for this type(%d), need to unset route", type);
             hook_call_route_data.stream = NULL;
             hook_call_route_data.stream_type = type;
         }
@@ -2425,13 +2425,13 @@ static process_stream_result_t process_stream(pa_stream_manager *m, void *stream
                     if ((ch_str = pa_proplist_gets(req_format->plist, PA_PROP_FORMAT_CHANNELS)))
                         ((pa_sink_input_new_data*)stream)->sample_spec.channels = atoi(ch_str);
 
-                    pa_log_info("req rate(%s), req ch(%s), req format(%s)", rate_str, ch_str, format_str);
+                    pa_log_debug("req rate(%s), req ch(%s), req format(%s)", rate_str, ch_str, format_str);
 
                     /* set channel map if it is not set by client */
                     if (!((pa_sink_input_new_data*)stream)->channel_map_is_set) {
                         pa_channel_map_init_auto(&(((pa_sink_input_new_data*)stream)->channel_map),
                                                 ((pa_sink_input_new_data*)stream)->sample_spec.channels, PA_CHANNEL_MAP_ALSA);
-                        pa_log_info("set default channel_map: channels(%u)", ((pa_sink_input_new_data*)stream)->channel_map.channels);
+                        pa_log_debug("set default channel_map: channels(%u)", ((pa_sink_input_new_data*)stream)->channel_map.channels);
                         ((pa_sink_input_new_data*)stream)->channel_map_is_set = true;
                     }
                 }
@@ -2695,7 +2695,7 @@ static process_stream_result_t process_stream(pa_stream_manager *m, void *stream
     }
 
 FAILURE:
-    pa_log_info("<<< process_stream(%s): result(%d), stream(%p)", process_command_type_str[command], result, stream);
+    pa_log_debug("<<< process_stream(%s): result(%d), stream(%p)", process_command_type_str[command], result, stream);
     return result;
 }
 
@@ -2719,7 +2719,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_info("start sink_input_new_cb");
+    pa_log_debug("start sink_input_new_cb");
 
     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);
@@ -2733,7 +2733,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_info("start sink_input_put_cb, i(%p, index:%u)", i, i->index);
+    pa_log_debug("start sink_input_put_cb, i(%p, index:%u)", i, i->index);
 
     process_stream(m, i, STREAM_SINK_INPUT, PROCESS_COMMAND_ADD_PARENT_ID, false);
 
@@ -2744,7 +2744,8 @@ 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_info("start sink_input_unlink_cb, i(%p, index:%u)", i, i->index);
+    pa_log_debug("start sink_input_unlink_cb, i(%p, index:%u)", i, i->index);
+
     remove_sink_input_from_muted_streams(m, i);
     process_stream(m, i, STREAM_SINK_INPUT, PROCESS_COMMAND_REMOVE_PARENT_ID, false);
     process_stream(m, i, STREAM_SINK_INPUT, PROCESS_COMMAND_CHANGE_ROUTE_BY_STREAM_ENDED, false);
@@ -2759,7 +2760,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_info("start sink_input_state_changed_cb(), sink-input(%p), state(%d)", i, state);
+    pa_log_debug("start sink_input_state_changed_cb(), sink-input(%p), state(%d)", i, state);
 
     switch (state) {
     case PA_SINK_INPUT_CORKED: {
@@ -3102,7 +3103,7 @@ static void update_sink_or_source_as_device_change(stream_route_type_t stream_ro
     device_type = pa_device_manager_get_device_type(device);
 
     if (stream_route_type == STREAM_ROUTE_TYPE_AUTO || stream_route_type == STREAM_ROUTE_TYPE_AUTO_LAST_CONNECTED) {
-        pa_log_info("[SM][UPDATE_SINK_SOURCE][AUTO] route_type(%d), deivce_type(%s), is_connected(%d))",
+        pa_log_debug("[SM][UPDATE_SINK_SOURCE][AUTO] route_type(%d), deivce_type(%s), is_connected(%d))",
                      stream_route_type, device_type, is_connected);
         if (stream_type == STREAM_SINK_INPUT)
             sink = pa_device_manager_get_sink(device, DEVICE_ROLE_NORMAL);
@@ -3232,7 +3233,7 @@ static void update_sink_or_source_as_device_change(stream_route_type_t stream_ro
         }
 
     } else if (stream_route_type == STREAM_ROUTE_TYPE_MANUAL_EXT) {
-        pa_log_info("[SM][UPDATE_SINK_SOURCE][EXT] deivce_type(%s), is_connected(%d))", device_type, is_connected);
+        pa_log_debug("[SM][UPDATE_SINK_SOURCE][EXT] deivce_type(%s), is_connected(%d))", device_type, is_connected);
         if (!is_connected) {
             PA_IDXSET_FOREACH(s, streams, s_idx) { /* streams: source->outputs/sink->inputs */
                 if (!get_route_type(s, stream_type, false, &route_type) && route_type == stream_route_type) {
@@ -3279,7 +3280,7 @@ static void mute_sink_inputs_as_device_disconnection(pa_stream_manager *m, uint3
         pa_hashmap_put(m->muted_streams, (void*)event_id, muted_streams);
     } else {
         if (!(muted_streams = pa_hashmap_get(m->muted_streams, (void*)event_id))) {
-            pa_log_error("could not find muted_streams for event_id(%u)", event_id);
+            pa_log_debug("could not find muted_streams for event_id(%u)", event_id);
             return;
         }
         PA_IDXSET_FOREACH(i, muted_streams, s_idx) {