Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] v4l: common part Updates and tuner additions

- Remove $Id CVS logs for V4L files
- Included newer cards.
- Added a new NEC protocol for ir based on pulse distance.
- Enable ATSC support for DViCO FusionHDTV5 Gold.
- Added tuner LG NTSC (TALN mini series).
- Fixed tea5767 autodetection.
- Resolve more tuner types.
- Commented debug function removed from mainstream.
- Remove comments from mainstream. Still on development tree.
- linux/version dependencies removed.
- BTSC Lang1 now is set to auto_stereo mode.
- New tuner standby API.
- i2c-core.c uses hexadecimal for the i2c address, so it should stay consistent.

Signed-off-by: Uli Luckas <luckas@musoft.de>
Signed-off-by: Mac Michaels <wmichaels1@earthlink.net>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Hermann Pitton <hermann.pitton@onlinehome.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Mauro Carvalho Chehab and committed by
Linus Torvalds
793cf9e6 a1938038

+202 -153
+1
Documentation/video4linux/CARDLIST.tuner
··· 64 64 tuner=63 - Philips FMD1216ME MK3 Hybrid Tuner 65 65 tuner=64 - LG TDVS-H062F/TUA6034 66 66 tuner=65 - Ymec TVF66T5-B/DFF 67 + tuner=66 - LG NTSC (TALN mini series)
+67 -1
drivers/media/common/ir-common.c
··· 1 1 /* 2 - * $Id: ir-common.c,v 1.11 2005/07/07 14:44:43 mchehab Exp $ 3 2 * 4 3 * some common structs and functions to handle infrared remotes via 5 4 * input layer ... ··· 334 335 return 0; 335 336 } 336 337 338 + /* decode raw samples, pulse distance coding used by NEC remotes */ 339 + int ir_decode_pulsedistance(u32 *samples, int count, int low, int high) 340 + { 341 + int i,last,bit,len; 342 + u32 curBit; 343 + u32 value; 344 + 345 + /* find start burst */ 346 + for (i = len = 0; i < count * 32; i++) { 347 + bit = getbit(samples,i); 348 + if (bit) { 349 + len++; 350 + } else { 351 + if (len >= 29) 352 + break; 353 + len = 0; 354 + } 355 + } 356 + 357 + /* start burst to short */ 358 + if (len < 29) 359 + return 0xffffffff; 360 + 361 + /* find start silence */ 362 + for (len = 0; i < count * 32; i++) { 363 + bit = getbit(samples,i); 364 + if (bit) { 365 + break; 366 + } else { 367 + len++; 368 + } 369 + } 370 + 371 + /* silence to short */ 372 + if (len < 7) 373 + return 0xffffffff; 374 + 375 + /* go decoding */ 376 + len = 0; 377 + last = 1; 378 + value = 0; curBit = 1; 379 + for (; i < count * 32; i++) { 380 + bit = getbit(samples,i); 381 + if (last) { 382 + if(bit) { 383 + continue; 384 + } else { 385 + len = 1; 386 + } 387 + } else { 388 + if (bit) { 389 + if (len > (low + high) /2) 390 + value |= curBit; 391 + curBit <<= 1; 392 + if (curBit == 1) 393 + break; 394 + } else { 395 + len++; 396 + } 397 + } 398 + last = bit; 399 + } 400 + 401 + return value; 402 + } 403 + 337 404 /* decode raw samples, biphase coding, used by rc5 for example */ 338 405 int ir_decode_biphase(u32 *samples, int count, int low, int high) 339 406 { ··· 448 383 EXPORT_SYMBOL_GPL(ir_extract_bits); 449 384 EXPORT_SYMBOL_GPL(ir_dump_samples); 450 385 EXPORT_SYMBOL_GPL(ir_decode_biphase); 386 + EXPORT_SYMBOL_GPL(ir_decode_pulsedistance); 451 387 452 388 /* 453 389 * Local variables:
-1
drivers/media/video/btcx-risc.c
··· 1 1 /* 2 - $Id: btcx-risc.c,v 1.6 2005/02/21 13:57:59 kraxel Exp $ 3 2 4 3 btcx-risc.c 5 4
-1
drivers/media/video/btcx-risc.h
··· 1 1 /* 2 - * $Id: btcx-risc.h,v 1.2 2004/09/15 16:15:24 kraxel Exp $ 3 2 */ 4 3 struct btcx_riscmem { 5 4 unsigned int size;
-1
drivers/media/video/ir-kbd-gpio.c
··· 1 1 /* 2 - * $Id: ir-kbd-gpio.c,v 1.13 2005/05/15 19:01:26 mchehab Exp $ 3 2 * 4 3 * Copyright (c) 2003 Gerd Knorr 5 4 * Copyright (c) 2003 Pavel Machek
-1
drivers/media/video/ir-kbd-i2c.c
··· 1 1 /* 2 - * $Id: ir-kbd-i2c.c,v 1.11 2005/07/07 16:42:11 mchehab Exp $ 3 2 * 4 3 * keyboard input driver for i2c IR remote controls 5 4 *
-1
drivers/media/video/msp3400.h
··· 1 1 /* 2 - * $Id: msp3400.h,v 1.3 2005/06/12 04:19:19 mchehab Exp $ 3 2 */ 4 3 5 4 #ifndef MSP3400_H
+1 -1
drivers/media/video/mt20xx.c
··· 1 1 /* 2 - * $Id: mt20xx.c,v 1.5 2005/06/16 08:29:49 nsh Exp $ 3 2 * 4 3 * i2c tv tuner chip device driver 5 4 * controls microtune tuners, mt2032 + mt2050 at the moment. ··· 493 494 memset(buf,0,sizeof(buf)); 494 495 t->tv_freq = NULL; 495 496 t->radio_freq = NULL; 497 + t->standby = NULL; 496 498 name = "unknown"; 497 499 498 500 i2c_master_send(c,buf,1);
+18 -1
drivers/media/video/tda8290.c
··· 1 1 /* 2 - * $Id: tda8290.c,v 1.15 2005/07/08 20:21:33 mchehab Exp $ 3 2 * 4 3 * i2c tv tuner chip device driver 5 4 * controls the philips tda8290+75 tuner chip combo. ··· 7 8 #include <linux/videodev.h> 8 9 #include <linux/delay.h> 9 10 #include <media/tuner.h> 11 + 12 + #define I2C_ADDR_TDA8290 0x4b 13 + #define I2C_ADDR_TDA8275 0x61 10 14 11 15 /* ---------------------------------------------------------------------- */ 12 16 ··· 77 75 static unsigned char i2c_set_VS[2] = { 0x30, 0x6F }; 78 76 static unsigned char i2c_set_GP01_CF[2] = { 0x20, 0x0B }; 79 77 static unsigned char i2c_tda8290_reset[2] = { 0x00, 0x00 }; 78 + static unsigned char i2c_tda8290_standby[2] = { 0x00, 0x02 }; 80 79 static unsigned char i2c_gainset_off[2] = { 0x28, 0x14 }; 81 80 static unsigned char i2c_gainset_on[2] = { 0x28, 0x54 }; 82 81 static unsigned char i2c_agc3_00[2] = { 0x80, 0x00 }; 83 82 static unsigned char i2c_agc2_BF[2] = { 0x60, 0xBF }; 83 + static unsigned char i2c_cb1_D0[2] = { 0x30, 0xD0 }; 84 84 static unsigned char i2c_cb1_D2[2] = { 0x30, 0xD2 }; 85 85 static unsigned char i2c_cb1_56[2] = { 0x30, 0x56 }; 86 86 static unsigned char i2c_cb1_52[2] = { 0x30, 0x52 }; ··· 119 115 { I2C_ADDR_TDA8275, 0, ARRAY_SIZE(i2c_agc3_08), i2c_agc3_08 }, 120 116 { I2C_ADDR_TDA8290, 0, ARRAY_SIZE(i2c_disable_bridge), i2c_disable_bridge }, 121 117 { I2C_ADDR_TDA8290, 0, ARRAY_SIZE(i2c_gainset_on), i2c_gainset_on }, 118 + }; 119 + 120 + static struct i2c_msg i2c_msg_standby[] = { 121 + { I2C_ADDR_TDA8290, 0, ARRAY_SIZE(i2c_enable_bridge), i2c_enable_bridge }, 122 + { I2C_ADDR_TDA8275, 0, ARRAY_SIZE(i2c_cb1_D0), i2c_cb1_D0 }, 123 + { I2C_ADDR_TDA8290, 0, ARRAY_SIZE(i2c_disable_bridge), i2c_disable_bridge }, 124 + { I2C_ADDR_TDA8290, 0, ARRAY_SIZE(i2c_tda8290_standby), i2c_tda8290_standby }, 122 125 }; 123 126 124 127 static int tda8290_tune(struct i2c_client *c) ··· 216 205 return (afc & 0x80)? 65535:0; 217 206 } 218 207 208 + static void standby(struct i2c_client *c) 209 + { 210 + i2c_transfer(c->adapter, i2c_msg_standby, ARRAY_SIZE(i2c_msg_standby)); 211 + } 212 + 219 213 int tda8290_init(struct i2c_client *c) 220 214 { 221 215 struct tuner *t = i2c_get_clientdata(c); ··· 230 214 t->tv_freq = set_tv_freq; 231 215 t->radio_freq = set_radio_freq; 232 216 t->has_signal = has_signal; 217 + t->standby = standby; 233 218 234 219 i2c_master_send(c, i2c_enable_bridge, ARRAY_SIZE(i2c_enable_bridge)); 235 220 i2c_transfer(c->adapter, i2c_msg_init, ARRAY_SIZE(i2c_msg_init));
+25 -14
drivers/media/video/tda9887.c
··· 49 49 struct tda9887 { 50 50 struct i2c_client client; 51 51 v4l2_std_id std; 52 - unsigned int radio; 52 + enum tuner_mode mode; 53 53 unsigned int config; 54 54 unsigned int pinnacle_id; 55 55 unsigned int using_v4l2; ··· 196 196 .b = ( cNegativeFmTV | 197 197 cQSS ), 198 198 .c = ( cDeemphasisON | 199 - cDeemphasis50 ), 199 + cDeemphasis75 ), 200 200 .e = ( cGating_36 | 201 201 cAudioIF_4_5 | 202 202 cVideoIF_45_75 ), ··· 364 364 struct tvnorm *norm = NULL; 365 365 int i; 366 366 367 - if (t->radio) { 367 + if (t->mode == T_RADIO) { 368 368 if (t->radio_mode == V4L2_TUNER_MODE_MONO) 369 369 norm = &radio_mono; 370 370 else ··· 378 378 } 379 379 } 380 380 if (NULL == norm) { 381 - dprintk(PREFIX "Oops: no tvnorm entry found\n"); 381 + dprintk(PREFIX "Unsupported tvnorm entry - audio muted\n"); 382 382 return -1; 383 383 } 384 384 ··· 569 569 tda9887_set_config(t,buf); 570 570 tda9887_set_insmod(t,buf); 571 571 572 + if (t->mode == T_STANDBY) { 573 + buf[1] |= cForcedMuteAudioON; 574 + } 575 + 572 576 573 577 dprintk(PREFIX "writing: b=0x%02x c=0x%02x e=0x%02x\n", 574 578 buf[1],buf[2],buf[3]); ··· 657 653 658 654 /* --- configuration --- */ 659 655 case AUDC_SET_RADIO: 660 - t->radio = 1; 656 + { 657 + t->mode = T_RADIO; 661 658 tda9887_configure(t); 662 659 break; 663 - 660 + } 661 + case TUNER_SET_STANDBY: 662 + { 663 + t->mode = T_STANDBY; 664 + tda9887_configure(t); 665 + break; 666 + } 664 667 case AUDC_CONFIG_PINNACLE: 665 668 { 666 669 int *i = arg; ··· 700 689 struct video_channel *vc = arg; 701 690 702 691 CHECK_V4L2; 703 - t->radio = 0; 692 + t->mode = T_ANALOG_TV; 704 693 if (vc->norm < ARRAY_SIZE(map)) 705 694 t->std = map[vc->norm]; 706 695 tda9887_fixup_std(t); ··· 712 701 v4l2_std_id *id = arg; 713 702 714 703 SWITCH_V4L2; 715 - t->radio = 0; 704 + t->mode = T_ANALOG_TV; 716 705 t->std = *id; 717 706 tda9887_fixup_std(t); 718 707 tda9887_configure(t); ··· 724 713 725 714 SWITCH_V4L2; 726 715 if (V4L2_TUNER_ANALOG_TV == f->type) { 727 - if (t->radio == 0) 716 + if (t->mode == T_ANALOG_TV) 728 717 return 0; 729 - t->radio = 0; 718 + t->mode = T_ANALOG_TV; 730 719 } 731 720 if (V4L2_TUNER_RADIO == f->type) { 732 - if (t->radio == 1) 721 + if (t->mode == T_RADIO) 733 722 return 0; 734 - t->radio = 1; 723 + t->mode = T_RADIO; 735 724 } 736 725 tda9887_configure(t); 737 726 break; ··· 746 735 }; 747 736 struct v4l2_tuner* tuner = arg; 748 737 749 - if (t->radio) { 738 + if (t->mode == T_RADIO) { 750 739 __u8 reg = 0; 751 740 tuner->afc=0; 752 741 if (1 == i2c_master_recv(&t->client,&reg,1)) ··· 758 747 { 759 748 struct v4l2_tuner* tuner = arg; 760 749 761 - if (t->radio) { 750 + if (t->mode == T_RADIO) { 762 751 t->radio_mode = tuner->audmode; 763 752 tda9887_configure (t); 764 753 }
+22 -15
drivers/media/video/tea5767.c
··· 2 2 * For Philips TEA5767 FM Chip used on some TV Cards like Prolink Pixelview 3 3 * I2C address is allways 0xC0. 4 4 * 5 - * $Id: tea5767.c,v 1.27 2005/07/31 12:10:56 mchehab Exp $ 6 5 * 7 6 * Copyright (c) 2005 Mauro Carvalho Chehab (mchehab@brturbo.com.br) 8 7 * This code is placed under the terms of the GNU General Public License ··· 204 205 TEA5767_ST_NOISE_CTL | TEA5767_JAPAN_BAND; 205 206 buffer[4] = 0; 206 207 207 - if (t->mode == T_STANDBY) { 208 - tuner_dbg("TEA5767 set to standby mode\n"); 209 - buffer[3] |= TEA5767_STDBY; 210 - } 211 - 212 208 if (t->audmode == V4L2_TUNER_MODE_MONO) { 213 209 tuner_dbg("TEA5767 set to mono\n"); 214 210 buffer[2] |= TEA5767_MONO; ··· 284 290 return ((buffer[2] & TEA5767_STEREO_MASK) ? V4L2_TUNER_SUB_STEREO : 0); 285 291 } 286 292 293 + static void tea5767_standby(struct i2c_client *c) 294 + { 295 + unsigned char buffer[5]; 296 + struct tuner *t = i2c_get_clientdata(c); 297 + unsigned div, rc; 298 + 299 + div = (87500 * 4 + 700 + 225 + 25) / 50; /* Set frequency to 87.5 MHz */ 300 + buffer[0] = (div >> 8) & 0x3f; 301 + buffer[1] = div & 0xff; 302 + buffer[2] = TEA5767_PORT1_HIGH; 303 + buffer[3] = TEA5767_PORT2_HIGH | TEA5767_HIGH_CUT_CTRL | 304 + TEA5767_ST_NOISE_CTL | TEA5767_JAPAN_BAND | TEA5767_STDBY; 305 + buffer[4] = 0; 306 + 307 + if (5 != (rc = i2c_master_send(c, buffer, 5))) 308 + tuner_warn("i2c i/o error: rc == %d (should be 5)\n", rc); 309 + } 310 + 287 311 int tea5767_autodetection(struct i2c_client *c) 288 312 { 289 313 unsigned char buffer[7] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; 290 314 int rc; 291 315 struct tuner *t = i2c_get_clientdata(c); 292 316 293 - if (7 != (rc = i2c_master_recv(c, buffer, 7))) { 317 + if ((rc = i2c_master_recv(c, buffer, 7))< 5) { 294 318 tuner_warn("It is not a TEA5767. Received %i bytes.\n", rc); 295 319 return EINVAL; 296 320 } ··· 325 313 * bit 0 : internally set to 0 326 314 * Byte 5: bit 7:0 : == 0 327 315 */ 328 - if (!((buffer[3] & 0x0f) == 0x00) && (buffer[4] == 0x00)) { 316 + if (((buffer[3] & 0x0f) != 0x00) || (buffer[4] != 0x00)) { 329 317 tuner_warn("Chip ID is not zero. It is not a TEA5767\n"); 330 - return EINVAL; 331 - } 332 - /* It seems that tea5767 returns 0xff after the 5th byte */ 333 - if ((buffer[5] != 0xff) || (buffer[6] != 0xff)) { 334 - tuner_warn("Returned more than 5 bytes. It is not a TEA5767\n"); 335 318 return EINVAL; 336 319 } 337 320 ··· 344 337 { 345 338 struct tuner *t = i2c_get_clientdata(c); 346 339 347 - tuner_info("type set to %d (%s)\n", t->type, 348 - "Philips TEA5767HN FM Radio"); 340 + tuner_info("type set to %d (%s)\n", t->type, "Philips TEA5767HN FM Radio"); 349 341 strlcpy(c->name, "tea5767", sizeof(c->name)); 350 342 351 343 t->tv_freq = set_tv_freq; 352 344 t->radio_freq = set_radio_freq; 353 345 t->has_signal = tea5767_signal; 354 346 t->is_stereo = tea5767_stereo; 347 + t->standby = tea5767_standby; 355 348 356 349 return (0); 357 350 }
+45 -32
drivers/media/video/tuner-core.c
··· 1 1 /* 2 - * $Id: tuner-core.c,v 1.63 2005/07/28 18:19:55 mchehab Exp $ 3 2 * 4 3 * i2c tv tuner chip device driver 5 4 * core core, i.e. kernel interfaces, registering and so on ··· 181 182 i2c_master_send(c, buffer, 4); 182 183 default_tuner_init(c); 183 184 break; 185 + case TUNER_LG_TDVS_H062F: 186 + /* Set the Auxiliary Byte. */ 187 + buffer[2] &= ~0x20; 188 + buffer[2] |= 0x18; 189 + buffer[3] = 0x20; 190 + i2c_master_send(c, buffer, 4); 191 + default_tuner_init(c); 192 + break; 184 193 default: 185 194 default_tuner_init(c); 186 195 break; ··· 215 208 { 216 209 struct tuner *t = i2c_get_clientdata(c); 217 210 218 - if (tun_setup->addr == ADDR_UNSET) { 219 - if (t->mode_mask & tun_setup->mode_mask) 211 + if ((tun_setup->addr == ADDR_UNSET && 212 + (t->mode_mask & tun_setup->mode_mask)) || 213 + tun_setup->addr == c->addr) { 220 214 set_type(c, tun_setup->type, tun_setup->mode_mask); 221 - } else if (tun_setup->addr == c->addr) { 222 - set_type(c, tun_setup->type, tun_setup->mode_mask); 223 215 } 224 216 } 225 217 226 218 static inline int check_mode(struct tuner *t, char *cmd) 227 219 { 228 - if (1 << t->mode & t->mode_mask) { 229 - switch (t->mode) { 230 - case V4L2_TUNER_RADIO: 231 - tuner_dbg("Cmd %s accepted for radio\n", cmd); 232 - break; 233 - case V4L2_TUNER_ANALOG_TV: 234 - tuner_dbg("Cmd %s accepted for analog TV\n", cmd); 235 - break; 236 - case V4L2_TUNER_DIGITAL_TV: 237 - tuner_dbg("Cmd %s accepted for digital TV\n", cmd); 238 - break; 239 - } 240 - return 0; 220 + if ((1 << t->mode & t->mode_mask) == 0) { 221 + return EINVAL; 241 222 } 242 - return EINVAL; 223 + 224 + switch (t->mode) { 225 + case V4L2_TUNER_RADIO: 226 + tuner_dbg("Cmd %s accepted for radio\n", cmd); 227 + break; 228 + case V4L2_TUNER_ANALOG_TV: 229 + tuner_dbg("Cmd %s accepted for analog TV\n", cmd); 230 + break; 231 + case V4L2_TUNER_DIGITAL_TV: 232 + tuner_dbg("Cmd %s accepted for digital TV\n", cmd); 233 + break; 234 + } 235 + return 0; 243 236 } 244 237 245 238 static char pal[] = "-"; ··· 413 406 414 407 static inline int set_mode(struct i2c_client *client, struct tuner *t, int mode, char *cmd) 415 408 { 416 - if (mode != t->mode) { 409 + if (mode == t->mode) 410 + return 0; 417 411 418 - t->mode = mode; 419 - if (check_mode(t, cmd) == EINVAL) { 420 - t->mode = T_STANDBY; 421 - if (V4L2_TUNER_RADIO == mode) { 422 - set_tv_freq(client, 400 * 16); 423 - } else { 424 - set_radio_freq(client, 87.5 * 16000); 425 - } 426 - return EINVAL; 427 - } 428 - } 429 - return 0; 412 + t->mode = mode; 413 + 414 + if (check_mode(t, cmd) == EINVAL) { 415 + t->mode = T_STANDBY; 416 + if (t->standby) 417 + t->standby (client); 418 + return EINVAL; 419 + } 420 + return 0; 430 421 } 431 422 432 423 #define switch_v4l2() if (!t->using_v4l2) \ ··· 458 453 case AUDC_SET_RADIO: 459 454 set_mode(client,t,V4L2_TUNER_RADIO, "AUDC_SET_RADIO"); 460 455 break; 456 + case TUNER_SET_STANDBY: 457 + { 458 + if (check_mode(t, "TUNER_SET_STANDBY") == EINVAL) 459 + return 0; 460 + if (t->standby) 461 + t->standby (client); 462 + break; 463 + } 461 464 case AUDC_CONFIG_PINNACLE: 462 465 if (check_mode(t, "AUDC_CONFIG_PINNACLE") == EINVAL) 463 466 return 0;
+3 -2
drivers/media/video/tuner-simple.c
··· 1 1 /* 2 - * $Id: tuner-simple.c,v 1.43 2005/07/28 18:41:21 mchehab Exp $ 3 2 * 4 3 * i2c tv tuner chip device driver 5 4 * controls all those simple 4-control-bytes style tuners. ··· 247 248 248 249 { "LG TDVS-H062F/TUA6034", LGINNOTEK, NTSC, 249 250 16*160.00,16*455.00,0x01,0x02,0x04,0x8e,732}, 250 - 251 251 { "Ymec TVF66T5-B/DFF", Philips, PAL, 252 252 16*160.25,16*464.25,0x01,0x02,0x08,0x8e,623}, 253 + { "LG NTSC (TALN mini series)", LGINNOTEK, NTSC, 254 + 16*150.00,16*425.00,0x01,0x02,0x08,0x8e,732 }, 253 255 }; 254 256 255 257 unsigned const int tuner_count = ARRAY_SIZE(tuners); ··· 497 497 t->radio_freq = default_set_radio_freq; 498 498 t->has_signal = tuner_signal; 499 499 t->is_stereo = tuner_stereo; 500 + t->standby = NULL; 500 501 501 502 return 0; 502 503 }
+4 -21
drivers/media/video/tveeprom.c
··· 155 155 { TUNER_ABSENT, "Philips FQ1216ME MK3"}, 156 156 { TUNER_ABSENT, "Philips FI1236 MK3"}, 157 157 { TUNER_PHILIPS_FM1216ME_MK3, "Philips FM1216 ME MK3"}, 158 - { TUNER_ABSENT, "Philips FM1236 MK3"}, 158 + { TUNER_PHILIPS_FM1236_MK3, "Philips FM1236 MK3"}, 159 159 { TUNER_ABSENT, "Philips FM1216MP MK3"}, 160 160 /* 60-69 */ 161 - { TUNER_ABSENT, "LG S001D MK3"}, 161 + { TUNER_PHILIPS_FM1216ME_MK3, "LG S001D MK3"}, 162 162 { TUNER_ABSENT, "LG M001D MK3"}, 163 163 { TUNER_ABSENT, "LG S701D MK3"}, 164 164 { TUNER_ABSENT, "LG M701D MK3"}, ··· 183 183 { TUNER_ABSENT, "Philips FQ1216LME MK3"}, 184 184 { TUNER_ABSENT, "LG TAPC G701D"}, 185 185 { TUNER_LG_NTSC_NEW_TAPC, "LG TAPC H791F"}, 186 - { TUNER_ABSENT, "TCL 2002MB 3"}, 187 - { TUNER_ABSENT, "TCL 2002MI 3"}, 186 + { TUNER_LG_PAL_NEW_TAPC, "TCL 2002MB 3"}, 187 + { TUNER_LG_PAL_NEW_TAPC, "TCL 2002MI 3"}, 188 188 { TUNER_TCL_2002N, "TCL 2002N 6A"}, 189 189 { TUNER_ABSENT, "Philips FQ1236 MK3"}, 190 190 { TUNER_ABSENT, "Samsung TCPN 2121P30A"}, ··· 445 445 } 446 446 EXPORT_SYMBOL(tveeprom_read); 447 447 448 - #if 0 449 - int tveeprom_dump(unsigned char *eedata, int len) 450 - { 451 - int i; 452 - 453 - dprintk(1, "%s\n",__FUNCTION__); 454 - for (i = 0; i < len; i++) { 455 - if (0 == (i % 16)) 456 - printk(KERN_INFO "tveeprom: %02x:",i); 457 - printk(" %02x",eedata[i]); 458 - if (15 == (i % 16)) 459 - printk("\n"); 460 - } 461 - return 0; 462 - } 463 - EXPORT_SYMBOL(tveeprom_dump); 464 - #endif /* 0 */ 465 448 466 449 /* ----------------------------------------------------------------------- */ 467 450 /* needed for ivtv.sf.net at the moment. Should go away in the long */
-1
drivers/media/video/tvmixer.c
··· 1 1 /* 2 - * $Id: tvmixer.c,v 1.8 2005/06/12 04:19:19 mchehab Exp $ 3 2 */ 4 3 5 4 #include <linux/module.h>
-16
drivers/media/video/v4l1-compat.c
··· 1 1 /* 2 - * $Id: v4l1-compat.c,v 1.9 2005/06/12 04:19:19 mchehab Exp $ 3 2 * 4 3 * Video for Linux Two 5 4 * Backward Compatibility Layer ··· 603 604 dprintk("VIDIOCGPICT / VIDIOC_G_FMT: %d\n",err); 604 605 break; 605 606 } 606 - #if 0 /* FIXME */ 607 - pict->depth = fmt2->fmt.pix.depth; 608 - #endif 609 607 pict->palette = pixelformat_to_palette( 610 608 fmt2->fmt.pix.pixelformat); 611 609 break; ··· 703 707 } 704 708 case VIDIOCSTUNER: /* select a tuner input */ 705 709 { 706 - #if 0 /* FIXME */ 707 - err = drv(inode, file, VIDIOC_S_INPUT, &i); 708 - if (err < 0) 709 - dprintk("VIDIOCSTUNER / VIDIOC_S_INPUT: %d\n",err); 710 - #else 711 710 err = 0; 712 - #endif 713 711 break; 714 712 } 715 713 case VIDIOCGFREQ: /* get frequency */ ··· 842 852 err = 0; 843 853 break; 844 854 } 845 - #if 0 846 - case VIDIOCGMBUF: 847 - /* v4l2 drivers must implement that themself. The 848 - mmap() differences can't be translated fully 849 - transparent, thus there is no point to try that */ 850 - #endif 851 855 case VIDIOCMCAPTURE: /* capture a frame */ 852 856 { 853 857 struct video_mmap *mm = arg;
-18
drivers/media/video/v4l2-common.c
··· 84 84 * Video Standard Operations (contributed by Michael Schimek) 85 85 */ 86 86 87 - #if 0 /* seems to have no users */ 88 - /* This is the recommended method to deal with the framerate fields. More 89 - sophisticated drivers will access the fields directly. */ 90 - unsigned int 91 - v4l2_video_std_fps(struct v4l2_standard *vs) 92 - { 93 - if (vs->frameperiod.numerator > 0) 94 - return (((vs->frameperiod.denominator << 8) / 95 - vs->frameperiod.numerator) + 96 - (1 << 7)) / (1 << 8); 97 - return 0; 98 - } 99 - EXPORT_SYMBOL(v4l2_video_std_fps); 100 - #endif 101 87 102 88 /* Fill in the fields of a v4l2_standard structure according to the 103 89 'id' and 'transmission' parameters. Returns negative on error. */ ··· 199 213 [_IOC_NR(VIDIOC_ENUM_FMT)] = "VIDIOC_ENUM_FMT", 200 214 [_IOC_NR(VIDIOC_G_FMT)] = "VIDIOC_G_FMT", 201 215 [_IOC_NR(VIDIOC_S_FMT)] = "VIDIOC_S_FMT", 202 - #if 0 203 - [_IOC_NR(VIDIOC_G_COMP)] = "VIDIOC_G_COMP", 204 - [_IOC_NR(VIDIOC_S_COMP)] = "VIDIOC_S_COMP", 205 - #endif 206 216 [_IOC_NR(VIDIOC_REQBUFS)] = "VIDIOC_REQBUFS", 207 217 [_IOC_NR(VIDIOC_QUERYBUF)] = "VIDIOC_QUERYBUF", 208 218 [_IOC_NR(VIDIOC_G_FBUF)] = "VIDIOC_G_FBUF",
-1
drivers/media/video/video-buf-dvb.c
··· 1 1 /* 2 - * $Id: video-buf-dvb.c,v 1.7 2004/12/09 12:51:35 kraxel Exp $ 3 2 * 4 3 * some helper function for simple DVB cards which simply DMA the 5 4 * complete transport stream and let the computer sort everything else
-1
drivers/media/video/video-buf.c
··· 1 1 /* 2 - * $Id: video-buf.c,v 1.18 2005/02/24 13:32:30 kraxel Exp $ 3 2 * 4 3 * generic helper functions for video4linux capture buffers, to handle 5 4 * memory management and PCI DMA. Right now bttv + saa7134 use it.
-3
include/linux/videodev.h
··· 3 3 4 4 #include <linux/compiler.h> 5 5 #include <linux/types.h> 6 - #include <linux/version.h> 7 6 8 7 #define HAVE_V4L2 1 9 8 #include <linux/videodev2.h> ··· 28 29 void (*release)(struct video_device *vfd); 29 30 30 31 31 - #if 1 /* to be removed in 2.7.x */ 32 32 /* obsolete -- fops->owner is used instead */ 33 33 struct module *owner; 34 34 /* dev->driver_data will be used instead some day. ··· 35 37 * so the switch over will be transparent for you. 36 38 * Or use {pci|usb}_{get|set}_drvdata() directly. */ 37 39 void *priv; 38 - #endif 39 40 40 41 /* for videodev.c intenal usage -- please don't touch */ 41 42 int users; /* video_exclusive_{open|close} ... */
-4
include/linux/videodev2.h
··· 270 270 /* The above is based on SMPTE timecodes */ 271 271 272 272 273 - #if 1 274 273 /* 275 274 * M P E G C O M P R E S S I O N P A R A M E T E R S 276 275 * ··· 356 357 /* I don't expect the above being perfect yet ;) */ 357 358 __u32 reserved_5[8]; 358 359 }; 359 - #endif 360 360 361 361 struct v4l2_jpegcompression 362 362 { ··· 869 871 #define VIDIOC_ENUM_FMT _IOWR ('V', 2, struct v4l2_fmtdesc) 870 872 #define VIDIOC_G_FMT _IOWR ('V', 4, struct v4l2_format) 871 873 #define VIDIOC_S_FMT _IOWR ('V', 5, struct v4l2_format) 872 - #if 1 /* experimental */ 873 874 #define VIDIOC_G_MPEGCOMP _IOR ('V', 6, struct v4l2_mpeg_compression) 874 875 #define VIDIOC_S_MPEGCOMP _IOW ('V', 7, struct v4l2_mpeg_compression) 875 - #endif 876 876 #define VIDIOC_REQBUFS _IOWR ('V', 8, struct v4l2_requestbuffers) 877 877 #define VIDIOC_QUERYBUF _IOWR ('V', 9, struct v4l2_buffer) 878 878 #define VIDIOC_G_FBUF _IOR ('V', 10, struct v4l2_framebuffer)
-1
include/media/audiochip.h
··· 1 1 /* 2 - * $Id: audiochip.h,v 1.5 2005/06/16 22:59:16 hhackmann Exp $ 3 2 */ 4 3 5 4 #ifndef AUDIOCHIP_H
-1
include/media/id.h
··· 1 1 /* 2 - * $Id: id.h,v 1.4 2005/06/12 04:19:19 mchehab Exp $ 3 2 */ 4 3 5 4 /* FIXME: this temporarely, until these are included in linux/i2c-id.h */
+2 -2
include/media/ir-common.h
··· 1 1 /* 2 - * $Id: ir-common.h,v 1.9 2005/05/15 19:01:26 mchehab Exp $ 3 2 * 4 3 * some common structs and functions to handle infrared remotes via 5 4 * input layer ... ··· 20 21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 22 */ 22 23 23 - #include <linux/version.h> 24 24 #include <linux/input.h> 25 25 26 26 27 27 #define IR_TYPE_RC5 1 28 + #define IR_TYPE_PD 2 /* Pulse distance encoded IR */ 28 29 #define IR_TYPE_OTHER 99 29 30 30 31 #define IR_KEYTAB_TYPE u32 ··· 59 60 u32 ir_extract_bits(u32 data, u32 mask); 60 61 int ir_dump_samples(u32 *samples, int count); 61 62 int ir_decode_biphase(u32 *samples, int count, int low, int high); 63 + int ir_decode_pulsedistance(u32 *samples, int count, int low, int high); 62 64 63 65 /* 64 66 * Local variables:
+14 -11
include/media/tuner.h
··· 1 - 2 - /* $Id: tuner.h,v 1.45 2005/07/28 18:41:21 mchehab Exp $ 3 1 * 4 2 tuner.h - definition for different tuners 5 3 ··· 109 111 #define TUNER_LG_TDVS_H062F 64 /* DViCO FusionHDTV 5 */ 110 112 #define TUNER_YMEC_TVF66T5_B_DFF 65 /* Acorp Y878F */ 111 113 114 + #define TUNER_LG_NTSC_TALN_MINI 66 115 + 112 116 #define NOTUNER 0 113 117 #define PAL 1 /* PAL_BG */ 114 118 #define PAL_I 2 ··· 134 134 #define THOMSON 12 135 135 136 136 #define TUNER_SET_TYPE_ADDR _IOW('T',3,int) 137 + #define TUNER_SET_STANDBY _IOW('T',4,int) 137 138 #define TDA9887_SET_CONFIG _IOW('t',5,int) 138 139 139 140 /* tv card specific */ ··· 153 152 # define TDA9887_AUTOMUTE (1<<18) 154 153 155 154 #ifdef __KERNEL__ 156 - 157 - #define I2C_ADDR_TDA8290 0x4b 158 - #define I2C_ADDR_TDA8275 0x61 159 155 160 156 enum tuner_mode { 161 157 T_UNINITIALIZED = 0, ··· 196 198 void (*radio_freq)(struct i2c_client *c, unsigned int freq); 197 199 int (*has_signal)(struct i2c_client *c); 198 200 int (*is_stereo)(struct i2c_client *c); 201 + void (*standby)(struct i2c_client *c); 199 202 }; 200 203 201 204 extern unsigned int tuner_debug; ··· 208 209 extern int default_tuner_init(struct i2c_client *c); 209 210 extern int tea5767_autodetection(struct i2c_client *c); 210 211 211 - #define tuner_warn(fmt, arg...) \ 212 - dev_printk(KERN_WARNING , &t->i2c.dev , fmt , ## arg) 213 - #define tuner_info(fmt, arg...) \ 214 - dev_printk(KERN_INFO , &t->i2c.dev , fmt , ## arg) 215 - #define tuner_dbg(fmt, arg...) \ 216 - if (tuner_debug) dev_printk(KERN_DEBUG , &t->i2c.dev , fmt , ## arg) 212 + #define tuner_warn(fmt, arg...) do {\ 213 + printk(KERN_WARNING "%s %d-%04x: " fmt, t->i2c.driver->name, \ 214 + t->i2c.adapter->nr, t->i2c.addr , ##arg); } while (0) 215 + #define tuner_info(fmt, arg...) do {\ 216 + printk(KERN_INFO "%s %d-%04x: " fmt, t->i2c.driver->name, \ 217 + t->i2c.adapter->nr, t->i2c.addr , ##arg); } while (0) 218 + #define tuner_dbg(fmt, arg...) do {\ 219 + if (tuner_debug) \ 220 + printk(KERN_DEBUG "%s %d-%04x: " fmt, t->i2c.driver->name, \ 221 + t->i2c.adapter->nr, t->i2c.addr , ##arg); } while (0) 217 222 218 223 #endif /* __KERNEL__ */ 219 224
-1
include/media/tveeprom.h
··· 1 1 /* 2 - * $Id: tveeprom.h,v 1.2 2005/06/12 04:19:19 mchehab Exp $ 3 2 */ 4 3 5 4 struct tveeprom {
-1
include/media/video-buf.h
··· 1 1 /* 2 - * $Id: video-buf.h,v 1.9 2004/11/07 13:17:15 kraxel Exp $ 3 2 * 4 3 * generic helper functions for video4linux capture buffers, to handle 5 4 * memory management and PCI DMA. Right now bttv + saa7134 use it.