|
From: <li...@ba...> - 2007-05-06 07:38:42
|
Hi!
Andrei Tanas "an...@un..." wrote:
>> I explained to you why I have chosen a different approach.
>> If you can give arguments why your solution is better than mine I will
>> be happy to accept it.
>>
> My solution is better simply because it works, yours does nothing as I
> explained a couple of letters ago. What other arguments do you expect me
> to provide? I don't disagree that there may be users using this driver
> with incorrect setting, and I even offered to work on a solution that
> won't break things for them, but you just ignored that part somehow.
Ok, please work out a solution that does not break things.
>> Have you tested if the code in CVS solved the problem?
>>
> Yes, and as I explained - it only works if there's IR activity within 15
> seconds after resume, otherwise the driver switches to the same
> "inverted" mode and LIRC does not recognize anything.
Again: if there really is no activity after a resume for 15 seconds, then we both agree that the next change on the DCD line will be a beginning of a pulse.
That means that the time passed since lasttv must be a space.
If the current sense value indicates that it was a pulse (i.e. the current change on the DCD line indicates a beginning of a space), then the sense value must be wrong.
> This is my last letter on this topic unless you can actually suggest
> something constructive or accept that just possibly you might have been
> mistaken.
Of course I might be mistaken and it would not be the first time.
It would be nice if you could point out where is the mistake in my reasoning.
If the current code still does not work, then I suspect there is an interrupt after resume before lasttv is initialized.
Could you please try this:
Index: lirc_serial.c
===================================================================
RCS file: /cvsroot/lirc/lirc/drivers/lirc_serial/lirc_serial.c,v
retrieving revision 5.79
diff -u -u -r5.79 lirc_serial.c
--- lirc_serial.c 4 May 2007 18:34:48 -0000 5.79
+++ lirc_serial.c 6 May 2007 07:32:37 -0000
@@ -777,6 +777,12 @@
"We're caught!\n");
break;
}
+ if(lasttv.tv_sec == 0 && lasttv.tv_usec == 0)
+ {
+ printk(KERN_WARNING LIRC_DRIVER_NAME
+ ": unexpected interrupt\n");
+ continue;
+ }
if((status&hardware[type].signal_pin_change) && sense!= 1)
{
/* get current time */
Christoph
|