return SOUND_MANAGER_ERROR_INVALID_PARAMETER;
}
+ LOGI("device_type[%s, %d]", device_type_str, *device_type);
+
return SOUND_MANAGER_ERROR_NONE;
}
//LCOV_EXCL_STOP
//LCOV_EXCL_STOP
}
+ LOGI("device_type[%d]", *sound_device_type);
+
return SOUND_MANAGER_ERROR_NONE;
}
-int _convert_device_io_direction(mm_sound_device_io_direction_e io_direction, sound_device_io_direction_e *sound_io_direction)
+int _convert_device_io_direction(mm_sound_device_io_direction_e io_direction, sound_device_io_direction_e *device_io_direction)
{
- SM_ARG_CHECK(sound_io_direction);
+ SM_ARG_CHECK(device_io_direction);
switch (io_direction) {
case MM_SOUND_DEVICE_IO_DIRECTION_IN:
- *sound_io_direction = SOUND_DEVICE_IO_DIRECTION_IN;
+ *device_io_direction = SOUND_DEVICE_IO_DIRECTION_IN;
break;
case MM_SOUND_DEVICE_IO_DIRECTION_OUT:
- *sound_io_direction = SOUND_DEVICE_IO_DIRECTION_OUT;
+ *device_io_direction = SOUND_DEVICE_IO_DIRECTION_OUT;
break;
case MM_SOUND_DEVICE_IO_DIRECTION_BOTH:
- *sound_io_direction = SOUND_DEVICE_IO_DIRECTION_BOTH;
+ *device_io_direction = SOUND_DEVICE_IO_DIRECTION_BOTH;
break;
}
+ LOGI("device_io_direction[%d]", *device_io_direction);
+
return SOUND_MANAGER_ERROR_NONE;
}
//LCOV_EXCL_START
return SOUND_MANAGER_ERROR_INVALID_PARAMETER;
}
+ LOGI("format[%s, %d]", format_str, *format);
+
return SOUND_MANAGER_ERROR_NONE;
}
return SOUND_MANAGER_ERROR_INVALID_PARAMETER;
}
+ LOGI("rate[%d, %d]", rate, *rate_e);
+
return SOUND_MANAGER_ERROR_NONE;
}
//LCOV_EXCL_STOP
sound_stream_focus_change_reason_e change_reason = SOUND_STREAM_FOCUS_CHANGED_BY_MEDIA;
_focus_watch_info_s *watch_info;
+ LOGI(">> enter");
+
if (!user_data) {
LOGE("user_data is null");
goto LEAVE;
LEAVE:
LOGI("<< leave");
+
return;
}
//LCOV_EXCL_STOP
state = pa_context_get_state(c);
- LOGI("[%p] context state = [%d]", pa_info, state);
+ LOGI("pa_info[%p] context state[%d]", pa_info, state);
if (state == PA_CONTEXT_FAILED) {
pa_info->is_disconnected = true;
assert(s);
state = pa_stream_get_state(s);
- LOGI("[%p] stream [%d] state = [%d]", vstream_h, pa_stream_get_index(s), state);
+ LOGI("vstream_h[%p] index[%d] state[%d]", vstream_h, pa_stream_get_index(s), state);
switch (state) {
case PA_STREAM_READY:
if ((ret = __get_dbus_connection(&conn)) != SOUND_MANAGER_ERROR_NONE)
return ret;
- LOGI("stream info index(%u)", index);
+ LOGI("index[%u]", index);
builder_for_in_devices = g_variant_builder_new(G_VARIANT_TYPE("au"));
builder_for_out_devices = g_variant_builder_new(G_VARIANT_TYPE("au"));
}
g_variant_get(result, "(&s)", &dbus_ret);
- LOGI("g_dbus_connection_call_sync() success, method return value is (%s)", dbus_ret);
+
if (strncmp("STREAM_MANAGER_RETURN_OK", dbus_ret, strlen(dbus_ret)))
ret = SOUND_MANAGER_ERROR_INTERNAL;
else
info->is_set = true;
+ LOGI("dbus_ret[%s] ret[0x%x]", dbus_ret, ret);
+
LEAVE:
g_variant_unref(result);
if (builder_for_in_devices)
if ((ret = __get_dbus_connection(&conn)) != SOUND_MANAGER_ERROR_NONE)
return ret;
- LOGI("[OPTION] %s(%d)", name, value);
+ LOGI("index[%u] name[%s] value[%d]", index, name, value);
result = g_dbus_connection_call_sync(conn,
PA_BUS_NAME,
}
g_variant_get(result, "(&s)", &dbus_ret);
- LOGI("g_dbus_connection_call_sync() success, method return value is (%s)", dbus_ret);
+
if (!strncmp("STREAM_MANAGER_RETURN_ERROR_NO_STREAM", dbus_ret, strlen(dbus_ret)))
ret = SOUND_MANAGER_ERROR_INVALID_STATE;
else if (strncmp("STREAM_MANAGER_RETURN_OK", dbus_ret, strlen(dbus_ret)))
ret = SOUND_MANAGER_ERROR_INTERNAL;
+ LOGI("dbus_ret[%s] ret[0x%x]", dbus_ret, ret);
+
LEAVE:
g_variant_unref(result);
g_object_unref(conn);
}
g_variant_get(result, "(u&s)", max_level, &dbus_ret);
- LOGI("g_dbus_connection_call_sync() success, method return value is (%u, %s)", *max_level, dbus_ret);
+
if (strncmp("STREAM_MANAGER_RETURN_OK", dbus_ret, strlen(dbus_ret)))
ret = SOUND_MANAGER_ERROR_INTERNAL;//LCOV_EXCL_LINE
+ else
+ LOGI("max_level[%u]", *max_level);
+
+ LOGI("dbus_ret[%s] ret[0x%x]", dbus_ret, ret);
LEAVE:
g_variant_unref(result);
}
g_variant_get(result, "(u&s)", level, &dbus_ret);
- LOGI("g_dbus_connection_call_sync() success, method return value is (%u, %s)", *level, dbus_ret);
+
if (strncmp("STREAM_MANAGER_RETURN_OK", dbus_ret, strlen(dbus_ret)))
ret = SOUND_MANAGER_ERROR_INTERNAL;
+ else
+ LOGI("level[%u]", *level);
+
+ LOGI("dbus_ret[%s] ret[0x%x]", dbus_ret, ret);
LEAVE:
g_variant_unref(result);
}
g_variant_get(result, "(&s)", &dbus_ret);
- LOGI("g_dbus_connection_call_sync() success, method return value is (%s)", dbus_ret);
+
if (strncmp("STREAM_MANAGER_RETURN_OK", dbus_ret, strlen(dbus_ret)))
ret = SOUND_MANAGER_ERROR_INTERNAL;
else {
LOGE("vconf_set_int(%s) failed..ret[%d]\n", volume_path, vret);
}
+ LOGI("dbus_ret[%s] ret[0x%x]", dbus_ret, ret);
+
LEAVE:
g_variant_unref(result);
g_object_unref(conn);
}
g_variant_get(result, "(&s&s)", &dbus_volume_type, &dbus_ret);
- LOGI("g_dbus_connection_call_sync() success, method return value is (%s, %s)", dbus_volume_type, dbus_ret);
+
if (!strncmp("STREAM_MANAGER_RETURN_OK", dbus_ret, strlen(dbus_ret))) {
ret = SOUND_MANAGER_ERROR_NONE;//LCOV_EXCL_LINE
*volume_type = strdup(dbus_volume_type);//LCOV_EXCL_LINE
+ LOGI("volume_type[%s]", *volume_type);
} else if (!strncmp("STREAM_MANAGER_RETURN_ERROR_NO_STREAM", dbus_ret, strlen(dbus_ret))) {
ret = SOUND_MANAGER_ERROR_NO_PLAYING_SOUND;
} else {
ret = SOUND_MANAGER_ERROR_INTERNAL;//LCOV_EXCL_LINE
}
+ LOGI("dbus_ret[%s] ret[0x%x]", dbus_ret, ret);
+
LEAVE:
g_variant_unref(result);
g_object_unref(conn);
}
g_variant_get(result, "(&s&s)", &dbus_device_type, &dbus_ret);
- LOGI("g_dbus_connection_call_sync() success, method return value is (%s, %s)", dbus_device_type, dbus_ret);
+
if (!strncmp("STREAM_MANAGER_RETURN_OK", dbus_ret, strlen(dbus_ret))) {
if (_convert_device_type_str_to_enum(dbus_device_type, device_type) < 0)
ret = SOUND_MANAGER_ERROR_INTERNAL;//LCOV_EXCL_LINE
ret = SOUND_MANAGER_ERROR_INTERNAL;
}
+ LOGI("dbus_ret[%s] ret[0x%x]", dbus_ret, ret);
+
LEAVE:
g_variant_unref(result);
g_object_unref(conn);
} else {
g_variant_get(result, "(b)", &_is_running);
*is_running = (bool)_is_running;
- LOGI("device(id:%d) is (%s)", device_id, *is_running ? "Running" : "Not running");
+ LOGI("device_id[%d] is [%s]", device_id, *is_running ? "Running" : "Not running");
}
LEAVE:
}
while (g_variant_iter_loop(iter, "&s", &format_str)) {
- if (_convert_sample_format_str_to_enum((const char *)format_str, &format))
+ if (_convert_sample_format_str_to_enum((const char *)format_str, &format) != SOUND_MANAGER_ERROR_NONE)
continue;
- LOGI("%s(enum:%u) is supported", format_str, format);
elem_num++;
sm_formats[elem_num - 1] = format;
}
*num = elem_num;
+ LOGI("num[%d]", *num);
+
LEAVE:
g_variant_iter_free(iter);
g_variant_unref(result);
goto LEAVE;
}
g_variant_get(result, "(&s)", &format_str);
- if (!(ret = _convert_sample_format_str_to_enum((const char *)format_str, &format_e)))
+ if ((ret = _convert_sample_format_str_to_enum((const char *)format_str, &format_e)) == SOUND_MANAGER_ERROR_NONE)
*format = format_e;
g_variant_unref(result);
}
while (g_variant_iter_loop(iter, "u", &rate)) {
- if (_convert_sample_rate_to_enum(rate, &rate_e))
+ if (_convert_sample_rate_to_enum(rate, &rate_e) != SOUND_MANAGER_ERROR_NONE)
continue;
- LOGI("%u(enum:%u) is supported", rate, rate_e);
elem_num++;
sm_rates[elem_num - 1] = rate_e;
}
*num = elem_num;
+ LOGI("num[%d]", *num);
+
LEAVE:
g_variant_iter_free(iter);
g_variant_unref(result);
goto LEAVE;
}
g_variant_get(result, "(u)", &_rate);
- if (!(ret = _convert_sample_rate_to_enum(_rate, &rate_e)))
+ if ((ret = _convert_sample_rate_to_enum(_rate, &rate_e)) == SOUND_MANAGER_ERROR_NONE)
*rate = rate_e;
g_variant_unref(result);
*enabled = (bool)_enabled;
g_variant_unref(result);
+ LOGI("enabled[%d]", *enabled);
+
LEAVE:
g_object_unref(conn);
g_variant_unref(result);
+ LOGI("enabled[%d]", *enabled);
+
LEAVE:
g_object_unref(conn);
g_error_free(err);
goto LEAVE;
}
+
g_variant_get(result, "(&s)", &dbus_ret);
- LOGI("g_dbus_connection_call_sync() success, method return value is (%s)", dbus_ret);
+
if (!strncmp("STREAM_MANAGER_RETURN_ERROR_INVALID_ARGUMENT", dbus_ret, strlen(dbus_ret)))
ret = SOUND_MANAGER_ERROR_INVALID_PARAMETER;
else if (!strncmp("STREAM_MANAGER_RETURN_ERROR_NO_STREAM", dbus_ret, strlen(dbus_ret)))
else if (strncmp("STREAM_MANAGER_RETURN_OK", dbus_ret, strlen(dbus_ret)))
ret = SOUND_MANAGER_ERROR_INTERNAL;
+ LOGI("dbus_ret[%s] ret[0x%x]", dbus_ret, ret);
+
LEAVE:
g_variant_unref(result);
g_object_unref(conn);
g_variant_get(result, "(&s)", &dbus_ret);
- LOGI("g_dbus_connection_call_sync() success, method return value is (%s)", dbus_ret);
-
if (!strncmp("STREAM_MANAGER_RETURN_ERROR_INVALID_STATE", dbus_ret, strlen(dbus_ret)))
ret = SOUND_MANAGER_ERROR_INVALID_STATE;
else if (strncmp("STREAM_MANAGER_RETURN_OK", dbus_ret, strlen(dbus_ret)))
ret = SOUND_MANAGER_ERROR_INTERNAL;
+ LOGI("dbus_ret[%s] ret[0x%x]", dbus_ret, ret);
+
LEAVE:
g_variant_unref(result);
g_object_unref(conn);
g_variant_get(result, "(b&s)", &_is_ducked, &dbus_ret);
- LOGI("dbus return value is (%s)", dbus_ret);
-
if (!strncmp("STREAM_MANAGER_RETURN_OK", dbus_ret, strlen(dbus_ret))) {
*is_ducked = (bool)_is_ducked;
- LOGI("is_ducked %u", *is_ducked);
+ LOGI("is_ducked[%d]", *is_ducked);
} else {
ret = SOUND_MANAGER_ERROR_INTERNAL;
}
- if (strncmp("STREAM_MANAGER_RETURN_OK", dbus_ret, strlen(dbus_ret)))
- ret = SOUND_MANAGER_ERROR_INTERNAL;
+ LOGI("dbus_ret[%s] ret[0x%x]", dbus_ret, ret);
LEAVE:
g_variant_unref(result);
LOGI("Preferred device(id:%d, direction:%s) is set to PA context(%u)", device_id, direction_str, stream_info->pa_info.index);
g_variant_get(result, "(&s)", &dbus_ret);
- LOGI("g_dbus_connection_call_sync() success, method return value is (%s)", dbus_ret);
+
if (!strncmp("STREAM_MANAGER_RETURN_ERROR_DEVICE_NOT_FOUND", dbus_ret, strlen(dbus_ret)))
ret = SOUND_MANAGER_ERROR_INVALID_PARAMETER;
else if (!strncmp("STREAM_MANAGER_RETURN_POLICY", dbus_ret, strlen(dbus_ret)))
else if (strncmp("STREAM_MANAGER_RETURN_OK", dbus_ret, strlen(dbus_ret)))
ret = SOUND_MANAGER_ERROR_INTERNAL;
+ LOGI("dbus_ret[%s] ret[0x%x]", dbus_ret, ret);
+
g_variant_unref(result);
if (ret)
goto LEAVE;
g_variant_get(result, "(uu&s)", &_in_device_id, &_out_device_id, &dbus_ret);
- LOGI("dbus return value is (%s)", dbus_ret);
-
if (!strncmp("STREAM_MANAGER_RETURN_OK", dbus_ret, strlen(dbus_ret))) {
if (in_device_id) {
if (stream_info->preferred_device_info.in != _in_device_id) {
ret = SOUND_MANAGER_ERROR_INTERNAL;
}
+ LOGI("dbus_ret[%s] ret[0x%x]", dbus_ret, ret);
+
LEAVE:
g_variant_unref(result);
g_object_unref(conn);
LOGI("Preemptive device(id:%d, direction:%s) is set", device_id, direction_str);
g_variant_get(result, "(&s)", &dbus_ret);
- LOGI("g_dbus_connection_call_sync() success, method return value is (%s)", dbus_ret);
+
if (!strncmp("STREAM_MANAGER_RETURN_INVALID_ARGUMENT", dbus_ret, strlen(dbus_ret)))
ret = SOUND_MANAGER_ERROR_INVALID_PARAMETER;
else if (!strncmp("STREAM_MANAGER_RETURN_POLICY", dbus_ret, strlen(dbus_ret)))
else if (strncmp("STREAM_MANAGER_RETURN_OK", dbus_ret, strlen(dbus_ret)))
ret = SOUND_MANAGER_ERROR_INTERNAL;
+ LOGI("dbus_ret[%s] ret[0x%x]", dbus_ret, ret);
+
g_variant_unref(result);
if (ret)
goto LEAVE;
}
g_variant_get(result, "(uu&s)", &_in_device_id, &_out_device_id, &dbus_ret);
- LOGI("dbus return value is (%s)", dbus_ret);
-
if (!strncmp("STREAM_MANAGER_RETURN_OK", dbus_ret, strlen(dbus_ret))) {
if (in_device_id) {
*in_device_id = _in_device_id;
ret = SOUND_MANAGER_ERROR_INTERNAL;
}
+ LOGI("dbus_ret[%s] ret[0x%x]", dbus_ret, ret);
+
LEAVE:
g_variant_unref(result);
g_object_unref(conn);
g_variant_get(result, "(u&s)", &_pid, &dbus_ret);
- LOGI("dbus return value is (%s)", dbus_ret);
-
if (!strncmp("STREAM_MANAGER_RETURN_OK", dbus_ret, strlen(dbus_ret)))
*pid = _pid;
else if (!strncmp("STREAM_MANAGER_RETURN_ERROR_NO_STREAM", dbus_ret, strlen(dbus_ret)))
else
ret = SOUND_MANAGER_ERROR_INTERNAL;
+ LOGI("dbus_ret[%s] ret[0x%x]", dbus_ret, ret);
+
LEAVE:
if (builder_for_stream_types)
g_variant_builder_unref(builder_for_stream_types);