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) |