Move volume vconf set to pulseaudio 19/136919/2 accepted/tizen/unified/20170717.021038 submit/tizen/20170713.021221
authorSeungbae Shin <seungbae.shin@samsung.com>
Mon, 3 Jul 2017 12:23:54 +0000 (21:23 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Mon, 10 Jul 2017 05:47:04 +0000 (14:47 +0900)
[Version] 0.11.11
[Profile] Common
[Issue Type] Requirement

Change-Id: I6f8be5668a6e32ad7f498ea6c8c5add6cb45879c

common/mm_sound_utils.c
include/mm_sound_utils.h
mm_sound.c
packaging/libmm-sound.spec

index cc381cf..01a63c1 100644 (file)
@@ -87,28 +87,6 @@ int mm_sound_util_volume_get_value_by_type(volume_type_t type, unsigned int *val
 }
 
 EXPORT_API
-int mm_sound_util_volume_set_value_by_type(volume_type_t type, unsigned int value)
-{
-       int ret = MM_ERROR_NONE;
-       int vconf_value = 0;
-
-       vconf_value = value;
-       debug_log("volume_set_value %s %d",  g_volume_str[type], value);
-
-       /* Set volume value to VCONF */
-       if ((ret = vconf_set_int(g_volume_vconf[type], vconf_value)) != 0) {
-               int vconf_errno;
-               vconf_errno = vconf_get_ext_errno();
-               debug_error ("vconf_set_int(%s) failed..ret[%d] errno[%d]\n", g_volume_vconf[type], ret, vconf_errno);
-               if (vconf_errno == VCONF_ERROR_FILE_PERM)
-                       return MM_ERROR_SOUND_PERMISSION_DENIED;
-               else
-                       return MM_ERROR_SOUND_INTERNAL;
-       }
-       return ret;
-}
-
-EXPORT_API
 bool mm_sound_util_is_process_alive(pid_t pid)
 {
        gchar *tmp = NULL;
index 714c29d..c29a4d2 100644 (file)
@@ -36,7 +36,6 @@
 #endif
 
 int mm_sound_util_volume_get_value_by_type(volume_type_t type, unsigned int *value);
-int mm_sound_util_volume_set_value_by_type(volume_type_t type, unsigned int value);
 
 bool mm_sound_util_is_process_alive(pid_t pid);
 
index 0ed72c2..3f86b9b 100644 (file)
@@ -157,13 +157,10 @@ int mm_sound_volume_set_value(volume_type_t volume_type, const unsigned int volu
                return MM_ERROR_INVALID_ARGUMENT;
        }
 
-       ret = mm_sound_util_volume_set_value_by_type(volume_type, volume_level);
-       if (ret == MM_ERROR_NONE) {
-               /* update shared memory value */
-               if(MM_ERROR_NONE != mm_sound_client_set_volume_by_type(volume_type, volume_level)) {
-                       debug_error("Can not set volume to shared memory 0x%x\n", ret);
-               }
-       }
+       /* request daemon to set volume */
+       ret = mm_sound_client_set_volume_by_type(volume_type, volume_level);
+       if (MM_ERROR_NONE != ret)
+               debug_error("Can not set volume, ret=0x%x", ret);
 
        return ret;
 }
index d5f9426..b257058 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-sound
 Summary:    MMSound Package contains client lib and sound_server binary
-Version:    0.11.10
+Version:    0.11.11
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0