hvr 1300 mpeg sound / video issues + patches

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

 



Dear all,

I'm experiencing an issue I had experienced previously which I though I got rid of but in fact no.
The issue is :

I tune the card through the [v4l] device (open/ioctls/close), then read the mpeg PS through the [mpeg] device. This is working. But closing the mpeg device, retuning the [v4l] device (open/ioctls/close) the reopening for read the [mpeg] device will yield in raspy sound and/or blinking black banner on the top of the video frames ...

I'm using a 2.6.22.19 kernel
I'm using a quite fresh v4l-dvb snapshot (rev e5ca4534b543 of September 9th, changeset 8963) I'm using v4l-cx2341x-enc.fw which md5sum is 9b39b3d3bba1ce2da40f82ef0c50ef48 from http://ivtvdriver.org/index.php/Firmware

By the way the mpeg was not providing anything (i.e only I/O errors) when selecting the analog tv tuner input so I took some time looking for a snapshot with tuner working and I came up with the attached hvr-1300-tuner-fix.patch patch file. I don't get why but this is simply a diff between rev b7bb2b116cbb (changeset 7442) and its child rev 13244661a8df (changset 7483) and it worked for me (7442 had tuner working, 7483 had not). Applying this patch on recent snapshots make the analog tuner work for me ... so if anyone can check if it's ok or if I missed an important point ...

Another thing : the way I work with the [mpeg] device was polling the device, then read from it if any data is available. But the [mpeg] is not providing anything until a read call has initiated the codec (i.e a call to blackbird_start_codec). So I came up with the attached cx88-blackbird-poll-fix.patch patch file. Thus, anyone willing to have a generic implementation of timeout polling before trying to read the device would be glad to be able to.

So if anyone has an understanding of my first issue (raspy sound / blinkg black banner on top of the video after some retuning function calls), can reproduce it, and / or has an idea on how to fix this, help would be greatly appreciated !

Greetings


--
CAND Frederic
Product Manager
ANEVIA
--- linux/drivers/media/common/tuners/tuner-types.c	2008-09-08 21:42:40.000000000 +0200
+++ linux/drivers/media/common/tuners/tuner-types.c	2008-09-16 10:55:28.000000000 +0200
@@ -1480,6 +1480,7 @@ struct tunertype tuners[] = {
 		.min    = 16 *  57.00,
 		.max    = 16 * 858.00,
 		.stepsize = 62500,
+		.initdata = tua603x_agc103,
 	},
 
 	/* 50-59 */
@@ -1494,12 +1495,15 @@ struct tunertype tuners[] = {
 		.count  = ARRAY_SIZE(tuner_philips_fm1256_ih3_params),
 	},
 	[TUNER_THOMSON_DTT7610] = { /* THOMSON ATSC */
+		.initdata = tua603x_agc112,
+		.sleepdata = (u8[]){ 4, 0x9c, 0x60, 0x85, 0x54 },
 		.name   = "Thomson DTT 7610 (ATSC/NTSC)",
 		.params = tuner_thomson_dtt7610_params,
 		.count  = ARRAY_SIZE(tuner_thomson_dtt7610_params),
 		.min    = 16 *  44.00,
 		.max    = 16 * 958.00,
 		.stepsize = 62500,
+		.initdata = tua603x_agc103,
 	},
 	[TUNER_PHILIPS_FQ1286] = { /* Philips NTSC */
 		.name   = "Philips FQ1286",
@@ -1544,7 +1548,6 @@ struct tunertype tuners[] = {
 		.min    = 16 *  57.00,
 		.max    = 16 * 863.00,
 		.stepsize = 62500,
-		.initdata = tua603x_agc103,
 	},
 	[TUNER_TENA_9533_DI] = { /* Philips PAL */
 		.name   = "Tena TNF9533-D/IF/TNF9533-B/DF",
@@ -1562,8 +1565,6 @@ struct tunertype tuners[] = {
 		.min = 16 *  50.87,
 		.max = 16 * 858.00,
 		.stepsize = 166667,
-		.initdata = tua603x_agc112,
-		.sleepdata = (u8[]){ 4, 0x9c, 0x60, 0x85, 0x54 },
 	},
 	[TUNER_LG_TDVS_H06XF] = { /* LGINNOTEK ATSC */
 		.name   = "LG TDVS-H06xF", /* H061F, H062F & H064F */
@@ -1572,7 +1573,6 @@ struct tunertype tuners[] = {
 		.min    = 16 *  54.00,
 		.max    = 16 * 863.00,
 		.stepsize = 62500,
-		.initdata = tua603x_agc103,
 	},
 	[TUNER_YMEC_TVF66T5_B_DFF] = { /* Philips PAL */
 		.name   = "Ymec TVF66T5-B/DFF",
--- linux/drivers/media/video/cx88/cx88-blackbird.c	2008-09-16 17:05:51.000000000 +0200
+++ linux/drivers/media/video/cx88/cx88-blackbird.c	2008-09-16 16:58:57.000000000 +0200
@@ -1177,6 +1177,10 @@ static unsigned int
 mpeg_poll(struct file *file, struct poll_table_struct *wait)
 {
 	struct cx8802_fh *fh = file->private_data;
+	struct cx8802_dev *dev = fh->dev;
+
+	if (!dev->mpeg_active)
+		blackbird_start_codec(file, fh);
 
 	return videobuf_poll_stream(file, &fh->mpegq, wait);
 }
_______________________________________________
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