#4 Unintened auto repeat.

open
nobody
None
5
2007-08-16
2007-08-16
Anonymous
No

The mod_mce driver will frequently auto repeat a key press from the keyboard at a high rate. The auto repeat will continue indefinitely until another key is pressed.

root@mythtv:/home/dj# uname -a
Linux mythtv 2.6.19.2 #1 SMP PREEMPT Mon Feb 19 22:12:43 PST 2007 i686 GNU/Linux

Discussion

  • Logged In: NO

    dj@deadhat.com

     
  • Florian Demski
    Florian Demski
    2007-08-18

    Logged In: YES
    user_id=1549018
    Originator: NO

    This is most likely due to a bad reception. The key up event gets somehow lost on its way from the keyboard to the receiver.

     
  • Ryan Reading
    Ryan Reading
    2010-01-03

    I was having the same issue with v0.2.1 and finally found a fix. The
    problem that I observed was caused because the driver was analyzing all the
    IR data (peaks?) upon completion of transmission. Each transmission is
    ended with what is called (in the driver) a MCE_CONTROL_HEADER packet.

    The new driver has logic that will stop analyzing data once that packet
    comes in, even if there is "un-analyzed" data left in the buffer. That
    data doesn't get analyzed until the next keypress happens. So in effect,
    the "key up" even never gets sent to the input layer.

    After looking at the code, I'm not sure the key up event is being detected
    correctly. And maybe the intention is that end of transmission should
    signal key up, but that doesn't seem explicit (just circumstantial) in the
    driver.

    Bottom line, this fixes the problem (atleast for me):

    Change this block at lirc_mod_mce.c:658 in decode_buffer():

    if (ir->buf_in[offset] == MCE_CONTROL_HEADER)
    break;

    to this:

    if (ir->buf_in[offset] == MCE_CONTROL_HEADER)
    {
    /* If we hit this, it's the end of the current transmission,
    analyze everything up to this point */
    do_analyze(ir, &ir->peaks[ir->sync_pos], ir->peak_index -
    ir->sync_pos + 1);
    break;
    }

    I've only test a little bit at this point, but if anyone can give feedback
    on any side affects, let me know.