SM_ARG_CHECK(max_level);
- LOGI(">> enter");
-
ret = _get_volume_max_level(DIRECTION_OUT_STR, SOUND_TYPE_MASTER_STR, &volume_level);
- if (ret == SOUND_MANAGER_ERROR_NONE)
+ if (ret == SOUND_MANAGER_ERROR_NONE) {
*max_level = (int)volume_level;
+ LOGI("max_level[%d]", *max_level);
+ }
return ret;
}
{
int ret = SOUND_MANAGER_ERROR_NONE;
- LOGI(">> enter");
+ LOGI("level[%d]", level);
ret = _set_volume_level(DIRECTION_OUT_STR, SOUND_TYPE_MASTER_STR, (unsigned int)level);
+ LOGI("ret[0x%x]", ret);
+
return ret;
}
SM_ARG_CHECK(level);
- LOGI(">> enter");
-
ret = _get_volume_level(DIRECTION_OUT_STR, SOUND_TYPE_MASTER_STR, &volume_level);
- if (ret == SOUND_MANAGER_ERROR_NONE)
+ if (ret == SOUND_MANAGER_ERROR_NONE) {
*level = (int)volume_level;
+ LOGI("level[%d]", *level);
+ }
+
+ LOGI("ret[0x%x]", ret);
return ret;
}
SM_ARG_CHECK(type < SOUND_TYPE_NUM);
+ LOGI("type[%d] mute[%d]", type, mute);
+
ret = mm_sound_set_mute(type, mute);
- LOGI("type=%d, mute=%d", type, mute);
return _convert_sound_manager_error_code(__func__, ret);
}
SM_ARG_CHECK(type < SOUND_TYPE_NUM);
SM_ARG_CHECK(muted);
+ LOGI("type[%d]", type);
+
ret = mm_sound_get_mute(type, muted);
- LOGI("type=%d, mute=%d", type, *muted);
+
+ LOGI("muted[%d]", *muted);
return _convert_sound_manager_error_code(__func__, ret);
}
SM_ARG_CHECK(max);
SM_ARG_CHECK(type < SOUND_TYPE_INTERNAL_NUM);
+ LOGI("type[%d]", type);
+
ret = _convert_sound_type_for_internal(type, &volume_type);
if (ret == SOUND_MANAGER_ERROR_NONE) {
ret = _get_volume_max_level(DIRECTION_OUT_STR, volume_type, &max_level);
- if (ret == SOUND_MANAGER_ERROR_NONE)
+ if (ret == SOUND_MANAGER_ERROR_NONE) {
*max = (int)max_level -1; /* actual volume step can be max step - 1 */
+ LOGI("volume_type[%s] max_level[%d]", volume_type, *max);
+ }
}
+ LOGI("ret[0x%x]", ret);
+
return ret;
}
SM_ARG_CHECK(type < SOUND_TYPE_INTERNAL_NUM);
SM_ARG_CHECK(level >= 0);
+ LOGI("type[%d] level[%d]", type, level);
+
ret = mm_sound_volume_set_value_internal(type, level);
- LOGI("type=%d, level=%d", type, level);
return _convert_sound_manager_error_code(__func__, ret);
}
SM_ARG_CHECK(type < SOUND_TYPE_INTERNAL_NUM);
SM_ARG_CHECK(level);
+ LOGI("type[%d]", type);
+
ret = mm_sound_volume_get_value_internal(type, &uvolume);
- if (ret == MM_ERROR_NONE)
+ if (ret == MM_ERROR_NONE) {
*level = uvolume;
-
- LOGI("type=%d, level=%d", type, *level);
+ LOGI("level[%d]", *level);
+ }
return _convert_sound_manager_error_code(__func__, ret);
}
if (ret == SOUND_MANAGER_ERROR_NONE) {
ret = _convert_sound_type_to_enum_for_internal((const char*)volume_type, type);
if (ret == SOUND_MANAGER_ERROR_NONE)
- LOGI("type=%d", *type);
+ LOGI("volume_type[%s] type[%d]", volume_type, *type);
}
+ LOGI("ret[0x%x]", ret);
+
return ret;
}
SM_ARG_CHECK(callback);
SM_ARG_CHECK(id);
+ LOGI("callback[%p] user_data[%p]", callback, user_data);
+
ret = mm_sound_add_volume_changed_callback_internal((mm_sound_volume_changed_cb_internal)callback, user_data, (unsigned int*)id);
+ LOGI("id[%d]", *id);
+
return _convert_sound_manager_error_code(__func__, ret);
}
SM_ARG_CHECK(id >= 0);
+ LOGI("id[%d]", id);
+
ret = mm_sound_remove_volume_changed_callback_internal(id);
return _convert_sound_manager_error_code(__func__, ret);
SM_ARG_CHECK(stream_info);
- LOGI(">> enter");
+ LOGI("stream_type[%d] callback[%p] user_data[%p]", stream_type, callback, user_data);
sound_stream_info_s *stream_h = malloc(sizeof(sound_stream_info_s));
if (!stream_h) {
if (ret == SOUND_MANAGER_ERROR_NONE) {
_set_focus_availability(stream_h);
ret = _make_pa_connection_and_register_focus(stream_h, callback, user_data);
- if (!ret) {
+ if (ret == SOUND_MANAGER_ERROR_NONE) {
*stream_info = (sound_stream_info_h)stream_h;
- LOGI("stream_h(%p), pa_index(%u), focus_id(%d), user_cb(%p), ret(0x%x)",
- stream_h, stream_h->pa_info.index, stream_h->focus_id, stream_h->user_cb, ret);
+ LOGI("stream_info[%p, type:%s] pa_index[%u] focus_id[%d]",
+ stream_info, stream_h->stream_type, stream_h->pa_info.index, stream_h->focus_id);
}
}
if (ret)
SM_SAFE_FREE(stream_h);
+ LOGI("ret[0x%x]", ret);
+
return ret;
}
SM_ARG_CHECK(stream_h);
SM_ARG_CHECK(name);
- LOGI(">> enter");
+ LOGI("stream_info[%p] name[%s] value[%d]", stream_info, name, value);
return _set_route_option(stream_h->pa_info.index, name, value);
}
{
SM_ARG_CHECK(stream_info);
- LOGI(">> enter");
+ LOGI("stream_info[%p] device_id[%d]", stream_info, device_id);
return _add_device_id_for_stream_routing((sound_stream_info_s*)stream_info, device_id);
}
{
SM_ARG_CHECK(stream_info);
- LOGI(">> enter");
+ LOGI("stream_info[%p] device_id[%d]", stream_info, device_id);
return _remove_device_id_for_stream_routing((sound_stream_info_s*)stream_info, device_id);
}
{
SM_ARG_CHECK(stream_info);
+ LOGI("stream_info[%p] io_direction[%d] device_id[%d]", stream_info, io_direction, device_id);
+
return _set_preferred_device_id((sound_stream_info_s*)stream_info, io_direction, device_id);
}
int ret = MM_ERROR_NONE;
MMSoundDevice_t device = NULL;
- LOGI(">> enter");
+ SM_ARG_CHECK(state);
+
+ LOGI("device_id[%d]", device_id);
if ((ret = mm_sound_get_device_by_id(device_id, &device)) != MM_ERROR_NONE) {
LOGE("failed to mm_sound_get_device_by_id()");
ret = mm_sound_get_device_state(device, (mm_sound_device_state_e*)state);
+ LOGI("state[%d]", *state);
+
mm_sound_free_device(device);
LEAVE:
return _convert_sound_manager_error_code(__func__, ret);
{
SM_ARG_CHECK(is_running);
- LOGI(">> enter");
+ LOGI("device_id[%d]", device_id);
return _is_device_running_by_id(device_id, is_running);
}
SM_ARG_CHECK(formats);
SM_ARG_CHECK(num_of_elems);
- LOGI(">> enter");
+ LOGI("device_id[%d]", device_id);
return _get_supported_sample_formats(device_id, formats, num_of_elems);
}
int sound_manager_set_sample_format_by_id(int device_id, sound_sample_format_e format)
{
- LOGI(">> enter");
+ LOGI("device_id[%d] format[%d]", device_id, format);
return _set_sample_format(device_id, format);
}
{
SM_ARG_CHECK(format);
- LOGI(">> enter");
+ LOGI("device_id[%d]", device_id);
return _get_sample_format(device_id, format);
}
SM_ARG_CHECK(rates);
SM_ARG_CHECK(num_of_elems);
- LOGI(">> enter");
+ LOGI("device_id[%d]", device_id);
return _get_supported_sample_rates(device_id, rates, num_of_elems);
}
int sound_manager_set_sample_rate_by_id(int device_id, sound_sample_rate_e rate)
{
- LOGI(">> enter");
+ LOGI("device_id[%d] rate[%d]", device_id, rate);
return _set_sample_rate(device_id, rate);
}
{
SM_ARG_CHECK(rate);
- LOGI(">> enter");
+ LOGI("device_id[%d]", device_id);
return _get_sample_rate(device_id, rate);
}
int sound_manager_set_avoid_resampling_by_id(int device_id, bool enable)
{
- LOGI(">> enter");
+ LOGI("device_id[%d] enable[%d]", device_id, enable);
return _set_avoid_resampling(device_id, enable);
}
{
SM_ARG_CHECK(enabled);
- LOGI(">> enter");
+ LOGI("device_id[%d]", device_id);
return _get_avoid_resampling(device_id, enabled);
}
int sound_manager_set_media_stream_only_by_id(int device_id, bool enable)
{
- LOGI(">> enter");
+ LOGI("device_id[%d] enable[%d]", device_id, enable);
return _set_media_stream_only(device_id, enable);
}
{
SM_ARG_CHECK(enabled);
- LOGI(">> enter");
+ LOGI("device_id[%d]", device_id);
return _get_media_stream_only(device_id, enabled);
}
sound_stream_info_s *stream_h = (sound_stream_info_s*)stream_info;
SM_ARG_CHECK(stream_h);
+ SM_ARG_CHECK(virtual_stream);
- LOGI(">> enter");
+ LOGI("stream_info[%p, type:%s]", stream_info, stream_h->stream_type);
SM_ENTER_CRITICAL_SECTION_WITH_RETURN(&stream_h->vstream_mutex, SOUND_MANAGER_ERROR_INTERNAL);
if (stream_h->vstream) {
- LOGE("virtual stream was already created. stream_h(%p), vstream(%p)", stream_h, stream_h->vstream);
+ LOGE("virtual stream was already created. vstream(%p)", stream_h->vstream);
SM_LEAVE_CRITICAL_SECTION(&stream_h->vstream_mutex);
return SOUND_MANAGER_ERROR_INVALID_OPERATION;
}
ret = _create_virtual_stream(stream_h, &vstream_h);
- if (ret == SOUND_MANAGER_ERROR_NONE)
+ if (ret == SOUND_MANAGER_ERROR_NONE) {
*virtual_stream = stream_h->vstream = (virtual_sound_stream_h)vstream_h;
+ LOGI("virtual_stream[%p]", *virtual_stream);
+ }
SM_LEAVE_CRITICAL_SECTION(&stream_h->vstream_mutex);
+ LOGI("ret[0x%x]", ret);
+
return ret;
}
SM_ARG_CHECK(vstream_h);
SM_ARG_CHECK(vstream_h->stream_info);
- LOGI(">> enter");
+ LOGI("virtual_stream[%p] stream_type[%s]", virtual_stream, vstream_h->stream_info->stream_type);
vstream_mutex = &vstream_h->stream_info->vstream_mutex;
SM_LEAVE_CRITICAL_SECTION(vstream_mutex);
+ LOGI("ret[0x%x]", ret);
+
return ret;
}
SM_ARG_CHECK(vstream_h);
SM_ARG_CHECK(vstream_h->stream_info);
- LOGI(">> enter");
+ LOGI("virtual_stream[%p] stream_type[%s]", virtual_stream, vstream_h->stream_info->stream_type);
vstream_mutex = &vstream_h->stream_info->vstream_mutex;
SM_LEAVE_CRITICAL_SECTION(vstream_mutex);
+ LOGI("ret[0x%x]", ret);
+
return ret;
}
SM_ARG_CHECK(vstream_h);
SM_ARG_CHECK(vstream_h->stream_info);
- LOGI(">> enter");
+ LOGI("virtual_stream[%p] stream_type[%s]", virtual_stream, vstream_h->stream_info->stream_type);
vstream_mutex = &vstream_h->stream_info->vstream_mutex;
SM_LEAVE_CRITICAL_SECTION(vstream_mutex);
+ LOGI("ret[0x%x]", ret);
+
return ret;
}
SM_ARG_CHECK(vstream_h);
SM_ARG_CHECK(vstream_h->stream_info);
- LOGI(">> enter");
+ LOGI("virtual_stream[%p] ratio[%lf]", virtual_stream, ratio);
vstream_mutex = &vstream_h->stream_info->vstream_mutex;
SM_LEAVE_CRITICAL_SECTION(vstream_mutex);
+ LOGI("ret[0x%x]", ret);
+
return ret;
}
char *filter_str = NULL;
char *filter_params_str = NULL;
- LOGI(">> enter");
+ LOGI("stream_type[%d] filter[%d]", stream_type, filter);
if (stream_type != SOUND_STREAM_TYPE_MEDIA) {
LOGE("Not supported stream type(%d)", stream_type);
int ret = SOUND_MANAGER_ERROR_NONE;
char *stream_type_str = NULL;
- LOGI(">> enter");
+ LOGI("stream_type[%d]", stream_type);
if ((ret = _convert_stream_type(stream_type, &stream_type_str)) != SOUND_MANAGER_ERROR_NONE)
return ret;
- LOGI("stream_type[%s]", stream_type_str);
-
return _convert_sound_manager_error_code(__func__, mm_sound_unset_filter(stream_type_str));
}
char *filter_params_str = NULL;
char *control_str = NULL;
- LOGI(">> enter");
-
if (stream_type != SOUND_STREAM_TYPE_MEDIA) {
LOGE("Not supported stream type(%d)", stream_type);
return SOUND_MANAGER_ERROR_NOT_SUPPORTED;
}
+ LOGI("stream_type[%d] filter[%d] preset[%d]", stream_type, filter, preset);
+
if ((ret = _check_valid_filter_preset(filter, preset)) != SOUND_MANAGER_ERROR_NONE)
return ret;
if ((ret = _convert_stream_type(stream_type, &stream_type_str)) != SOUND_MANAGER_ERROR_NONE)
SM_ARG_CHECK(device);
SM_ARG_CHECK(vendor_id);
- LOGI(">> enter");
+ LOGI("device[%p]", device);
if ((ret = mm_sound_get_device_type(device, &type)) != MM_ERROR_NONE)
return _convert_sound_manager_error_code(__func__, ret);
ret = mm_sound_get_device_vendor_id(device, vendor_id);
+ LOGI("vendor_id[%d]", *vendor_id);
+
return _convert_sound_manager_error_code(__func__, ret);
}
SM_ARG_CHECK(device);
SM_ARG_CHECK(product_id);
- LOGI(">> enter");
+ LOGI("device[%p]", device);
if ((ret = mm_sound_get_device_type(device, &type)) != MM_ERROR_NONE)
return _convert_sound_manager_error_code(__func__, ret);
ret = mm_sound_get_device_product_id(device, product_id);
+ LOGI("product_id[%d]", *product_id);
+
return _convert_sound_manager_error_code(__func__, ret);
}
SM_ARG_CHECK(stream_h);
SM_ARG_CHECK(is_on);
- LOGI(">> enter");
+ LOGI("stream_info[%p, type:%s] device_id[%d]", stream_info, stream_h->stream_type, device_id);
ret = mm_sound_is_stream_on_device_by_id(stream_h->pa_info.index, device_id, is_on);
+ LOGI("is_on[%d]", *is_on);
+
return _convert_sound_manager_error_code(__func__, ret);
}
int sound_manager_set_acm_master_mode(bool enable)
{
- LOGI(">> enter");
+ LOGI("enable[%d]", enable);
return _set_acm_master_mode(enable);
}
int sound_manager_get_latest_stream_pid(int stream_type, unsigned int *pid)
{
- SM_ARG_CHECK(pid);
SM_ARG_CHECK(stream_type >= 0);
+ SM_ARG_CHECK(pid);
- LOGI(">> enter, stream_type(0x%x)", stream_type);
+ LOGI("stream_type[0x%x]", stream_type);
return _get_latest_stream_pid(stream_type, pid);
}
int sound_manager_set_stream_preemptive_device(sound_stream_type_e stream_type, sound_device_io_direction_e io_direction, int device_id)
{
+ LOGI("stream_type[%d] io_direction[%d] device_id[%d]", stream_type, io_direction, device_id);
+
return _set_preemptive_device(stream_type, io_direction, device_id);
}
{
SM_ARG_CHECK(in_device_id || out_device_id);
+ LOGI("stream_type[%d]", stream_type);
+
return _get_preemptive_device(stream_type, in_device_id, out_device_id);
}