Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 69061 | Differences between
and this patch

Collapse All | Expand All

(-)linux-2.6.9-rc2/drivers/media/video/tuner.c (-5 / +45 lines)
Lines 129-135 struct tunertype Link Here
129
	unsigned char config; 
129
	unsigned char config; 
130
	unsigned short IFPCoff; /* 622.4=16*38.90 MHz PAL, 
130
	unsigned short IFPCoff; /* 622.4=16*38.90 MHz PAL, 
131
				   732  =16*45.75 NTSCi, 
131
				   732  =16*45.75 NTSCi, 
132
				   940  =58.75 NTSC-Japan */
132
				   940  =16*58.75 NTSC-Japan
133
				   704  =16*44    ATSC */
133
};
134
};
134
135
135
/*
136
/*
Lines 244-253 static struct tunertype tuners[] = { Link Here
244
	{ "Panasonic VP27s/ENGE4324D", Panasonic, NTSC,
245
	{ "Panasonic VP27s/ENGE4324D", Panasonic, NTSC,
245
	  16*160.00,16*454.00,0x01,0x02,0x08,0xce,940},
246
	  16*160.00,16*454.00,0x01,0x02,0x08,0xce,940},
246
        { "LG NTSC (TAPE series)", LGINNOTEK, NTSC,
247
        { "LG NTSC (TAPE series)", LGINNOTEK, NTSC,
247
          16*170.00, 16*450.00, 0x01,0x02,0x04,0x8e,732 },
248
          16*160.00,16*442.00,0x01,0x02,0x04,0xc8,732 },
248
249
249
        { "Tenna TNF 8831 BGFF)", Philips, PAL,
250
        { "Tenna TNF 8831 BGFF)", Philips, PAL,
250
          16*161.25,16*463.25,0xa0,0x90,0x30,0x8e,623},
251
          16*161.25,16*463.25,0xa0,0x90,0x30,0x8e,623},
252
	{ "Microtune 4042 FI5 ATSC/NTSC dual in", Microtune, NTSC,
253
	  16*162.00,16*457.00,0xa2,0x94,0x31,0x8e,732},
254
        { "TCL 2002N", TCL, NTSC,
255
          16*172.00,16*448.00,0x01,0x02,0x08,0x88,732},
251
256
252
};
257
};
253
#define TUNERS ARRAY_SIZE(tuners)
258
#define TUNERS ARRAY_SIZE(tuners)
Lines 550-556 static void mt2032_set_tv_freq(struct i2 Link Here
550
		// NTSC
555
		// NTSC
551
		from = 40750*1000;
556
		from = 40750*1000;
552
		to   = 46750*1000;
557
		to   = 46750*1000;
553
		if2  = 45750*1000;
558
		if2  = 45750*1000; 
554
	} else {
559
	} else {
555
		// PAL
560
		// PAL
556
		from = 32900*1000;
561
		from = 32900*1000;
Lines 854-860 static void default_set_tv_freq(struct i Link Here
854
859
855
		} else if (t->std & V4L2_STD_PAL_DK) {
860
		} else if (t->std & V4L2_STD_PAL_DK) {
856
			config |= TEMIC_SET_PAL_DK;
861
			config |= TEMIC_SET_PAL_DK;
857
862
			
858
		} else if (t->std & V4L2_STD_SECAM_L) {
863
		} else if (t->std & V4L2_STD_SECAM_L) {
859
			config |= TEMIC_SET_PAL_L;
864
			config |= TEMIC_SET_PAL_L;
860
865
Lines 886-893 static void default_set_tv_freq(struct i Link Here
886
			config |= 2;
891
			config |= 2;
887
		/* FIXME: input */
892
		/* FIXME: input */
888
		break;
893
		break;
889
	}
890
894
895
	case TUNER_MICROTUNE_4042FI5:
896
		/* Set the charge pump for fast tuning */
897
		tun->config |= 0x40;
898
		break;
899
	}
891
	
900
	
