summaryrefslogtreecommitdiff
path: root/linux
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
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')
-rw-r--r--linux/drivers/media/dvb/dvb-usb/a800.c52
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dibusb-common.c129
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dibusb-mb.c2
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dibusb-mc.c3
-rw-r--r--linux/drivers/media/dvb/dvb-usb/digitv.c2
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dtt200u.c40
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c5
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dvb-usb-init.c3
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c14
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dvb-usb-urb.c3
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dvb-usb.h9
-rw-r--r--linux/drivers/media/dvb/dvb-usb/nova-t-usb2.c3
-rw-r--r--linux/drivers/media/dvb/dvb-usb/umt-010.c2
13 files changed, 157 insertions, 110 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/a800.c b/linux/drivers/media/dvb/dvb-usb/a800.c
index c6e477d63..cc3f9dd9e 100644
--- a/linux/drivers/media/dvb/dvb-usb/a800.c
+++ b/linux/drivers/media/dvb/dvb-usb/a800.c
@@ -5,7 +5,7 @@
*
* Thanks to
* - AVerMedia who kindly provided information and
- * - Glen Harris who suffered from my mistake during development.
+ * - Glen Harris who suffered from my mistakes during development.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
@@ -15,11 +15,55 @@
*/
#include "dibusb.h"
+static int debug;
+module_param(debug, int, 0644);
+MODULE_PARM_DESC(debug, "set debugging level (rc=1 (or-able))." DVB_USB_DEBUG_STATUS);
+#define deb_rc(args...) dprintk(debug,0x01,args)
+
static int a800_power_ctrl(struct dvb_usb_device *d, int onoff)
{
return 0;
}
+static struct dvb_usb_nec_rc_key a800_rc_keys[] = {
+ { 0x00, 0x16, KEY_POWER }, /* dummy key */
+};
+
+int a800_rc_init(struct dvb_usb_device *d)
+{
+ int i;
+ for (i = 0; i < sizeof(a800_rc_keys)/sizeof(struct dvb_usb_nec_rc_key); i++)
+ set_bit(a800_rc_keys[i].event, d->rc_input_dev.keybit);
+ return 0;
+}
+
+/*1. Make a vendor request with the following parameters:
+ * Request = 0x04
+ * Index = 0;
+ * Value = 0;
+ * TransferBufferLength = 5;
+ * TransferBuffer = TransferBufferPointer;
+ *
+ *2. Send the command to the A800 device, then you can get 5 bytes of data back:
+ * Control byte | custom code | ~custom code | data code | ~data code
+ * Control byte: 0x00: no data 0x01: data is available 0x02: repeat (repeat the previous valid data)
+ */
+int a800_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
+{
+ u8 key[5];
+ if (usb_control_msg(d->udev,usb_rcvctrlpipe(d->udev,0),
+ 0x04, USB_TYPE_VENDOR | USB_DIR_IN, 0, 0, key, 5,
+ 2*HZ) != 5)
+ return -ENODEV;
+
+ /* call the universal NEC remote processor, to find out the key's state and event */
+ dvb_usb_nec_rc_key_to_event(d,a800_rc_keys,sizeof(a800_rc_keys)/sizeof(struct dvb_usb_nec_rc_key),
+ key,event,state);
+ if (key[0] != 0)
+ deb_rc("key: %x %x %x %x %x\n",key[0],key[1],key[2],key[3],key[4]);
+ return 0;
+}
+
/* USB Driver stuff */
static struct dvb_usb_properties a800_properties;
@@ -39,6 +83,8 @@ MODULE_DEVICE_TABLE (usb, a800_table);
static struct dvb_usb_properties a800_properties = {
.caps = DVB_USB_HAS_PID_FILTER | DVB_USB_PID_FILTER_CAN_BE_TURNED_OFF | DVB_USB_IS_AN_I2C_ADAPTER,
+ .pid_filter_count = 32,
+
.usb_ctrl = CYPRESS_FX2,
.firmware = "dvb-usb-avertv-a800-02.fw",
@@ -54,8 +100,8 @@ static struct dvb_usb_properties a800_properties = {
.read_mac_address = NULL,
.rc_interval = DEFAULT_RC_INTERVAL,
- .init_rc = NULL, /* TODO */
- .query_rc = NULL,
+ .init_rc = a800_rc_init,
+ .query_rc = a800_rc_query,
.i2c_algo = &dibusb_i2c_algo,
diff --git a/linux/drivers/media/dvb/dvb-usb/dibusb-common.c b/linux/drivers/media/dvb/dvb-usb/dibusb-common.c
index 486548a82..58c6d61bb 100644
--- a/linux/drivers/media/dvb/dvb-usb/dibusb-common.c
+++ b/linux/drivers/media/dvb/dvb-usb/dibusb-common.c
@@ -236,74 +236,73 @@ EXPORT_SYMBOL(dibusb_dib3000mc_tuner_attach);
/*
* common remote control stuff
*/
-
static struct dvb_usb_nec_rc_key dibusb_rc_keys[] = {
/* Key codes for the little Artec T1/Twinhan/HAMA/ remote. */
- { 0x00, 0xff, 0x16, KEY_POWER },
- { 0x00, 0xff, 0x10, KEY_MUTE },
- { 0x00, 0xff, 0x03, KEY_1 },
- { 0x00, 0xff, 0x01, KEY_2 },
- { 0x00, 0xff, 0x06, KEY_3 },
- { 0x00, 0xff, 0x09, KEY_4 },
- { 0x00, 0xff, 0x1d, KEY_5 },
- { 0x00, 0xff, 0x1f, KEY_6 },
- { 0x00, 0xff, 0x0d, KEY_7 },
- { 0x00, 0xff, 0x19, KEY_8 },
- { 0x00, 0xff, 0x1b, KEY_9 },
- { 0x00, 0xff, 0x15, KEY_0 },
- { 0x00, 0xff, 0x05, KEY_CHANNELUP },
- { 0x00, 0xff, 0x02, KEY_CHANNELDOWN },
- { 0x00, 0xff, 0x1e, KEY_VOLUMEUP },
- { 0x00, 0xff, 0x0a, KEY_VOLUMEDOWN },
- { 0x00, 0xff, 0x11, KEY_RECORD },
- { 0x00, 0xff, 0x17, KEY_FAVORITES }, /* Heart symbol - Channel list. */
- { 0x00, 0xff, 0x14, KEY_PLAY },
- { 0x00, 0xff, 0x1a, KEY_STOP },
- { 0x00, 0xff, 0x40, KEY_REWIND },
- { 0x00, 0xff, 0x12, KEY_FASTFORWARD },
- { 0x00, 0xff, 0x0e, KEY_PREVIOUS }, /* Recall - Previous channel. */
- { 0x00, 0xff, 0x4c, KEY_PAUSE },
- { 0x00, 0xff, 0x4d, KEY_SCREEN }, /* Full screen mode. */
- { 0x00, 0xff, 0x54, KEY_AUDIO }, /* MTS - Switch to secondary audio. */
+ { 0x00, 0x16, KEY_POWER },
+ { 0x00, 0x10, KEY_MUTE },
+ { 0x00, 0x03, KEY_1 },
+ { 0x00, 0x01, KEY_2 },
+ { 0x00, 0x06, KEY_3 },
+ { 0x00, 0x09, KEY_4 },
+ { 0x00, 0x1d, KEY_5 },
+ { 0x00, 0x1f, KEY_6 },
+ { 0x00, 0x0d, KEY_7 },
+ { 0x00, 0x19, KEY_8 },
+ { 0x00, 0x1b, KEY_9 },
+ { 0x00, 0x15, KEY_0 },
+ { 0x00, 0x05, KEY_CHANNELUP },
+ { 0x00, 0x02, KEY_CHANNELDOWN },
+ { 0x00, 0x1e, KEY_VOLUMEUP },
+ { 0x00, 0x0a, KEY_VOLUMEDOWN },
+ { 0x00, 0x11, KEY_RECORD },
+ { 0x00, 0x17, KEY_FAVORITES }, /* Heart symbol - Channel list. */
+ { 0x00, 0x14, KEY_PLAY },
+ { 0x00, 0x1a, KEY_STOP },
+ { 0x00, 0x40, KEY_REWIND },
+ { 0x00, 0x12, KEY_FASTFORWARD },
+ { 0x00, 0x0e, KEY_PREVIOUS }, /* Recall - Previous channel. */
+ { 0x00, 0x4c, KEY_PAUSE },
+ { 0x00, 0x4d, KEY_SCREEN }, /* Full screen mode. */
+ { 0x00, 0x54, KEY_AUDIO }, /* MTS - Switch to secondary audio. */
/* additional keys TwinHan VisionPlus, the Artec seemingly not have */
- { 0x00, 0xff, 0x0c, KEY_CANCEL }, /* Cancel */
- { 0x00, 0xff, 0x1c, KEY_EPG }, /* EPG */
- { 0x00, 0xff, 0x00, KEY_TAB }, /* Tab */
- { 0x00, 0xff, 0x48, KEY_INFO }, /* Preview */
- { 0x00, 0xff, 0x04, KEY_LIST }, /* RecordList */
- { 0x00, 0xff, 0x0f, KEY_TEXT }, /* Teletext */
+ { 0x00, 0x0c, KEY_CANCEL }, /* Cancel */
+ { 0x00, 0x1c, KEY_EPG }, /* EPG */
+ { 0x00, 0x00, KEY_TAB }, /* Tab */
+ { 0x00, 0x48, KEY_INFO }, /* Preview */
+ { 0x00, 0x04, KEY_LIST }, /* RecordList */
+ { 0x00, 0x0f, KEY_TEXT }, /* Teletext */
/* Key codes for the KWorld/ADSTech/JetWay remote. */
- { 0x86, 0x6b, 0x12, KEY_POWER },
- { 0x86, 0x6b, 0x0f, KEY_SELECT }, /* source */
- { 0x86, 0x6b, 0x0c, KEY_UNKNOWN }, /* scan */
- { 0x86, 0x6b, 0x0b, KEY_EPG },
- { 0x86, 0x6b, 0x10, KEY_MUTE },
- { 0x86, 0x6b, 0x01, KEY_1 },
- { 0x86, 0x6b, 0x02, KEY_2 },
- { 0x86, 0x6b, 0x03, KEY_3 },
- { 0x86, 0x6b, 0x04, KEY_4 },
- { 0x86, 0x6b, 0x05, KEY_5 },
- { 0x86, 0x6b, 0x06, KEY_6 },
- { 0x86, 0x6b, 0x07, KEY_7 },
- { 0x86, 0x6b, 0x08, KEY_8 },
- { 0x86, 0x6b, 0x09, KEY_9 },
- { 0x86, 0x6b, 0x0a, KEY_0 },
- { 0x86, 0x6b, 0x18, KEY_ZOOM },
- { 0x86, 0x6b, 0x1c, KEY_UNKNOWN }, /* preview */
- { 0x86, 0x6b, 0x13, KEY_UNKNOWN }, /* snap */
- { 0x86, 0x6b, 0x00, KEY_UNDO },
- { 0x86, 0x6b, 0x1d, KEY_RECORD },
- { 0x86, 0x6b, 0x0d, KEY_STOP },
- { 0x86, 0x6b, 0x0e, KEY_PAUSE },
- { 0x86, 0x6b, 0x16, KEY_PLAY },
- { 0x86, 0x6b, 0x11, KEY_BACK },
- { 0x86, 0x6b, 0x19, KEY_FORWARD },
- { 0x86, 0x6b, 0x14, KEY_UNKNOWN }, /* pip */
- { 0x86, 0x6b, 0x15, KEY_ESC },
- { 0x86, 0x6b, 0x1a, KEY_UP },
- { 0x86, 0x6b, 0x1e, KEY_DOWN },
- { 0x86, 0x6b, 0x1f, KEY_LEFT },
- { 0x86, 0x6b, 0x1b, KEY_RIGHT },
+ { 0x86, 0x12, KEY_POWER },
+ { 0x86, 0x0f, KEY_SELECT }, /* source */
+ { 0x86, 0x0c, KEY_UNKNOWN }, /* scan */
+ { 0x86, 0x0b, KEY_EPG },
+ { 0x86, 0x10, KEY_MUTE },
+ { 0x86, 0x01, KEY_1 },
+ { 0x86, 0x02, KEY_2 },
+ { 0x86, 0x03, KEY_3 },
+ { 0x86, 0x04, KEY_4 },
+ { 0x86, 0x05, KEY_5 },
+ { 0x86, 0x06, KEY_6 },
+ { 0x86, 0x07, KEY_7 },
+ { 0x86, 0x08, KEY_8 },
+ { 0x86, 0x09, KEY_9 },
+ { 0x86, 0x0a, KEY_0 },
+ { 0x86, 0x18, KEY_ZOOM },
+ { 0x86, 0x1c, KEY_UNKNOWN }, /* preview */
+ { 0x86, 0x13, KEY_UNKNOWN }, /* snap */
+ { 0x86, 0x00, KEY_UNDO },
+ { 0x86, 0x1d, KEY_RECORD },
+ { 0x86, 0x0d, KEY_STOP },
+ { 0x86, 0x0e, KEY_PAUSE },
+ { 0x86, 0x16, KEY_PLAY },
+ { 0x86, 0x11, KEY_BACK },
+ { 0x86, 0x19, KEY_FORWARD },
+ { 0x86, 0x14, KEY_UNKNOWN }, /* pip */
+ { 0x86, 0x15, KEY_ESC },
+ { 0x86, 0x1a, KEY_UP },
+ { 0x86, 0x1e, KEY_DOWN },
+ { 0x86, 0x1f, KEY_LEFT },
+ { 0x86, 0x1b, KEY_RIGHT },
};
@@ -311,7 +310,7 @@ int dibusb_rc_init(struct dvb_usb_device *d)
{
int i;
for (i = 0; i < sizeof(dibusb_rc_keys)/sizeof(struct dvb_usb_nec_rc_key); i++)
- set_bit(dibusb_rc_keys[i].key, d->rc_input_dev.keybit);
+ set_bit(dibusb_rc_keys[i].event, d->rc_input_dev.keybit);
return 0;
}
EXPORT_SYMBOL(dibusb_rc_init);
diff --git a/linux/drivers/media/dvb/dvb-usb/dibusb-mb.c b/linux/drivers/media/dvb/dvb-usb/dibusb-mb.c
index 135f4cd72..09c5cb687 100644
--- a/linux/drivers/media/dvb/dvb-usb/dibusb-mb.c
+++ b/linux/drivers/media/dvb/dvb-usb/dibusb-mb.c
@@ -118,6 +118,8 @@ MODULE_DEVICE_TABLE (usb, dibusb_dib3000mb_table);
static struct dvb_usb_properties dibusb1_1_properties = {
.caps = DVB_USB_HAS_PID_FILTER | DVB_USB_PID_FILTER_CAN_BE_TURNED_OFF | DVB_USB_IS_AN_I2C_ADAPTER,
+ .pid_filter_count = 16,
+
.usb_ctrl = CYPRESS_AN2135,
.firmware = "dvb-usb-dibusb-5.0.0.11.fw",
diff --git a/linux/drivers/media/dvb/dvb-usb/dibusb-mc.c b/linux/drivers/media/dvb/dvb-usb/dibusb-mc.c
index fbf22cca5..1754e7f60 100644
--- a/linux/drivers/media/dvb/dvb-usb/dibusb-mc.c
+++ b/linux/drivers/media/dvb/dvb-usb/dibusb-mc.c
@@ -34,8 +34,9 @@ MODULE_DEVICE_TABLE (usb, dibusb_dib3000mc_table);
static struct dvb_usb_properties dibusb_mc_properties = {
.caps = DVB_USB_HAS_PID_FILTER | DVB_USB_PID_FILTER_CAN_BE_TURNED_OFF | DVB_USB_IS_AN_I2C_ADAPTER,
- .usb_ctrl = CYPRESS_FX2,
+ .pid_filter_count = 32,
+ .usb_ctrl = CYPRESS_FX2,
.firmware = "dvb-usb-dibusb-6.0.0.8.fw",
.size_of_priv = sizeof(struct dibusb_state),
diff --git a/linux/drivers/media/dvb/dvb-usb/digitv.c b/linux/drivers/media/dvb/dvb-usb/digitv.c
index 1375446d5..489644a51 100644
--- a/linux/drivers/media/dvb/dvb-usb/digitv.c
+++ b/linux/drivers/media/dvb/dvb-usb/digitv.c
@@ -159,8 +159,8 @@ MODULE_DEVICE_TABLE (usb, digitv_table);
static struct dvb_usb_properties digitv_properties = {
.caps = DVB_USB_IS_AN_I2C_ADAPTER,
- .usb_ctrl = CYPRESS_FX2,
+ .usb_ctrl = CYPRESS_FX2,
.firmware = "dvb-usb-digitv-01.fw",
.size_of_priv = 0,
diff --git a/linux/drivers/media/dvb/dvb-usb/dtt200u.c b/linux/drivers/media/dvb/dvb-usb/dtt200u.c
index ebe6b4ea8..b529c06e0 100644
--- a/linux/drivers/media/dvb/dvb-usb/dtt200u.c
+++ b/linux/drivers/media/dvb/dvb-usb/dtt200u.c
@@ -44,31 +44,31 @@ static int dtt200u_pid_filter(struct dvb_usb_device *d, int index, u16 pid, int
/* remote control */
/* key list for the tiny remote control (Yakumo, don't know about the others) */
static struct dvb_usb_nec_rc_key dtt200u_rc_keys[] = {
- { 0x80, 0x7f, 0x01, KEY_MUTE },
- { 0x80, 0x7f, 0x02, KEY_CHANNELDOWN },
- { 0x80, 0x7f, 0x03, KEY_VOLUMEDOWN },
- { 0x80, 0x7f, 0x04, KEY_1 },
- { 0x80, 0x7f, 0x05, KEY_2 },
- { 0x80, 0x7f, 0x06, KEY_3 },
- { 0x80, 0x7f, 0x07, KEY_4 },
- { 0x80, 0x7f, 0x08, KEY_5 },
- { 0x80, 0x7f, 0x09, KEY_6 },
- { 0x80, 0x7f, 0x0a, KEY_7 },
- { 0x00, 0xff, 0x0c, KEY_ZOOM },
- { 0x80, 0x7f, 0x0d, KEY_0 },
- { 0x00, 0xff, 0x0e, KEY_SELECT },
- { 0x80, 0x7f, 0x12, KEY_POWER },
- { 0x80, 0x7f, 0x1a, KEY_CHANNELUP },
- { 0x80, 0x7f, 0x1b, KEY_8 },
- { 0x80, 0x7f, 0x1e, KEY_VOLUMEUP },
- { 0x80, 0x7f, 0x1f, KEY_9 },
+ { 0x80, 0x01, KEY_MUTE },
+ { 0x80, 0x02, KEY_CHANNELDOWN },
+ { 0x80, 0x03, KEY_VOLUMEDOWN },
+ { 0x80, 0x04, KEY_1 },
+ { 0x80, 0x05, KEY_2 },
+ { 0x80, 0x06, KEY_3 },
+ { 0x80, 0x07, KEY_4 },
+ { 0x80, 0x08, KEY_5 },
+ { 0x80, 0x09, KEY_6 },
+ { 0x80, 0x0a, KEY_7 },
+ { 0x00, 0x0c, KEY_ZOOM },
+ { 0x80, 0x0d, KEY_0 },
+ { 0x00, 0x0e, KEY_SELECT },
+ { 0x80, 0x12, KEY_POWER },
+ { 0x80, 0x1a, KEY_CHANNELUP },
+ { 0x80, 0x1b, KEY_8 },
+ { 0x80, 0x1e, KEY_VOLUMEUP },
+ { 0x80, 0x1f, KEY_9 },
};
static int dtt200u_rc_init(struct dvb_usb_device *d)
{
int i;
for (i = 0; i < sizeof(dtt200u_rc_keys)/sizeof(struct dvb_usb_nec_rc_key); i++)
- set_bit(dtt200u_rc_keys[i].key, d->rc_input_dev.keybit);
+ set_bit(dtt200u_rc_keys[i].event, d->rc_input_dev.keybit);
return 0;
}
@@ -106,6 +106,7 @@ MODULE_DEVICE_TABLE(usb, dtt200u_usb_table);
static struct dvb_usb_properties dtt200u_properties = {
.caps = DVB_USB_HAS_PID_FILTER | DVB_USB_NEED_PID_FILTERING,
+ .pid_filter_count = 255, /* It is a guess, but there are at least 10 */
.usb_ctrl = CYPRESS_FX2,
.firmware = "dvb-usb-dtt200u-01.fw",
@@ -121,7 +122,6 @@ static struct dvb_usb_properties dtt200u_properties = {
.init_rc = dtt200u_rc_init,
.generic_bulk_ctrl_endpoint = 0x01,
- .rw_delay_ms = 50,
/* parameter for the MPEG2-data transfer */
.urb = {
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c b/linux/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
index 067c5f149..f33a16c61 100644
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
@@ -94,15 +94,14 @@ int dvb_usb_dvb_init(struct dvb_usb_device *d)
d->dvb_adap.proposed_mac[3],d->dvb_adap.proposed_mac[4],
d->dvb_adap.proposed_mac[5]);
else
- err("MAC reading failed.");
+ err("MAC address reading failed.");
}
d->demux.dmx.capabilities = DMX_TS_FILTERING | DMX_SECTION_FILTERING;
d->demux.priv = d;
- /* get pidcount from demod */
- d->demux.feednum = d->demux.filternum = 255;
+ d->demux.feednum = d->demux.filternum = d->max_feed_count;
d->demux.start_feed = dvb_usb_start_feed;
d->demux.stop_feed = dvb_usb_stop_feed;
d->demux.write_to_decoder = NULL;
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-init.c b/linux/drivers/media/dvb/dvb-usb/dvb-usb-init.c
index 34dbcb836..20ec6e35b 100644
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-init.c
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-init.c
@@ -55,12 +55,13 @@ static int dvb_usb_init(struct dvb_usb_device *d)
(d->props.caps & DVB_USB_NEED_PID_FILTERING)) {
info("will use the device's hw PID filter.");
d->pid_filtering = 1;
+ d->max_feed_count = d->props.pid_filter_count;
} else {
info("will pass the complete MPEG2 transport stream to the demuxer.");
d->pid_filtering = 0;
+ d->max_feed_count = 255;
}
-
if (d->props.power_ctrl)
d->props.power_ctrl(d,1);
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;
}
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-urb.c b/linux/drivers/media/dvb/dvb-usb/dvb-usb-urb.c
index 7effc9383..0aa2e3c2b 100644
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-urb.c
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-urb.c
@@ -39,9 +39,6 @@ int dvb_usb_generic_rw(struct dvb_usb_device *d, u8 *wbuf, u16 wlen, u8 *rbuf,
/* an answer is expected, and no error before */
if (!ret && rbuf && rlen) {
- if (d->props.rw_delay_ms)
- msleep(d->props.rw_delay_ms);
-
ret = usb_bulk_msg(d->udev,usb_rcvbulkpipe(d->udev,
d->props.generic_bulk_ctrl_endpoint),rbuf,rlen,&actlen,
2*HZ);
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb.h b/linux/drivers/media/dvb/dvb-usb/dvb-usb.h
index 239ff40c3..e653f8648 100644
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb.h
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb.h
@@ -68,6 +68,7 @@ struct dvb_usb_properties {
#define DVB_USB_NEED_PID_FILTERING 0x04
#define DVB_USB_IS_AN_I2C_ADAPTER 0x08
int caps;
+ int pid_filter_count;
#define CYPRESS_AN2135 0
#define CYPRESS_AN2235 1
@@ -104,8 +105,6 @@ struct dvb_usb_properties {
/* endpoint for generic bulk read/write operations (used by many drivers for controlling the device) */
int generic_bulk_ctrl_endpoint;
-/* delay between the two transfers of a read operation */
- int rw_delay_ms;
/* MPEG2 TS transfer description */
struct {
@@ -124,7 +123,6 @@ struct dvb_usb_properties {
int framesize;
} isoc;
} u;
-
} urb;
int num_device_descs;
@@ -168,6 +166,7 @@ struct dvb_usb_device {
struct dvb_demux demux;
struct dvb_net dvb_net;
struct dvb_frontend* fe;
+ int max_feed_count;
int (*fe_sleep) (struct dvb_frontend *);
int (*fe_init) (struct dvb_frontend *);
@@ -192,8 +191,8 @@ 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;
+ u8 custom,data;
+ u32 event;
};
extern int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *, struct dvb_usb_nec_rc_key[],int, u8[], u32 *, int *);
diff --git a/linux/drivers/media/dvb/dvb-usb/nova-t-usb2.c b/linux/drivers/media/dvb/dvb-usb/nova-t-usb2.c
index 24650f8f9..2ceeead94 100644
--- a/linux/drivers/media/dvb/dvb-usb/nova-t-usb2.c
+++ b/linux/drivers/media/dvb/dvb-usb/nova-t-usb2.c
@@ -145,8 +145,9 @@ MODULE_DEVICE_TABLE (usb, nova_t_table);
static struct dvb_usb_properties nova_t_properties = {
.caps = DVB_USB_HAS_PID_FILTER | DVB_USB_PID_FILTER_CAN_BE_TURNED_OFF | DVB_USB_IS_AN_I2C_ADAPTER,
- .usb_ctrl = CYPRESS_FX2,
+ .pid_filter_count = 32,
+ .usb_ctrl = CYPRESS_FX2,
.firmware = "dvb-usb-nova-t-usb2-01.fw",
.size_of_priv = sizeof(struct dibusb_state),
diff --git a/linux/drivers/media/dvb/dvb-usb/umt-010.c b/linux/drivers/media/dvb/dvb-usb/umt-010.c
index ab23759b2..6fae66eaa 100644
--- a/linux/drivers/media/dvb/dvb-usb/umt-010.c
+++ b/linux/drivers/media/dvb/dvb-usb/umt-010.c
@@ -93,8 +93,8 @@ MODULE_DEVICE_TABLE (usb, umt_table);
static struct dvb_usb_properties umt_properties = {
.caps = DVB_USB_IS_AN_I2C_ADAPTER,
- .usb_ctrl = CYPRESS_FX2,
+ .usb_ctrl = CYPRESS_FX2,
.firmware = "dvb-usb-umt-010-02.fw",
.size_of_priv = sizeof(struct dibusb_state),