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.
This commit is contained in:
Stefan Seyfried
2012-03-17 23:21:30 +01:00
parent 457c7a9199
commit e10c60b02c

View File

@@ -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__);