From: Tino K. <tin...@ti...> - 2008-05-21 15:59:29
|
On Tue, May 20, 2008 at 20:49:59 +0200, Tobias Arrskog wrote: > Hi I'm a developer for XBMC for Linux and we use LIRC but we have a bit of > trouble with standby and LIRC. > We use the standard socket procedure with a nonblocking socket. The main > problem for us is that we have no way of knowing if we lost connection to > lirc, no IO error when we enter a standby. I suspect we might not loose > connection but lirc doesn't seem to recognize us as it doesn't send anything > on the socket. To fix this we reinitialize, which works. The problem is to > recognize when we need to do this because lirc exhibit the same behavior if > a user have gone into a sleep-wake cycle or if they've unplugged the > hardware. I once used LIRC hardware with drivers that needed to be reloaded after suspend. All LIRC clients also needed to be reloaded, which I wanted to avoid. As a solution, I added a LIRC meta daemon, so I had 2 lircd processes running on one computer. Then, the LIRC daemon that handled the hardware send the events to the meta LIRC daemon, and the clients connected to the meta daemon. After suspend, I restarted the hardware daemon, and the clients didn't need to be restarted to work after suspend, because the didn't lose the connection to their meats LIRC daemon. Regards, Tino |