summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
diff options
context:
space:
mode:
authorPatrick Boettcher <devnull@localhost>2005-04-27 12:45:28 +0000
committerPatrick Boettcher <devnull@localhost>2005-04-27 12:45:28 +0000
commit284f6a87e6612f7025766e5ba0b2470102ab9842 (patch)
tree3e41c48e7b3fea435a5a2846fdb770935f79e46a /linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
parent129880a6df432ecd06fbe5a1ed773683b719fc83 (diff)
downloadmediapointer-dvb-s2-284f6a87e6612f7025766e5ba0b2470102ab9842.tar.gz
mediapointer-dvb-s2-284f6a87e6612f7025766e5ba0b2470102ab9842.tar.bz2
- removed the field which specified the delay between the two transfer of a read operation (not unused, didn't help)
- correct the maximal number of feed for each device (up to now it was always 255 even if the device was only able to handle 16 pids) - added preliminary remote control support for the AVerTV USB2 A800 - changed the remote-control-struct for the NEC-protocol
Diffstat (limited to 'linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c')
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c b/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
index 7908b4de6..e1db0352e 100644
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
@@ -130,7 +130,9 @@ int dvb_usb_remote_exit(struct dvb_usb_device *d)
#define DVB_USB_RC_NEC_EMPTY 0x00
#define DVB_USB_RC_NEC_KEY_PRESSED 0x01
#define DVB_USB_RC_NEC_KEY_REPEATED 0x02
-int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *d, struct dvb_usb_nec_rc_key keymap[],int key_count, u8 keybuf[5], u32 *event, int *state)
+int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *d, struct
+ dvb_usb_nec_rc_key keymap[],int key_count, u8 keybuf[5], u32 *event,
+ int *state)
{
int i;
*event = 0;
@@ -139,16 +141,16 @@ int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *d, struct dvb_usb_nec_rc_
case DVB_USB_RC_NEC_EMPTY:
break;
case DVB_USB_RC_NEC_KEY_PRESSED:
- if ((0xff - keybuf[3]) != keybuf[4]) {
+ if ((u8) ~keybuf[1] != keybuf[2] ||
+ (u8) ~keybuf[3] != keybuf[4]) {
deb_err("remote control checksum failed.\n");
break;
}
/* See if we can match the raw key code. */
for (i = 0; i < key_count; i++)
- if (keymap[i].c0 == keybuf[1] &&
- keymap[i].c1 == keybuf[2] &&
- keymap[i].c2 == keybuf[3]) {
- *event = keymap[i].key;
+ if (keymap[i].custom == keybuf[1] &&
+ keymap[i].data == keybuf[3]) {
+ *event = keymap[i].event;
*state = REMOTE_KEY_PRESSED;
break;
}