Remove sound_server legacies 57/257457/3
authorJaechul Lee <jcsing.lee@samsung.com>
Mon, 26 Apr 2021 07:37:30 +0000 (16:37 +0900)
committerJaechul Lee <jcsing.lee@samsung.com>
Tue, 27 Apr 2021 04:46:28 +0000 (13:46 +0900)
Change-Id: Ie6c3c07d86362233fc489d6b3286dda199bda106
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
common/mm_sound_dbus.c
focus_server/mm_sound_focus_server.c
include/mm_sound_client.h
include/mm_sound_intf.h
include/mm_sound_proxy.h
mm_sound.c
mm_sound_client.c
mm_sound_proxy.c
packaging/libmm-sound.notstrip [deleted file]
packaging/libmm-sound.spec
testsuite/mm_sound_testsuite_simple.c

index 0cf4130..db9c7ef 100644 (file)
@@ -21,11 +21,6 @@ struct dbus_path {
 };
 
 static const struct dbus_path g_paths[AUDIO_PROVIDER_MAX] = {
-       [AUDIO_PROVIDER_SOUND_SERVER] = {
-               .bus_name = "org.tizen.SoundServer",
-               .object = "/org/tizen/SoundServer1",
-               .interface = "org.tizen.SoundServer1"
-       },
        [AUDIO_PROVIDER_FOCUS_SERVER] = {
                .bus_name = "org.tizen.FocusServer",
                .object = "/org/tizen/FocusServer1",
index c1c6278..f6adf8f 100644 (file)
@@ -280,7 +280,6 @@ int main(int argc, char **argv)
 
        if (serveropt.startserver) {
                unlink(PA_READY); // remove pa_ready file after focus-server init.
-
                /* FIXME : This code is moved from sound_server temporally for TV migration
                                        As other modules which has dependancy on this file is cleared,
                                        this code will be removed */
@@ -294,7 +293,6 @@ int main(int argc, char **argv)
                _generate_ready_file(SOUND_SERVER_READY);
 #endif
                _generate_ready_file(FOCUS_SERVER_READY);
-
                _mainloop_run();
        }
 
index b628cc7..61bc2db 100644 (file)
@@ -76,10 +76,6 @@ int mm_sound_client_execute_focus_func_in_main_context(focus_idle_event_type_e t
 int mm_sound_client_add_ducking_state_changed_callback(mm_sound_ducking_state_changed_cb func, void* user_data, unsigned int *subs_id);
 int mm_sound_client_remove_ducking_state_changed_callback(unsigned int subs_id);
 
-int mm_sound_client_add_test_callback(mm_sound_test_cb func, void* user_data, unsigned int *subs_id);
-int mm_sound_client_remove_test_callback(unsigned int subs_id);
-int mm_sound_client_test(int a, int b, int* get);
-
 typedef void (*mm_sound_volume_changed_wrapper_cb)(const char *direction, const char *volume_type_str, int volume_level, void *userdata);
 typedef void (*mm_sound_device_connected_wrapper_cb)(int device_id, const char *device_type, int io_direction, int state,
                const char *name, int vendor_id, int product_id, bool is_running, int *stream_id, int stream_num, bool is_connected, void *userdata);
index c2d540c..6170ff6 100644 (file)
@@ -35,7 +35,6 @@
 
 /* audio service(methods, signals) providers */
 typedef enum audio_provider {
-       AUDIO_PROVIDER_SOUND_SERVER,
        AUDIO_PROVIDER_DEVICE_MANAGER,
        AUDIO_PROVIDER_STREAM_MANAGER,
        AUDIO_PROVIDER_FOCUS_SERVER,
index 55daf5b..f39a59d 100644 (file)
@@ -71,10 +71,6 @@ int mm_sound_proxy_deliver_focus(int src_index, int dst_index, mm_sound_focus_ty
 int mm_sound_proxy_add_focus_watch_callback(int index, mm_sound_focus_type_e type);
 int mm_sound_proxy_remove_focus_watch_callback(int index);
 
-int mm_sound_proxy_add_test_callback(mm_sound_test_cb func, void *userdata, mm_sound_proxy_userdata_free freefunc, unsigned *subs_id);
-int mm_sound_proxy_remove_test_callback(unsigned subs_id);
-int mm_sound_proxy_test(int a, int b, int* get);
-
 int mm_sound_proxy_initialize(void);
 int mm_sound_proxy_finalize(void);
 
index 1d9f443..96b98a2 100644 (file)
@@ -270,60 +270,6 @@ int mm_sound_control_filter(const char *stream_type, const char *filter_name, co
 ///////////////////////////////////
 
 EXPORT_API
-int mm_sound_test(int a, int b, int* getv)
-{
-       int ret = MM_ERROR_NONE;
-
-       debug_log("mm_sound_test enter");
-       if (!getv) {
-               debug_error("argu null");
-               return MM_ERROR_INVALID_ARGUMENT;
-       }
-       ret = mm_sound_client_test(a, b, getv);
-       if (ret < 0) {
-               debug_error("Can not mm sound test, ret = %x", ret);
-       }
-       debug_log("mm_sound_test leave");
-
-       return ret;
-}
-
-EXPORT_API
-int mm_sound_add_test_callback(mm_sound_test_cb func, void *user_data, unsigned int *subs_id)
-{
-       int ret = MM_ERROR_NONE;
-
-       debug_log("enter");
-       if (!func || !subs_id) {
-               debug_error("argument is not valid");
-               return MM_ERROR_INVALID_ARGUMENT;
-       }
-
-       ret = mm_sound_client_add_test_callback(func, user_data, subs_id);
-       if (ret < 0) {
-               debug_error("Can not add test callback, ret = %x", ret);
-       }
-       debug_log("leave");
-
-       return ret;
-}
-
-EXPORT_API
-int mm_sound_remove_test_callback(unsigned int subs_id)
-{
-       int ret = MM_ERROR_NONE;
-
-       debug_log("enter");
-       ret = mm_sound_client_remove_test_callback(subs_id);
-       if (ret < 0) {
-               debug_error("Can not remove test callback, ret = %x", ret);
-       }
-       debug_log("leave");
-
-       return ret;
-}
-
-EXPORT_API
 int mm_sound_add_ducking_state_changed_callback(mm_sound_ducking_state_changed_cb func, void *user_data, unsigned int *subs_id)
 {
        int ret = MM_ERROR_NONE;
index 9bcc86e..9097b76 100644 (file)
@@ -1465,39 +1465,3 @@ int mm_sound_client_remove_ducking_state_changed_callback(unsigned int subs_id)
        return ret;
 }
 
-int mm_sound_client_add_test_callback(mm_sound_test_cb func, void* user_data, unsigned int *subs_id)
-{
-       int ret = MM_ERROR_NONE;
-
-       debug_fenter();
-
-       ret = mm_sound_proxy_add_test_callback(func, user_data, g_free, subs_id);
-
-       debug_fleave();
-       return ret;
-}
-
-int mm_sound_client_remove_test_callback(unsigned int subs_id)
-{
-       int ret = MM_ERROR_NONE;
-       debug_fenter();
-
-       ret = mm_sound_proxy_remove_test_callback(subs_id);
-
-       debug_fleave();
-       return ret;
-}
-
-int mm_sound_client_test(int a, int b, int* getv)
-{
-       int ret = MM_ERROR_NONE;
-
-       debug_fenter();
-
-       ret = mm_sound_proxy_test(a, b, getv);
-       debug_log("%d * %d -> result : %d", a, b, *getv);
-
-       debug_fleave();
-
-       return ret;
-}
index 109b456..c70ac69 100644 (file)
@@ -261,71 +261,6 @@ static void simple_callback_data_free_func(void *data)
        }
 }
 
-int mm_sound_proxy_add_test_callback(mm_sound_test_cb func, void *userdata, mm_sound_proxy_userdata_free freefunc, unsigned *subs_id)
-{
-       int ret = MM_ERROR_NONE;
-       struct callback_data *cb_data;
-
-       debug_fenter();
-
-       CB_DATA_NEW(cb_data, func, userdata, freefunc);
-
-       if ((ret = mm_sound_dbus_signal_subscribe_to(AUDIO_PROVIDER_SOUND_SERVER, AUDIO_EVENT_TEST, dbus_callback, cb_data, simple_callback_data_free_func, &cb_data->subs_id)) != MM_ERROR_NONE)
-               debug_error("add test callback failed");
-       else
-               *subs_id = cb_data->subs_id;
-
-       debug_fleave();
-       return ret;
-}
-
-int mm_sound_proxy_remove_test_callback(unsigned subs_id)
-{
-       int ret = MM_ERROR_NONE;
-       debug_fenter();
-
-       if ((ret = mm_sound_dbus_signal_unsubscribe(subs_id)) != MM_ERROR_NONE)
-               debug_error("remove test callback failed");
-
-       debug_fleave();
-       return ret;
-}
-
-int mm_sound_proxy_test(int a, int b, int *get)
-{
-       int ret = MM_ERROR_NONE;
-       int reply = 0;
-       GVariant *params = NULL, *result = NULL;
-
-       debug_fenter();
-
-       if ((params = g_variant_new("(ii)", a, b)) == NULL) {
-               debug_error("Construct Param for method call failed");
-               return MM_ERROR_SOUND_INTERNAL;
-       }
-
-       if ((ret = mm_sound_dbus_method_call_to(AUDIO_PROVIDER_SOUND_SERVER, AUDIO_METHOD_TEST, params, &result)) != MM_ERROR_NONE) {
-               debug_error("dbus test call failed");
-               goto cleanup;
-       }
-
-       if (result) {
-               g_variant_get(result, "(i)",  &reply);
-               debug_log("reply : %d", reply);
-               *get = reply;
-       } else {
-               debug_error("reply null");
-               ret = MM_ERROR_SOUND_INTERNAL;
-       }
-
-cleanup:
-       if (result)
-               g_variant_unref(result);
-
-       debug_fleave();
-       return ret;
-}
-
 int mm_sound_proxy_is_stream_on_device(int stream_id, int device_id, bool *is_on)
 {
        int ret = MM_ERROR_NONE;
diff --git a/packaging/libmm-sound.notstrip b/packaging/libmm-sound.notstrip
deleted file mode 100644 (file)
index be7b7db..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/usr/bin/sound_server
index 440b606..d0b2d3e 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-sound
-Summary:    MMSound Package contains client lib and sound_server binary
-Version:    0.13.8
+Summary:    MMSound Package contains client lib and focus server binary
+Version:    0.13.9
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
@@ -13,8 +13,7 @@ Source5:    focus-server.path
 Source6:    focus-server.conf
 Requires: security-config
 %if "%{tizen_profile_name}" == "tv"
-Source7:    libmm-sound.notstrip
-Source8:    focus-server-tv.service
+Source7:    focus-server-tv.service
 %endif
 Requires(post): /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
@@ -99,7 +98,7 @@ rm -rf %{buildroot}
 mkdir -p %{buildroot}/etc/dbus-1/system.d/
 cp %{SOURCE6} %{buildroot}/etc/dbus-1/system.d/focus-server.conf
 %if "%{tizen_profile_name}" == "tv"
-cp %{SOURCE8} %{SOURCE4}
+cp %{SOURCE7} %{SOURCE4}
 %endif
 %if "%{tizen_profile_name}" != "tv"
 cp %{SOURCE1} %{buildroot}/etc/dbus-1/system.d/audio-aec.conf
@@ -108,10 +107,6 @@ cp %{SOURCE1} %{buildroot}/etc/dbus-1/system.d/audio-aec.conf
 mkdir -p %{buildroot}/usr/share/dbus-1/system-services/
 
 %make_install
-%if "%{tizen_profile_name}" == "tv"
-mkdir -p %{buildroot}%{_sysconfdir}/notstrip
-install -m0644 %{SOURCE7} %{buildroot}%{_sysconfdir}/notstrip/libmm-sound.notstrip
-%endif
 install -d %{buildroot}%{_unitdir}/paths.target.wants
 install -m0644 %{SOURCE4} %{buildroot}%{_unitdir}/
 install -m0644 %{SOURCE5} %{buildroot}%{_unitdir}/
@@ -137,9 +132,6 @@ cp %{SOURCE3} %{buildroot}/usr/share/dbus-1/system-services/org.tizen.AudioAec.s
 %{_libdir}/libmmfsoundcommon.so.*
 %{_libdir}/libmmfkeysound.so.*
 %{_libdir}/libmmfbootsound.so.*
-%if "%{tizen_profile_name}" == "tv"
-%{_sysconfdir}/notstrip/libmm-sound.notstrip
-%endif
 %{_unitdir}/paths.target.wants/focus-server.path
 %{_unitdir}/focus-server.service
 %{_unitdir}/focus-server.path
index d21cd28..3989f4f 100755 (executable)
@@ -519,38 +519,6 @@ static void interpret(char *cmd)
                        ret = mm_sound_play_keysound(KEYTONE_FILE, 0);
                        if (ret < 0)
                                debug_error("keysound play failed with 0x%x", ret);
-               } else if (strcmp(cmd, "dbus-m") == 0) {
-                       int ret = 0;
-                       int a = 3;
-                       int b = 4;
-                       int result_val = 0;
-                       g_print("dbus method test call\n");
-                       ret = mm_sound_test(a, b, &result_val);
-                       if (ret)
-                               g_print("failed to mm_sound_test(), ret[0x%x]\n", ret);
-                       else
-                               g_print("Got answer : %d\n", result_val);
-
-               } else if (strcmp(cmd, "dbus-a") == 0) {
-                       int ret = 0;
-                       int user_data = 3;
-                       g_print("dbus method test add callback\n");
-                       g_print("my testsuite pid : %u  tid : %ld\n", getpid(), pthread_self());
-                       ret = mm_sound_add_test_callback(mm_sound_test_cb1, (void *)user_data, &g_subs_id_test);
-                       if (ret)
-                               g_print("failed to mm_sound_add_test_callback(), ret[0x%x]\n", ret);
-                       else
-                               g_print("add test callback success\n");
-
-               } else if (strcmp(cmd, "dbus-r") == 0) {
-                       int ret = 0;
-                       g_print("dbus method test remove callback\n");
-                       ret = mm_sound_remove_test_callback(g_subs_id_test);
-                       if (ret)
-                               g_print("failed to mm_sound_remove_test_callback(), ret[0x%x]\n", ret);
-                       else
-                               g_print("remove test callback success\n");
-
                } else if (strncmp(cmd, "q", 1) == 0) {
                        unsigned int value = 100;
                        ret = mm_sound_volume_get_value(g_volume_type, &value);