Add testcase for loopback and modify logs 17/56517/2 accepted/tizen/mobile/20160111.225822 accepted/tizen/tv/20160111.225851 accepted/tizen/wearable/20160111.225925 submit/tizen/20160111.093338
authorSangchul Lee <sc11.lee@samsung.com>
Mon, 11 Jan 2016 00:32:32 +0000 (09:32 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Mon, 11 Jan 2016 09:07:41 +0000 (18:07 +0900)
[Version] Release 0.3.40
[profile] Common
[Issue Type] Feature enhancement

Change-Id: Iccb3577c49d0f2739a037860c7e9c35fe291b3e2

packaging/capi-media-sound-manager.spec
src/sound_manager_private.c
test/sound_manager_test.c

index 4fc27650ba251fbd57bcb650b0fc94bf471054c7..8fff9a2886f19cbb7dd8ca3be2f4dccab0f7a336 100755 (executable)
@@ -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
index 839968bdb7382775fc805f9ad05ae5f1edafdfc8..4db3b3cdaa0e0d0d4e06070dbd117403538333e3 100644 (file)
@@ -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++) {
index fb7f723d13c5053d53acbf675343a0bd9ba29423..7cb365d8ef356483656b73f8d544b8b10cc4318e 100644 (file)
@@ -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);