summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/dvb-usb/dvb-usb.h
diff options
context:
space:
mode:
authorPatrick Boettcher <devnull@localhost>2005-04-02 14:42:56 +0000
committerPatrick Boettcher <devnull@localhost>2005-04-02 14:42:56 +0000
commit861784e76607eafbfb13c6ce1e3b87204b3978da (patch)
tree892e736a8c25848d2ccb0a3a8a46f6b92693ec56 /linux/drivers/media/dvb/dvb-usb/dvb-usb.h
parent302481a5ffb8737f5fcb821ee79576637aa85055 (diff)
downloadmediapointer-dvb-s2-861784e76607eafbfb13c6ce1e3b87204b3978da.tar.gz
mediapointer-dvb-s2-861784e76607eafbfb13c6ce1e3b87204b3978da.tar.bz2
re-enabled and improved commonly used remote control code for dvb-usb
Diffstat (limited to 'linux/drivers/media/dvb/dvb-usb/dvb-usb.h')
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dvb-usb.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb.h b/linux/drivers/media/dvb/dvb-usb/dvb-usb.h
index 7f08936ce..8fdafd2b3 100644
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb.h
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb.h
@@ -88,17 +88,13 @@ struct dvb_usb_properties {
struct dvb_usb_device_description * (*identify_desc_quirk) (void); /* the device is not distinuishable just by its USB IDs */
-#define USB_REMOTE_PROTO_NO 1
-#define USB_REMOTE_PROTO_NEC 2
-#define USB_REMOTE_PROTO_HAUPPAUGE 3
- int remote_protocol; /* does this device have an ir-receiver */
+#define REMOTE_NO_KEY_PRESSED 0x00
+#define REMOTE_KEY_PRESSED 0x01
+#define REMOTE_KEY_REPEAT 0x02
+ int (*init_rc) (struct dvb_usb_device *); /* remote query callback - NULL no ir-receiver */
+ int (*query_rc) (struct dvb_usb_device *, u32 *, int *); /* remote query callback - NULL no ir-receiver */
int rc_interval;
-#define REMOTE_KEY_NO 0x01
-#define REMOTE_KEY_REPEAT 0x02
-#define REMOTE_KEY_PRESSED 0x03
- int (*query_rc) (struct dvb_usb_device *, u8 *, int *); /* remote query callback */
-
/* i2c algorithm, if any */
struct i2c_algorithm i2c_algo;
@@ -151,6 +147,7 @@ struct dvb_usb_device {
int urbs_submitted;
int feedcount;
+ int pid_filtering;
/* locking */
struct semaphore usb_sem;
@@ -170,15 +167,10 @@ struct dvb_usb_device {
int (*fe_init) (struct dvb_frontend *);
/* remote control */
-// struct input_dev rc_input_dev;
-// struct work_struct rc_query_work;
-// int last_event;
-// int last_state; /* for Hauppauge RC protocol */
-// int repeat_key_count;
-// int rc_key_repeat_count; /* module parameter */
-
- int pid_filtering;
-// int rc_query_interval;
+ struct input_dev rc_input_dev;
+ struct work_struct rc_query_work;
+ u32 last_event;
+ int last_state;
void *priv;
};
@@ -190,4 +182,12 @@ extern void dvb_usb_device_exit(struct usb_interface *);
extern int dvb_usb_generic_rw(struct dvb_usb_device *, u8 *, u16, u8 *, u16);
extern int dvb_usb_generic_write(struct dvb_usb_device *, u8 *, u16);
+/* common used remote control parsing */
+struct dvb_usb_nec_rc_key {
+ u8 c0,c1,c2;
+ u32 key;
+};
+
+extern int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *, struct dvb_usb_nec_rc_key[],int, u8[], u32 *, int *);
+
#endif