Lines Matching +full:packet +full:- +full:processor

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * tveeprom - eeprom decoder for tvcard configuration eeproms
5 * Data and decoding routines shamelessly borrowed from bttv-cards.c
6 * eeprom access routine shamelessly borrowed from bttv-if.c
9 Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de)
10 & Marcus Metzler (mocm@thp.uni-koeln.de)
11 (c) 1999-2001 Gerd Knorr <kraxel@goldbach.in-berlin.de>
31 #include <media/v4l2-common.h>
67 /* 0-9 */
78 /* 10-19 */
89 /* 20-29 */
100 /* 30-39 */
111 /* 40-49 */
121 { TUNER_LG_PAL_I_FM, "LG TAPC-I001D"},
122 /* 50-59 */
123 { TUNER_LG_PAL_I, "LG TAPC-I701D"},
133 /* 60-69 */
144 /* 70-79 */
155 /* 80-89 */
166 /* 90-99 */
177 /* 100-109 */
181 { TUNER_PHILIPS_FM1236_MK3, "TCL MFNM05-4"},
182 { TUNER_PHILIPS_FM1236_MK3, "TCL MNM05-4"},
183 { TUNER_PHILIPS_FM1216ME_MK3, "TCL MPE05-2"},
184 { TUNER_ABSENT, "TCL MQNM05-4"},
185 { TUNER_ABSENT, "LG TAPC-W701D"},
186 { TUNER_ABSENT, "TCL 9886P-WM"},
187 { TUNER_ABSENT, "TCL 1676NM-WM"},
188 /* 110-119 */
199 /* 120-129 */
210 /* 130-139 */
221 /* 140-149 */
232 /* 150-159 */
243 /* 160-169 */
252 { TUNER_PHILIPS_FQ1236_MK5, "TCL M30WTP-4N-E"},
254 /* 170-179 */
265 /* 180-188 */
284 /* 0-4 */
290 /* 5-9 */
296 /* 10-14 */
302 /* 15-19 */
308 /* 20-24 */
314 /* 25-29 */
320 /* 30-34 */
326 /* 35-39 */
332 /* 40-44 */
338 /* 45-49 */
344 /* 50-52 */
352 /* 0-4 */
354 /* 5-9 */
356 /* 10-14 */
358 /* 15-19 */
360 /* 20-24 */
362 /* 25-29 */
364 /* 30-34 */
366 /* 35-39 */
368 /* 40-44 */
370 /* 45-49 */
372 /* 50-53 */
418 /* ---------------------------------------------- in tveeprom_hauppauge_analog()
421 ** if packet[0] == 0x84, then packet[0..1] == length in tveeprom_hauppauge_analog()
422 ** else length = packet[0] & 3f; in tveeprom_hauppauge_analog()
423 ** if packet[0] & f8 == f8, then EOD and packet[1] == checksum in tveeprom_hauppauge_analog()
434 ** model: tag [00].07-08 or [06].00-01 in tveeprom_hauppauge_analog()
435 ** revision: tag [00].09-0b or [06].04-06 in tveeprom_hauppauge_analog()
436 ** serial#: tag [01].05-07 or [04].04-06 in tveeprom_hauppauge_analog()
443 int tuner1 = 0, t_format1 = 0, audioic = -1; in tveeprom_hauppauge_analog()
452 tvee->tuner_type = TUNER_ABSENT; in tveeprom_hauppauge_analog()
453 tvee->tuner2_type = TUNER_ABSENT; in tveeprom_hauppauge_analog()
489 pr_warn("Encountered bad packet header [%02x]. Corrupt or not a Hauppauge eeprom.\n", in tveeprom_hauppauge_analog()
495 eeprom_data[i], len - 1, len, &eeprom_data[i]); in tveeprom_hauppauge_analog()
504 tvee->has_radio = eeprom_data[i+len-1]; in tveeprom_hauppauge_analog()
507 tvee->has_ir = 0; in tveeprom_hauppauge_analog()
508 tvee->model = in tveeprom_hauppauge_analog()
511 tvee->revision = eeprom_data[i+10] + in tveeprom_hauppauge_analog()
518 tvee->serial_number = in tveeprom_hauppauge_analog()
531 tvee->audio_processor = audio_ic[audioic].id; in tveeprom_hauppauge_analog()
533 tvee->audio_processor = TVEEPROM_AUDPROC_OTHER; in tveeprom_hauppauge_analog()
540 tvee->serial_number = in tveeprom_hauppauge_analog()
547 tvee->MAC_address[0] = 0x00; in tveeprom_hauppauge_analog()
548 tvee->MAC_address[1] = 0x0D; in tveeprom_hauppauge_analog()
549 tvee->MAC_address[2] = 0xFE; in tveeprom_hauppauge_analog()
550 tvee->MAC_address[3] = eeprom_data[i + 7]; in tveeprom_hauppauge_analog()
551 tvee->MAC_address[4] = eeprom_data[i + 6]; in tveeprom_hauppauge_analog()
552 tvee->MAC_address[5] = eeprom_data[i + 5]; in tveeprom_hauppauge_analog()
553 tvee->has_MAC_address = 1; in tveeprom_hauppauge_analog()
564 tvee->audio_processor = audio_ic[audioic].id; in tveeprom_hauppauge_analog()
566 tvee->audio_processor = TVEEPROM_AUDPROC_OTHER; in tveeprom_hauppauge_analog()
572 tvee->model = in tveeprom_hauppauge_analog()
577 tvee->revision = in tveeprom_hauppauge_analog()
585 on any PCI-era or later boards. */ in tveeprom_hauppauge_analog()
592 tvee->decoder_processor = eeprom_data[i + 1]; in tveeprom_hauppauge_analog()
607 tvee->has_radio = 1; /* must be radio */ in tveeprom_hauppauge_analog()
622 tvee->has_radio = eeprom_data[i+1]; in tveeprom_hauppauge_analog()
627 tvee->has_ir = 1 | (eeprom_data[i+1] << 1); in tveeprom_hauppauge_analog()
637 /* dump the rest of the packet? */ in tveeprom_hauppauge_analog()
646 if (tvee->revision != 0) { in tveeprom_hauppauge_analog()
647 tvee->rev_str[0] = 32 + ((tvee->revision >> 18) & 0x3f); in tveeprom_hauppauge_analog()
648 tvee->rev_str[1] = 32 + ((tvee->revision >> 12) & 0x3f); in tveeprom_hauppauge_analog()
649 tvee->rev_str[2] = 32 + ((tvee->revision >> 6) & 0x3f); in tveeprom_hauppauge_analog()
650 tvee->rev_str[3] = 32 + (tvee->revision & 0x3f); in tveeprom_hauppauge_analog()
651 tvee->rev_str[4] = 0; in tveeprom_hauppauge_analog()
654 if (hasRadioTuner(tuner1) && !tvee->has_radio) { in tveeprom_hauppauge_analog()
657 tvee->has_radio = 1; in tveeprom_hauppauge_analog()
661 tvee->tuner_type = hauppauge_tuner[tuner1].id; in tveeprom_hauppauge_analog()
668 tvee->tuner2_type = hauppauge_tuner[tuner2].id; in tveeprom_hauppauge_analog()
674 tvee->tuner_hauppauge_model = tuner1; in tveeprom_hauppauge_analog()
675 tvee->tuner2_hauppauge_model = tuner2; in tveeprom_hauppauge_analog()
676 tvee->tuner_formats = 0; in tveeprom_hauppauge_analog()
677 tvee->tuner2_formats = 0; in tveeprom_hauppauge_analog()
680 tvee->tuner_formats |= hauppauge_tuner_fmt[i].id; in tveeprom_hauppauge_analog()
686 tvee->tuner2_formats |= hauppauge_tuner_fmt[i].id; in tveeprom_hauppauge_analog()
692 tvee->model, tvee->rev_str, tvee->serial_number); in tveeprom_hauppauge_analog()
693 if (tvee->has_MAC_address == 1) in tveeprom_hauppauge_analog()
694 pr_info("MAC address is %pM\n", tvee->MAC_address); in tveeprom_hauppauge_analog()
696 t_name1, tuner1, tvee->tuner_type); in tveeprom_hauppauge_analog()
703 t_name2, tuner2, tvee->tuner2_type); in tveeprom_hauppauge_analog()
710 pr_info("audio processor is unknown (no idx)\n"); in tveeprom_hauppauge_analog()
711 tvee->audio_processor = TVEEPROM_AUDPROC_OTHER; in tveeprom_hauppauge_analog()
714 pr_info("audio processor is %s (idx %d)\n", in tveeprom_hauppauge_analog()
717 pr_info("audio processor is unknown (idx %d)\n", in tveeprom_hauppauge_analog()
720 if (tvee->decoder_processor) in tveeprom_hauppauge_analog()
721 pr_info("decoder processor is %s (idx %d)\n", in tveeprom_hauppauge_analog()
722 STRM(decoderIC, tvee->decoder_processor), in tveeprom_hauppauge_analog()
723 tvee->decoder_processor); in tveeprom_hauppauge_analog()
724 if (tvee->has_ir) in tveeprom_hauppauge_analog()
726 tvee->has_radio ? "" : "no ", in tveeprom_hauppauge_analog()
727 (tvee->has_ir & 2) ? "" : "no ", in tveeprom_hauppauge_analog()
728 (tvee->has_ir & 4) ? "" : "no "); in tveeprom_hauppauge_analog()
731 tvee->has_radio ? "" : "no "); in tveeprom_hauppauge_analog()
735 /* ----------------------------------------------------------------------- */
747 return -1; in tveeprom_read()
752 return -1; in tveeprom_read()
755 print_hex_dump_debug("full 256-byte eeprom dump:", DUMP_PREFIX_NONE, in tveeprom_read()