From: Sangchul Lee Date: Mon, 11 Jan 2016 00:32:32 +0000 (+0900) Subject: Add testcase for loopback and modify logs X-Git-Tag: submit/tizen/20160111.093338^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e09e49cfe0a347b7742057d9df2f2fa855366cda;p=platform%2Fcore%2Fapi%2Fsound-manager.git Add testcase for loopback and modify logs [Version] Release 0.3.40 [profile] Common [Issue Type] Feature enhancement Change-Id: Iccb3577c49d0f2739a037860c7e9c35fe291b3e2 --- diff --git a/packaging/capi-media-sound-manager.spec b/packaging/capi-media-sound-manager.spec index 4fc2765..8fff9a2 100755 --- a/packaging/capi-media-sound-manager.spec +++ b/packaging/capi-media-sound-manager.spec @@ -1,6 +1,6 @@ Name: capi-media-sound-manager Summary: Sound Manager library -Version: 0.3.39 +Version: 0.3.40 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/sound_manager_private.c b/src/sound_manager_private.c index 839968b..4db3b3c 100644 --- a/src/sound_manager_private.c +++ b/src/sound_manager_private.c @@ -189,7 +189,7 @@ int _convert_stream_type_for_internal(sound_stream_type_internal_e stream_type_e ret = MM_ERROR_SOUND_INTERNAL; break; } - LOGI("stream_type_for_internal[%s]", stream_type); + LOGI("stream_type_for_internal[%s]", *stream_type); return ret; } @@ -660,7 +660,7 @@ int _get_stream_conf_info(const char *stream_type, stream_conf_info_s *info) g_variant_unref(result); if (info->priority == -1) { - LOGE("could not find the info of stream type(%s)", stream_type); + LOGE("could not find the info of stream type(%s)", *stream_type); ret = MM_ERROR_SOUND_INTERNAL; } } @@ -687,6 +687,8 @@ int _set_manual_route_info(unsigned int index, manual_route_info_s *info) return MM_ERROR_SOUND_INTERNAL; } + 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")); for (i = 0; i < AVAIL_DEVICES_MAX; i++) { diff --git a/test/sound_manager_test.c b/test/sound_manager_test.c index fb7f723..7cb365d 100644 --- a/test/sound_manager_test.c +++ b/test/sound_manager_test.c @@ -390,7 +390,7 @@ static void displaymenu() else if (g_menu_state == CURRENT_STATUS_UNSET_DEVICE_INFO_CHANGED_CB) g_print("*** press enter to unset device information changed cb\n"); else if (g_menu_state == CURRENT_STATUS_CREATE_STREAM_INFO) - g_print("*** input stream type to create stream information\n(0:media, 1:system, 2:alarm, 3:notification, 4:emergency, 5:ringtone-call, 6:voice-call, 7:voip, 8:media-ext-only)\n"); + g_print("*** input stream type to create stream information\n(0:media, 1:system, 2:alarm, 3:notification, 4:emergency, 5:ringtone-call, 6:voice-call, 7:voip, 8:media-ext-only, 9:loopback)\n"); else if (g_menu_state == CURRENT_STATUS_ADD_DEVICE_FOR_STREAM_ROUTING) g_print("*** input device type to add (0:built-in mic, 1:built-in spk, 2:built-in rcv, 3:audio-jack, 4:bt)\n"); else if (g_menu_state == CURRENT_STATUS_REMOVE_DEVICE_FOR_STREAM_ROUTING) @@ -1026,11 +1026,16 @@ static void interpret(char *cmd) case 8: /* media only for external devices */ type = SOUND_STREAM_TYPE_MEDIA_EXTERNAL_ONLY; break; + case 9: /* loopback */ + type = SOUND_STREAM_TYPE_LOOPBACK; + break; default: type = SOUND_STREAM_TYPE_MEDIA; break; } - if (type == (int)SOUND_STREAM_TYPE_RINGTONE_CALL || type == (int)SOUND_STREAM_TYPE_VOICE_CALL) + if (type == (int)SOUND_STREAM_TYPE_RINGTONE_CALL || + type == (int)SOUND_STREAM_TYPE_VOICE_CALL || + type == (int)SOUND_STREAM_TYPE_LOOPBACK) ret = sound_manager_create_stream_information_internal(type, focus_callback, NULL, &g_stream_info_h); else ret = sound_manager_create_stream_information(type, focus_callback, NULL, &g_stream_info_h);