summaryrefslogtreecommitdiff
path: root/drivers/media/dvb/dvb-usb/af9015.h
diff options
context:
space:
mode:
authorIan Armstrong <ian@iarmst.demon.co.uk>2011-03-18 19:23:05 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-22 04:54:52 -0300
commitc1e13971b19324305b35fafc080b527465214d3c (patch)
tree15abefc08f1b5f04deb640e00edfe3e23d82a94f /drivers/media/dvb/dvb-usb/af9015.h
parentce5b2acce60405b938d1f1f994024cde4e2cdd7e (diff)
[media] af9015: enhance RC
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: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/af9015.h')
-rw-r--r--drivers/media/dvb/dvb-usb/af9015.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-usb/af9015.h b/drivers/media/dvb/dvb-usb/af9015.h
index f20cfa6ed690..beb3004f00ba 100644
--- a/drivers/media/dvb/dvb-usb/af9015.h
+++ b/drivers/media/dvb/dvb-usb/af9015.h
@@ -102,6 +102,7 @@ struct af9015_state {
struct i2c_adapter i2c_adap; /* I2C adapter for 2nd FE */
u8 rc_repeat;
u32 rc_keycode;
+ u8 rc_last[4];
};
struct af9015_config {