On Thu, 2006-06-01 at 21:12 +0200, Hans Verkuil wrote:
> Ah, thanks! This did indeed give me the clue I needed. The type field of 
> the v4l2_frequency struct was left uninitialized in the ivtv driver 
> when the frequency was set on driver load. So if you were unlucky it 
> would switch the tuner to radio mode. It's now fixed in the subversion 
> repository.

I was also suffering from what looks like this problem. I need to test
to make sure -- but thanks in advance! 

Perhaps the below might be a good idea so at least problems such as this
will be deterministic in the future if new fields are added to the
struct?

The attached version also fixes up the whitespace in the next couple of
lines...

Ian.

--- ./driver/.svn/text-base/ivtv-driver.c.svn-base      2006-06-03 
11:34:39.000000000 +0100
+++ ./driver/ivtv-driver.c      2006-06-03 12:15:26.000000000 +0100
@@ -1359,6 +1359,7 @@
                ivtv_call_i2c_clients(itv, TUNER_SET_TYPE_ADDR, &setup);
        }

+       memset(&vf, 0, sizeof(vf));
         vf.tuner = 0;
        vf.type = V4L2_TUNER_ANALOG_TV;
         vf.frequency = 6400; /* the tuner 'baseline' frequency */

-- 
Ian Campbell

Oh yeah?  Well, I remember when sex was dirty and the air was clean.
Index: driver/ivtv-driver.c
===================================================================
--- driver/ivtv-driver.c	(revision 3319)
+++ driver/ivtv-driver.c	(working copy)
@@ -1359,9 +1359,10 @@
 		ivtv_call_i2c_clients(itv, TUNER_SET_TYPE_ADDR, &setup);
 	}
 
-        vf.tuner = 0;
+	memset(&vf, 0, sizeof(vf));
+	vf.tuner = 0;
 	vf.type = V4L2_TUNER_ANALOG_TV;
-        vf.frequency = 6400; /* the tuner 'baseline' frequency */
+	vf.frequency = 6400; /* the tuner 'baseline' frequency */
 	if (itv->std & V4L2_STD_NTSC_M) {
 		/* Why on earth? */
 		vf.frequency = 1076;	/* ch. 4 67250*16/1000 */

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
ivtv-users mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-users

Reply via email to