892
	/*
901
	/*
893
	 * Philips FI1216MK2 remark from specification :
902
	 * Philips FI1216MK2 remark from specification :
Lines 921-926 static void default_set_tv_freq(struct i Link Here
921
        if (4 != (rc = i2c_master_send(c,buffer,4)))
930
        if (4 != (rc = i2c_master_send(c,buffer,4)))
922
                printk("tuner: i2c i/o error: rc == %d (should be 4)\n",rc);
931
                printk("tuner: i2c i/o error: rc == %d (should be 4)\n",rc);
923
932
933
	if (t->type == TUNER_MICROTUNE_4042FI5) {
934
		// FIXME - this may also work for other tuners
935
		unsigned long timeout = jiffies + msecs_to_jiffies(1);
936
		u8 status_byte = 0;
937
938
		/* Wait until the PLL locks */
939
		for (;;) {
940
			if (time_after(jiffies,timeout))
941
				return;
942
			if (1 != (rc = i2c_master_recv(c,&status_byte,1))) {
943
				dprintk("tuner: i2c i/o read error: rc == %d (should be 1)\n",rc);
944
				break;
945
			}
946
			/* bit 6 is PLL locked indicator */
947
			if (status_byte & 0x40)
948
				break;
949
			udelay(10);
950
		}
951
		
952
		/* Set the charge pump for optimized phase noise figure */
953
		tun->config &= ~0x40;
954
		buffer[0] = (div>>8) & 0x7f;
955
		buffer[1] = div      & 0xff;
956
		buffer[2] = tun->config;
957
		buffer[3] = config;
958
		dprintk("tuner: tv 0x%02x 0x%02x 0x%02x 0x%02x\n",
959
			buffer[0],buffer[1],buffer[2],buffer[3]);
960
961
		if (4 != (rc = i2c_master_send(c,buffer,4)))
962
			dprintk("tuner: i2c i/o error: rc == %d (should be 4)\n",rc);
963
	}
924
}
964
}
925
965
926
static void default_set_radio_freq(struct i2c_client *c, unsigned int freq)
966
static void default_set_radio_freq(struct i2c_client *c, unsigned int freq)
(-)linux-2.6.9-rc2/include/media/tuner.h (+5 lines)
Lines 1-3 Link Here
1
1
/* 
2
/* 
2
    tuner.h - definition for different tuners
3
    tuner.h - definition for different tuners
3
4
Lines 69-77 Link Here
69
#define TUNER_PHILIPS_ATSC       42
70
#define TUNER_PHILIPS_ATSC       42
70
#define TUNER_PHILIPS_FM1236_MK3 43
71
#define TUNER_PHILIPS_FM1236_MK3 43
71
#define TUNER_PHILIPS_4IN1       44	/* ATI TV Wonder Pro - Conexant */
72
#define TUNER_PHILIPS_4IN1       44	/* ATI TV Wonder Pro - Conexant */
73
/* Microtune mergeged with Temic 12/31/1999 partially financed by Alps - these may be similar to Temic */ 
72
#define TUNER_MICROTUNE_4049FM5  45
74
#define TUNER_MICROTUNE_4049FM5  45
73
#define TUNER_LG_NTSC_TAPE       47
75
#define TUNER_LG_NTSC_TAPE       47
74
#define TUNER_TNF_8831BGFF       48
76
#define TUNER_TNF_8831BGFF       48
77
#define TUNER_MICROTUNE_4042FI5  49	/* FusionHDTV 3 Gold - 4042 FI5 (3X 8147) */
78
#define TUNER_TCL_2002N          50
75
79
76
#define NOTUNER 0
80
#define NOTUNER 0
77
#define PAL     1	/* PAL_BG */
81
#define PAL     1	/* PAL_BG */
Lines 91-96 Link Here
91
#define Microtune 8
95
#define Microtune 8
92
#define HITACHI 9
96
#define HITACHI 9
93
#define Panasonic 10
97
#define Panasonic 10
98
#define TCL     11
94
99
95
#define TUNER_SET_TYPE               _IOW('t',1,int)    /* set tuner type */
100
#define TUNER_SET_TYPE               _IOW('t',1,int)    /* set tuner type */
96
#define TUNER_SET_TVFREQ             _IOW('t',2,int)    /* set tv freq */
101
#define TUNER_SET_TVFREQ             _IOW('t',2,int)    /* set tv freq */

Return to bug 69061