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>
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+
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);
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) {
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))
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);
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)));
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)));
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)));
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)));
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)));
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)));
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)));
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)));
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)));
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)));
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)));
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)));
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)));
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)));
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)));
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)));
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)));
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);
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)));
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);
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);
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);
}
}
} 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");
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;
}
}
*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;
/* 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;
}
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;
}
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);
}
}
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);
}
}
}
}
- 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;
/* 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;
}
} 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;
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;
}
}
/* 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;
}
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);
}
}
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;
/* 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;
}
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);
}
}
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;
/* 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;
}
/* 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;
}
}
}
- 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;
}
/* 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;
}
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);
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;
}
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);
/* 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;
}
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);
}
}
}
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;
}
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;
}
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;
}
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) {
}
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 {
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) {
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) {
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: {
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: {
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);
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) {
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) {
}
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;
}
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);
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);
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;
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:
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);
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);
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))
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);
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;
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:
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);
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);
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]);
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);
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);
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) {
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 */
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 */
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;
}
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)
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, *) */
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);
}
}
}