Skip to contentSkip to conversation

Update the DVB subsystem

PATCH New Michael Hunold 1 participant 6 messages Oct 27, 2004

Subsystems (2)
lore
Share & tools
lore
#1 lore raw

PATCH 1/5 DVB: rework debugging in av7110

In reply to Michael Hunold

- [DVB] av7110: switch from stupid DEB_xx() debug macros to saner dprintk() style debugging
- [DVB] av7110: fix dvb-ttpci ca write() polling
- [DVB] budget: switch from stupid DEB_xx() debug macros to saner dprintk() style debugging

drivers/media/dvb/ttpci/av7110.c +51 -58
diff -uraNwB linux-2.6.10-rc1/drivers/media/dvb/ttpci/av7110.c linux-2.6.10-rc1-patched/drivers/media/dvb/ttpci/av7110.c
@@ -67,7 +67,8 @@
 #include "av7110_ca.h"
 #include "av7110_ipack.h"
 
-static int av7110_debug;
+int av7110_debug;
+
 static int vidmode=CVBS_RGB_OUT;
 static int pids_off;
 static int adac=DVB_ADAC_TI;
@@ -110,7 +111,7 @@
 	av7110->has_analog_tuner = 0;
 	av7110->current_input = 0;
 	if (i2c_writereg(av7110, 0x20, 0x00, 0x00) == 1) {
-		printk ("av7110(%d): Crystal audio DAC detected\n",
+		printk ("dvb-ttpci: Crystal audio DAC @ card %d detected\n",
 			av7110->dvb_adapter->num);
 		av7110->adac_type = DVB_ADAC_CRYSTAL;
 		i2c_writereg(av7110, 0x20, 0x01, 0xd2);
@@ -125,13 +126,13 @@
 		/* done. */
 	}
 	else if (dev->pci->subsystem_vendor == 0x110a) {
-		printk("av7110(%d): DVB-C w/o analog module detected\n",
+		printk("dvb-ttpci: DVB-C w/o analog module @ card %d detected\n",
 			av7110->dvb_adapter->num);
 		av7110->adac_type = DVB_ADAC_NONE;
 	}
 	else {
 		av7110->adac_type = adac;
-		printk("av7110(%d): adac type set to %d\n",
+		printk("dvb-ttpci: adac type set to %d @ card %d\n",
 			av7110->dvb_adapter->num, av7110->adac_type);
 	}
 
@@ -150,7 +151,7 @@
 
 static void recover_arm(struct av7110 *av7110)
 {
-	DEB_EE(("av7110: %p\n",av7110));
+	dprintk(4, "%p\n",av7110);
 
 	av7110_bootarm(av7110);
 	msleep(100);
@@ -160,7 +161,7 @@
 
 static void arm_error(struct av7110 *av7110)
 {
-	DEB_EE(("av7110: %p\n",av7110));
+	dprintk(4, "%p\n",av7110);
 
         av7110->arm_errors++;
         av7110->arm_ready=0;
@@ -173,7 +174,7 @@
         u16 newloops = 0;
 	int timeout;
 
-	DEB_EE(("av7110: %p\n",av7110));
+	dprintk(4, "%p\n",av7110);
 	
         lock_kernel ();
         daemonize ("arm_mon");
@@ -199,7 +200,7 @@
                 up(&av7110->dcomlock);
 
                 if (newloops==av7110->arm_loops) {
-                        printk(KERN_ERR "av7110%d: ARM crashed!\n",
+			printk(KERN_ERR "dvb-ttpci: ARM crashed @ card %d\n",
 				av7110->dvb_adapter->num);
 
 			arm_error(av7110);
@@ -231,7 +232,7 @@
 {
 	static struct av7110 *last;
 
-	DEB_EE(("av7110: %p\n",av7110));
+	dprintk(4, "%p\n",av7110);
 
 	if (!av7110)
 		av7110 = last;
@@ -248,13 +249,13 @@
 
 void av7110_register_irc_handler(void (*func)(u32)) 
 {
-	DEB_EE(("registering %p\n", func));
+	dprintk(4, "registering %p\n", func);
         irc_handler = func;
 }
 
 void av7110_unregister_irc_handler(void (*func)(u32)) 
 {
-	DEB_EE(("unregistering %p\n", func));
+	dprintk(4, "unregistering %p\n", func);
         irc_handler = NULL;
 }
 
@@ -268,7 +269,7 @@
 
 void IR_handle(struct av7110 *av7110, u32 ircom)
 {
-	DEB_S(("av7110: ircommand = %08x\n", ircom));
+	dprintk(4, "ircommand = %08x\n", ircom);
         irtask.data = (unsigned long) ircom;
         tasklet_schedule(&irtask);
 }
@@ -283,8 +284,6 @@
                      enum dmx_success success,
                      struct av7110 *av7110)
 {
-	DEB_INT(("av7110: %p\n",av7110));
-
         if (!dvbdmxfilter->feed->demux->dmx.frontend)
                 return 0;
         if (dvbdmxfilter->feed->demux->dmx.frontend->source==DMX_MEMORY_FE)
@@ -344,7 +343,7 @@
         int type=av7110->debitype;
         int handle=(type>>8)&0x1f;
 	
-//	DEB_EE(("av7110: %p\n",av7110));
+//	dprintk(4, "%p\n",av7110);
 
         print_time("debi");
         saa7146_write(av7110->dev, IER, 
@@ -476,10 +475,8 @@
         u32 rxbuf, txbuf;
         int len;
         
-        //printk("GPIO0 irq\n");        
-
         if (av7110->debitype !=-1)
-		printk("GPIO0 irq oops @ %ld, psr:0x%08x, ssr:0x%08x\n",
+		printk("dvb-ttpci: GPIO0 irq oops @ %ld, psr:0x%08x, ssr:0x%08x\n",
 		       jiffies, saa7146_read(av7110->dev, PSR),
 		       saa7146_read(av7110->dev, SSR));
        
@@ -497,10 +494,10 @@
         txbuf=irdebi(av7110, DEBINOSWAP, TX_BUFF, 0, 2);
 	len = (av7110->debilen + 3) & ~3;
 
-//        DEB_D(("GPIO0 irq %d %d\n", av7110->debitype, av7110->debilen));
+//	dprintk(8, "GPIO0 irq %d %d\n", av7110->debitype, av7110->debilen);
         print_time("gpio");
 
-//       DEB_D(("GPIO0 irq %02x\n", av7110->debitype&0xff));        
+//	dprintk(8, "GPIO0 irq %02x\n", av7110->debitype&0xff);
         switch (av7110->debitype&0xff) {
 
         case DATA_TS_PLAY:
@@ -519,10 +516,10 @@
                 iwdebi(av7110, DEBINOSWAP, RX_BUFF, 0, 2);
 
 		av7110->video_size.h = h_ar & 0xfff;
-		DEB_D(("GPIO0 irq: DATA_MPEG_VIDEO_EVENT: w/h/ar = %u/%u/%u\n",
+		dprintk(8, "GPIO0 irq: DATA_MPEG_VIDEO_EVENT: w/h/ar = %u/%u/%u\n",
 				av7110->video_size.w,
 				av7110->video_size.h,
-				av7110->video_size.aspect_ratio));
+				av7110->video_size.aspect_ratio);
 
 		event.type = VIDEO_EVENT_SIZE_CHANGED;
 		event.u.size.w = av7110->video_size.w;
@@ -610,7 +607,7 @@
                         iwdebi(av7110, DEBINOSWAP, TX_BUFF, 0, 2);
                         break;
                 } 
-                DEB_D(("GPIO0 PES_PLAY len=%04x\n", len));        
+		dprintk(8, "GPIO0 PES_PLAY len=%04x\n", len);
                 iwdebi(av7110, DEBINOSWAP, TX_LEN, len, 2);
                 iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, len, 2);
 		saa7146_wait_for_debi_done(av7110->dev);
@@ -688,7 +685,7 @@
                 break;
 
         default:
-                printk("gpioirq unknown type=%d len=%d\n", 
+		printk("dvb-ttpci: gpioirq unknown type=%d len=%d\n",
                        av7110->debitype, av7110->debilen);
                 break;
         }      
@@ -705,7 +702,7 @@
 	struct dvb_device *dvbdev = (struct dvb_device *) file->private_data;
 	struct av7110 *av7110 = (struct av7110 *) dvbdev->priv;
 
-	DEB_EE(("av7110: %p\n", av7110));
+	dprintk(4, "%p\n", av7110);
 
 	if (cmd == OSD_SEND_CMD)
 		return av7110_osd_cmd(av7110, (osd_cmd_t *) parg);
@@ -736,7 +733,7 @@
 static inline int SetPIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid,
 			  u16 subpid, u16 pcrpid)
         {
-	DEB_EE(("av7110: %p\n", av7110));
+	dprintk(4, "%p\n", av7110);
 
 	if (vpid == 0x1fff || apid == 0x1fff ||
 	    ttpid == 0x1fff || subpid == 0x1fff || pcrpid == 0x1fff) {
@@ -754,7 +751,7 @@
 void ChangePIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid,
 		u16 subpid, u16 pcrpid)
 {
-	DEB_EE(("av7110: %p\n", av7110));
+	dprintk(4, "%p\n", av7110);
         
 	if (down_interruptible(&av7110->pid_mutex))
 		return;
@@ -793,7 +790,7 @@
 //	u16 mode=0x0320;
 	u16 mode=0xb96a;
 
-	DEB_EE(("av7110: %p\n",av7110));
+	dprintk(4, "%p\n", av7110);
 
 	if (dvbdmxfilter->type == DMX_TYPE_SEC) {
 		if (hw_sections) {
@@ -817,7 +814,7 @@
 
 	ret = av7110_fw_request(av7110, buf, 20, &handle, 1);
 	if (ret < 0) {
-		printk("StartHWFilter error\n");
+		dprintk(1, "StartHWFilter error\n");
 		return ret;
         }
 
@@ -835,13 +832,11 @@
 	int ret;
 	u16 handle;
         
-	DEB_EE(("av7110: %p\n", av7110));
+	dprintk(4, "%p\n", av7110);
 
 	handle = dvbdmxfilter->hw_handle;
 	if (handle > 32) {
-		DEB_S(("dvb: StopHWFilter tried to stop invalid filter %d.\n",
-		       handle));
-		DEB_S(("dvb: filter type = %d\n", dvbdmxfilter->type));
+		dprintk(1, "StopHWFilter tried to stop invalid filter %d, filter type = %d\n", handle, dvbdmxfilter->type);
 		return 0;
                 }
 
@@ -852,10 +847,10 @@
 	buf[2] = handle;
 	ret = av7110_fw_request(av7110, buf, 3, answ, 2);
 	if (ret)
-		printk("StopHWFilter error\n");
+		dprintk(1, "StopHWFilter error\n");
 
 	if (answ[1] != handle) {
-		DEB_S(("dvb: filter %d shutdown error :%d\n", handle, answ[1]));
+		dprintk(2, "filter %d shutdown error :%d\n", handle, answ[1]);
 		ret = -1;
         }
         return ret;
@@ -869,7 +864,7 @@
 	u16 *pid = dvbdmx->pids, npids[5];
 	int i;
 
-	DEB_EE(("av7110: %p\n",av7110));
+	dprintk(4, "%p\n", av7110);
 
 	npids[0] = npids[1] = npids[2] = npids[3] = npids[4] = 0xffff;
 	i = dvbdmxfeed->pes_type;
@@ -902,7 +897,7 @@
 	u16 *pid = dvbdmx->pids, npids[5];
 	int i;
                 
-	DEB_EE(("av7110: %p\n", av7110));
+	dprintk(4, "%p\n", av7110);
                 
 	if (dvbdmxfeed->pes_type <= 1) {
 		av7110_av_stop(av7110, dvbdmxfeed->pes_type ?  RP_VIDEO : RP_AUDIO);
@@ -935,7 +930,7 @@
 	struct dvb_demux *demux = feed->demux;
 	struct av7110 *av7110 = (struct av7110 *) demux->priv;
                 
-	DEB_EE(("av7110: %p\n", av7110));
+	dprintk(4, "%p\n", av7110);
                 
 	if (!demux->dmx.frontend)
 		return -EINVAL;
@@ -993,7 +988,7 @@
 	struct dvb_demux *demux = feed->demux;
 	struct av7110 *av7110 = (struct av7110 *) demux->priv;
 
-	DEB_EE(("av7110: %p\n",av7110));
+	dprintk(4, "%p\n", av7110);
 
 	if (feed->type == DMX_TYPE_TS) {
 		if (feed->ts_type & TS_DECODER) {
@@ -1035,7 +1030,7 @@
 	int mode;
 	int i;
 
-	DEB_EE(("av7110: %p\n",av7110));
+	dprintk(4, "%p\n", av7110);
 
 	mode = av7110->playing;
 	av7110->playing = 0;
@@ -1068,7 +1063,7 @@
 		BUG();
 	av7110 = (struct av7110 *) dvbdemux->priv;
 
-	DEB_EE(("av7110: %p\n",av7110));
+	dprintk(4, "%p\n", av7110);
 
 	if (num != 0)
 		return -EINVAL;
@@ -1078,14 +1073,14 @@
 		printk(KERN_ERR "%s: av7110_fw_request error\n", __FUNCTION__);
 		return -EIO;
 }
-	DEB_EE(("av7110: fwstc = %04hx %04hx %04hx %04hx\n",
-		fwstc[0], fwstc[1], fwstc[2], fwstc[3]));
+	dprintk(2, "fwstc = %04hx %04hx %04hx %04hx\n",
+		fwstc[0], fwstc[1], fwstc[2], fwstc[3]);
 
 	*stc =	(((uint64_t) ((fwstc[3] & 0x8000) >> 15)) << 32) |
 		(((uint64_t)  fwstc[1]) << 16) | ((uint64_t) fwstc[0]);
 	*base = 1;
         
-	DEB_EE(("av7110: stc = %lu\n", (unsigned long)*stc));
+	dprintk(4, "stc = %lu\n", (unsigned long)*stc);
 
 	return 0;
 }
@@ -1099,7 +1094,7 @@
 {
 	struct av7110 *av7110 = fe->before_after_data;
 
-	DEB_EE(("av7110: %p\n", av7110));
+	dprintk(4, "%p\n", av7110);
 
 	switch (cmd) {
 	case FE_SET_TONE:
@@ -1138,7 +1133,7 @@
 {
 	struct av7110 *av7110 = data;
 
-	DEB_EE(("av7110: %p\n",av7110));
+	dprintk(4, "%p\n", av7110);
 
         av7110->fe_synced = (s & FE_HAS_LOCK) ? 1 : 0;
 
@@ -1168,7 +1163,7 @@
         int ret, i;
         struct dvb_demux *dvbdemux=&av7110->demux;
 
-	DEB_EE(("av7110: %p\n",av7110));
+	dprintk(4, "%p\n", av7110);
 
         if (av7110->registered)
                 return -1;
@@ -1243,7 +1238,7 @@
 {
         struct dvb_demux *dvbdemux=&av7110->demux;
 
-	DEB_EE(("av7110: %p\n",av7110));
+	dprintk(4, "%p\n", av7110);
 
         if (!av7110->registered)
                 return;
@@ -1397,7 +1391,7 @@
 	/* check if the firmware is available */
 	av7110->bin_fw = (unsigned char*) vmalloc(fw->size);
 	if (NULL == av7110->bin_fw) {
-		DEB_D(("out of memory\n"));
+		dprintk(1, "out of memory\n");
 		release_firmware(fw);
 		return -ENOMEM;
 	}
@@ -1440,14 +1434,14 @@
 	struct av7110 *av7110 = NULL;
 	int ret = 0;
 
-	DEB_EE(("dev: %p\n", dev));
+	dprintk(4, "dev: %p\n", dev);
 
 	/* prepare the av7110 device struct */
 	if (!(av7110 = kmalloc (sizeof (struct av7110), GFP_KERNEL))) {
-		printk ("%s: out of memory!\n", __FUNCTION__);
+		dprintk(1, "out of memory\n");
 		return -ENOMEM;
 	}
-	DEB_EE(("av7110: %p\n", av7110));
+
 	memset(av7110, 0, sizeof(struct av7110));
 	
 	av7110->card_name = (char*)pci_ext->ext_priv;
@@ -1547,11 +1541,11 @@
 	}
 
 	if (FW_VERSION(av7110->arm_app)<0x2501)
-		printk ("av7110: Warning, firmware version 0x%04x is too old. "
+		printk ("dvb-ttpci: Warning, firmware version 0x%04x is too old. "
 			"System might be unstable!\n", FW_VERSION(av7110->arm_app));
 
 	if (kernel_thread(arm_thread, (void *) av7110, 0) < 0) {
-		printk(KERN_ERR "av7110(%d): faile to start arm_mon kernel thread\n",
+		printk("dvb-ttpci: failed to start arm_mon kernel thread @ card %d\n",
 		       av7110->dvb_adapter->num);
 		goto err2;
 	}
@@ -1572,7 +1566,7 @@
 	if (ret)
 		goto err3;
 
-	printk(KERN_INFO "av7110: found av7110-%d.\n",av7110_num);
+	printk(KERN_INFO "dvb-ttpci: found av7110-%d.\n", av7110_num);
 	av7110->device_initialized = 1;
 	av7110_num++;
         return 0;
@@ -1604,7 +1598,7 @@
 static int av7110_detach (struct saa7146_dev* saa)
 {
 	struct av7110 *av7110 = (struct av7110*)saa->ext_priv;
-	DEB_EE(("av7110: %p\n",av7110));
+	dprintk(4, "%p\n", av7110);
 	
 	if( 0 == av7110->device_initialized ) {
 		return 0;
@@ -1653,8 +1647,6 @@
 {
 	struct av7110 *av7110 = (struct av7110*)dev->ext_priv;
 
-//	DEB_INT(("dev: %p, av7110: %p\n",dev,av7110));
-
 	if (*isr & MASK_19)
 		tasklet_schedule (&av7110->debi_tasklet);
 	
drivers/media/dvb/ttpci/av7110.h +5 -0
diff -uraNwB linux-2.6.10-rc1/drivers/media/dvb/ttpci/av7110.h linux-2.6.10-rc1-patched/drivers/media/dvb/ttpci/av7110.h
@@ -27,6 +27,11 @@
 
 #include <media/saa7146_vv.h>
 
+extern int av7110_debug;
+
+#define dprintk(level,args...) \
+	    do { if ((av7110_debug & level)) { printk("dvb-ttpci: %s(): ", __FUNCTION__); printk(args); } } while (0)
+
 #define MAXFILT 32
 
 enum {AV_PES_STREAM, PS_STREAM, TS_STREAM, PES_STREAM};
drivers/media/dvb/ttpci/av7110_av.c +26 -36

242 lines not on this page · raw message

drivers/media/dvb/ttpci/av7110_ca.c +12 -9
diff -uraNwB linux-2.6.10-rc1/drivers/media/dvb/ttpci/av7110_ca.c linux-2.6.10-rc1-patched/drivers/media/dvb/ttpci/av7110_ca.c
@@ -44,7 +44,7 @@
 
 void CI_handle(struct av7110 *av7110, u8 *data, u16 len)
 {
-	DEB_EE(("av7110: %p\n", av7110));
+	dprintk(8, "av7110:%p\n",av7110);
 
 	if (len < 3)
 		return;
@@ -207,7 +207,7 @@
 	struct av7110 *av7110 = (struct av7110 *) dvbdev->priv;
 	int err = dvb_generic_open(inode, file);
 
-	DEB_EE(("av7110: %p\n", av7110));
+	dprintk(8, "av7110:%p\n",av7110);
 
 	if (err < 0)
 		return err;
@@ -223,13 +223,16 @@
 	struct dvb_ringbuffer *wbuf = &av7110->ci_wbuffer;
 	unsigned int mask = 0;
 
-	DEB_EE(("av7110: %p\n", av7110));
+	dprintk(8, "av7110:%p\n",av7110);
 
 	poll_wait(file, &rbuf->queue, wait);
+	poll_wait(file, &wbuf->queue, wait);
+
 	if (!dvb_ringbuffer_empty(rbuf))
-		mask |= POLLIN;
-	if (dvb_ringbuffer_avail(wbuf) > 1024)
-		mask |= POLLOUT;
+		mask |= (POLLIN | POLLRDNORM);
+
+	if (dvb_ringbuffer_free(wbuf) > 1024)
+		mask |= (POLLOUT | POLLWRNORM);
 
 	return mask;
 }
@@ -241,7 +244,7 @@
 	struct av7110 *av7110 = (struct av7110 *) dvbdev->priv;
 	unsigned long arg = (unsigned long) parg;
 
-	DEB_EE(("av7110: %p\n", av7110));
+	dprintk(8, "av7110:%p\n",av7110);
 
 	switch (cmd) {
 	case CA_RESET:
@@ -318,7 +321,7 @@
 	struct dvb_device *dvbdev = (struct dvb_device *) file->private_data;
 	struct av7110 *av7110 = (struct av7110 *) dvbdev->priv;
 
-	DEB_EE(("av7110: %p\n", av7110));
+	dprintk(8, "av7110:%p\n",av7110);
 	return ci_ll_write(&av7110->ci_wbuffer, file, buf, count, ppos);
 }
 
@@ -328,7 +331,7 @@
 	struct dvb_device *dvbdev = (struct dvb_device *) file->private_data;
 	struct av7110 *av7110 = (struct av7110 *) dvbdev->priv;
 
-	DEB_EE(("av7110: %p\n", av7110));
+	dprintk(8, "av7110:%p\n",av7110);
 	return ci_ll_read(&av7110->ci_rbuffer, file, buf, count, ppos);
 }
 
drivers/media/dvb/ttpci/av7110_hw.c +50 -50

342 lines not on this page · raw message

drivers/media/dvb/ttpci/av7110_ir.c +3 -8
diff -uraNwB linux-2.6.10-rc1/drivers/media/dvb/ttpci/av7110_ir.c linux-2.6.10-rc1-patched/drivers/media/dvb/ttpci/av7110_ir.c
@@ -4,18 +4,13 @@
 #include <linux/moduleparam.h>
 #include <linux/input.h>
 #include <linux/proc_fs.h>
-#include <linux/bitops.h>
+#include <asm/bitops.h>
 
 #include "av7110.h"
 
 #define UP_TIMEOUT (HZ/4)
 
-static int av7110_ir_debug;
-
-module_param_named(debug_ir, av7110_ir_debug, int, 0644);
-MODULE_PARM_DESC(av7110_ir_debug, "Turn on/off IR debugging (default:off).");
-
-#define dprintk(x...)  do { if (av7110_ir_debug) printk (x); } while (0)
+/* enable ir debugging by or'ing av7110_debug with 16 */
 
 static struct input_dev input_dev;
 
@@ -78,7 +73,7 @@
 
 	keycode = key_map[data];
 	
-	dprintk ("#########%08x######### addr %i data 0x%02x (keycode %i)\n",
+	dprintk(16, "#########%08x######### addr %i data 0x%02x (keycode %i)\n",
 		 ircom, addr, data, keycode);
 
 	/* check device address (if selected) */
drivers/media/dvb/ttpci/av7110_v4l.c +33 -33

230 lines not on this page · raw message

drivers/media/dvb/ttpci/budget-av.c +9 -21
diff -uraNwB linux-2.6.10-rc1/drivers/media/dvb/ttpci/budget-av.c linux-2.6.10-rc1-patched/drivers/media/dvb/ttpci/budget-av.c
@@ -127,19 +123,18 @@
 	const u8 *data = saa7113_tab;
 
         if (i2c_writereg (&budget->i2c_adap, 0x4a, 0x01, 0x08) != 1) {
-                DEB_D(("saa7113: not found on KNC card\n"));
+                dprintk(1, "saa7113 not found on KNC card\n");
                 return -ENODEV;
         }
 
-        INFO(("saa7113: detected and initializing\n"));
+        dprintk(1, "saa7113 detected and initializing\n");
 
 	while (*data != 0xff) {
                 i2c_writereg(&budget->i2c_adap, 0x4a, *data, *(data+1));
                 data += 2;
         }
 
-	DEB_D(("saa7113: status=%02x\n",
-	      i2c_readreg(&budget->i2c_adap, 0x4a, 0x1f)));
+	dprintk(1, "saa7113  status=%02x\n", i2c_readreg(&budget->i2c_adap, 0x4a, 0x1f));
 
 	return 0;
 }
@@ -171,7 +164,7 @@
 	struct budget_av *budget_av = (struct budget_av*) dev->ext_priv;
 	int err;
 
-	DEB_EE(("dev: %p\n",dev));
+	dprintk(2, "dev: %p\n", dev);
 
 	if ( 1 == budget_av->has_saa7113 ) {
 	saa7146_setgpio(dev, 0, SAA7146_GPIO_OUTLO);
@@ -198,7 +191,7 @@
 	u8 *mac;
 	int err;
 
-	DEB_EE(("dev: %p\n",dev));
+	dprintk(2, "dev: %p\n", dev);
 
 	if (bi->type != BUDGET_KNC1 && bi->type != BUDGET_CIN1200) {
 		return -ENODEV;
@@ -299,7 +288,7 @@
 	{
 		struct v4l2_input *i = arg;
 		
-		DEB_EE(("VIDIOC_ENUMINPUT %d.\n",i->index));
+		dprintk(1, "VIDIOC_ENUMINPUT %d.\n", i->index);
 		if( i->index < 0 || i->index >= KNC1_INPUTS) {
 			return -EINVAL;
 		}
@@ -312,19 +301,16 @@
 
 		*input = budget_av->cur_input;
 
-		DEB_EE(("VIDIOC_G_INPUT %d.\n",*input));
+		dprintk(1, "VIDIOC_G_INPUT %d.\n", *input);
 		return 0;		
 	}	
 	case VIDIOC_S_INPUT:
 	{
 		int input = *(int *)arg;
-		DEB_EE(("VIDIOC_S_INPUT %d.\n", input));
+		dprintk(1, "VIDIOC_S_INPUT %d.\n", input);
 		return saa7113_setinput (budget_av, input);
 	}
 	default:
-/*
-		DEB2(printk("does not handle this ioctl.\n"));
-*/
 		return -ENOIOCTLCMD;
 	}
 	return 0;
@@ -384,21 +367,13 @@
 	.irq_func	= ttpci_budget_irq10_handler,
 };	
 
-
 static int __init budget_av_init(void) 
 {
-	DEB_EE((".\n"));
-
-	if (saa7146_register_extension(&budget_extension))
-		return -ENODEV;
-	
-	return 0;
+	return saa7146_register_extension(&budget_extension);
 }
 
-
 static void __exit budget_av_exit(void)
 {
-	DEB_EE((".\n"));
 	saa7146_unregister_extension(&budget_extension); 
 }
 
drivers/media/dvb/ttpci/budget-ci.c +2 -4
diff -uraNwB linux-2.6.10-rc1/drivers/media/dvb/ttpci/budget-ci.c linux-2.6.10-rc1-patched/drivers/media/dvb/ttpci/budget-ci.c
@@ -500,7 +491,7 @@
 {
         struct budget_ci *budget_ci = (struct budget_ci*) dev->ext_priv;
 
-        DEB_EE(("dev: %p, budget_ci: %p\n", dev, budget_ci));
+	dprintk(8, "dev: %p, budget_ci: %p\n", dev, budget_ci);
 
         if (*isr & MASK_06)
                 tasklet_schedule (&budget_ci->msp430_irq_tasklet);
@@ -523,7 +512,7 @@
 	if (!(budget_ci = kmalloc (sizeof(struct budget_ci), GFP_KERNEL)))
 		return -ENOMEM;
 
-	DEB_EE(("budget_ci: %p\n", budget_ci));
+	dprintk(2, "budget_ci: %p\n", budget_ci);
 
 	spin_lock_init(&budget_ci->debilock);
 	budget_ci->budget.ci_present = 0;
@@ -606,10 +590,8 @@
 	return saa7146_register_extension(&budget_extension);
 }
 
-
 static void __exit budget_ci_exit(void)
 {
-	DEB_EE((".\n"));
 	saa7146_unregister_extension(&budget_extension); 
 }
 
drivers/media/dvb/ttpci/budget-core.c +9 -9
diff -uraNwB linux-2.6.10-rc1/drivers/media/dvb/ttpci/budget-core.c linux-2.6.10-rc1-patched/drivers/media/dvb/ttpci/budget-core.c
@@ -50,7 +49,7 @@
 
 static int stop_ts_capture(struct budget *budget)
 {
-	DEB_EE(("budget: %p\n",budget));
+	dprintk(2, "budget: %p\n", budget);
 
         if (--budget->feeding)
                 return budget->feeding;
@@ -65,7 +63,7 @@
 {
         struct saa7146_dev *dev=budget->dev;
 
-	DEB_EE(("budget: %p\n",budget));
+	dprintk(2, "budget: %p\n", budget);
 
         if (budget->feeding) 
                 return ++budget->feeding;
@@ -171,7 +167,7 @@
         struct budget *budget = (struct budget*) demux->priv;
 	int status;
 
-	DEB_EE(("budget: %p\n",budget));
+	dprintk(2, "budget: %p\n", budget);
 
         if (!demux->dmx.frontend)
                 return -EINVAL;
@@ -188,7 +184,7 @@
         struct budget *budget = (struct budget *) demux->priv;
 	int status;
 
-	DEB_EE(("budget: %p\n",budget));
+	dprintk(2, "budget: %p\n", budget);
 
    	spin_lock(&budget->feedlock);
 	status = stop_ts_capture (budget);
@@ -202,7 +197,7 @@
         struct dvb_demux *dvbdemux=&budget->demux;
         int ret;
 
-	DEB_EE(("budget: %p\n",budget));
+	dprintk(2, "budget: %p\n", budget);
 
         dvbdemux->priv = (void *) budget;
 
@@ -251,7 +245,7 @@
 {
         struct dvb_demux *dvbdemux=&budget->demux;
 
-	DEB_EE(("budget: %p\n",budget));
+	dprintk(2, "budget: %p\n", budget);
 
 	dvb_net_release(&budget->dvb_net);
 
@@ -294,7 +288,7 @@
 
 	memset(budget, 0, sizeof(struct budget));
 
-	DEB_EE(("dev: %p, budget: %p\n", dev, budget));
+	dprintk(2, "dev: %p, budget: %p\n", dev, budget);
 
 	budget->card = bi;
 	budget->dev = (struct saa7146_dev *) dev;
@@ -377,7 +370,7 @@
 {
 	struct saa7146_dev *dev = budget->dev;
 
-	DEB_EE(("budget: %p\n", budget));
+	dprintk(2, "budget: %p\n", budget);
 
 	budget_unregister (budget);
 
@@ -398,7 +391,7 @@
 {
 	struct budget *budget = (struct budget*)dev->ext_priv;
 
-	DEB_EE(("dev: %p, budget: %p\n",dev,budget));
+	dprintk(8, "dev: %p, budget: %p\n",dev,budget);
 
 	if (*isr & MASK_10)
 		tasklet_schedule (&budget->vpe_tasklet);
drivers/media/dvb/ttpci/budget-patch.c +7 -9
diff -uraNwB linux-2.6.10-rc1/drivers/media/dvb/ttpci/budget-patch.c linux-2.6.10-rc1-patched/drivers/media/dvb/ttpci/budget-patch.c
@@ -30,9 +30,9 @@
  * the project's page is at http://www.linuxtv.org/dvb/
  */
 
-#include "budget.h"
 #include "av7110.h"
 #include "av7110_hw.h"
+#include "budget.h"
 
 #define budget_patch budget
 
@@ -51,7 +51,7 @@
 {
         struct saa7146_dev *dev=budget->dev;
 
-        DEB_EE(("budget: %p\n", budget));
+        dprintk(2, "budget: %p\n", budget);
 
         if (count <= 0 || count > 4)
                 return -1;
@@ -71,7 +70,7 @@
 {
         int i;
 
-        DEB_EE(("budget: %p\n", budget));
+        dprintk(2, "budget: %p\n", budget);
 
         for (i = 2; i < length; i++)
                 budget_wdebi(budget, DEBINOSWAP, COMMAND + 2*i, (u32) buf[i], 2);
@@ -90,7 +88,7 @@
 {
         u16 buf[2] = {( COMTYPE_AUDIODAC << 8) | (state ? ON22K : OFF22K), 0};
         
-        DEB_EE(("budget: %p\n", budget));
+        dprintk(2, "budget: %p\n", budget);
         budget_av7110_send_fw_cmd(budget, buf, 2);
 }
 
@@ -101,7 +98,7 @@
         u16 buf[18] = { ((COMTYPE_AUDIODAC << 8) | SendDiSEqC),
                 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
 
-        DEB_EE(("budget: %p\n", budget));
+        dprintk(2, "budget: %p\n", budget);
 
         if (len>10)
                 len=10;
@@ -126,7 +122,7 @@
 {
         struct budget_patch *budget = fe->before_after_data;
 
-        DEB_EE(("budget: %p\n", budget));
+        dprintk(2, "budget: %p\n", budget);
 
         switch (cmd) {
         case FE_SET_TONE:
@@ -171,7 +166,7 @@
         if (!(budget = kmalloc (sizeof(struct budget_patch), GFP_KERNEL)))
                 return -ENOMEM;
 
-        DEB_EE(("budget: %p\n",budget));
+        dprintk(2, "budget: %p\n", budget);
 
         if ((err = ttpci_budget_init (budget, dev, info))) {
                 kfree (budget);
@@ -251,10 +244,8 @@
 	return saa7146_register_extension(&budget_extension);
 }
 
-
 static void __exit budget_patch_exit(void)
 {
-        DEB_EE((".\n"));
         saa7146_unregister_extension(&budget_extension); 
 }
 
drivers/media/dvb/ttpci/budget.c +8 -9
diff -uraNwB linux-2.6.10-rc1/drivers/media/dvb/ttpci/budget.c linux-2.6.10-rc1-patched/drivers/media/dvb/ttpci/budget.c
@@ -39,7 +39,7 @@
 static void Set22K (struct budget *budget, int state)
 {
 	struct saa7146_dev *dev=budget->dev;
-	DEB_EE(("budget: %p\n",budget));
+	dprintk(2, "budget: %p\n", budget);
 	saa7146_setgpio(dev, 3, (state ? SAA7146_GPIO_OUTHI : SAA7146_GPIO_OUTLO));
 }
 
@@ -51,7 +51,7 @@
 static void DiseqcSendBit (struct budget *budget, int data)
 {
 	struct saa7146_dev *dev=budget->dev;
-	DEB_EE(("budget: %p\n",budget));
+	dprintk(2, "budget: %p\n", budget);
 
 	saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTHI);
 	udelay(data ? 500 : 1000);
@@ -64,7 +64,7 @@
 {
 	int i, par=1, d;
 
-	DEB_EE(("budget: %p\n",budget));
+	dprintk(2, "budget: %p\n", budget);
 
 	for (i=7; i>=0; i--) {
 		d = (data>>i)&1;
@@ -81,7 +81,7 @@
 	struct saa7146_dev *dev=budget->dev;
 	int i;
 
-	DEB_EE(("budget: %p\n",budget));
+	dprintk(2, "budget: %p\n", budget);
 
 	saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO);
 	mdelay(16);
@@ -110,7 +110,7 @@
 {
        struct budget *budget = fe->before_after_data;
 
-       DEB_EE(("budget: %p\n",budget));
+       dprintk(2, "budget: %p\n", budget);
 
        switch (cmd) {
        case FE_SET_TONE:
@@ -155,7 +155,7 @@
 {
 	struct saa7146_dev *dev=budget->dev;
 
-	DEB_EE(("budget: %p\n",budget));
+	dprintk(2, "budget: %p\n", budget);
 
 	switch (voltage) {
 		case SEC_VOLTAGE_13:
@@ -176,7 +176,7 @@
 {
 	struct budget *budget = fe->before_after_data;
 
-	DEB_EE(("budget: %p\n",budget));
+	dprintk(2, "budget: %p\n", budget);
 
 	switch (cmd) {
 		case FE_SET_VOLTAGE:
@@ -199,7 +199,7 @@
 		return -ENOMEM;
 	}
 
-	DEB_EE(("dev:%p, info:%p, budget:%p\n",dev,info,budget));
+	dprintk(2, "dev:%p, info:%p, budget:%p\n", dev, info, budget);
 
 	dev->ext_priv = budget;
 
@@ -289,7 +289,6 @@
 
 static void __exit budget_exit(void)
 {
-	DEB_EE((".\n"));
 	saa7146_unregister_extension(&budget_extension); 
 }
 
drivers/media/dvb/ttpci/budget.h +7 -0
diff -uraNwB linux-2.6.10-rc1/drivers/media/dvb/ttpci/budget.h linux-2.6.10-rc1-patched/drivers/media/dvb/ttpci/budget.h
@@ -13,6 +13,13 @@
 
 extern int budget_debug;
 
+#ifdef dprintk
+#undef dprintk
+#endif
+
+#define dprintk(level,args...) \
+            do { if ((budget_debug & level)) { printk("%s: %s(): ",__stringify(KBUILD_MODNAME), __FUNCTION__); printk(args); } } while (0)
+
 struct budget_info {
 	char *name;
 	int type;
#2 lore raw

PATCH 2/5 DVB: misc. updates to the dvb-core

- [DVB] ttusb_dec: add new 2000T type model number
- [DVB] dvb_ca_en50221: properly zero out private pointer
- [DVB] dvb-bt8xx: properly use a mutex when starting/stopping the dma engine, remove card list, it's not need anymore
- [DVB] bt878: fix hex <=> dec typo (missing 0x prefix), mark remove bt878_remove() function __devexit_p
- [DVB] dvb-core: add dvb_net_debug module parameter, remove some dead code

Documentation/dvb/readme.txt +3 -3
diff -uraNwB linux-2.6.10-rc1/Documentation/dvb/readme.txt linux-2.6.10-rc1-patched/Documentation/dvb/readme.txt
@@ -41,9 +41,9 @@
 various bt8xx based "budget" DVB cards
 (Nebula, Pinnacle PCTV, Twinhan DST)
 
-"vp7041.txt"
-contains detailed informations about the
-Visionplus VisionDTV USB-Ter DVB-T adapter.
+"README.dibusb"
+contains detailed information about adapters
+based on DiBcom reference design.
 
 "udev.txt"
 how to get DVB and udev up and running.
drivers/media/dvb/ttusb-dec/ttusb_dec.c +1 -0
diff -uraNwB linux-2.6.10-rc1/drivers/media/dvb/ttusb-dec/ttusb_dec.c linux-2.6.10-rc1-patched/drivers/media/dvb/ttusb-dec/ttusb_dec.c
@@ -1293,6 +1293,7 @@
 				ttusb_dec_set_model(dec, TTUSB_DEC3000S);
 				break;
 			case 0x00070009:
+			case 0x00070013:
 				ttusb_dec_set_model(dec, TTUSB_DEC2000T);
 				break;
 			case 0x00070011:
drivers/media/dvb/frontends/grundig_29504-401.c +1 -1
diff -uraNwB linux-2.6.10-rc1/drivers/media/dvb/frontends/grundig_29504-401.c linux-2.6.10-rc1-patched/drivers/media/dvb/frontends/grundig_29504-401.c
@@ -4,7 +4,7 @@
 
     Copyright (C) 2001 Holger Waechtler <[email protected]>
                        for Convergence Integrated Media GmbH
-                       Marko Kohtala <[email protected]>
+                       Marko Kohtala <[email protected]>
 
     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
drivers/media/dvb/dvb-core/dvb_ca_en50221.c +1 -0
diff -uraNwB linux-2.6.10-rc1/drivers/media/dvb/dvb-core/dvb_ca_en50221.c linux-2.6.10-rc1-patched/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
@@ -1500,6 +1499,7 @@
 };
 
 static struct dvb_device dvbdev_ca = {
+        .priv	= NULL,
 	.users	= 1,
 	.readers= 1,
 	.writers= 1,
drivers/media/dvb/bt8xx/dvb-bt8xx.c +22 -18
diff -uraNwB linux-2.6.10-rc1/drivers/media/dvb/bt8xx/dvb-bt8xx.c linux-2.6.10-rc1-patched/drivers/media/dvb/bt8xx/dvb-bt8xx.c
@@ -68,20 +68,21 @@
 {
 	struct dvb_demux *dvbdmx = dvbdmxfeed->demux;
 	struct dvb_bt8xx_card *card = dvbdmx->priv;
+	int rc;
 
 	dprintk("dvb_bt8xx: start_feed\n");
 	
 	if (!dvbdmx->dmx.frontend)
 		return -EINVAL;
 
-	if (card->active)
-		return 0;
-		
-	card->active = 1;
-	
-//	bt878_start(card->bt, card->gpio_mode);
-
-	return 0;
+	down(&card->lock);
+	card->nfeeds++;
+	rc = card->nfeeds;
+	if (card->nfeeds == 1)
+		bt878_start(card->bt, card->gpio_mode,
+			    card->op_sync_orin, card->irq_err_ignore);
+	up(&card->lock);
+	return rc;
 }
 
 static int dvb_bt8xx_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
@@ -94,12 +95,11 @@
 	if (!dvbdmx->dmx.frontend)
 		return -EINVAL;
 		
-	if (!card->active)
-		return 0;
-
-//	bt878_stop(card->bt);
-
-	card->active = 0;
+	down(&card->lock);
+	card->nfeeds--;
+	if (card->nfeeds == 0)
+		bt878_stop(card->bt);
+	up(&card->lock);
 
 	return 0;
 }
@@ -207,8 +207,6 @@
 
 	tasklet_init(&card->bt->tasklet, dvb_bt8xx_task, (unsigned long) card);
 	
-	bt878_start(card->bt, card->gpio_mode, card->op_sync_orin, card->irq_err_ignore);
-
 	return 0;
 }
 
@@ -223,6 +221,7 @@
 		return -ENOMEM;
 
 	memset(card, 0, sizeof(*card));
+	init_MUTEX(&card->lock);
 	card->bttv_nr = sub->core->nr;
 	strncpy(card->card_name, sub->core->name, sizeof(sub->core->name));
 	card->i2c_adapter = &sub->core->i2c_adap;
@@ -230,6 +229,9 @@
 	switch(sub->core->type)
 	{
 	case BTTV_PINNACLESAT:
+#ifdef BTTV_DVICO_DVBT_LITE
+	case BTTV_DVICO_DVBT_LITE:
+#endif
 		card->gpio_mode = 0x0400C060;
 		card->op_sync_orin = 0;
 		card->irq_err_ignore = 0;
@@ -287,7 +289,10 @@
 	}
 
 	if (!(card->bt = dvb_bt8xx_878_match(card->bttv_nr, bttv_pci_dev))) {
-		printk("dvb_bt8xx: unable to determine DMA core of card %d\n", card->bttv_nr);
+		printk("dvb_bt8xx: unable to determine DMA core of card %d,\n",
+		       card->bttv_nr);
+		printk("dvb_bt8xx: if you have the ALSA bt87x audio driver "
+		       "installed, try removing it.\n");
 
 		kfree(card);
 		return -EFAULT;
@@ -321,7 +326,6 @@
 		dvb_dmx_release(&card->demux);
 		dvb_unregister_adapter(card->dvb_adapter);
 		
-		list_del(&card->list);
 		kfree(card);
 
 	return 0;
drivers/media/dvb/bt8xx/dvb-bt8xx.h +2 -2
diff -uraNwB linux-2.6.10-rc1/drivers/media/dvb/bt8xx/dvb-bt8xx.h linux-2.6.10-rc1-patched/drivers/media/dvb/bt8xx/dvb-bt8xx.h
@@ -28,8 +28,8 @@
 #include "bttv.h"
 
 struct dvb_bt8xx_card {
-	struct list_head list;
-	u8 active;
+	struct semaphore lock;
+	int nfeeds;
 	char card_name[32];
 	struct dvb_adapter *dvb_adapter;
 	struct bt878 *bt;
drivers/media/dvb/bt8xx/bt878.c +2 -2
diff -uraNwB linux-2.6.10-rc1/drivers/media/dvb/bt8xx/bt878.c linux-2.6.10-rc1-patched/drivers/media/dvb/bt8xx/bt878.c
@@ -511,7 +511,7 @@
 		printk("bt878(%d): unloading\n", bt->nr);
 
 	/* turn off all capturing, DMA and IRQs */
-	btand(~13, BT878_AGPIO_DMA_CTL);
+	btand(~0x13, BT878_AGPIO_DMA_CTL);
 
 	/* first disable interrupts before unmapping the memory! */
 	btwrite(0, BT878_AINT_MASK);
@@ -554,7 +554,7 @@
       .name 	= "bt878",
       .id_table = bt878_pci_tbl,
       .probe 	= bt878_probe,
-      .remove 	= __devexit_p(bt878_remove),
+      .remove 	= bt878_remove,
 };
 
 static int bt878_pci_driver_registered = 0;
drivers/media/dvb/dvb-core/dvb_net.c +8 -16
diff -uraNwB linux-2.6.10-rc1/drivers/media/dvb/dvb-core/dvb_net.c linux-2.6.10-rc1-patched/drivers/media/dvb/dvb-core/dvb_net.c
@@ -37,10 +37,18 @@
 #include <linux/uio.h>
 #include <asm/uaccess.h>
 #include <linux/crc32.h>
+#include <linux/version.h>
 
 #include "dvb_demux.h"
 #include "dvb_net.h"
 
+static int dvb_net_debug;
+module_param(dvb_net_debug, int, 0444);
+MODULE_PARM_DESC(dvb_net_debug, "enable debug messages");
+
+#define dprintk(x...) do { if (dvb_net_debug) printk(x); } while (0)
+
+
 static inline __u32 iov_crc32( __u32 c, struct kvec *iov, unsigned int cnt )
 {
 	unsigned int j;
@@ -50,13 +58,6 @@
 }
 
 
-#if 1
-#define dprintk(x...) printk(x)
-#else
-#define dprintk(x...)
-#endif
-
-
 #define DVB_NET_MULTICAST_MAX 10
 
 #define isprint(c)	((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9'))
@@ -917,14 +922,6 @@
 }
 
 
-static int dvb_net_set_config(struct net_device *dev, struct ifmap *map)
-{
-	if (netif_running(dev))
-		return -EBUSY;
-	return 0;
-}
-
-
 static void wq_restart_net_feed (void *data)
 {
 	struct net_device *dev = data;
@@ -983,7 +979,6 @@
 	dev->hard_start_xmit	= dvb_net_tx;
 	dev->get_stats		= dvb_net_get_stats;
 	dev->set_multicast_list = dvb_net_set_multicast_list;
-	dev->set_config         = dvb_net_set_config;
 	dev->set_mac_address    = dvb_net_set_mac;
 	dev->mtu		= 4096;
 	dev->mc_count           = 0;
#0 lore raw

cover Update the DVB subsystem

Hi again,

thanks for applying the recent DVB updates to 2.6.10-rc1.

Here comes another patchset with 5 patches that in short does the following:

- rework debug print logic in av7110 driver
- various fixes in the dvb-core
- one new driver named "Terratec CinergyT2/qanu" for an highspeed USB2 DVB-T receiver
- general overhaul of the dibusb USB DVB driver -- there are more clones of this card out there than we expected

As usual, the details are at the top of each patch. IMO all changes are non-intrusive and can be applied safely.

Please apply.

CU
Michael.

#3 lore raw

PATCH 3/5 DVB: add new driver

In reply to Michael Hunold

- [DVB] add new driver for the Terratec CinergyT2/qanu USB2 DVB-T receiver, thanks to Daniel Mack and Holger Waechtler

drivers/media/dvb/Kconfig +1 -0
diff -uraNwB linux-2.6.10-rc1/drivers/media/dvb/Kconfig linux-2.6.10-rc1-patched/drivers/media/dvb/Kconfig
@@ -32,6 +32,7 @@
 source "drivers/media/dvb/ttusb-budget/Kconfig"
 source "drivers/media/dvb/ttusb-dec/Kconfig"
 source "drivers/media/dvb/dibusb/Kconfig"
+source "drivers/media/dvb/cinergyT2/Kconfig"
 
 comment "Supported FlexCopII (B2C2) Adapters"
 	depends on DVB_CORE && PCI
drivers/media/dvb/Makefile +1 -1
diff -uraNwB linux-2.6.10-rc1/drivers/media/dvb/Makefile linux-2.6.10-rc1-patched/drivers/media/dvb/Makefile
@@ -2,4 +2,4 @@
 # Makefile for the kernel multimedia device drivers.
 #
 
-obj-y        := dvb-core/ frontends/ ttpci/ ttusb-dec/ ttusb-budget/ b2c2/ bt8xx/ dibusb/
+obj-y        := dvb-core/ frontends/ ttpci/ ttusb-dec/ ttusb-budget/ b2c2/ bt8xx/ dibusb/ cinergyT2/
drivers/media/dvb/cinergyT2/Kconfig +59 -0

59 lines not on this page · raw message

drivers/media/dvb/cinergyT2/Makefile +3 -0
diff -uraNwB linux-2.6.10-rc1/drivers/media/dvb/cinergyT2/Makefile linux-2.6.10-rc1-patched/drivers/media/dvb/cinergyT2/Makefile
@@ -0,0 +1,3 @@
+obj-$(CONFIG_DVB_CINERGYT2) += cinergyT2.o
+
+EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/
drivers/media/dvb/cinergyT2/cinergyT2.c +811 -0

811 lines not on this page · raw message

#4 lore raw

PATCH 4/5 DVB: revamp dibusb driver

- [DVB] dibusb: update documentation for the dibusb DVB driver
- [DVB] dibusb: major overhaul of the driver, including adding new vendor and product ids from clones

Documentation/dvb/README.dibusb +26 -8
diff -uraNwB linux-2.6.10-rc1/Documentation/dvb/README.dibusb linux-2.6.10-rc1-patched/Documentation/dvb/README.dibusb
@@ -1,9 +1,11 @@
+
+
 Documentation for dib3000mb frontend driver and dibusb device driver
 
 The drivers should work with
 
 - Twinhan VisionPlus VisionDTV USB-Ter DVB-T Device (VP7041)
-	http://www.twinhan.com/visiontv-2_4.htm
+	http://www.twinhan.com/
 
 - CTS Portable (Chinese Television System)
 	http://www.2cts.tv/ctsportable/
@@ -19,6 +21,10 @@
 - Ultima Electronic/Artec T1 USB TVBOX
 	http://www.arteceuro.com/products-tvbox.html
 
+- Compro Videomate DVB-U2000 - DVB-T USB
+	http://www.comprousa.com/products/vmu2000.htm
+
+- Unknown USB DVB-T device with vendor ID Hyper-Paltek
 
 Copyright (C) 2004 Patrick Boettcher ([email protected]),
 
@@ -32,6 +38,11 @@
 
 
 NEWS:
+  2004-09-28 - added support for a new device (Unkown, vendor ID is Hyper-Paltek)
+  2004-09-20 - added support for a new device (Compro DVB-U2000), thanks
+               to Amaury Demol for reporting
+             - changed usb TS transfer method (several urbs, stopping transfer 
+               before setting a new pid)
   2004-09-13 - added support for a new device (Artec T1 USB TVBOX), thanks
                to Christian Motschke for reporting
   2004-09-05 - released the dibusb device and dib3000mb-frontend driver
@@ -85,8 +96,13 @@
 
 If you want to enable debug output, you have to load the driver manually.
 
-modprobe dvb-dibusb debug=1
-modprobe dib3000mb debug=1
+first have a look, which debug level are available:
+
+modinfo dvb-dibusb
+modinfo dib3000mb
+
+modprobe dvb-dibusb debug=<level> 
+modprobe dib3000mb debug=<level>
 
 should do the trick.
 
@@ -102,11 +118,13 @@
 2. Known problems and bugs
 
 TODO:
-- add some additional URBs for USB data transfer
-- due a firmware problem i2c writes during mpeg transfers destroy the stream
-  no i2c writes during streaming, interrupt streaming, when adding another pid
+- remote control tasklet
+- signal-quality and strength calculations
+- debug messages restructure
+- i2c address probing
+- 
 
-2.1. Adding new devices
+2.1. Adding support for devices 
 
 It is not possible to determine the range of devices based on the DiBcom
 reference design. This is because the reference design of DiBcom can be sold
@@ -122,7 +140,7 @@
 others.
 
 If you are familar with C you can also add the VID and PID of the device to
-the dvb-dibusb.[hc]-files and create a patch and send it over to me or to
+the dvb-dibusb.h-file and create a patch and send it over to me or to 
 the linux-dvb mailing list, _after_ you have tried compiling and modprobing
 it.
 
drivers/media/dvb/dibusb/Kconfig +5 -3
diff -uraNwB linux-2.6.10-rc1/drivers/media/dvb/dibusb/Kconfig linux-2.6.10-rc1-patched/drivers/media/dvb/dibusb/Kconfig
@@ -1,5 +1,5 @@
 config DVB_DIBUSB
-	tristate "Twinhan/KWorld/Hama/Artec USB DVB-T devices"
+	tristate "DiBcom/Twinhan/KWorld/Hama/Artec/Compro USB DVB-T devices"
 	depends on DVB_CORE && USB
 	select FW_LOADER
 	help
@@ -8,11 +8,13 @@
 
 	  Devices supported by this driver:
 
-	    Twinhan VisionPlus VisionDTV USB-Ter (VP7041)
+	    TwinhanDTV USB-Ter (VP7041)
+		TwinhanDTV Magic Box (VP7041e)
 	    KWorld V-Stream XPERT DTV - DVB-T USB
 	    Hama DVB-T USB-Box
 	    DiBcom reference device (non-public)
 	    Ultima Electronic/Artec T1 USB TVBOX
+	    Compro Videomate DVB-U2000 - DVB-T USB
 
 	  The VP7041 seems to be identical to "CTS Portable" (Chinese
 	  Television System).
@@ -20,7 +22,7 @@
 	  These devices can be understood as budget ones, they "only" deliver
 	  the MPEG data.
 
-	  Currently all known copies of the DiBcom reference design have the DiBcom 3000MB
+	  Currently all known copies of the DiBcom reference design have the DiBcom 3000-MB 
 	  frontend onboard. Please enable and load this one manually in order to use this
 	  device.
 
drivers/media/dvb/dibusb/dvb-dibusb.c +105 -72

336 lines not on this page · raw message

drivers/media/dvb/dibusb/dvb-dibusb.h +104 -55

207 lines not on this page · raw message

drivers/media/dvb/frontends/dib3000mb.c +209 -73

668 lines not on this page · raw message

drivers/media/dvb/frontends/dib3000mb.h +9 -9
diff -uraNwB linux-2.6.10-rc1/drivers/media/dvb/frontends/dib3000mb.h linux-2.6.10-rc1-patched/drivers/media/dvb/frontends/dib3000mb.h
@@ -7,6 +7,7 @@
  *	modify it under the terms of the GNU General Public License as
  *	published by the Free Software Foundation, version 2.
  *
+ * 
  *
  * for more information see dib3000mb.c .
  */
@@ -320,7 +321,7 @@
 #define DIB3000MB_REG_UNK_108			(   108)
 #define DIB3000MB_UNK_108					(0x0080)
 
-/* fft ??? */
+/* fft */
 #define DIB3000MB_REG_UNK_121			(   121)
 #define DIB3000MB_UNK_121_2K				(     7)
 #define DIB3000MB_UNK_121_DEFAULT			(     5)
@@ -351,12 +352,11 @@
 #define DIB3000MB_REG_VIT_CODE_RATE		(   129)
 
 /* forward error correction code rates */
-#define DIB3000MB_FEC_1_2					(     0)
-#define DIB3000MB_FEC_2_3					(     1)
-#define DIB3000MB_FEC_3_4					(     2)
-#define DIB3000MB_FEC_4_5					(     3)
-#define DIB3000MB_FEC_5_6					(     4)
-#define DIB3000MB_FEC_7_8					(     5)
+#define DIB3000MB_FEC_1_2					(     1)
+#define DIB3000MB_FEC_2_3					(     2)
+#define DIB3000MB_FEC_3_4					(     3)
+#define DIB3000MB_FEC_5_6					(     5)
+#define DIB3000MB_FEC_7_8					(     7)
 
 /* vit select hp */
 #define DIB3000MB_REG_VIT_HP			(   130)
@@ -627,8 +627,8 @@
 /* packet error rate (uncorrected TS packets) (16) */
 #define DIB3000MB_REG_PACKET_ERROR_RATE	(   417)
 
-/* packet error count (16) */
-#define DIB3000MB_REG_PACKET_ERROR_COUNT	(   420)
+/* uncorrected packet count (16) */
+#define DIB3000MB_REG_UNC				(   420)
 
 /* viterbi locked (1) */
 #define DIB3000MB_REG_VIT_LCK			(   421)
#5 lore raw

PATCH 5/5 DVB: misc. updates to frontend drivers

- [DVB] add legacy DishNetwork support to dvb core and stv0299, thanks to Jeremy Hall
- [DVB] mt352: major cleanup, support DVICO FusionHDTV DVB-T, thanks to Christopher Pascoe

include/linux/dvb/frontend.h +2 -0
diff -uraNwB linux-2.6.10-rc1/include/linux/dvb/frontend.h linux-2.6.10-rc1-patched/include/linux/dvb/frontend.h
@@ -258,6 +258,8 @@
 #define FE_GET_FRONTEND            _IOR('o', 77, struct dvb_frontend_parameters)
 #define FE_GET_EVENT               _IOR('o', 78, struct dvb_frontend_event)
 
+#define FE_DISHNETWORK_SEND_LEGACY_CMD _IO('o', 80) /* unsigned int */
+
 
 #endif /*_DVBFRONTEND_H_*/
 diff -uraNwB linux-2.6.10-rc1/drivers/media/dvb/frontends/stv0299.c linux-2.6.10-rc1-patched/drivers/media/dvb/frontends/stv0299.c
drivers/media/dvb/frontends/stv0299.c +45 -4

69 lines not on this page · raw message

drivers/media/dvb/frontends/mt352.c +285 -150

804 lines not on this page · raw message

drivers/media/dvb/frontends/mt352.h +20 -23

87 lines not on this page · raw message