Lines Matching refs:c
94 static inline void clear_operands(struct avc_command_frame *c, int from, int to) in clear_operands() argument
96 memset(&c->operand[from], 0, to - from + 1); in clear_operands()
99 static void pad_operands(struct avc_command_frame *c, int from) in pad_operands() argument
104 clear_operands(c, from, to); in pad_operands()
340 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_tuner_tuneqpsk() local
342 c->opcode = AVC_OPCODE_VENDOR; in avc_tuner_tuneqpsk()
344 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0; in avc_tuner_tuneqpsk()
345 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1; in avc_tuner_tuneqpsk()
346 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2; in avc_tuner_tuneqpsk()
348 c->operand[3] = SFE_VENDOR_OPCODE_TUNE_QPSK2; in avc_tuner_tuneqpsk()
350 c->operand[3] = SFE_VENDOR_OPCODE_TUNE_QPSK; in avc_tuner_tuneqpsk()
352 c->operand[4] = (p->frequency >> 24) & 0xff; in avc_tuner_tuneqpsk()
353 c->operand[5] = (p->frequency >> 16) & 0xff; in avc_tuner_tuneqpsk()
354 c->operand[6] = (p->frequency >> 8) & 0xff; in avc_tuner_tuneqpsk()
355 c->operand[7] = p->frequency & 0xff; in avc_tuner_tuneqpsk()
357 c->operand[8] = ((p->symbol_rate / 1000) >> 8) & 0xff; in avc_tuner_tuneqpsk()
358 c->operand[9] = (p->symbol_rate / 1000) & 0xff; in avc_tuner_tuneqpsk()
361 case FEC_1_2: c->operand[10] = 0x1; break; in avc_tuner_tuneqpsk()
362 case FEC_2_3: c->operand[10] = 0x2; break; in avc_tuner_tuneqpsk()
363 case FEC_3_4: c->operand[10] = 0x3; break; in avc_tuner_tuneqpsk()
364 case FEC_5_6: c->operand[10] = 0x4; break; in avc_tuner_tuneqpsk()
365 case FEC_7_8: c->operand[10] = 0x5; break; in avc_tuner_tuneqpsk()
369 default: c->operand[10] = 0x0; in avc_tuner_tuneqpsk()
373 c->operand[11] = 0xff; in avc_tuner_tuneqpsk()
375 c->operand[11] = 0; in avc_tuner_tuneqpsk()
377 c->operand[11] = 1; in avc_tuner_tuneqpsk()
380 c->operand[12] = 0xff; in avc_tuner_tuneqpsk()
382 c->operand[12] = 1; in avc_tuner_tuneqpsk()
384 c->operand[12] = 0; in avc_tuner_tuneqpsk()
389 case QAM_16: c->operand[13] = 0x1; break; in avc_tuner_tuneqpsk()
390 case QPSK: c->operand[13] = 0x2; break; in avc_tuner_tuneqpsk()
391 case PSK_8: c->operand[13] = 0x3; break; in avc_tuner_tuneqpsk()
392 default: c->operand[13] = 0x2; break; in avc_tuner_tuneqpsk()
395 case ROLLOFF_35: c->operand[14] = 0x2; break; in avc_tuner_tuneqpsk()
396 case ROLLOFF_20: c->operand[14] = 0x0; break; in avc_tuner_tuneqpsk()
397 case ROLLOFF_25: c->operand[14] = 0x1; break; in avc_tuner_tuneqpsk()
399 default: c->operand[14] = 0x2; break; in avc_tuner_tuneqpsk()
403 case PILOT_AUTO: c->operand[15] = 0x0; break; in avc_tuner_tuneqpsk()
404 case PILOT_OFF: c->operand[15] = 0x0; break; in avc_tuner_tuneqpsk()
405 case PILOT_ON: c->operand[15] = 0x1; break; in avc_tuner_tuneqpsk()
408 c->operand[13] = 0x1; /* auto modulation */ in avc_tuner_tuneqpsk()
409 c->operand[14] = 0xff; /* disable rolloff */ in avc_tuner_tuneqpsk()
410 c->operand[15] = 0xff; /* disable pilot */ in avc_tuner_tuneqpsk()
421 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_tuner_dsd_dvb_c() local
423 c->opcode = AVC_OPCODE_DSD; in avc_tuner_dsd_dvb_c()
425 c->operand[0] = 0; /* source plug */ in avc_tuner_dsd_dvb_c()
426 c->operand[1] = 0xd2; /* subfunction replace */ in avc_tuner_dsd_dvb_c()
427 c->operand[2] = 0x20; /* system id = DVB */ in avc_tuner_dsd_dvb_c()
428 c->operand[3] = 0x00; /* antenna number */ in avc_tuner_dsd_dvb_c()
429 c->operand[4] = 0x11; /* system_specific_multiplex selection_length */ in avc_tuner_dsd_dvb_c()
432 c->operand[5] = 0 << 7 /* reserved */ in avc_tuner_dsd_dvb_c()
442 c->operand[6] = 0 << 7 /* NetworkID */ in avc_tuner_dsd_dvb_c()
445 c->operand[7] = 0x00; in avc_tuner_dsd_dvb_c()
446 c->operand[8] = 0x00; in avc_tuner_dsd_dvb_c()
447 c->operand[9] = 0x00; in avc_tuner_dsd_dvb_c()
448 c->operand[10] = 0x00; in avc_tuner_dsd_dvb_c()
450 c->operand[11] = (((p->frequency / 4000) >> 16) & 0xff) | (2 << 6); in avc_tuner_dsd_dvb_c()
451 c->operand[12] = ((p->frequency / 4000) >> 8) & 0xff; in avc_tuner_dsd_dvb_c()
452 c->operand[13] = (p->frequency / 4000) & 0xff; in avc_tuner_dsd_dvb_c()
453 c->operand[14] = ((p->symbol_rate / 1000) >> 12) & 0xff; in avc_tuner_dsd_dvb_c()
454 c->operand[15] = ((p->symbol_rate / 1000) >> 4) & 0xff; in avc_tuner_dsd_dvb_c()
455 c->operand[16] = ((p->symbol_rate / 1000) << 4) & 0xf0; in avc_tuner_dsd_dvb_c()
456 c->operand[17] = 0x00; in avc_tuner_dsd_dvb_c()
459 case FEC_1_2: c->operand[18] = 0x1; break; in avc_tuner_dsd_dvb_c()
460 case FEC_2_3: c->operand[18] = 0x2; break; in avc_tuner_dsd_dvb_c()
461 case FEC_3_4: c->operand[18] = 0x3; break; in avc_tuner_dsd_dvb_c()
462 case FEC_5_6: c->operand[18] = 0x4; break; in avc_tuner_dsd_dvb_c()
463 case FEC_7_8: c->operand[18] = 0x5; break; in avc_tuner_dsd_dvb_c()
464 case FEC_8_9: c->operand[18] = 0x6; break; in avc_tuner_dsd_dvb_c()
465 case FEC_4_5: c->operand[18] = 0x8; break; in avc_tuner_dsd_dvb_c()
467 default: c->operand[18] = 0x0; in avc_tuner_dsd_dvb_c()
471 case QAM_16: c->operand[19] = 0x08; break; in avc_tuner_dsd_dvb_c()
472 case QAM_32: c->operand[19] = 0x10; break; in avc_tuner_dsd_dvb_c()
473 case QAM_64: c->operand[19] = 0x18; break; in avc_tuner_dsd_dvb_c()
474 case QAM_128: c->operand[19] = 0x20; break; in avc_tuner_dsd_dvb_c()
475 case QAM_256: c->operand[19] = 0x28; break; in avc_tuner_dsd_dvb_c()
477 default: c->operand[19] = 0x00; in avc_tuner_dsd_dvb_c()
480 c->operand[20] = 0x00; in avc_tuner_dsd_dvb_c()
481 c->operand[21] = 0x00; in avc_tuner_dsd_dvb_c()
483 return 22 + add_pid_filter(fdtv, &c->operand[22]); in avc_tuner_dsd_dvb_c()
489 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_tuner_dsd_dvb_t() local
491 c->opcode = AVC_OPCODE_DSD; in avc_tuner_dsd_dvb_t()
493 c->operand[0] = 0; /* source plug */ in avc_tuner_dsd_dvb_t()
494 c->operand[1] = 0xd2; /* subfunction replace */ in avc_tuner_dsd_dvb_t()
495 c->operand[2] = 0x20; /* system id = DVB */ in avc_tuner_dsd_dvb_t()
496 c->operand[3] = 0x00; /* antenna number */ in avc_tuner_dsd_dvb_t()
497 c->operand[4] = 0x0c; /* system_specific_multiplex selection_length */ in avc_tuner_dsd_dvb_t()
500 c->operand[5] = in avc_tuner_dsd_dvb_t()
511 c->operand[6] = in avc_tuner_dsd_dvb_t()
517 c->operand[7] = 0x0; in avc_tuner_dsd_dvb_t()
518 c->operand[8] = (p->frequency / 10) >> 24; in avc_tuner_dsd_dvb_t()
519 c->operand[9] = ((p->frequency / 10) >> 16) & 0xff; in avc_tuner_dsd_dvb_t()
520 c->operand[10] = ((p->frequency / 10) >> 8) & 0xff; in avc_tuner_dsd_dvb_t()
521 c->operand[11] = (p->frequency / 10) & 0xff; in avc_tuner_dsd_dvb_t()
524 case 7000000: c->operand[12] = 0x20; break; in avc_tuner_dsd_dvb_t()
528 default: c->operand[12] = 0x00; in avc_tuner_dsd_dvb_t()
532 case QAM_16: c->operand[13] = 1 << 6; break; in avc_tuner_dsd_dvb_t()
533 case QAM_64: c->operand[13] = 2 << 6; break; in avc_tuner_dsd_dvb_t()
535 default: c->operand[13] = 0x00; in avc_tuner_dsd_dvb_t()
539 case HIERARCHY_1: c->operand[13] |= 1 << 3; break; in avc_tuner_dsd_dvb_t()
540 case HIERARCHY_2: c->operand[13] |= 2 << 3; break; in avc_tuner_dsd_dvb_t()
541 case HIERARCHY_4: c->operand[13] |= 3 << 3; break; in avc_tuner_dsd_dvb_t()
548 case FEC_2_3: c->operand[13] |= 1; break; in avc_tuner_dsd_dvb_t()
549 case FEC_3_4: c->operand[13] |= 2; break; in avc_tuner_dsd_dvb_t()
550 case FEC_5_6: c->operand[13] |= 3; break; in avc_tuner_dsd_dvb_t()
551 case FEC_7_8: c->operand[13] |= 4; break; in avc_tuner_dsd_dvb_t()
557 case FEC_2_3: c->operand[14] = 1 << 5; break; in avc_tuner_dsd_dvb_t()
558 case FEC_3_4: c->operand[14] = 2 << 5; break; in avc_tuner_dsd_dvb_t()
559 case FEC_5_6: c->operand[14] = 3 << 5; break; in avc_tuner_dsd_dvb_t()
560 case FEC_7_8: c->operand[14] = 4 << 5; break; in avc_tuner_dsd_dvb_t()
562 default: c->operand[14] = 0x00; break; in avc_tuner_dsd_dvb_t()
566 case GUARD_INTERVAL_1_16: c->operand[14] |= 1 << 3; break; in avc_tuner_dsd_dvb_t()
567 case GUARD_INTERVAL_1_8: c->operand[14] |= 2 << 3; break; in avc_tuner_dsd_dvb_t()
568 case GUARD_INTERVAL_1_4: c->operand[14] |= 3 << 3; break; in avc_tuner_dsd_dvb_t()
575 case TRANSMISSION_MODE_8K: c->operand[14] |= 1 << 1; break; in avc_tuner_dsd_dvb_t()
581 c->operand[15] = 0x00; /* network_ID[0] */ in avc_tuner_dsd_dvb_t()
582 c->operand[16] = 0x00; /* network_ID[1] */ in avc_tuner_dsd_dvb_t()
584 return 17 + add_pid_filter(fdtv, &c->operand[17]); in avc_tuner_dsd_dvb_t()
590 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_tuner_dsd() local
595 c->ctype = AVC_CTYPE_CONTROL; in avc_tuner_dsd()
596 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit; in avc_tuner_dsd()
606 pad_operands(c, pos); in avc_tuner_dsd()
629 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_tuner_set_pids() local
637 c->ctype = AVC_CTYPE_CONTROL; in avc_tuner_set_pids()
638 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit; in avc_tuner_set_pids()
639 c->opcode = AVC_OPCODE_DSD; in avc_tuner_set_pids()
641 c->operand[0] = 0; /* source plug */ in avc_tuner_set_pids()
642 c->operand[1] = 0xd2; /* subfunction replace */ in avc_tuner_set_pids()
643 c->operand[2] = 0x20; /* system id = DVB */ in avc_tuner_set_pids()
644 c->operand[3] = 0x00; /* antenna number */ in avc_tuner_set_pids()
645 c->operand[4] = 0x00; /* system_specific_multiplex selection_length */ in avc_tuner_set_pids()
646 c->operand[5] = pidc; /* Nr_of_dsd_sel_specs */ in avc_tuner_set_pids()
651 c->operand[pos++] = 0x13; /* flowfunction relay */ in avc_tuner_set_pids()
652 c->operand[pos++] = 0x80; /* dsd_sel_spec_valid_flags -> PID */ in avc_tuner_set_pids()
653 c->operand[pos++] = (pid[k] >> 8) & 0x1f; in avc_tuner_set_pids()
654 c->operand[pos++] = pid[k] & 0xff; in avc_tuner_set_pids()
655 c->operand[pos++] = 0x00; /* tableID */ in avc_tuner_set_pids()
656 c->operand[pos++] = 0x00; /* filter_length */ in avc_tuner_set_pids()
658 pad_operands(c, pos); in avc_tuner_set_pids()
675 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_tuner_get_ts() local
680 c->ctype = AVC_CTYPE_CONTROL; in avc_tuner_get_ts()
681 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit; in avc_tuner_get_ts()
682 c->opcode = AVC_OPCODE_DSIT; in avc_tuner_get_ts()
686 c->operand[0] = 0; /* source plug */ in avc_tuner_get_ts()
687 c->operand[1] = 0xd2; /* subfunction replace */ in avc_tuner_get_ts()
688 c->operand[2] = 0xff; /* status */ in avc_tuner_get_ts()
689 c->operand[3] = 0x20; /* system id = DVB */ in avc_tuner_get_ts()
690 c->operand[4] = 0x00; /* antenna number */ in avc_tuner_get_ts()
691 c->operand[5] = 0x0; /* system_specific_search_flags */ in avc_tuner_get_ts()
692 c->operand[6] = sl; /* system_specific_multiplex selection_length */ in avc_tuner_get_ts()
698 clear_operands(c, 7, 24); in avc_tuner_get_ts()
715 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_identify_subunit() local
721 c->ctype = AVC_CTYPE_CONTROL; in avc_identify_subunit()
722 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit; in avc_identify_subunit()
723 c->opcode = AVC_OPCODE_READ_DESCRIPTOR; in avc_identify_subunit()
725 c->operand[0] = DESCRIPTOR_SUBUNIT_IDENTIFIER; in avc_identify_subunit()
726 c->operand[1] = 0xff; in avc_identify_subunit()
727 c->operand[2] = 0x00; in avc_identify_subunit()
728 c->operand[3] = 0x00; /* length highbyte */ in avc_identify_subunit()
729 c->operand[4] = 0x08; /* length lowbyte */ in avc_identify_subunit()
730 c->operand[5] = 0x00; /* offset highbyte */ in avc_identify_subunit()
731 c->operand[6] = 0x0d; /* offset lowbyte */ in avc_identify_subunit()
732 clear_operands(c, 7, 8); /* padding */ in avc_identify_subunit()
755 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_tuner_status() local
761 c->ctype = AVC_CTYPE_CONTROL; in avc_tuner_status()
762 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit; in avc_tuner_status()
763 c->opcode = AVC_OPCODE_READ_DESCRIPTOR; in avc_tuner_status()
765 c->operand[0] = DESCRIPTOR_TUNER_STATUS; in avc_tuner_status()
766 c->operand[1] = 0xff; /* read_result_status */ in avc_tuner_status()
772 clear_operands(c, 2, 31); in avc_tuner_status()
836 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_lnb_control() local
842 c->ctype = AVC_CTYPE_CONTROL; in avc_lnb_control()
843 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit; in avc_lnb_control()
844 c->opcode = AVC_OPCODE_VENDOR; in avc_lnb_control()
846 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0; in avc_lnb_control()
847 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1; in avc_lnb_control()
848 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2; in avc_lnb_control()
849 c->operand[3] = SFE_VENDOR_OPCODE_LNB_CONTROL; in avc_lnb_control()
850 c->operand[4] = voltage; in avc_lnb_control()
851 c->operand[5] = nrdiseq; in avc_lnb_control()
855 c->operand[pos++] = diseqcmd[j].msg_len; in avc_lnb_control()
858 c->operand[pos++] = diseqcmd[j].msg[k]; in avc_lnb_control()
860 c->operand[pos++] = burst; in avc_lnb_control()
861 c->operand[pos++] = conttone; in avc_lnb_control()
862 pad_operands(c, pos); in avc_lnb_control()
881 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_register_remote_control() local
886 c->ctype = AVC_CTYPE_NOTIFY; in avc_register_remote_control()
887 c->subunit = AVC_SUBUNIT_TYPE_UNIT | 7; in avc_register_remote_control()
888 c->opcode = AVC_OPCODE_VENDOR; in avc_register_remote_control()
890 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0; in avc_register_remote_control()
891 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1; in avc_register_remote_control()
892 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2; in avc_register_remote_control()
893 c->operand[3] = SFE_VENDOR_OPCODE_REGISTER_REMOTE_CONTROL; in avc_register_remote_control()
894 c->operand[4] = 0; /* padding */ in avc_register_remote_control()
918 struct avc_command_frame *c = (void *)fdtv->avc_data;
923 c->ctype = AVC_CTYPE_CONTROL;
924 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit;
925 c->opcode = AVC_OPCODE_VENDOR;
927 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0;
928 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1;
929 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2;
930 c->operand[3] = SFE_VENDOR_OPCODE_HOST2CA;
931 c->operand[4] = 0; /* slot */
932 c->operand[5] = SFE_VENDOR_TAG_CA_APPLICATION_INFO; /* ca tag */
933 clear_operands(c, 6, 8);
973 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_ca_app_info() local
979 c->ctype = AVC_CTYPE_STATUS; in avc_ca_app_info()
980 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit; in avc_ca_app_info()
981 c->opcode = AVC_OPCODE_VENDOR; in avc_ca_app_info()
983 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0; in avc_ca_app_info()
984 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1; in avc_ca_app_info()
985 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2; in avc_ca_app_info()
986 c->operand[3] = SFE_VENDOR_OPCODE_CA2HOST; in avc_ca_app_info()
987 c->operand[4] = 0; /* slot */ in avc_ca_app_info()
988 c->operand[5] = SFE_VENDOR_TAG_CA_APPLICATION_INFO; /* ca tag */ in avc_ca_app_info()
989 clear_operands(c, 6, LAST_OPERAND); in avc_ca_app_info()
1014 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_ca_info() local
1020 c->ctype = AVC_CTYPE_STATUS; in avc_ca_info()
1021 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit; in avc_ca_info()
1022 c->opcode = AVC_OPCODE_VENDOR; in avc_ca_info()
1024 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0; in avc_ca_info()
1025 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1; in avc_ca_info()
1026 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2; in avc_ca_info()
1027 c->operand[3] = SFE_VENDOR_OPCODE_CA2HOST; in avc_ca_info()
1028 c->operand[4] = 0; /* slot */ in avc_ca_info()
1029 c->operand[5] = SFE_VENDOR_TAG_CA_APPLICATION_INFO; /* ca tag */ in avc_ca_info()
1030 clear_operands(c, 6, LAST_OPERAND); in avc_ca_info()
1064 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_ca_reset() local
1069 c->ctype = AVC_CTYPE_CONTROL; in avc_ca_reset()
1070 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit; in avc_ca_reset()
1071 c->opcode = AVC_OPCODE_VENDOR; in avc_ca_reset()
1073 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0; in avc_ca_reset()
1074 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1; in avc_ca_reset()
1075 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2; in avc_ca_reset()
1076 c->operand[3] = SFE_VENDOR_OPCODE_HOST2CA; in avc_ca_reset()
1077 c->operand[4] = 0; /* slot */ in avc_ca_reset()
1078 c->operand[5] = SFE_VENDOR_TAG_CA_RESET; /* ca tag */ in avc_ca_reset()
1079 c->operand[6] = 0; /* more/last */ in avc_ca_reset()
1080 c->operand[7] = 1; /* length */ in avc_ca_reset()
1081 c->operand[8] = 0; /* force hardware reset */ in avc_ca_reset()
1095 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_ca_pmt() local
1111 c->ctype = AVC_CTYPE_CONTROL; in avc_ca_pmt()
1112 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit; in avc_ca_pmt()
1113 c->opcode = AVC_OPCODE_VENDOR; in avc_ca_pmt()
1126 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0; in avc_ca_pmt()
1127 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1; in avc_ca_pmt()
1128 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2; in avc_ca_pmt()
1129 c->operand[3] = SFE_VENDOR_OPCODE_HOST2CA; in avc_ca_pmt()
1130 c->operand[4] = 0; /* slot */ in avc_ca_pmt()
1131 c->operand[5] = SFE_VENDOR_TAG_CA_PMT; /* ca tag */ in avc_ca_pmt()
1132 c->operand[6] = 0; /* more/last */ in avc_ca_pmt()
1134 c->operand[10] = list_management; in avc_ca_pmt()
1135 c->operand[11] = 0x01; /* pmt_cmd=OK_descramble */ in avc_ca_pmt()
1139 c->operand[12] = 0x02; /* Table id=2 */ in avc_ca_pmt()
1140 c->operand[13] = 0x80; /* Section syntax + length */ in avc_ca_pmt()
1142 c->operand[15] = msg[1]; /* Program number */ in avc_ca_pmt()
1143 c->operand[16] = msg[2]; in avc_ca_pmt()
1144 c->operand[17] = msg[3]; /* Version number and current/next */ in avc_ca_pmt()
1145 c->operand[18] = 0x00; /* Section number=0 */ in avc_ca_pmt()
1146 c->operand[19] = 0x00; /* Last section number=0 */ in avc_ca_pmt()
1147 c->operand[20] = 0x1f; /* PCR_PID=1FFF */ in avc_ca_pmt()
1148 c->operand[21] = 0xff; in avc_ca_pmt()
1149 c->operand[22] = (program_info_length >> 8); /* Program info length */ in avc_ca_pmt()
1150 c->operand[23] = (program_info_length & 0xff); in avc_ca_pmt()
1160 if (program_info_length > sizeof(c->operand) - 4 - write_pos) { in avc_ca_pmt()
1165 memcpy(&c->operand[write_pos], &msg[read_pos], in avc_ca_pmt()
1171 c->operand[write_pos++] = msg[read_pos++]; in avc_ca_pmt()
1172 c->operand[write_pos++] = msg[read_pos++]; in avc_ca_pmt()
1173 c->operand[write_pos++] = msg[read_pos++]; in avc_ca_pmt()
1179 c->operand[write_pos++] = es_info_length >> 8; in avc_ca_pmt()
1180 c->operand[write_pos++] = es_info_length & 0xff; in avc_ca_pmt()
1187 if (es_info_length > sizeof(c->operand) - 4 - in avc_ca_pmt()
1193 memcpy(&c->operand[write_pos], &msg[read_pos], in avc_ca_pmt()
1201 c->operand[7] = 0x82; in avc_ca_pmt()
1202 c->operand[8] = (write_pos - 10) >> 8; in avc_ca_pmt()
1203 c->operand[9] = (write_pos - 10) & 0xff; in avc_ca_pmt()
1204 c->operand[14] = write_pos - 15; in avc_ca_pmt()
1206 crc32_csum = crc32_be(0, &c->operand[10], c->operand[12] - 1); in avc_ca_pmt()
1207 c->operand[write_pos - 4] = (crc32_csum >> 24) & 0xff; in avc_ca_pmt()
1208 c->operand[write_pos - 3] = (crc32_csum >> 16) & 0xff; in avc_ca_pmt()
1209 c->operand[write_pos - 2] = (crc32_csum >> 8) & 0xff; in avc_ca_pmt()
1210 c->operand[write_pos - 1] = (crc32_csum >> 0) & 0xff; in avc_ca_pmt()
1211 pad_operands(c, write_pos); in avc_ca_pmt()
1231 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_ca_get_time_date() local
1237 c->ctype = AVC_CTYPE_STATUS; in avc_ca_get_time_date()
1238 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit; in avc_ca_get_time_date()
1239 c->opcode = AVC_OPCODE_VENDOR; in avc_ca_get_time_date()
1241 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0; in avc_ca_get_time_date()
1242 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1; in avc_ca_get_time_date()
1243 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2; in avc_ca_get_time_date()
1244 c->operand[3] = SFE_VENDOR_OPCODE_CA2HOST; in avc_ca_get_time_date()
1245 c->operand[4] = 0; /* slot */ in avc_ca_get_time_date()
1246 c->operand[5] = SFE_VENDOR_TAG_CA_DATE_TIME; /* ca tag */ in avc_ca_get_time_date()
1247 clear_operands(c, 6, LAST_OPERAND); in avc_ca_get_time_date()
1265 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_ca_enter_menu() local
1270 c->ctype = AVC_CTYPE_STATUS; in avc_ca_enter_menu()
1271 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit; in avc_ca_enter_menu()
1272 c->opcode = AVC_OPCODE_VENDOR; in avc_ca_enter_menu()
1274 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0; in avc_ca_enter_menu()
1275 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1; in avc_ca_enter_menu()
1276 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2; in avc_ca_enter_menu()
1277 c->operand[3] = SFE_VENDOR_OPCODE_HOST2CA; in avc_ca_enter_menu()
1278 c->operand[4] = 0; /* slot */ in avc_ca_enter_menu()
1279 c->operand[5] = SFE_VENDOR_TAG_CA_ENTER_MENU; in avc_ca_enter_menu()
1280 clear_operands(c, 6, 8); in avc_ca_enter_menu()
1294 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_ca_get_mmi() local
1300 c->ctype = AVC_CTYPE_STATUS; in avc_ca_get_mmi()
1301 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit; in avc_ca_get_mmi()
1302 c->opcode = AVC_OPCODE_VENDOR; in avc_ca_get_mmi()
1304 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0; in avc_ca_get_mmi()
1305 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1; in avc_ca_get_mmi()
1306 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2; in avc_ca_get_mmi()
1307 c->operand[3] = SFE_VENDOR_OPCODE_CA2HOST; in avc_ca_get_mmi()
1308 c->operand[4] = 0; /* slot */ in avc_ca_get_mmi()
1309 c->operand[5] = SFE_VENDOR_TAG_CA_MMI; in avc_ca_get_mmi()
1310 clear_operands(c, 6, LAST_OPERAND); in avc_ca_get_mmi()