diff options
Diffstat (limited to 'drivers/media/video/tveeprom.c')
-rw-r--r-- | drivers/media/video/tveeprom.c | 64 |
1 files changed, 53 insertions, 11 deletions
diff --git a/drivers/media/video/tveeprom.c b/drivers/media/video/tveeprom.c index 72e8741e8b59..d95aecebbda3 100644 --- a/drivers/media/video/tveeprom.c +++ b/drivers/media/video/tveeprom.c | |||
@@ -81,7 +81,7 @@ hauppauge_tuner_fmt[] = | |||
81 | { 0x00000010, " PAL(I)" }, | 81 | { 0x00000010, " PAL(I)" }, |
82 | { 0x00400000, " SECAM(L/L')" }, | 82 | { 0x00400000, " SECAM(L/L')" }, |
83 | { 0x00000e00, " PAL(D/K)" }, | 83 | { 0x00000e00, " PAL(D/K)" }, |
84 | { 0x03000000, " ATSC Digital" }, | 84 | { 0x03000000, " ATSC/DVB Digital" }, |
85 | }; | 85 | }; |
86 | 86 | ||
87 | /* This is the full list of possible tuners. Many thanks to Hauppauge for | 87 | /* This is the full list of possible tuners. Many thanks to Hauppauge for |
@@ -209,13 +209,27 @@ hauppauge_tuner[] = | |||
209 | { TUNER_ABSENT, "Philips FMD1216ME"}, | 209 | { TUNER_ABSENT, "Philips FMD1216ME"}, |
210 | { TUNER_TEA5767, "Philips TEA5768HL FM Radio"}, | 210 | { TUNER_TEA5767, "Philips TEA5768HL FM Radio"}, |
211 | { TUNER_ABSENT, "Panasonic ENV57H12D5"}, | 211 | { TUNER_ABSENT, "Panasonic ENV57H12D5"}, |
212 | { TUNER_ABSENT, "TCL MFNM05-4"}, | 212 | { TUNER_PHILIPS_FM1236_MK3, "TCL MFNM05-4"}, |
213 | { TUNER_ABSENT, "TCL MNM05-4"}, | 213 | { TUNER_ABSENT, "TCL MNM05-4"}, |
214 | { TUNER_PHILIPS_FM1216ME_MK3, "TCL MPE05-2"}, | 214 | { TUNER_PHILIPS_FM1216ME_MK3, "TCL MPE05-2"}, |
215 | { TUNER_ABSENT, "TCL MQNM05-4"}, | 215 | { TUNER_ABSENT, "TCL MQNM05-4"}, |
216 | { TUNER_ABSENT, "LG TAPC-W701D"}, | 216 | { TUNER_ABSENT, "LG TAPC-W701D"}, |
217 | { TUNER_ABSENT, "TCL 9886P-WM"}, | 217 | { TUNER_ABSENT, "TCL 9886P-WM"}, |
218 | { TUNER_ABSENT, "TCL 1676NM-WM"}, | 218 | { TUNER_ABSENT, "TCL 1676NM-WM"}, |
219 | /* 110-119 */ | ||
220 | { TUNER_ABSENT, "Thompson DTT75105"}, | ||
221 | { TUNER_ABSENT, "Conexant_CX24109"}, | ||
222 | { TUNER_ABSENT, "TCL M2523_5N_E"}, | ||
223 | { TUNER_ABSENT, "TCL M2523_3DB_E"}, | ||
224 | { TUNER_ABSENT, "Philips 8275A"}, | ||
225 | { TUNER_ABSENT, "Microtune MT2060"}, | ||
226 | { TUNER_ABSENT, "Philips FM1236 MK5"}, | ||
227 | { TUNER_ABSENT, "Philips FM1216ME MK5"}, | ||
228 | { TUNER_ABSENT, "TCL M2523_3DI_E"}, | ||
229 | { TUNER_ABSENT, "Samsung THPD5222FG30A"}, | ||
230 | /* 120-129 */ | ||
231 | { TUNER_ABSENT, "Xceive XC3028"}, | ||
232 | { TUNER_ABSENT, "Philips FQ1216LME MK5"}, | ||
219 | }; | 233 | }; |
220 | 234 | ||
221 | static struct HAUPPAUGE_AUDIOIC | 235 | static struct HAUPPAUGE_AUDIOIC |
@@ -325,6 +339,7 @@ static int hasRadioTuner(int tunerType) | |||
325 | case 78: //PNPEnv_TUNER_TDA8275C1_8290_FM: | 339 | case 78: //PNPEnv_TUNER_TDA8275C1_8290_FM: |
326 | case 89: //PNPEnv_TUNER_TCL_MFPE05_2: | 340 | case 89: //PNPEnv_TUNER_TCL_MFPE05_2: |
327 | case 92: //PNPEnv_TUNER_PHILIPS_FQ1236A_MK4: | 341 | case 92: //PNPEnv_TUNER_PHILIPS_FQ1236A_MK4: |
342 | case 105: | ||
328 | return 1; | 343 | return 1; |
329 | } | 344 | } |
330 | return 0; | 345 | return 0; |
@@ -368,10 +383,15 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, | |||
368 | memset(tvee, 0, sizeof(*tvee)); | 383 | memset(tvee, 0, sizeof(*tvee)); |
369 | done = len = beenhere = 0; | 384 | done = len = beenhere = 0; |
370 | 385 | ||
371 | /* Hack for processing eeprom for em28xx */ | 386 | /* Hack for processing eeprom for em28xx and cx 2388x*/ |
372 | if ((eeprom_data[0]==0x1a)&&(eeprom_data[1]==0xeb)&& | 387 | if ((eeprom_data[0] == 0x1a) && (eeprom_data[1] == 0xeb) && |
373 | (eeprom_data[2]==0x67)&&(eeprom_data[3]==0x95)) | 388 | (eeprom_data[2] == 0x67) && (eeprom_data[3] == 0x95)) |
374 | start=0xa0; | 389 | start=0xa0; /* Generic em28xx offset */ |
390 | else if (((eeprom_data[0] & 0xf0) == 0x10) && | ||
391 | (eeprom_data[1] == 0x00) && | ||
392 | (eeprom_data[2] == 0x00) && | ||
393 | (eeprom_data[8] == 0x84)) | ||
394 | start=8; /* Generic cx2388x offset */ | ||
375 | else | 395 | else |
376 | start=0; | 396 | start=0; |
377 | 397 | ||
@@ -448,6 +468,17 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, | |||
448 | eeprom_data[i+5] + | 468 | eeprom_data[i+5] + |
449 | (eeprom_data[i+6] << 8) + | 469 | (eeprom_data[i+6] << 8) + |
450 | (eeprom_data[i+7] << 16); | 470 | (eeprom_data[i+7] << 16); |
471 | |||
472 | if ( (eeprom_data[i + 8] && 0xf0) && | ||
473 | (tvee->serial_number < 0xffffff) ) { | ||
474 | tvee->MAC_address[0] = 0x00; | ||
475 | tvee->MAC_address[1] = 0x0D; | ||
476 | tvee->MAC_address[2] = 0xFE; | ||
477 | tvee->MAC_address[3] = eeprom_data[i + 7]; | ||
478 | tvee->MAC_address[4] = eeprom_data[i + 6]; | ||
479 | tvee->MAC_address[5] = eeprom_data[i + 5]; | ||
480 | tvee->has_MAC_address = 1; | ||
481 | } | ||
451 | break; | 482 | break; |
452 | 483 | ||
453 | case 0x05: | 484 | case 0x05: |
@@ -466,11 +497,14 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, | |||
466 | case 0x06: | 497 | case 0x06: |
467 | /* tag 'ModelRev' */ | 498 | /* tag 'ModelRev' */ |
468 | tvee->model = | 499 | tvee->model = |
469 | eeprom_data[i+1] + | 500 | eeprom_data[i + 1] + |
470 | (eeprom_data[i+2] << 8); | 501 | (eeprom_data[i + 2] << 8) + |
471 | tvee->revision = eeprom_data[i+5] + | 502 | (eeprom_data[i + 3] << 16) + |
472 | (eeprom_data[i+6] << 8) + | 503 | (eeprom_data[i + 4] << 24); |
473 | (eeprom_data[i+7] << 16); | 504 | tvee->revision = |
505 | eeprom_data[i +5 ] + | ||
506 | (eeprom_data[i + 6] << 8) + | ||
507 | (eeprom_data[i + 7] << 16); | ||
474 | break; | 508 | break; |
475 | 509 | ||
476 | case 0x07: | 510 | case 0x07: |
@@ -563,6 +597,8 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, | |||
563 | t_name2 = "unknown"; | 597 | t_name2 = "unknown"; |
564 | } | 598 | } |
565 | 599 | ||
600 | tvee->tuner_hauppauge_model = tuner1; | ||
601 | tvee->tuner2_hauppauge_model = tuner2; | ||
566 | tvee->tuner_formats = 0; | 602 | tvee->tuner_formats = 0; |
567 | tvee->tuner2_formats = 0; | 603 | tvee->tuner2_formats = 0; |
568 | for (i = j = 0; i < 8; i++) { | 604 | for (i = j = 0; i < 8; i++) { |
@@ -578,6 +614,12 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, | |||
578 | 614 | ||
579 | tveeprom_info("Hauppauge model %d, rev %s, serial# %d\n", | 615 | tveeprom_info("Hauppauge model %d, rev %s, serial# %d\n", |
580 | tvee->model, tvee->rev_str, tvee->serial_number); | 616 | tvee->model, tvee->rev_str, tvee->serial_number); |
617 | if (tvee->has_MAC_address == 1) { | ||
618 | tveeprom_info("MAC address is %02X-%02X-%02X-%02X-%02X-%02X\n", | ||
619 | tvee->MAC_address[0], tvee->MAC_address[1], | ||
620 | tvee->MAC_address[2], tvee->MAC_address[3], | ||
621 | tvee->MAC_address[4], tvee->MAC_address[5]); | ||
622 | } | ||
581 | tveeprom_info("tuner model is %s (idx %d, type %d)\n", | 623 | tveeprom_info("tuner model is %s (idx %d, type %d)\n", |
582 | t_name1, tuner1, tvee->tuner_type); | 624 | t_name1, tuner1, tvee->tuner_type); |
583 | tveeprom_info("TV standards%s%s%s%s%s%s%s%s (eeprom 0x%02x)\n", | 625 | tveeprom_info("TV standards%s%s%s%s%s%s%s%s (eeprom 0x%02x)\n", |