
myth at grevrend
Nov 22, 2008, 1:16 AM
Post #1 of 2
(1907 views)
Permalink
|
|
Patch to support lirc reconnect
|
|
Hy here is a patch to support reconnection to lircd with signal USR2. The issue --------- I use mythtv with lirc and an imon remote. The drive doesn't support acpi suspend. When I suspend the computer, I have to unload lirc modules and stop lircd. When I wake up the computer, il load the modules again et start lircd. The point is that mythtv lose its connection to lircd and doesn't reconnect to the new server. I can no longer use my remote. So I have patched mythtv to be able to reconnect to lircd whe mythtv receive a signal USR2. When I wake up the computer, I send USR2 to mythfrontend, it reconnects to lircd and the remote works again. Summary of changes ------------------ In libmythui : mode the code to launch the lirc thread to an independant method called at init and when necessary In mythfrontend : create and bind a function to manage the signal USR2. It calls the libmythui function to launch a new lirc thread. In the Lirc code : modify the init of the class to first deinit lirc and close previous sessions (to prevent segfaults after multiple USR2). Version concerned ----------------- mythtv 0.21_p19046 (gentoo version) Best Regards Gerald
|