[mythtv] Patch to support lirc reconnect

myth at grevrend.com myth at grevrend.com
Sat Nov 22 09:16:34 UTC 2008


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mythtv-0.21-lirc.patch.zip
Type: application/zip
Size: 1321 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20081122/1f07016c/attachment.zip 


More information about the mythtv-dev mailing list