diff options
author | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2005-09-09 16:03:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 16:57:49 -0400 |
commit | 793cf9e6a54c698e109a599c8b8e303658fcaae6 (patch) | |
tree | 522a88bad46df318b04888bad91c49504d3565eb /drivers/media/common | |
parent | a1938038dd7e4188a8663e49242fa77dd2adb7ed (diff) |
[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>
Diffstat (limited to 'drivers/media/common')
-rw-r--r-- | drivers/media/common/ir-common.c | 68 |
1 files changed, 67 insertions, 1 deletions
diff --git a/drivers/media/common/ir-common.c b/drivers/media/common/ir-common.c index ab7a1fba4427..a0e700d7a4a4 100644 --- a/drivers/media/common/ir-common.c +++ b/drivers/media/common/ir-common.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: ir-common.c,v 1.11 2005/07/07 14:44:43 mchehab Exp $ | ||
3 | * | 2 | * |
4 | * some common structs and functions to handle infrared remotes via | 3 | * some common structs and functions to handle infrared remotes via |
5 | * input layer ... | 4 | * input layer ... |
@@ -335,6 +334,72 @@ int ir_dump_samples(u32 *samples, int count) | |||
335 | return 0; | 334 | return 0; |
336 | } | 335 | } |
337 | 336 | ||
337 | /* decode raw samples, pulse distance coding used by NEC remotes */ | ||
338 | int ir_decode_pulsedistance(u32 *samples, int count, int low, int high) | ||
339 | { | ||
340 | int i,last,bit,len; | ||
341 | u32 curBit; | ||
342 | u32 value; | ||
343 | |||
344 | /* find start burst */ | ||
345 | for (i = len = 0; i < count * 32; i++) { | ||
346 | bit = getbit(samples,i); | ||
347 | if (bit) { | ||
348 | len++; | ||
349 | } else { | ||
350 | if (len >= 29) | ||
351 | break; | ||
352 | len = 0; | ||
353 | } | ||
354 | } | ||
355 | |||
356 | /* start burst to short */ | ||
357 | if (len < 29) | ||
358 | return 0xffffffff; | ||
359 | |||
360 | /* find start silence */ | ||
361 | for (len = 0; i < count * 32; i++) { | ||
362 | bit = getbit(samples,i); | ||
363 | if (bit) { | ||
364 | break; | ||
365 | } else { | ||
366 | len++; | ||
367 | } | ||
368 | } | ||
369 | |||
370 | /* silence to short */ | ||
371 | if (len < 7) | ||
372 | return 0xffffffff; | ||
373 | |||
374 | /* go decoding */ | ||
375 | len = 0; | ||
376 | last = 1; | ||
377 | value = 0; curBit = 1; | ||
378 | for (; i < count * 32; i++) { | ||
379 | bit = getbit(samples,i); | ||
380 | if (last) { | ||
381 | if(bit) { | ||
382 | continue; | ||
383 | } else { | ||
384 | len = 1; | ||
385 | } | ||
386 | } else { | ||
387 | if (bit) { | ||
388 | if (len > (low + high) /2) | ||
389 | value |= curBit; | ||
390 | curBit <<= 1; | ||
391 | if (curBit == 1) | ||
392 | break; | ||
393 | } else { | ||
394 | len++; | ||
395 | } | ||
396 | } | ||
397 | last = bit; | ||
398 | } | ||
399 | |||
400 | return value; | ||
401 | } | ||
402 | |||
338 | /* decode raw samples, biphase coding, used by rc5 for example */ | 403 | /* decode raw samples, biphase coding, used by rc5 for example */ |
339 | int ir_decode_biphase(u32 *samples, int count, int low, int high) | 404 | int ir_decode_biphase(u32 *samples, int count, int low, int high) |
340 | { | 405 | { |
@@ -383,6 +448,7 @@ EXPORT_SYMBOL_GPL(ir_input_keydown); | |||
383 | EXPORT_SYMBOL_GPL(ir_extract_bits); | 448 | EXPORT_SYMBOL_GPL(ir_extract_bits); |
384 | EXPORT_SYMBOL_GPL(ir_dump_samples); | 449 | EXPORT_SYMBOL_GPL(ir_dump_samples); |
385 | EXPORT_SYMBOL_GPL(ir_decode_biphase); | 450 | EXPORT_SYMBOL_GPL(ir_decode_biphase); |
451 | EXPORT_SYMBOL_GPL(ir_decode_pulsedistance); | ||
386 | 452 | ||
387 | /* | 453 | /* |
388 | * Local variables: | 454 | * Local variables: |