From 31f614941e1b466ea17a90df69635b09b09c7af4 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 17 Mar 2012 23:21:30 +0100 Subject: [PATCH] spark: do not start IRMP thread if lircd is running This will provide a smooth switchover to using LIRC instead of IRMP: if the lircd is running (pidfile present), don't start the input thread. Neutrino will use the LIRC-created uinput device instead. Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/e10c60b02cc7e537faeec26f8ceca7fa0276c33c Author: Stefan Seyfried Date: 2012-03-17 (Sat, 17 Mar 2012) ------------------ This commit was generated by Migit --- libspark/init.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libspark/init.cpp b/libspark/init.cpp index cf3020d..5b6071f 100644 --- a/libspark/init.cpp +++ b/libspark/init.cpp @@ -27,7 +27,11 @@ void init_td_api() { cCpuFreqManager f; f.SetCpuFreq(0); /* CPUFREQ == 0 is the trigger for leaving standby */ - start_input_thread(); + /* hack: if lircd pidfile is present, don't start input thread */ + if (access("/var/run/lirc/lircd.pid", R_OK)) + start_input_thread(); + else + lt_info("%s: lircd pidfile present, not starting input thread\n", __func__); } initialized = true; lt_info("%s end\n", __FUNCTION__);