summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorPatrick Boettcher <devnull@localhost>2004-11-23 20:17:58 +0000
committerPatrick Boettcher <devnull@localhost>2004-11-23 20:17:58 +0000
commitb06f6b6f616e495ffc1766f2fd03497892c05ce3 (patch)
tree50304643b2e72a99a4169cfec9cb97a77330d8c3 /linux/drivers
parentee339a263583741edee12aa5c5ef05f132ff5ed6 (diff)
downloadmediapointer-dvb-s2-b06f6b6f616e495ffc1766f2fd03497892c05ce3.tar.gz
mediapointer-dvb-s2-b06f6b6f616e495ffc1766f2fd03497892c05ce3.tar.bz2
- revised debug
- added option to deliver the complete TS with USB2.0 devices
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/dvb/dibusb/dvb-dibusb.c55
-rw-r--r--linux/drivers/media/dvb/dibusb/dvb-dibusb.h1
2 files changed, 39 insertions, 17 deletions
diff --git a/linux/drivers/media/dvb/dibusb/dvb-dibusb.c b/linux/drivers/media/dvb/dibusb/dvb-dibusb.c
index e7f83d964..c94684b5b 100644
--- a/linux/drivers/media/dvb/dibusb/dvb-dibusb.c
+++ b/linux/drivers/media/dvb/dibusb/dvb-dibusb.c
@@ -65,9 +65,12 @@ MODULE_PARM_DESC(debug, "set debugging level (1=info,2=xfer,4=alotmore,8=ts,16=e
#define deb_xfer(args...) dprintk(0x02,args)
#define deb_alot(args...) dprintk(0x04,args)
#define deb_ts(args...) dprintk(0x08,args)
-#define deb_err(args...) dprintk(0x10,args)
+#define deb_err(args...) dprintk(0x10,args)
#define deb_rc(args...) dprintk(0x20,args)
+static int pid_parse;
+module_param(pid_parse, int, 0x644);
+MODULE_PARM_DESC(pid_parse, "enable pid parsing (filtering) when running at USB2.0");
/* Version information */
#define DRIVER_VERSION "0.1"
@@ -89,7 +92,7 @@ static int dibusb_readwrite_usb(struct usb_dibusb *dib,
wbuf[0] == DIBUSB_REQ_I2C_WRITE &&
dib->dibdev->parm->type == DIBUSB1_1)
deb_err("BUG: writing to i2c, while TS-streaming destroys the stream."
- "(%x reg: %x %x)", wbuf[0],wbuf[2],wbuf[3]);
+ "(%x reg: %x %x)\n", wbuf[0],wbuf[2],wbuf[3]);
debug_dump(wbuf,wlen);
@@ -188,20 +191,30 @@ static int dibusb_ctrl_feed(struct usb_dibusb *dib, int pid, int onoff)
dib->feedcount += onoff ? 1 : -1;
- if (dib->xfer_ops.pid_ctrl != NULL) {
- if (dib->xfer_ops.pid_ctrl(dib->fe,pid,onoff) < 0) {
- err("no free pid in list.");
+ if (dib->pid_parse) {
+ if (dib->xfer_ops.pid_ctrl != NULL) {
+ if (dib->xfer_ops.pid_ctrl(dib->fe,pid,onoff) < 0) {
+ err("no free pid in list.");
+ return -ENODEV;
+ }
+ } else {
+ err("no pid ctrl callback.");
return -ENODEV;
}
- } else {
- err("no pid ctrl callback.");
- return -ENODEV;
}
/*
* start the feed, either if there is the firmware bug or
* if this was the first pid to set.
*/
if (dib->dibdev->parm->firmware_bug || dib->feedcount == onoff) {
+
+ deb_ts("controlling pid parser\n");
+ if (dib->xfer_ops.pid_parse != NULL) {
+ if (dib->xfer_ops.pid_parse(dib->fe,dib->pid_parse) < 0) {
+ err("could not handle pid_parser");
+ }
+ }
+
deb_ts("start feeding\n");
if (dib->xfer_ops.fifo_ctrl != NULL) {
if (dib->xfer_ops.fifo_ctrl(dib->fe,1)) {
@@ -212,6 +225,8 @@ static int dibusb_ctrl_feed(struct usb_dibusb *dib, int pid, int onoff)
err("fifo_ctrl is not set.");
return -ENODEV;
}
+
+
}
return 0;
}
@@ -359,7 +374,7 @@ static int dibusb_read_remote_control(struct usb_dibusb *dib)
return 0;
}
-#define RC_QUERY_INTERVAL (10000) /* milliseconds */
+#define RC_QUERY_INTERVAL (100) /* milliseconds */
/* Remote-control poll function - called every RC_QUERY_INTERVAL ms to see
whether the remote control has received anything. */
@@ -924,27 +939,33 @@ static int dibusb_probe(struct usb_interface *intf,
if (cold)
ret = dibusb_loadfirmware(udev,dibdev);
else {
+ dib = kmalloc(sizeof(struct usb_dibusb),GFP_KERNEL);
+ if (dib == NULL) {
+ err("no memory");
+ return ret;
+ }
+ memset(dib,0,sizeof(struct usb_dibusb));
+
+ dib->pid_parse = 1;
switch (udev->speed) {
case USB_SPEED_LOW:
err("cannot handle USB speed because it is to sLOW.");
break;
case USB_SPEED_FULL:
- info("running at FULL speed, will use pid filter.");
+ info("running at FULL speed, will use pid parsing.");
break;
case USB_SPEED_HIGH:
- info("running at HIGH speed, will deliver the complete TS.");
+ if (!pid_parse) {
+ dib->pid_parse = 0;
+ info("running at HIGH speed, will deliver the complete TS.");
+ } else
+ info("running at HIGH speed, will use pid_parsing anyway.");
break;
case USB_SPEED_UNKNOWN: /* fall through */
default:
err("cannot handle USB speed because it is unkown.");
break;
}
- dib = kmalloc(sizeof(struct usb_dibusb),GFP_KERNEL);
- if (dib == NULL) {
- err("no memory");
- return ret;
- }
- memset(dib,0,sizeof(struct usb_dibusb));
dib->udev = udev;
dib->dibdev = dibdev;
diff --git a/linux/drivers/media/dvb/dibusb/dvb-dibusb.h b/linux/drivers/media/dvb/dibusb/dvb-dibusb.h
index e876264d8..30c2f168d 100644
--- a/linux/drivers/media/dvb/dibusb/dvb-dibusb.h
+++ b/linux/drivers/media/dvb/dibusb/dvb-dibusb.h
@@ -260,6 +260,7 @@ struct usb_dibusb {
struct dibusb_device * dibdev;
int feedcount;
+ int pid_parse;
struct dib3000_xfer_ops xfer_ops;
struct urb **urb_list;