Lines Matching defs:operand

78 	u8 operand[509];
85 u8 operand[509];
92 memset(&c->operand[from], 0, to - from + 1);
265 r->operand[0] == SFE_VENDOR_DE_COMPANYID_0 &&
266 r->operand[1] == SFE_VENDOR_DE_COMPANYID_1 &&
267 r->operand[2] == SFE_VENDOR_DE_COMPANYID_2 &&
268 r->operand[3] == SFE_VENDOR_OPCODE_REGISTER_REMOTE_CONTROL;
281 fdtv_handle_rc(fdtv, r->operand[4] << 8 | r->operand[5]);
309 static int add_pid_filter(struct firedtv *fdtv, u8 *operand)
315 operand[pos++] = 0x13; /* flowfunction relay */
316 operand[pos++] = 0x80; /* dsd_sel_spec_valid_flags -> PID */
317 operand[pos++] = (fdtv->channel_pid[i] >> 8) & 0x1f;
318 operand[pos++] = fdtv->channel_pid[i] & 0xff;
319 operand[pos++] = 0x00; /* tableID */
320 operand[pos++] = 0x00; /* filter_length */
324 operand[0] = n;
340 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0;
341 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1;
342 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2;
344 c->operand[3] = SFE_VENDOR_OPCODE_TUNE_QPSK2;
346 c->operand[3] = SFE_VENDOR_OPCODE_TUNE_QPSK;
348 c->operand[4] = (p->frequency >> 24) & 0xff;
349 c->operand[5] = (p->frequency >> 16) & 0xff;
350 c->operand[6] = (p->frequency >> 8) & 0xff;
351 c->operand[7] = p->frequency & 0xff;
353 c->operand[8] = ((p->symbol_rate / 1000) >> 8) & 0xff;
354 c->operand[9] = (p->symbol_rate / 1000) & 0xff;
357 case FEC_1_2: c->operand[10] = 0x1; break;
358 case FEC_2_3: c->operand[10] = 0x2; break;
359 case FEC_3_4: c->operand[10] = 0x3; break;
360 case FEC_5_6: c->operand[10] = 0x4; break;
361 case FEC_7_8: c->operand[10] = 0x5; break;
365 default: c->operand[10] = 0x0;
369 c->operand[11] = 0xff;
371 c->operand[11] = 0;
373 c->operand[11] = 1;
376 c->operand[12] = 0xff;
378 c->operand[12] = 1;
380 c->operand[12] = 0;
385 case QAM_16: c->operand[13] = 0x1; break;
386 case QPSK: c->operand[13] = 0x2; break;
387 case PSK_8: c->operand[13] = 0x3; break;
388 default: c->operand[13] = 0x2; break;
391 case ROLLOFF_35: c->operand[14] = 0x2; break;
392 case ROLLOFF_20: c->operand[14] = 0x0; break;
393 case ROLLOFF_25: c->operand[14] = 0x1; break;
395 default: c->operand[14] = 0x2; break;
396 /* case ROLLOFF_NONE: c->operand[14] = 0xff; break; */
399 case PILOT_AUTO: c->operand[15] = 0x0; break;
400 case PILOT_OFF: c->operand[15] = 0x0; break;
401 case PILOT_ON: c->operand[15] = 0x1; break;
404 c->operand[13] = 0x1; /* auto modulation */
405 c->operand[14] = 0xff; /* disable rolloff */
406 c->operand[15] = 0xff; /* disable pilot */
421 c->operand[0] = 0; /* source plug */
422 c->operand[1] = 0xd2; /* subfunction replace */
423 c->operand[2] = 0x20; /* system id = DVB */
424 c->operand[3] = 0x00; /* antenna number */
425 c->operand[4] = 0x11; /* system_specific_multiplex selection_length */
428 c->operand[5] = 0 << 7 /* reserved */
438 c->operand[6] = 0 << 7 /* NetworkID */
441 c->operand[7] = 0x00;
442 c->operand[8] = 0x00;
443 c->operand[9] = 0x00;
444 c->operand[10] = 0x00;
446 c->operand[11] = (((p->frequency / 4000) >> 16) & 0xff) | (2 << 6);
447 c->operand[12] = ((p->frequency / 4000) >> 8) & 0xff;
448 c->operand[13] = (p->frequency / 4000) & 0xff;
449 c->operand[14] = ((p->symbol_rate / 1000) >> 12) & 0xff;
450 c->operand[15] = ((p->symbol_rate / 1000) >> 4) & 0xff;
451 c->operand[16] = ((p->symbol_rate / 1000) << 4) & 0xf0;
452 c->operand[17] = 0x00;
455 case FEC_1_2: c->operand[18] = 0x1; break;
456 case FEC_2_3: c->operand[18] = 0x2; break;
457 case FEC_3_4: c->operand[18] = 0x3; break;
458 case FEC_5_6: c->operand[18] = 0x4; break;
459 case FEC_7_8: c->operand[18] = 0x5; break;
460 case FEC_8_9: c->operand[18] = 0x6; break;
461 case FEC_4_5: c->operand[18] = 0x8; break;
463 default: c->operand[18] = 0x0;
467 case QAM_16: c->operand[19] = 0x08; break;
468 case QAM_32: c->operand[19] = 0x10; break;
469 case QAM_64: c->operand[19] = 0x18; break;
470 case QAM_128: c->operand[19] = 0x20; break;
471 case QAM_256: c->operand[19] = 0x28; break;
473 default: c->operand[19] = 0x00;
476 c->operand[20] = 0x00;
477 c->operand[21] = 0x00;
479 return 22 + add_pid_filter(fdtv, &c->operand[22]);
489 c->operand[0] = 0; /* source plug */
490 c->operand[1] = 0xd2; /* subfunction replace */
491 c->operand[2] = 0x20; /* system id = DVB */
492 c->operand[3] = 0x00; /* antenna number */
493 c->operand[4] = 0x0c; /* system_specific_multiplex selection_length */
496 c->operand[5] =
507 c->operand[6] =
513 c->operand[7] = 0x0;
514 c->operand[8] = (p->frequency / 10) >> 24;
515 c->operand[9] = ((p->frequency / 10) >> 16) & 0xff;
516 c->operand[10] = ((p->frequency / 10) >> 8) & 0xff;
517 c->operand[11] = (p->frequency / 10) & 0xff;
520 case 7000000: c->operand[12] = 0x20; break;
524 default: c->operand[12] = 0x00;
528 case QAM_16: c->operand[13] = 1 << 6; break;
529 case QAM_64: c->operand[13] = 2 << 6; break;
531 default: c->operand[13] = 0x00;
535 case HIERARCHY_1: c->operand[13] |= 1 << 3; break;
536 case HIERARCHY_2: c->operand[13] |= 2 << 3; break;
537 case HIERARCHY_4: c->operand[13] |= 3 << 3; break;
544 case FEC_2_3: c->operand[13] |= 1; break;
545 case FEC_3_4: c->operand[13] |= 2; break;
546 case FEC_5_6: c->operand[13] |= 3; break;
547 case FEC_7_8: c->operand[13] |= 4; break;
553 case FEC_2_3: c->operand[14] = 1 << 5; break;
554 case FEC_3_4: c->operand[14] = 2 << 5; break;
555 case FEC_5_6: c->operand[14] = 3 << 5; break;
556 case FEC_7_8: c->operand[14] = 4 << 5; break;
558 default: c->operand[14] = 0x00; break;
562 case GUARD_INTERVAL_1_16: c->operand[14] |= 1 << 3; break;
563 case GUARD_INTERVAL_1_8: c->operand[14] |= 2 << 3; break;
564 case GUARD_INTERVAL_1_4: c->operand[14] |= 3 << 3; break;
571 case TRANSMISSION_MODE_8K: c->operand[14] |= 1 << 1; break;
577 c->operand[15] = 0x00; /* network_ID[0] */
578 c->operand[16] = 0x00; /* network_ID[1] */
580 return 17 + add_pid_filter(fdtv, &c->operand[17]);
614 *status = r->operand[2];
639 c->operand[0] = 0; /* source plug */
640 c->operand[1] = 0xd2; /* subfunction replace */
641 c->operand[2] = 0x20; /* system id = DVB */
642 c->operand[3] = 0x00; /* antenna number */
643 c->operand[4] = 0x00; /* system_specific_multiplex selection_length */
644 c->operand[5] = pidc; /* Nr_of_dsd_sel_specs */
649 c->operand[pos++] = 0x13; /* flowfunction relay */
650 c->operand[pos++] = 0x80; /* dsd_sel_spec_valid_flags -> PID */
651 c->operand[pos++] = (pid[k] >> 8) & 0x1f;
652 c->operand[pos++] = pid[k] & 0xff;
653 c->operand[pos++] = 0x00; /* tableID */
654 c->operand[pos++] = 0x00; /* filter_length */
684 c->operand[0] = 0; /* source plug */
685 c->operand[1] = 0xd2; /* subfunction replace */
686 c->operand[2] = 0xff; /* status */
687 c->operand[3] = 0x20; /* system id = DVB */
688 c->operand[4] = 0x00; /* antenna number */
689 c->operand[5] = 0x0; /* system_specific_search_flags */
690 c->operand[6] = sl; /* system_specific_multiplex selection_length */
692 * operand[7]: valid_flags[0]
693 * operand[8]: valid_flags[1]
694 * operand[7 + sl]: nr_of_dsit_sel_specs (always 0)
723 c->operand[0] = DESCRIPTOR_SUBUNIT_IDENTIFIER;
724 c->operand[1] = 0xff;
725 c->operand[2] = 0x00;
726 c->operand[3] = 0x00; /* length highbyte */
727 c->operand[4] = 0x08; /* length lowbyte */
728 c->operand[5] = 0x00; /* offset highbyte */
729 c->operand[6] = 0x0d; /* offset lowbyte */
739 (r->operand[3] << 8) + r->operand[4] != 8) {
763 c->operand[0] = DESCRIPTOR_TUNER_STATUS;
764 c->operand[1] = 0xff; /* read_result_status */
766 * operand[2]: reserved
767 * operand[3]: SIZEOF_ANTENNA_INPUT_INFO >> 8
768 * operand[4]: SIZEOF_ANTENNA_INPUT_INFO & 0xff
784 length = r->operand[9];
785 if (r->operand[1] != 0x10 || length != SIZEOF_ANTENNA_INPUT_INFO) {
791 stat->active_system = r->operand[10];
792 stat->searching = r->operand[11] >> 7 & 1;
793 stat->moving = r->operand[11] >> 6 & 1;
794 stat->no_rf = r->operand[11] >> 5 & 1;
795 stat->input = r->operand[12] >> 7 & 1;
796 stat->selected_antenna = r->operand[12] & 0x7f;
797 stat->ber = r->operand[13] << 24 |
798 r->operand[14] << 16 |
799 r->operand[15] << 8 |
800 r->operand[16];
801 stat->signal_strength = r->operand[17];
802 stat->raster_frequency = r->operand[18] >> 6 & 2;
803 stat->rf_frequency = (r->operand[18] & 0x3f) << 16 |
804 r->operand[19] << 8 |
805 r->operand[20];
806 stat->man_dep_info_length = r->operand[21];
807 stat->front_end_error = r->operand[22] >> 4 & 1;
808 stat->antenna_error = r->operand[22] >> 3 & 1;
809 stat->front_end_power_status = r->operand[22] >> 1 & 1;
810 stat->power_supply = r->operand[22] & 1;
811 stat->carrier_noise_ratio = r->operand[23] << 8 |
812 r->operand[24];
813 stat->power_supply_voltage = r->operand[27];
814 stat->antenna_voltage = r->operand[28];
815 stat->firewire_bus_voltage = r->operand[29];
816 stat->ca_mmi = r->operand[30] & 1;
817 stat->ca_pmt_reply = r->operand[31] >> 7 & 1;
818 stat->ca_date_time_request = r->operand[31] >> 6 & 1;
819 stat->ca_application_info = r->operand[31] >> 5 & 1;
820 stat->ca_module_present_status = r->operand[31] >> 4 & 1;
821 stat->ca_dvb_flag = r->operand[31] >> 3 & 1;
822 stat->ca_error_flag = r->operand[31] >> 2 & 1;
823 stat->ca_initialization_status = r->operand[31] >> 1 & 1;
844 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0;
845 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1;
846 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2;
847 c->operand[3] = SFE_VENDOR_OPCODE_LNB_CONTROL;
848 c->operand[4] = voltage;
849 c->operand[5] = nrdiseq;
853 c->operand[pos++] = diseqcmd[j].msg_len;
856 c->operand[pos++] = diseqcmd[j].msg[k];
858 c->operand[pos++] = burst;
859 c->operand[pos++] = conttone;
888 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0;
889 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1;
890 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2;
891 c->operand[3] = SFE_VENDOR_OPCODE_REGISTER_REMOTE_CONTROL;
892 c->operand[4] = 0; /* padding */
925 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0;
926 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1;
927 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2;
928 c->operand[3] = SFE_VENDOR_OPCODE_HOST2CA;
929 c->operand[4] = 0; /* slot */
930 c->operand[5] = SFE_VENDOR_TAG_CA_APPLICATION_INFO; /* ca tag */
949 if (r->operand[7] & 0x80)
950 length = (r->operand[7] & 0x7f) + 1;
960 if (r->operand[7] & 0x80)
961 for (i = 0; i < (r->operand[7] & 0x7f); i++) {
963 size += r->operand[8 + i];
966 return r->operand[7];
982 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0;
983 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1;
984 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2;
985 c->operand[3] = SFE_VENDOR_OPCODE_CA2HOST;
986 c->operand[4] = 0; /* slot */
987 c->operand[5] = SFE_VENDOR_TAG_CA_APPLICATION_INFO; /* ca tag */
1001 app_info[3] = 6 + r->operand[pos + 4];
1003 memcpy(&app_info[5], &r->operand[pos], 5 + r->operand[pos + 4]);
1024 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0;
1025 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1;
1026 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2;
1027 c->operand[3] = SFE_VENDOR_OPCODE_CA2HOST;
1028 c->operand[4] = 0; /* slot */
1029 c->operand[5] = SFE_VENDOR_TAG_CA_APPLICATION_INFO; /* ca tag */
1045 app_info[4] = r->operand[pos + 0];
1046 app_info[5] = r->operand[pos + 1];
1073 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0;
1074 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1;
1075 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2;
1076 c->operand[3] = SFE_VENDOR_OPCODE_HOST2CA;
1077 c->operand[4] = 0; /* slot */
1078 c->operand[5] = SFE_VENDOR_TAG_CA_RESET; /* ca tag */
1079 c->operand[6] = 0; /* more/last */
1080 c->operand[7] = 1; /* length */
1081 c->operand[8] = 0; /* force hardware reset */
1126 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0;
1127 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1;
1128 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2;
1129 c->operand[3] = SFE_VENDOR_OPCODE_HOST2CA;
1130 c->operand[4] = 0; /* slot */
1131 c->operand[5] = SFE_VENDOR_TAG_CA_PMT; /* ca tag */
1132 c->operand[6] = 0; /* more/last */
1134 c->operand[10] = list_management;
1135 c->operand[11] = 0x01; /* pmt_cmd=OK_descramble */
1139 c->operand[12] = 0x02; /* Table id=2 */
1140 c->operand[13] = 0x80; /* Section syntax + length */
1142 c->operand[15] = msg[1]; /* Program number */
1143 c->operand[16] = msg[2];
1144 c->operand[17] = msg[3]; /* Version number and current/next */
1145 c->operand[18] = 0x00; /* Section number=0 */
1146 c->operand[19] = 0x00; /* Last section number=0 */
1147 c->operand[20] = 0x1f; /* PCR_PID=1FFF */
1148 c->operand[21] = 0xff;
1149 c->operand[22] = (program_info_length >> 8); /* Program info length */
1150 c->operand[23] = (program_info_length & 0xff);
1160 if (program_info_length > sizeof(c->operand) - 4 - write_pos) {
1165 memcpy(&c->operand[write_pos], &msg[read_pos],
1171 if (write_pos + 4 >= sizeof(c->operand) - 4) {
1175 c->operand[write_pos++] = msg[read_pos++];
1176 c->operand[write_pos++] = msg[read_pos++];
1177 c->operand[write_pos++] = msg[read_pos++];
1183 c->operand[write_pos++] = es_info_length >> 8;
1184 c->operand[write_pos++] = es_info_length & 0xff;
1195 if (es_info_length > sizeof(c->operand) - 4 - write_pos ||
1201 memcpy(&c->operand[write_pos], &msg[read_pos],
1209 c->operand[7] = 0x82;
1210 c->operand[8] = (write_pos - 10) >> 8;
1211 c->operand[9] = (write_pos - 10) & 0xff;
1212 c->operand[14] = write_pos - 15;
1214 crc32_csum = crc32_be(0, &c->operand[10], c->operand[12] - 1);
1215 c->operand[write_pos - 4] = (crc32_csum >> 24) & 0xff;
1216 c->operand[write_pos - 3] = (crc32_csum >> 16) & 0xff;
1217 c->operand[write_pos - 2] = (crc32_csum >> 8) & 0xff;
1218 c->operand[write_pos - 1] = (crc32_csum >> 0) & 0xff;
1249 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0;
1250 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1;
1251 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2;
1252 c->operand[3] = SFE_VENDOR_OPCODE_CA2HOST;
1253 c->operand[4] = 0; /* slot */
1254 c->operand[5] = SFE_VENDOR_TAG_CA_DATE_TIME; /* ca tag */
1264 *interval = r->operand[get_ca_object_pos(r)];
1282 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0;
1283 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1;
1284 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2;
1285 c->operand[3] = SFE_VENDOR_OPCODE_HOST2CA;
1286 c->operand[4] = 0; /* slot */
1287 c->operand[5] = SFE_VENDOR_TAG_CA_ENTER_MENU;
1312 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0;
1313 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1;
1314 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2;
1315 c->operand[3] = SFE_VENDOR_OPCODE_CA2HOST;
1316 c->operand[4] = 0; /* slot */
1317 c->operand[5] = SFE_VENDOR_TAG_CA_MMI;
1328 memcpy(mmi_object, &r->operand[get_ca_object_pos(r)], *len);