patch(bttv-0.7.103+snapshot): Radio on PCTVpro/Mt2032 works perfect now

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



Michael Pearce wrote:
Hi, I just bought a PCTV Pro today after

...
> great picture and sound (using 0.7.102), but radio doesn't work
at all.

With this patch radio works perfectly here (PAL card tested, NTSC card should work too).

Note1:
There is currrently a race condition left.
When you don't get these two lines:
 kernel: bttv tuner received pinnacle id 2
 kernel: bttv tda9887 received pinnacle id 2
report this fact (and workaround by "rmmod bttv; insmod bttv").

Note2:
Patch is against http://bytesex.org/snapshot/
Hopefully Gerd will make 104 soon.

Regards, Gunther


diff -Nur bttv7-20030131.orig/driver/tda9887.c bttv7-20030131-mt2032_radio/driver/tda9887.c
--- bttv7-20030131.orig/driver/tda9887.c	Tue Jan 28 21:29:07 2003
+++ bttv7-20030131-mt2032_radio/driver/tda9887.c	Sat Feb  1 03:27:04 2003
@@ -419,6 +419,7 @@
 	{
 		int *i = arg;
 
+		printk("bttv tda9887 received pinnacle id %d\n",*i);
 		t->pinnacle_id = *i;
 		tda9887_miro(t);
 		break;
diff -Nur bttv7-20030131.orig/driver/tuner.c bttv7-20030131-mt2032_radio/driver/tuner.c
--- bttv7-20030131.orig/driver/tuner.c	Fri Jan 31 16:02:37 2003
+++ bttv7-20030131-mt2032_radio/driver/tuner.c	Sat Feb  1 03:27:17 2003
@@ -54,6 +54,7 @@
 	unsigned int radio;
 	unsigned int mode;            /* current norm for multi-norm tuners */
 	unsigned int xogc;	     // only for MT2032
+	unsigned int pinnacle_id;     // only for Pinnacle PCTVpro/MT2032 radio mode
 };
 
 static struct i2c_driver driver;
@@ -733,8 +734,14 @@
 static void mt2032_set_radio_freq(struct i2c_client *c,int freq)
 {               
         int if2;
+	struct tuner *t = (struct tuner*)c->data;
+
+        //if2=10700*1000; //  10.7MHz FM intermediate frequency
 
-        if2=10700*1000; //  10.7MHz FM intermediate frequency
+	if(t->pinnacle_id == 3) // TDA9887 will generate 10.7 MHz IF lastly.
+		if2=41300*1000; // radio must first go through NTSC SAW filter
+	else
+		if2=33300*1000; // ... through PAL SAW filter
 
 	// per Manual for FM tuning: first if center freq. 1085 MHz
         mt2032_set_if_freq(c,freq* 1000*1000/16, 1085*1000*1000,if2,if2,if2);
@@ -889,7 +896,17 @@
 	case AUDC_SET_RADIO:
 		t->radio = 1;
 		break;
-		
+
+	
+	case AUDC_CONFIG_PINNACLE:
+	{
+		int *i = arg;
+		printk("bttv tuner received pinnacle id %d\n",*i);
+
+                t->pinnacle_id = *i;
+                break;
+        }
+	
 	/* --- v4l ioctls --- */
 	/* take care: bttv does userspace copying, we'll get a
 	   kernel pointer here... */

[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux