[linux-dvb] [PATCH] budget-ci IR handling fixups

David Härdeman david at hardeman.nu
Tue Feb 13 01:56:37 CET 2007


On Sun, Feb 11, 2007 at 06:48:27AM +0100, Oliver Endriss wrote:
>David Härdeman wrote:
>> Changeset 6562d27de0d7 [1] by Oliver Endriss changed the budget-ci 
>> driver to use interrupt mode for i2c transfers.
>> 
>> This also meant that a new bunch of IR bytes that were previously lost 
>> are now received, which allowed me to better understand how the MSP430
>> chip works. Unfortunately it also means that the current driver gets 
>> some assumptions wrong and might generate double keypresses for one IR 
>> command.
>> 
>> The attached patch fixes this by throwing away the repeat bytes and by 
>> associating the correct command and device bytes. Please apply.
>
>Since I am not able to test the patch, I'd like to verify that the
>patched driver creates correct input events.

I wrote the old IR handling code that is currently in the unpatched 
driver (based on the work of Darren Salt). I've already verified on my 
own MythTV box that the patched driver does the right thing. Without the 
patch, the IR handling doesn't work at all or creates repeated events at 
the moment.

>Would you please post the output of the evtest tool for
>- a short key press (no key repeat)
Input driver version is 1.0.0
Input device ID: bus 0x1 vendor 0x13c2 product 0x1010 version 0x1
Input device name: "Budget-CI dvb ir receiver saa7146 (0)"
Supported events:
  Event type 0 (Reset)
    Event code 0 (Reset)
    Event code 1 (Key)
  Event type 1 (Key)
    Event code 0 (Reserved)
    Event code 1 (Esc)
    Event code 2 (1)
<snip>
    Event code 109 (PageDown)
    Event code 116 (Power)
Testing ... (interrupt to exit)
<short keypress button "right">
Event: time 1171327747.288858, type 1 (Key), code 106 (Right), value 1
Event: time 1171327747.288862, type 0 (Reset), code 0 (Reset), value 0
Event: time 1171327747.288864, type 1 (Key), code 106 (Right), value 0
Event: time 1171327747.288864, type 0 (Reset), code 0 (Reset), value 0

>- a long key press (key repeat)
<long keypress button "up">
Event: time 1171327812.339208, type 1 (Key), code 103 (Up), value 1
Event: time 1171327812.339213, type 0 (Reset), code 0 (Reset), value 0
Event: time 1171327812.339214, type 1 (Key), code 103 (Up), value 0
Event: time 1171327812.339214, type 0 (Reset), code 0 (Reset), value 0
Event: time 1171327812.544223, type 1 (Key), code 103 (Up), value 1
Event: time 1171327812.544228, type 0 (Reset), code 0 (Reset), value 0
Event: time 1171327812.544229, type 1 (Key), code 103 (Up), value 0
Event: time 1171327812.544232, type 0 (Reset), code 0 (Reset), value 0
Event: time 1171327812.760376, type 1 (Key), code 103 (Up), value 1
Event: time 1171327812.760378, type 0 (Reset), code 0 (Reset), value 0
Event: time 1171327812.760381, type 1 (Key), code 103 (Up), value 0
Event: time 1171327812.760382, type 0 (Reset), code 0 (Reset), value 0
Event: time 1171327812.932262, type 1 (Key), code 103 (Up), value 1
Event: time 1171327812.932264, type 0 (Reset), code 0 (Reset), value 0
Event: time 1171327812.932268, type 1 (Key), code 103 (Up), value 0
Event: time 1171327812.932269, type 0 (Reset), code 0 (Reset), value 0
Event: time 1171327813.167067, type 1 (Key), code 103 (Up), value 1
Event: time 1171327813.167069, type 0 (Reset), code 0 (Reset), value 0
Event: time 1171327813.167073, type 1 (Key), code 103 (Up), value 0
Event: time 1171327813.167073, type 0 (Reset), code 0 (Reset), value 0


I don't think you even want to see the evtest output when running with 
the unpatched driver :)

Furthermore, there's already two users on-list (not counting myself) who 
have been helped by the patch, so I think you can feel safe in applying 
it.

-- 
David Härdeman



More information about the linux-dvb mailing list