aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tuner-simple.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <maurochehab@gmail.com>2005-06-28 23:45:21 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-29 00:20:36 -0400
commit586b0cab2516640fec4dffc3049c4d8bca188f89 (patch)
treeafd2bc01527bfccc3dbaf5c2de7ae52c7f18c2d6 /drivers/media/video/tuner-simple.c
parent96b6aba08762f09e5dfa616854cb80ce054a7bf8 (diff)
[PATCH] v4l: tuner improvements
*tuner-core.c: - some tuner_info msgs will be generated only if insmod opt tuner_debug enabled. - Implemented tuner-core support for VIDIO_S_TUNER to allow changing mono/stereo mode - Remove unneeded config options. - I2C_CLIENT_MULTI option removed. - support for Philips FMD12ME hybrid tuner - allow to initialize with another tuner - Move PHILIPS_FMD initialization code to set_type function, * tda8290: - Fix dumb error in tda8290 tunning. - Radio tuner uses high-precision step instead of 62.5 KHz. *tea5767.c: - tuner_info msgs will be generated only if insmod tuner option tuner_debug enabled. - some cleanups for better reading. - Radio tuner uses high-precision step instead of 62.5 KHz. - Changing radio mode stereo/mono for tea5767 working. *tuner-simple.c: - TNF9533-D/IF UHF fixup. - Radio tuners now uses high-precision step instead of 62.5 KHz. *mt20xx.c: - Radio tuner uses high-precision step instead of 62.5 KHz. *tda9887.c: - tab and blank spaces corrections. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> Signed-off-by: Gerd Knorr <kraxel@bytesex.org> Signed-off-by: Nickolay V Shmyrev <nshmyrev@yandex.ru> Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de> Signed-off-by: Michael Krufky <mkrufky@m1k.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/video/tuner-simple.c')
-rw-r--r--drivers/media/video/tuner-simple.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/media/video/tuner-simple.c b/drivers/media/video/tuner-simple.c
index 539f30557317..c39ed6226ee0 100644
--- a/drivers/media/video/tuner-simple.c
+++ b/drivers/media/video/tuner-simple.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * $Id: tuner-simple.c,v 1.21 2005/06/10 19:53:26 nsh Exp $ 2 * $Id: tuner-simple.c,v 1.31 2005/06/21 16:02:25 mkrufky Exp $
3 * 3 *
4 * i2c tv tuner chip device driver 4 * i2c tv tuner chip device driver
5 * controls all those simple 4-control-bytes style tuners. 5 * controls all those simple 4-control-bytes style tuners.
@@ -207,28 +207,27 @@ static struct tunertype tuners[] = {
207 { "LG PAL (TAPE series)", LGINNOTEK, PAL, 207 { "LG PAL (TAPE series)", LGINNOTEK, PAL,
208 16*170.00, 16*450.00, 0x01,0x02,0x08,0xce,623}, 208 16*170.00, 16*450.00, 0x01,0x02,0x08,0xce,623},
209 209
210 { "Philips PAL/SECAM multi (FQ1216AME MK4)", Philips, PAL, 210 { "Philips PAL/SECAM multi (FQ1216AME MK4)", Philips, PAL,
211 16*160.00,16*442.00,0x01,0x02,0x04,0xce,623 }, 211 16*160.00,16*442.00,0x01,0x02,0x04,0xce,623 },
212 { "Philips FQ1236A MK4", Philips, NTSC, 212 { "Philips FQ1236A MK4", Philips, NTSC,
213 16*160.00,16*442.00,0x01,0x02,0x04,0x8e,732 }, 213 16*160.00,16*442.00,0x01,0x02,0x04,0x8e,732 },
214 214
215 /* Should work for TVF8531MF, TVF8831MF, TVF8731MF */ 215 /* Should work for TVF8531MF, TVF8831MF, TVF8731MF */
216 { "Ymec TVision TVF-8531MF", Philips, NTSC, 216 { "Ymec TVision TVF-8531MF", Philips, NTSC,
217 16*160.00,16*454.00,0xa0,0x90,0x30,0x8e,732}, 217 16*160.00,16*454.00,0xa0,0x90,0x30,0x8e,732},
218 { "Ymec TVision TVF-5533MF", Philips, NTSC, 218 { "Ymec TVision TVF-5533MF", Philips, NTSC,
219 16*160.00,16*454.00,0x01,0x02,0x04,0x8e,732}, 219 16*160.00,16*454.00,0x01,0x02,0x04,0x8e,732},
220
221 { "Thomson DDT 7611 (ATSC/NTSC)", THOMSON, ATSC, 220 { "Thomson DDT 7611 (ATSC/NTSC)", THOMSON, ATSC,
222 16*157.25,16*454.00,0x39,0x3a,0x3c,0x8e,732}, 221 16*157.25,16*454.00,0x39,0x3a,0x3c,0x8e,732},
223 { "Tena TNF9533-D/IF", LGINNOTEK, PAL, 222 /* Should work for TNF9533-D/IF, TNF9533-B/DF */
224 16*160.25, 16*464.25, 0x01,0x02,0x08,0x8e,623}, 223 { "Tena TNF9533-D/IF", Philips, PAL,
224 16*160.25,16*464.25,0x01,0x02,0x04,0x8e,623},
225 225
226 /* 226 /* This entry is for TEA5767 FM radio only chip used on several boards w/TV tuner */
227 * This entry is for TEA5767 FM radio only chip used on several boards
228 * w/TV tuner
229 */
230 { TEA5767_TUNER_NAME, Philips, RADIO, 227 { TEA5767_TUNER_NAME, Philips, RADIO,
231 -1, -1, 0, 0, 0, TEA5767_LOW_LO_32768,0}, 228 -1, -1, 0, 0, 0, TEA5767_LOW_LO_32768,0},
229 { "Philips FMD1216ME MK3 Hybrid Tuner", Philips, PAL,
230 16*160.00,16*442.00,0x51,0x52,0x54,0x86,623 },
232}; 231};
233 232
234unsigned const int tuner_count = ARRAY_SIZE(tuners); 233unsigned const int tuner_count = ARRAY_SIZE(tuners);
@@ -455,24 +454,24 @@ static void default_set_radio_freq(struct i2c_client *c, unsigned int freq)
455 int rc; 454 int rc;
456 455
457 tun=&tuners[t->type]; 456 tun=&tuners[t->type];
458 div = freq + (int)(16*10.7); 457 div = (freq / 1000) + (int)(16*10.7);
459 buffer[2] = tun->config; 458 buffer[2] = tun->config;
460 459
461 switch (t->type) { 460 switch (t->type) {
462 case TUNER_TENA_9533_DI: 461 case TUNER_TENA_9533_DI:
463 case TUNER_YMEC_TVF_5533MF: 462 case TUNER_YMEC_TVF_5533MF:
464
465 /*These values are empirically determinated */ 463 /*These values are empirically determinated */
466 div = (freq*122)/16 - 20; 464 div = (freq * 122) / 16000 - 20;
467 buffer[2] = 0x88; /* could be also 0x80 */ 465 buffer[2] = 0x88; /* could be also 0x80 */
468 buffer[3] = 0x19; /* could be also 0x10, 0x18, 0x99 */ 466 buffer[3] = 0x19; /* could be also 0x10, 0x18, 0x99 */
469 break; 467 break;
470 case TUNER_PHILIPS_FM1216ME_MK3: 468 case TUNER_PHILIPS_FM1216ME_MK3:
471 case TUNER_PHILIPS_FM1236_MK3: 469 case TUNER_PHILIPS_FM1236_MK3:
470 case TUNER_PHILIPS_FMD1216ME_MK3:
472 buffer[3] = 0x19; 471 buffer[3] = 0x19;
473 break; 472 break;
474 case TUNER_PHILIPS_FM1256_IH3: 473 case TUNER_PHILIPS_FM1256_IH3:
475 div = (20 * freq)/16 + 333 * 2; 474 div = (20 * freq) / 16000 + 333 * 2;
476 buffer[2] = 0x80; 475 buffer[2] = 0x80;
477 buffer[3] = 0x19; 476 buffer[3] = 0x19;
478 break; 477 break;
@@ -505,6 +504,7 @@ int default_tuner_init(struct i2c_client *c)
505 t->radio_freq = default_set_radio_freq; 504 t->radio_freq = default_set_radio_freq;
506 t->has_signal = tuner_signal; 505 t->has_signal = tuner_signal;
507 t->is_stereo = tuner_stereo; 506 t->is_stereo = tuner_stereo;
507
508 return 0; 508 return 0;
509} 509}
510 510