patch-2.2.3 linux/drivers/char/radio-aimslab.c

Next file: linux/drivers/char/radio-aztech.c
Previous file: linux/drivers/char/misc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.2/linux/drivers/char/radio-aimslab.c linux/drivers/char/radio-aimslab.c
@@ -3,6 +3,11 @@
  * Coverted to new API by Alan Cox <Alan.Cox@linux.org>
  * Various bugfixes and enhancements by Russell Kroll <rkroll@exploits.org>
  *
+ * History:
+ * 1999-02-24	Russell Kroll <rkroll@exploits.org>
+ * 		Fine tuning/VIDEO_TUNER_LOW
+ *		Frequency range expanded to start at 87 MHz
+ *
  * TODO: Allow for more than one of these foolish entities :-)
  *
  * Notes on the hardware (reverse engineered from other peoples'
@@ -156,14 +161,11 @@
 
 	/* adapted from radio-aztech.c */
 
-	/* We want to compute x * 100 / 16 without overflow 
-	 * So we compute x*6 + (x/100)*25 to give x*6.25
-	 */
-	 
-	freq = freq * 6 + freq/4;	/* massage the data a little	*/
-	freq += 1070;			/* IF = 10.7 MHz 		*/
-	freq /= 5;			/* ref = 25 kHz			*/
+	/* now uses VIDEO_TUNER_LOW for fine tuning */
 
+	freq += 171200;			/* Add 10.7 MHz IF 		*/
+	freq /= 800;			/* Convert to 50 kHz units	*/
+	 
 	send_0_byte (io, dev);		/*  0: LSB of frequency		*/
 
 	for (i = 0; i < 13; i++)	/*   : frequency bits (1-13)	*/
@@ -229,9 +231,9 @@
 				return -EFAULT;
 			if(v.tuner)	/* Only 1 tuner */ 
 				return -EINVAL;
-			v.rangelow=(88*16);
-			v.rangehigh=(108*16);
-			v.flags=0;
+			v.rangelow=(87*16000);
+			v.rangehigh=(108*16000);
+			v.flags=VIDEO_TUNER_LOW;
 			v.mode=VIDEO_MODE_AUTO;
 			v.signal=0xFFFF*rt_getsigstr(rt);
 			if(copy_to_user(arg,&v, sizeof(v)))

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)