|
From: Andrei T. <an...@un...> - 2007-05-05 03:57:31
|
Hi, > > The attached patch fixes two issues in lirc_serial > > 1. potential active level autodetection error (if there happens to > be an IR > > signal present at the moment when the driver is loading). The new > code takes > > 9 samples with 0.1s intervals and selects active high/low based on > the > > maximum number of "votes". 2. if 2 consecutive "pulse" interrupts > occur with > > more than 15 seconds interval, the driver would decide that "this > MUST be a > > space" and flip the "sense" bit (even if it wasn't in autodetection > mode!), > > becoming "deaf". Under normal conditions this (almost) never > happened, with > > suspend/resume working the problem became very obvious. The patch > just > > deletes this piece of code. > > I have modified part 1 slightly and have chosen a different approach > for > part 2. The code is in CVS already. I hope it will fix the problem. > Christoph, I don't think the approach you've chosen for part 2 will work. Scenario: the last interrupt received before standby is pulse (I am not even sure if this makes any difference, it can probably be space just as well), then, after resume (which is very possible, even if the box is being woken up by IR, by the time kernel is initialized and we could process our interrupt, any IR activity will be gone), lasttv is reset with gettimeofday, however, if no interrupt is received in the next 15 seconds, the sense flag will still be flipped. Why do you insist on keeping that code, I just don't see under what conditions it could be useful to "change our mind" on what type of receiver is being used, especially if it was passed as module parameter. Regards, Andrei. |