Fix sound lagging issue on IME 95/33695/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Mon, 27 Oct 2014 11:33:11 +0000 (20:33 +0900)
committerLi Zhang <li2012.zhang@samsung.com>
Wed, 14 Jan 2015 02:27:04 +0000 (10:27 +0800)
[model] Kiran
[binary_type] PDA
[customer] OPEN
[issue#] P141014-01590, P141023-01622
[problem] Touch sound is not proper for options for keyboard settings delay
[cause] The priority of IME process is higher than pulseaudio
[solution] The priority of IME process has been adjusted.
[team] Input Framework
[request] N/A
[horizontal_expansion] N/A

Change-Id: I22882ba9092fb58783bd08c1cbe3edaa06138f7c

ism/src/scim.cpp

index 09b6105571c72ef199b6786ee8ff621375eee11e..cd53a9f1ac9ec25078712ae4e6da4d6b02423a38 100644 (file)
@@ -43,6 +43,8 @@
 #include <signal.h>
 #include <string.h>
 #include <privilege-control.h>
+#include <sys/resource.h>
+#include <sched.h>
 
 #define WAIT_WM
 #define ISF_SYSTEM_WM_READY_FILE                        "/tmp/.wm_ready"
@@ -349,6 +351,12 @@ int main (int argc, char *argv [])
 
     std::vector<String>::iterator it;
 
+    struct sched_param param;
+    param.sched_priority = 0;
+
+    sched_setscheduler(0, SCHED_OTHER, &param);
+    setpriority (PRIO_PROCESS, getpid (), -11);
+
     String def_frontend ("socket");
     String def_config ("simple");