Re: patch "budget-av: Remove polarity switching of the clock for the DVB-C cards" causes corrupt stream

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthias Dahl wrote:
> Like always, if you need anything, please let me know.

Hi,

it seems that newer windows drivers for the KNC ONE/Satelco EasyWatch/Terratec Cinergy do not longer use the VPE
interrupt to transfer data. They use the the PORT A/B interrupt. Can you please try the attached patch (with and without
the CI/CAM)? The patch uses also the PORT A/B interrupt. I've tested it with my Cinergy 1200C (without a CI).

- Hartmut

diff -r 015313b16eab linux/drivers/media/dvb/ttpci/budget-av.c
--- a/linux/drivers/media/dvb/ttpci/budget-av.c	Tue May 22 10:30:04 2007 -0300
+++ b/linux/drivers/media/dvb/ttpci/budget-av.c	Tue May 22 23:59:46 2007 +0200
@@ -1058,7 +1058,8 @@ static void budget_av_irq(struct saa7146
 
 	dprintk(8, "dev: %p, budget_av: %p\n", dev, budget_av);
 
-	if (*isr & MASK_10)
+//	if (*isr & MASK_10)
+	if (*isr & (MASK_07|MASK_08))
 		ttpci_budget_irq10_handler(dev, isr);
 }
 
@@ -1300,7 +1301,8 @@ static struct saa7146_extension budget_e
 	.attach = budget_av_attach,
 	.detach = budget_av_detach,
 
-	.irq_mask = MASK_10,
+//	.irq_mask = MASK_10,
+	.irq_mask = MASK_07|MASK_08,
 	.irq_func = budget_av_irq,
 };
 
diff -r 015313b16eab linux/drivers/media/dvb/ttpci/budget-core.c
--- a/linux/drivers/media/dvb/ttpci/budget-core.c	Tue May 22 10:30:04 2007 -0300
+++ b/linux/drivers/media/dvb/ttpci/budget-core.c	Wed May 23 00:03:44 2007 +0200
@@ -52,7 +52,8 @@
 #define BUFFER_WARNING_WAIT	(30*HZ)
 
 int budget_debug;
-static int dma_buffer_size = TS_MIN_BUFSIZE_K;
+//static int dma_buffer_size = TS_MIN_BUFSIZE_K;
+static int dma_buffer_size = TS_MAX_BUFSIZE_K_DVBC;
 module_param_named(debug, budget_debug, int, 0644);
 module_param_named(bufsize, dma_buffer_size, int, 0444);
 MODULE_PARM_DESC(debug, "Turn on/off budget debugging (default:off).");
@@ -67,7 +68,9 @@ static int stop_ts_capture(struct budget
 	dprintk(2, "budget: %p\n", budget);
 
 	saa7146_write(budget->dev, MC1, MASK_20);	// DMA3 off
-	SAA7146_IER_DISABLE(budget->dev, MASK_10);
+//	SAA7146_IER_DISABLE(budget->dev, MASK_10);
+	SAA7146_IER_DISABLE(budget->dev, MASK_07);	// PORT B interrupt
+	SAA7146_IER_DISABLE(budget->dev, MASK_08);	// PORT A interrupt
 	return 0;
 }
 
@@ -113,22 +116,26 @@ static int start_ts_capture(struct budge
 	case BUDGET_KNC1C_MK3:
 	case BUDGET_KNC1CP_MK3:
 		if (budget->video_port == BUDGET_VIDEO_PORTA) {
-			saa7146_write(dev, DD1_INIT, 0x06000200);
+//			saa7146_write(dev, DD1_INIT, 0x06000200);
+			saa7146_write(dev, DD1_INIT, 0x06C00200);
 			saa7146_write(dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26));
 			saa7146_write(dev, BRS_CTRL, 0x00000000);
 		} else {
-			saa7146_write(dev, DD1_INIT, 0x00000600);
+//			saa7146_write(dev, DD1_INIT, 0x00000600);
+			saa7146_write(dev, DD1_INIT, 0x000006C0);
 			saa7146_write(dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26));
 			saa7146_write(dev, BRS_CTRL, 0x60000000);
 		}
 		break;
 	default:
 		if (budget->video_port == BUDGET_VIDEO_PORTA) {
-			saa7146_write(dev, DD1_INIT, 0x06000200);
+//			saa7146_write(dev, DD1_INIT, 0x06000200);
+			saa7146_write(dev, DD1_INIT, 0x06C00200);
 			saa7146_write(dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26));
 			saa7146_write(dev, BRS_CTRL, 0x00000000);
 		} else {
-			saa7146_write(dev, DD1_INIT, 0x02000600);
+//			saa7146_write(dev, DD1_INIT, 0x02000600);
+			saa7146_write(dev, DD1_INIT, 0x020006C0);
 			saa7146_write(dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26));
 			saa7146_write(dev, BRS_CTRL, 0x60000000);
 		}
@@ -154,8 +161,15 @@ static int start_ts_capture(struct budge
 
 	saa7146_write(dev, MC2, (MASK_04 | MASK_20));
 
-	SAA7146_ISR_CLEAR(budget->dev, MASK_10);	/* VPE */
-	SAA7146_IER_ENABLE(budget->dev, MASK_10);	/* VPE */
+//	SAA7146_ISR_CLEAR(budget->dev, MASK_10);	/* VPE */
+//	SAA7146_IER_ENABLE(budget->dev, MASK_10);	/* VPE */
+	if (budget->video_port == BUDGET_VIDEO_PORTA) {
+		SAA7146_ISR_CLEAR(budget->dev, MASK_08);	/* PORT A interrupt */
+		SAA7146_IER_ENABLE(budget->dev, MASK_08);	/* PORT A interrupt */
+	} else {
+		SAA7146_ISR_CLEAR(budget->dev, MASK_07);	/* PORT B interrupt */
+		SAA7146_IER_ENABLE(budget->dev, MASK_07);	/* PORT B interrupt */
+	}
 	saa7146_write(dev, MC1, (MASK_04 | MASK_20));	/* DMA3 on */
 
 	return 0;
@@ -577,7 +591,8 @@ void ttpci_budget_irq10_handler(struct s
 
 	dprintk(8, "dev: %p, budget: %p\n", dev, budget);
 
-	if (*isr & MASK_10)
+//	if (*isr & MASK_10)
+	if (*isr & (MASK_07|MASK_08))
 		tasklet_schedule(&budget->vpe_tasklet);
 }
 
_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux