• Ian Armstrong's avatar
    [media] af9015: enhance RC · c1e13971
    Ian Armstrong authored
    Patch from Ian Armstrong.
    
    I've encountered a couple of problems with the current af9015 driver as
    supplied with the 2.6.37 kernel, that the attached patch appears to fix. (I've
    generated this patch against the current v4l-dvb git).
    
    Some key-presses are lost. A key-press is only generated upon 'valid' data
    (buf[14] == (u8) ~buf[15]), but the buffer is wiped before this check.
    Sometimes the 15th byte has not been set at the time of read, so the data
    isn't valid & ignored. On the next poll the 15th byte has been set, but the
    rest of the data was wiped previously, so the data is still invalid & the key
    is lost.
    
    Weird repeat error, where an old key press is sometimes repeated in error. ie.
    button sequence '1 (pause) 2 (pause) 3 (pause) 4' generates output like '1
    (pause) 2 (pause) 23 (pause) 4'. The current driver zeroes the data for the
    key pushed, but sometimes this data is already zero but with other bytes set
    suggesting a repeat code. This results in the last key being incorrectly
    repeated.
    
    This patch attempts to reduce the risk of a missed key-press & also stop the
    random repeat of an old key-press when a new key is pressed.
    Signed-off-by: default avatarIan Armstrong <ian@iarmst.demon.co.uk>
    Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
    c1e13971
af9015.c 45.2 KB