aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tveeprom.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-29 05:54:24 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-29 05:54:24 -0400
commit3825c9e8d01e4310c40a3903a354c433c32a7b6f (patch)
tree87c94a8076bbb38bd2cf20ab9bc23d6f74f6a0a8 /drivers/media/video/tveeprom.c
parent5d7b605245b1aa1a9cd6549b1f57d69273eb0c37 (diff)
parent6e86841d05f371b5b9b86ce76c02aaee83352298 (diff)
Merge commit 'v2.6.27-rc1' into x86/microcode
Conflicts: arch/x86/kernel/microcode.c Manual resolutions: arch/x86/kernel/microcode_amd.c arch/x86/kernel/microcode_intel.c Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/media/video/tveeprom.c')
-rw-r--r--drivers/media/video/tveeprom.c122
1 files changed, 62 insertions, 60 deletions
diff --git a/drivers/media/video/tveeprom.c b/drivers/media/video/tveeprom.c
index 9da0e1807ffb..bcc32fa92a81 100644
--- a/drivers/media/video/tveeprom.c
+++ b/drivers/media/video/tveeprom.c
@@ -34,13 +34,13 @@
34#include <linux/kernel.h> 34#include <linux/kernel.h>
35#include <linux/init.h> 35#include <linux/init.h>
36#include <linux/types.h> 36#include <linux/types.h>
37#include <linux/videodev.h> 37#include <linux/videodev2.h>
38#include <linux/i2c.h> 38#include <linux/i2c.h>
39 39
40#include <media/tuner.h> 40#include <media/tuner.h>
41#include <media/tveeprom.h> 41#include <media/tveeprom.h>
42#include <media/v4l2-common.h> 42#include <media/v4l2-common.h>
43#include <media/audiochip.h> 43#include <media/v4l2-chip-ident.h>
44 44
45MODULE_DESCRIPTION("i2c Hauppauge eeprom decoder driver"); 45MODULE_DESCRIPTION("i2c Hauppauge eeprom decoder driver");
46MODULE_AUTHOR("John Klar"); 46MODULE_AUTHOR("John Klar");
@@ -261,70 +261,72 @@ hauppauge_tuner[] =
261 { TUNER_ABSENT, "MaxLinear MXL5005_v2"}, 261 { TUNER_ABSENT, "MaxLinear MXL5005_v2"},
262 { TUNER_PHILIPS_TDA8290, "Philips 18271_8295"}, 262 { TUNER_PHILIPS_TDA8290, "Philips 18271_8295"},
263 /* 150-159 */ 263 /* 150-159 */
264 { TUNER_ABSENT, "Xceive XC5000"}, 264 { TUNER_ABSENT, "Xceive XC5000"},
265}; 265};
266 266
267/* Use V4L2_IDENT_AMBIGUOUS for those audio 'chips' that are
268 * internal to a video chip, i.e. not a separate audio chip. */
267static struct HAUPPAUGE_AUDIOIC 269static struct HAUPPAUGE_AUDIOIC
268{ 270{
269 enum audiochip id; 271 u32 id;
270 char *name; 272 char *name;
271} 273}
272audioIC[] = 274audioIC[] =
273{ 275{
274 /* 0-4 */ 276 /* 0-4 */
275 {AUDIO_CHIP_NONE, "None"}, 277 { V4L2_IDENT_NONE, "None" },
276 {AUDIO_CHIP_TEA6300, "TEA6300"}, 278 { V4L2_IDENT_UNKNOWN, "TEA6300" },
277 {AUDIO_CHIP_TEA6300, "TEA6320"}, 279 { V4L2_IDENT_UNKNOWN, "TEA6320" },
278 {AUDIO_CHIP_TDA985X, "TDA9850"}, 280 { V4L2_IDENT_UNKNOWN, "TDA9850" },
279 {AUDIO_CHIP_MSP34XX, "MSP3400C"}, 281 { V4L2_IDENT_MSPX4XX, "MSP3400C" },
280 /* 5-9 */ 282 /* 5-9 */
281 {AUDIO_CHIP_MSP34XX, "MSP3410D"}, 283 { V4L2_IDENT_MSPX4XX, "MSP3410D" },
282 {AUDIO_CHIP_MSP34XX, "MSP3415"}, 284 { V4L2_IDENT_MSPX4XX, "MSP3415" },
283 {AUDIO_CHIP_MSP34XX, "MSP3430"}, 285 { V4L2_IDENT_MSPX4XX, "MSP3430" },
284 {AUDIO_CHIP_MSP34XX, "MSP3438"}, 286 { V4L2_IDENT_MSPX4XX, "MSP3438" },
285 {AUDIO_CHIP_UNKNOWN, "CS5331"}, 287 { V4L2_IDENT_UNKNOWN, "CS5331" },
286 /* 10-14 */ 288 /* 10-14 */
287 {AUDIO_CHIP_MSP34XX, "MSP3435"}, 289 { V4L2_IDENT_MSPX4XX, "MSP3435" },
288 {AUDIO_CHIP_MSP34XX, "MSP3440"}, 290 { V4L2_IDENT_MSPX4XX, "MSP3440" },
289 {AUDIO_CHIP_MSP34XX, "MSP3445"}, 291 { V4L2_IDENT_MSPX4XX, "MSP3445" },
290 {AUDIO_CHIP_MSP34XX, "MSP3411"}, 292 { V4L2_IDENT_MSPX4XX, "MSP3411" },
291 {AUDIO_CHIP_MSP34XX, "MSP3416"}, 293 { V4L2_IDENT_MSPX4XX, "MSP3416" },
292 /* 15-19 */ 294 /* 15-19 */
293 {AUDIO_CHIP_MSP34XX, "MSP3425"}, 295 { V4L2_IDENT_MSPX4XX, "MSP3425" },
294 {AUDIO_CHIP_MSP34XX, "MSP3451"}, 296 { V4L2_IDENT_MSPX4XX, "MSP3451" },
295 {AUDIO_CHIP_MSP34XX, "MSP3418"}, 297 { V4L2_IDENT_MSPX4XX, "MSP3418" },
296 {AUDIO_CHIP_UNKNOWN, "Type 0x12"}, 298 { V4L2_IDENT_UNKNOWN, "Type 0x12" },
297 {AUDIO_CHIP_UNKNOWN, "OKI7716"}, 299 { V4L2_IDENT_UNKNOWN, "OKI7716" },
298 /* 20-24 */ 300 /* 20-24 */
299 {AUDIO_CHIP_MSP34XX, "MSP4410"}, 301 { V4L2_IDENT_MSPX4XX, "MSP4410" },
300 {AUDIO_CHIP_MSP34XX, "MSP4420"}, 302 { V4L2_IDENT_MSPX4XX, "MSP4420" },
301 {AUDIO_CHIP_MSP34XX, "MSP4440"}, 303 { V4L2_IDENT_MSPX4XX, "MSP4440" },
302 {AUDIO_CHIP_MSP34XX, "MSP4450"}, 304 { V4L2_IDENT_MSPX4XX, "MSP4450" },
303 {AUDIO_CHIP_MSP34XX, "MSP4408"}, 305 { V4L2_IDENT_MSPX4XX, "MSP4408" },
304 /* 25-29 */ 306 /* 25-29 */
305 {AUDIO_CHIP_MSP34XX, "MSP4418"}, 307 { V4L2_IDENT_MSPX4XX, "MSP4418" },
306 {AUDIO_CHIP_MSP34XX, "MSP4428"}, 308 { V4L2_IDENT_MSPX4XX, "MSP4428" },
307 {AUDIO_CHIP_MSP34XX, "MSP4448"}, 309 { V4L2_IDENT_MSPX4XX, "MSP4448" },
308 {AUDIO_CHIP_MSP34XX, "MSP4458"}, 310 { V4L2_IDENT_MSPX4XX, "MSP4458" },
309 {AUDIO_CHIP_MSP34XX, "Type 0x1d"}, 311 { V4L2_IDENT_MSPX4XX, "Type 0x1d" },
310 /* 30-34 */ 312 /* 30-34 */
311 {AUDIO_CHIP_INTERNAL, "CX880"}, 313 { V4L2_IDENT_AMBIGUOUS, "CX880" },
312 {AUDIO_CHIP_INTERNAL, "CX881"}, 314 { V4L2_IDENT_AMBIGUOUS, "CX881" },
313 {AUDIO_CHIP_INTERNAL, "CX883"}, 315 { V4L2_IDENT_AMBIGUOUS, "CX883" },
314 {AUDIO_CHIP_INTERNAL, "CX882"}, 316 { V4L2_IDENT_AMBIGUOUS, "CX882" },
315 {AUDIO_CHIP_INTERNAL, "CX25840"}, 317 { V4L2_IDENT_AMBIGUOUS, "CX25840" },
316 /* 35-39 */ 318 /* 35-39 */
317 {AUDIO_CHIP_INTERNAL, "CX25841"}, 319 { V4L2_IDENT_AMBIGUOUS, "CX25841" },
318 {AUDIO_CHIP_INTERNAL, "CX25842"}, 320 { V4L2_IDENT_AMBIGUOUS, "CX25842" },
319 {AUDIO_CHIP_INTERNAL, "CX25843"}, 321 { V4L2_IDENT_AMBIGUOUS, "CX25843" },
320 {AUDIO_CHIP_INTERNAL, "CX23418"}, 322 { V4L2_IDENT_AMBIGUOUS, "CX23418" },
321 {AUDIO_CHIP_INTERNAL, "CX23885"}, 323 { V4L2_IDENT_AMBIGUOUS, "CX23885" },
322 /* 40-44 */ 324 /* 40-44 */
323 {AUDIO_CHIP_INTERNAL, "CX23888"}, 325 { V4L2_IDENT_AMBIGUOUS, "CX23888" },
324 {AUDIO_CHIP_INTERNAL, "SAA7131"}, 326 { V4L2_IDENT_AMBIGUOUS, "SAA7131" },
325 {AUDIO_CHIP_INTERNAL, "CX23887"}, 327 { V4L2_IDENT_AMBIGUOUS, "CX23887" },
326 {AUDIO_CHIP_INTERNAL, "SAA7164"}, 328 { V4L2_IDENT_AMBIGUOUS, "SAA7164" },
327 {AUDIO_CHIP_INTERNAL, "AU8522"}, 329 { V4L2_IDENT_AMBIGUOUS, "AU8522" },
328}; 330};
329 331
330/* This list is supplied by Hauppauge. Thanks! */ 332/* This list is supplied by Hauppauge. Thanks! */
@@ -483,7 +485,7 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee,
483 tvee->has_radio = eeprom_data[i+len-1]; 485 tvee->has_radio = eeprom_data[i+len-1];
484 /* old style tag, don't know how to detect 486 /* old style tag, don't know how to detect
485 IR presence, mark as unknown. */ 487 IR presence, mark as unknown. */
486 tvee->has_ir = -1; 488 tvee->has_ir = 0;
487 tvee->model = 489 tvee->model =
488 eeprom_data[i+8] + 490 eeprom_data[i+8] +
489 (eeprom_data[i+9] << 8); 491 (eeprom_data[i+9] << 8);
@@ -509,7 +511,7 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee,
509 if (audioic < ARRAY_SIZE(audioIC)) 511 if (audioic < ARRAY_SIZE(audioIC))
510 tvee->audio_processor = audioIC[audioic].id; 512 tvee->audio_processor = audioIC[audioic].id;
511 else 513 else
512 tvee->audio_processor = AUDIO_CHIP_UNKNOWN; 514 tvee->audio_processor = V4L2_IDENT_UNKNOWN;
513 break; 515 break;
514 516
515 /* case 0x03: tag 'EEInfo' */ 517 /* case 0x03: tag 'EEInfo' */
@@ -542,7 +544,7 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee,
542 if (audioic < ARRAY_SIZE(audioIC)) 544 if (audioic < ARRAY_SIZE(audioIC))
543 tvee->audio_processor = audioIC[audioic].id; 545 tvee->audio_processor = audioIC[audioic].id;
544 else 546 else
545 tvee->audio_processor = AUDIO_CHIP_UNKNOWN; 547 tvee->audio_processor = V4L2_IDENT_UNKNOWN;
546 548
547 break; 549 break;
548 550
@@ -603,7 +605,7 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee,
603 605
604 case 0x0f: 606 case 0x0f:
605 /* tag 'IRInfo' */ 607 /* tag 'IRInfo' */
606 tvee->has_ir = eeprom_data[i+1]; 608 tvee->has_ir = 1 | (eeprom_data[i+1] << 1);
607 break; 609 break;
608 610
609 /* case 0x10: tag 'VBIInfo' */ 611 /* case 0x10: tag 'VBIInfo' */
@@ -690,7 +692,7 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee,
690 t_fmt_name2[6], t_fmt_name2[7], t_format2); 692 t_fmt_name2[6], t_fmt_name2[7], t_format2);
691 if (audioic < 0) { 693 if (audioic < 0) {
692 tveeprom_info("audio processor is unknown (no idx)\n"); 694 tveeprom_info("audio processor is unknown (no idx)\n");
693 tvee->audio_processor = AUDIO_CHIP_UNKNOWN; 695 tvee->audio_processor = V4L2_IDENT_UNKNOWN;
694 } else { 696 } else {
695 if (audioic < ARRAY_SIZE(audioIC)) 697 if (audioic < ARRAY_SIZE(audioIC))
696 tveeprom_info("audio processor is %s (idx %d)\n", 698 tveeprom_info("audio processor is %s (idx %d)\n",
@@ -703,14 +705,14 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee,
703 tveeprom_info("decoder processor is %s (idx %d)\n", 705 tveeprom_info("decoder processor is %s (idx %d)\n",
704 STRM(decoderIC, tvee->decoder_processor), 706 STRM(decoderIC, tvee->decoder_processor),
705 tvee->decoder_processor); 707 tvee->decoder_processor);
706 if (tvee->has_ir == -1) 708 if (tvee->has_ir)
707 tveeprom_info("has %sradio\n",
708 tvee->has_radio ? "" : "no ");
709 else
710 tveeprom_info("has %sradio, has %sIR receiver, has %sIR transmitter\n", 709 tveeprom_info("has %sradio, has %sIR receiver, has %sIR transmitter\n",
711 tvee->has_radio ? "" : "no ", 710 tvee->has_radio ? "" : "no ",
712 (tvee->has_ir & 1) ? "" : "no ", 711 (tvee->has_ir & 2) ? "" : "no ",
713 (tvee->has_ir & 2) ? "" : "no "); 712 (tvee->has_ir & 4) ? "" : "no ");
713 else
714 tveeprom_info("has %sradio\n",
715 tvee->has_radio ? "" : "no ");
714} 716}
715EXPORT_SYMBOL(tveeprom_hauppauge_analog); 717EXPORT_SYMBOL(tveeprom_hauppauge_analog);
716 718