Lines Matching refs:c

90 static inline void clear_operands(struct avc_command_frame *c, int from, int to)  in clear_operands()  argument
92 memset(&c->operand[from], 0, to - from + 1); in clear_operands()
95 static void pad_operands(struct avc_command_frame *c, int from) in pad_operands() argument
100 clear_operands(c, from, to); in pad_operands()
336 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_tuner_tuneqpsk() local
338 c->opcode = AVC_OPCODE_VENDOR; in avc_tuner_tuneqpsk()
340 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0; in avc_tuner_tuneqpsk()
341 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1; in avc_tuner_tuneqpsk()
342 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2; in avc_tuner_tuneqpsk()
344 c->operand[3] = SFE_VENDOR_OPCODE_TUNE_QPSK2; in avc_tuner_tuneqpsk()
346 c->operand[3] = SFE_VENDOR_OPCODE_TUNE_QPSK; in avc_tuner_tuneqpsk()
348 c->operand[4] = (p->frequency >> 24) & 0xff; in avc_tuner_tuneqpsk()
349 c->operand[5] = (p->frequency >> 16) & 0xff; in avc_tuner_tuneqpsk()
350 c->operand[6] = (p->frequency >> 8) & 0xff; in avc_tuner_tuneqpsk()
351 c->operand[7] = p->frequency & 0xff; in avc_tuner_tuneqpsk()
353 c->operand[8] = ((p->symbol_rate / 1000) >> 8) & 0xff; in avc_tuner_tuneqpsk()
354 c->operand[9] = (p->symbol_rate / 1000) & 0xff; in avc_tuner_tuneqpsk()
357 case FEC_1_2: c->operand[10] = 0x1; break; in avc_tuner_tuneqpsk()
358 case FEC_2_3: c->operand[10] = 0x2; break; in avc_tuner_tuneqpsk()
359 case FEC_3_4: c->operand[10] = 0x3; break; in avc_tuner_tuneqpsk()
360 case FEC_5_6: c->operand[10] = 0x4; break; in avc_tuner_tuneqpsk()
361 case FEC_7_8: c->operand[10] = 0x5; break; in avc_tuner_tuneqpsk()
365 default: c->operand[10] = 0x0; in avc_tuner_tuneqpsk()
369 c->operand[11] = 0xff; in avc_tuner_tuneqpsk()
371 c->operand[11] = 0; in avc_tuner_tuneqpsk()
373 c->operand[11] = 1; in avc_tuner_tuneqpsk()
376 c->operand[12] = 0xff; in avc_tuner_tuneqpsk()
378 c->operand[12] = 1; in avc_tuner_tuneqpsk()
380 c->operand[12] = 0; in avc_tuner_tuneqpsk()
385 case QAM_16: c->operand[13] = 0x1; break; in avc_tuner_tuneqpsk()
386 case QPSK: c->operand[13] = 0x2; break; in avc_tuner_tuneqpsk()
387 case PSK_8: c->operand[13] = 0x3; break; in avc_tuner_tuneqpsk()
388 default: c->operand[13] = 0x2; break; in avc_tuner_tuneqpsk()
391 case ROLLOFF_35: c->operand[14] = 0x2; break; in avc_tuner_tuneqpsk()
392 case ROLLOFF_20: c->operand[14] = 0x0; break; in avc_tuner_tuneqpsk()
393 case ROLLOFF_25: c->operand[14] = 0x1; break; in avc_tuner_tuneqpsk()
395 default: c->operand[14] = 0x2; break; in avc_tuner_tuneqpsk()
399 case PILOT_AUTO: c->operand[15] = 0x0; break; in avc_tuner_tuneqpsk()
400 case PILOT_OFF: c->operand[15] = 0x0; break; in avc_tuner_tuneqpsk()
401 case PILOT_ON: c->operand[15] = 0x1; break; in avc_tuner_tuneqpsk()
404 c->operand[13] = 0x1; /* auto modulation */ in avc_tuner_tuneqpsk()
405 c->operand[14] = 0xff; /* disable rolloff */ in avc_tuner_tuneqpsk()
406 c->operand[15] = 0xff; /* disable pilot */ in avc_tuner_tuneqpsk()
417 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_tuner_dsd_dvb_c() local
419 c->opcode = AVC_OPCODE_DSD; in avc_tuner_dsd_dvb_c()
421 c->operand[0] = 0; /* source plug */ in avc_tuner_dsd_dvb_c()
422 c->operand[1] = 0xd2; /* subfunction replace */ in avc_tuner_dsd_dvb_c()
423 c->operand[2] = 0x20; /* system id = DVB */ in avc_tuner_dsd_dvb_c()
424 c->operand[3] = 0x00; /* antenna number */ in avc_tuner_dsd_dvb_c()
425 c->operand[4] = 0x11; /* system_specific_multiplex selection_length */ in avc_tuner_dsd_dvb_c()
428 c->operand[5] = 0 << 7 /* reserved */ in avc_tuner_dsd_dvb_c()
438 c->operand[6] = 0 << 7 /* NetworkID */ in avc_tuner_dsd_dvb_c()
441 c->operand[7] = 0x00; in avc_tuner_dsd_dvb_c()
442 c->operand[8] = 0x00; in avc_tuner_dsd_dvb_c()
443 c->operand[9] = 0x00; in avc_tuner_dsd_dvb_c()
444 c->operand[10] = 0x00; in avc_tuner_dsd_dvb_c()
446 c->operand[11] = (((p->frequency / 4000) >> 16) & 0xff) | (2 << 6); in avc_tuner_dsd_dvb_c()
447 c->operand[12] = ((p->frequency / 4000) >> 8) & 0xff; in avc_tuner_dsd_dvb_c()
448 c->operand[13] = (p->frequency / 4000) & 0xff; in avc_tuner_dsd_dvb_c()
449 c->operand[14] = ((p->symbol_rate / 1000) >> 12) & 0xff; in avc_tuner_dsd_dvb_c()
450 c->operand[15] = ((p->symbol_rate / 1000) >> 4) & 0xff; in avc_tuner_dsd_dvb_c()
451 c->operand[16] = ((p->symbol_rate / 1000) << 4) & 0xf0; in avc_tuner_dsd_dvb_c()
452 c->operand[17] = 0x00; in avc_tuner_dsd_dvb_c()
455 case FEC_1_2: c->operand[18] = 0x1; break; in avc_tuner_dsd_dvb_c()
456 case FEC_2_3: c->operand[18] = 0x2; break; in avc_tuner_dsd_dvb_c()
457 case FEC_3_4: c->operand[18] = 0x3; break; in avc_tuner_dsd_dvb_c()
458 case FEC_5_6: c->operand[18] = 0x4; break; in avc_tuner_dsd_dvb_c()
459 case FEC_7_8: c->operand[18] = 0x5; break; in avc_tuner_dsd_dvb_c()
460 case FEC_8_9: c->operand[18] = 0x6; break; in avc_tuner_dsd_dvb_c()
461 case FEC_4_5: c->operand[18] = 0x8; break; in avc_tuner_dsd_dvb_c()
463 default: c->operand[18] = 0x0; in avc_tuner_dsd_dvb_c()
467 case QAM_16: c->operand[19] = 0x08; break; in avc_tuner_dsd_dvb_c()
468 case QAM_32: c->operand[19] = 0x10; break; in avc_tuner_dsd_dvb_c()
469 case QAM_64: c->operand[19] = 0x18; break; in avc_tuner_dsd_dvb_c()
470 case QAM_128: c->operand[19] = 0x20; break; in avc_tuner_dsd_dvb_c()
471 case QAM_256: c->operand[19] = 0x28; break; in avc_tuner_dsd_dvb_c()
473 default: c->operand[19] = 0x00; in avc_tuner_dsd_dvb_c()
476 c->operand[20] = 0x00; in avc_tuner_dsd_dvb_c()
477 c->operand[21] = 0x00; in avc_tuner_dsd_dvb_c()
479 return 22 + add_pid_filter(fdtv, &c->operand[22]); in avc_tuner_dsd_dvb_c()
485 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_tuner_dsd_dvb_t() local
487 c->opcode = AVC_OPCODE_DSD; in avc_tuner_dsd_dvb_t()
489 c->operand[0] = 0; /* source plug */ in avc_tuner_dsd_dvb_t()
490 c->operand[1] = 0xd2; /* subfunction replace */ in avc_tuner_dsd_dvb_t()
491 c->operand[2] = 0x20; /* system id = DVB */ in avc_tuner_dsd_dvb_t()
492 c->operand[3] = 0x00; /* antenna number */ in avc_tuner_dsd_dvb_t()
493 c->operand[4] = 0x0c; /* system_specific_multiplex selection_length */ in avc_tuner_dsd_dvb_t()
496 c->operand[5] = in avc_tuner_dsd_dvb_t()
507 c->operand[6] = in avc_tuner_dsd_dvb_t()
513 c->operand[7] = 0x0; in avc_tuner_dsd_dvb_t()
514 c->operand[8] = (p->frequency / 10) >> 24; in avc_tuner_dsd_dvb_t()
515 c->operand[9] = ((p->frequency / 10) >> 16) & 0xff; in avc_tuner_dsd_dvb_t()
516 c->operand[10] = ((p->frequency / 10) >> 8) & 0xff; in avc_tuner_dsd_dvb_t()
517 c->operand[11] = (p->frequency / 10) & 0xff; in avc_tuner_dsd_dvb_t()
520 case 7000000: c->operand[12] = 0x20; break; in avc_tuner_dsd_dvb_t()
524 default: c->operand[12] = 0x00; in avc_tuner_dsd_dvb_t()
528 case QAM_16: c->operand[13] = 1 << 6; break; in avc_tuner_dsd_dvb_t()
529 case QAM_64: c->operand[13] = 2 << 6; break; in avc_tuner_dsd_dvb_t()
531 default: c->operand[13] = 0x00; in avc_tuner_dsd_dvb_t()
535 case HIERARCHY_1: c->operand[13] |= 1 << 3; break; in avc_tuner_dsd_dvb_t()
536 case HIERARCHY_2: c->operand[13] |= 2 << 3; break; in avc_tuner_dsd_dvb_t()
537 case HIERARCHY_4: c->operand[13] |= 3 << 3; break; in avc_tuner_dsd_dvb_t()
544 case FEC_2_3: c->operand[13] |= 1; break; in avc_tuner_dsd_dvb_t()
545 case FEC_3_4: c->operand[13] |= 2; break; in avc_tuner_dsd_dvb_t()
546 case FEC_5_6: c->operand[13] |= 3; break; in avc_tuner_dsd_dvb_t()
547 case FEC_7_8: c->operand[13] |= 4; break; in avc_tuner_dsd_dvb_t()
553 case FEC_2_3: c->operand[14] = 1 << 5; break; in avc_tuner_dsd_dvb_t()
554 case FEC_3_4: c->operand[14] = 2 << 5; break; in avc_tuner_dsd_dvb_t()
555 case FEC_5_6: c->operand[14] = 3 << 5; break; in avc_tuner_dsd_dvb_t()
556 case FEC_7_8: c->operand[14] = 4 << 5; break; in avc_tuner_dsd_dvb_t()
558 default: c->operand[14] = 0x00; break; in avc_tuner_dsd_dvb_t()
562 case GUARD_INTERVAL_1_16: c->operand[14] |= 1 << 3; break; in avc_tuner_dsd_dvb_t()
563 case GUARD_INTERVAL_1_8: c->operand[14] |= 2 << 3; break; in avc_tuner_dsd_dvb_t()
564 case GUARD_INTERVAL_1_4: c->operand[14] |= 3 << 3; break; in avc_tuner_dsd_dvb_t()
571 case TRANSMISSION_MODE_8K: c->operand[14] |= 1 << 1; break; in avc_tuner_dsd_dvb_t()
577 c->operand[15] = 0x00; /* network_ID[0] */ in avc_tuner_dsd_dvb_t()
578 c->operand[16] = 0x00; /* network_ID[1] */ in avc_tuner_dsd_dvb_t()
580 return 17 + add_pid_filter(fdtv, &c->operand[17]); in avc_tuner_dsd_dvb_t()
586 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_tuner_dsd() local
591 c->ctype = AVC_CTYPE_CONTROL; in avc_tuner_dsd()
592 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit; in avc_tuner_dsd()
602 pad_operands(c, pos); in avc_tuner_dsd()
625 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_tuner_set_pids() local
633 c->ctype = AVC_CTYPE_CONTROL; in avc_tuner_set_pids()
634 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit; in avc_tuner_set_pids()
635 c->opcode = AVC_OPCODE_DSD; in avc_tuner_set_pids()
637 c->operand[0] = 0; /* source plug */ in avc_tuner_set_pids()
638 c->operand[1] = 0xd2; /* subfunction replace */ in avc_tuner_set_pids()
639 c->operand[2] = 0x20; /* system id = DVB */ in avc_tuner_set_pids()
640 c->operand[3] = 0x00; /* antenna number */ in avc_tuner_set_pids()
641 c->operand[4] = 0x00; /* system_specific_multiplex selection_length */ in avc_tuner_set_pids()
642 c->operand[5] = pidc; /* Nr_of_dsd_sel_specs */ in avc_tuner_set_pids()
647 c->operand[pos++] = 0x13; /* flowfunction relay */ in avc_tuner_set_pids()
648 c->operand[pos++] = 0x80; /* dsd_sel_spec_valid_flags -> PID */ in avc_tuner_set_pids()
649 c->operand[pos++] = (pid[k] >> 8) & 0x1f; in avc_tuner_set_pids()
650 c->operand[pos++] = pid[k] & 0xff; in avc_tuner_set_pids()
651 c->operand[pos++] = 0x00; /* tableID */ in avc_tuner_set_pids()
652 c->operand[pos++] = 0x00; /* filter_length */ in avc_tuner_set_pids()
654 pad_operands(c, pos); in avc_tuner_set_pids()
671 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_tuner_get_ts() local
676 c->ctype = AVC_CTYPE_CONTROL; in avc_tuner_get_ts()
677 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit; in avc_tuner_get_ts()
678 c->opcode = AVC_OPCODE_DSIT; in avc_tuner_get_ts()
682 c->operand[0] = 0; /* source plug */ in avc_tuner_get_ts()
683 c->operand[1] = 0xd2; /* subfunction replace */ in avc_tuner_get_ts()
684 c->operand[2] = 0xff; /* status */ in avc_tuner_get_ts()
685 c->operand[3] = 0x20; /* system id = DVB */ in avc_tuner_get_ts()
686 c->operand[4] = 0x00; /* antenna number */ in avc_tuner_get_ts()
687 c->operand[5] = 0x0; /* system_specific_search_flags */ in avc_tuner_get_ts()
688 c->operand[6] = sl; /* system_specific_multiplex selection_length */ in avc_tuner_get_ts()
694 clear_operands(c, 7, 24); in avc_tuner_get_ts()
711 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_identify_subunit() local
717 c->ctype = AVC_CTYPE_CONTROL; in avc_identify_subunit()
718 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit; in avc_identify_subunit()
719 c->opcode = AVC_OPCODE_READ_DESCRIPTOR; in avc_identify_subunit()
721 c->operand[0] = DESCRIPTOR_SUBUNIT_IDENTIFIER; in avc_identify_subunit()
722 c->operand[1] = 0xff; in avc_identify_subunit()
723 c->operand[2] = 0x00; in avc_identify_subunit()
724 c->operand[3] = 0x00; /* length highbyte */ in avc_identify_subunit()
725 c->operand[4] = 0x08; /* length lowbyte */ in avc_identify_subunit()
726 c->operand[5] = 0x00; /* offset highbyte */ in avc_identify_subunit()
727 c->operand[6] = 0x0d; /* offset lowbyte */ in avc_identify_subunit()
728 clear_operands(c, 7, 8); /* padding */ in avc_identify_subunit()
751 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_tuner_status() local
757 c->ctype = AVC_CTYPE_CONTROL; in avc_tuner_status()
758 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit; in avc_tuner_status()
759 c->opcode = AVC_OPCODE_READ_DESCRIPTOR; in avc_tuner_status()
761 c->operand[0] = DESCRIPTOR_TUNER_STATUS; in avc_tuner_status()
762 c->operand[1] = 0xff; /* read_result_status */ in avc_tuner_status()
768 clear_operands(c, 2, 31); in avc_tuner_status()
832 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_lnb_control() local
838 c->ctype = AVC_CTYPE_CONTROL; in avc_lnb_control()
839 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit; in avc_lnb_control()
840 c->opcode = AVC_OPCODE_VENDOR; in avc_lnb_control()
842 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0; in avc_lnb_control()
843 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1; in avc_lnb_control()
844 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2; in avc_lnb_control()
845 c->operand[3] = SFE_VENDOR_OPCODE_LNB_CONTROL; in avc_lnb_control()
846 c->operand[4] = voltage; in avc_lnb_control()
847 c->operand[5] = nrdiseq; in avc_lnb_control()
851 c->operand[pos++] = diseqcmd[j].msg_len; in avc_lnb_control()
854 c->operand[pos++] = diseqcmd[j].msg[k]; in avc_lnb_control()
856 c->operand[pos++] = burst; in avc_lnb_control()
857 c->operand[pos++] = conttone; in avc_lnb_control()
858 pad_operands(c, pos); in avc_lnb_control()
877 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_register_remote_control() local
882 c->ctype = AVC_CTYPE_NOTIFY; in avc_register_remote_control()
883 c->subunit = AVC_SUBUNIT_TYPE_UNIT | 7; in avc_register_remote_control()
884 c->opcode = AVC_OPCODE_VENDOR; in avc_register_remote_control()
886 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0; in avc_register_remote_control()
887 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1; in avc_register_remote_control()
888 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2; in avc_register_remote_control()
889 c->operand[3] = SFE_VENDOR_OPCODE_REGISTER_REMOTE_CONTROL; in avc_register_remote_control()
890 c->operand[4] = 0; /* padding */ in avc_register_remote_control()
914 struct avc_command_frame *c = (void *)fdtv->avc_data;
919 c->ctype = AVC_CTYPE_CONTROL;
920 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit;
921 c->opcode = AVC_OPCODE_VENDOR;
923 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0;
924 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1;
925 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2;
926 c->operand[3] = SFE_VENDOR_OPCODE_HOST2CA;
927 c->operand[4] = 0; /* slot */
928 c->operand[5] = SFE_VENDOR_TAG_CA_APPLICATION_INFO; /* ca tag */
929 clear_operands(c, 6, 8);
970 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_ca_app_info() local
976 c->ctype = AVC_CTYPE_STATUS; in avc_ca_app_info()
977 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit; in avc_ca_app_info()
978 c->opcode = AVC_OPCODE_VENDOR; in avc_ca_app_info()
980 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0; in avc_ca_app_info()
981 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1; in avc_ca_app_info()
982 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2; in avc_ca_app_info()
983 c->operand[3] = SFE_VENDOR_OPCODE_CA2HOST; in avc_ca_app_info()
984 c->operand[4] = 0; /* slot */ in avc_ca_app_info()
985 c->operand[5] = SFE_VENDOR_TAG_CA_APPLICATION_INFO; /* ca tag */ in avc_ca_app_info()
986 clear_operands(c, 6, LAST_OPERAND); in avc_ca_app_info()
1012 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_ca_info() local
1018 c->ctype = AVC_CTYPE_STATUS; in avc_ca_info()
1019 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit; in avc_ca_info()
1020 c->opcode = AVC_OPCODE_VENDOR; in avc_ca_info()
1022 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0; in avc_ca_info()
1023 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1; in avc_ca_info()
1024 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2; in avc_ca_info()
1025 c->operand[3] = SFE_VENDOR_OPCODE_CA2HOST; in avc_ca_info()
1026 c->operand[4] = 0; /* slot */ in avc_ca_info()
1027 c->operand[5] = SFE_VENDOR_TAG_CA_APPLICATION_INFO; /* ca tag */ in avc_ca_info()
1028 clear_operands(c, 6, LAST_OPERAND); in avc_ca_info()
1062 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_ca_reset() local
1067 c->ctype = AVC_CTYPE_CONTROL; in avc_ca_reset()
1068 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit; in avc_ca_reset()
1069 c->opcode = AVC_OPCODE_VENDOR; in avc_ca_reset()
1071 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0; in avc_ca_reset()
1072 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1; in avc_ca_reset()
1073 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2; in avc_ca_reset()
1074 c->operand[3] = SFE_VENDOR_OPCODE_HOST2CA; in avc_ca_reset()
1075 c->operand[4] = 0; /* slot */ in avc_ca_reset()
1076 c->operand[5] = SFE_VENDOR_TAG_CA_RESET; /* ca tag */ in avc_ca_reset()
1077 c->operand[6] = 0; /* more/last */ in avc_ca_reset()
1078 c->operand[7] = 1; /* length */ in avc_ca_reset()
1079 c->operand[8] = 0; /* force hardware reset */ in avc_ca_reset()
1093 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_ca_pmt() local
1109 c->ctype = AVC_CTYPE_CONTROL; in avc_ca_pmt()
1110 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit; in avc_ca_pmt()
1111 c->opcode = AVC_OPCODE_VENDOR; in avc_ca_pmt()
1124 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0; in avc_ca_pmt()
1125 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1; in avc_ca_pmt()
1126 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2; in avc_ca_pmt()
1127 c->operand[3] = SFE_VENDOR_OPCODE_HOST2CA; in avc_ca_pmt()
1128 c->operand[4] = 0; /* slot */ in avc_ca_pmt()
1129 c->operand[5] = SFE_VENDOR_TAG_CA_PMT; /* ca tag */ in avc_ca_pmt()
1130 c->operand[6] = 0; /* more/last */ in avc_ca_pmt()
1132 c->operand[10] = list_management; in avc_ca_pmt()
1133 c->operand[11] = 0x01; /* pmt_cmd=OK_descramble */ in avc_ca_pmt()
1137 c->operand[12] = 0x02; /* Table id=2 */ in avc_ca_pmt()
1138 c->operand[13] = 0x80; /* Section syntax + length */ in avc_ca_pmt()
1140 c->operand[15] = msg[1]; /* Program number */ in avc_ca_pmt()
1141 c->operand[16] = msg[2]; in avc_ca_pmt()
1142 c->operand[17] = msg[3]; /* Version number and current/next */ in avc_ca_pmt()
1143 c->operand[18] = 0x00; /* Section number=0 */ in avc_ca_pmt()
1144 c->operand[19] = 0x00; /* Last section number=0 */ in avc_ca_pmt()
1145 c->operand[20] = 0x1f; /* PCR_PID=1FFF */ in avc_ca_pmt()
1146 c->operand[21] = 0xff; in avc_ca_pmt()
1147 c->operand[22] = (program_info_length >> 8); /* Program info length */ in avc_ca_pmt()
1148 c->operand[23] = (program_info_length & 0xff); in avc_ca_pmt()
1158 if (program_info_length > sizeof(c->operand) - 4 - write_pos) { in avc_ca_pmt()
1163 memcpy(&c->operand[write_pos], &msg[read_pos], in avc_ca_pmt()
1169 if (write_pos + 4 >= sizeof(c->operand) - 4) { in avc_ca_pmt()
1173 c->operand[write_pos++] = msg[read_pos++]; in avc_ca_pmt()
1174 c->operand[write_pos++] = msg[read_pos++]; in avc_ca_pmt()
1175 c->operand[write_pos++] = msg[read_pos++]; in avc_ca_pmt()
1181 c->operand[write_pos++] = es_info_length >> 8; in avc_ca_pmt()
1182 c->operand[write_pos++] = es_info_length & 0xff; in avc_ca_pmt()
1193 if (es_info_length > sizeof(c->operand) - 4 - write_pos || in avc_ca_pmt()
1199 memcpy(&c->operand[write_pos], &msg[read_pos], in avc_ca_pmt()
1207 c->operand[7] = 0x82; in avc_ca_pmt()
1208 c->operand[8] = (write_pos - 10) >> 8; in avc_ca_pmt()
1209 c->operand[9] = (write_pos - 10) & 0xff; in avc_ca_pmt()
1210 c->operand[14] = write_pos - 15; in avc_ca_pmt()
1212 crc32_csum = crc32_be(0, &c->operand[10], c->operand[12] - 1); in avc_ca_pmt()
1213 c->operand[write_pos - 4] = (crc32_csum >> 24) & 0xff; in avc_ca_pmt()
1214 c->operand[write_pos - 3] = (crc32_csum >> 16) & 0xff; in avc_ca_pmt()
1215 c->operand[write_pos - 2] = (crc32_csum >> 8) & 0xff; in avc_ca_pmt()
1216 c->operand[write_pos - 1] = (crc32_csum >> 0) & 0xff; in avc_ca_pmt()
1217 pad_operands(c, write_pos); in avc_ca_pmt()
1237 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_ca_get_time_date() local
1243 c->ctype = AVC_CTYPE_STATUS; in avc_ca_get_time_date()
1244 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit; in avc_ca_get_time_date()
1245 c->opcode = AVC_OPCODE_VENDOR; in avc_ca_get_time_date()
1247 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0; in avc_ca_get_time_date()
1248 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1; in avc_ca_get_time_date()
1249 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2; in avc_ca_get_time_date()
1250 c->operand[3] = SFE_VENDOR_OPCODE_CA2HOST; in avc_ca_get_time_date()
1251 c->operand[4] = 0; /* slot */ in avc_ca_get_time_date()
1252 c->operand[5] = SFE_VENDOR_TAG_CA_DATE_TIME; /* ca tag */ in avc_ca_get_time_date()
1253 clear_operands(c, 6, LAST_OPERAND); in avc_ca_get_time_date()
1271 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_ca_enter_menu() local
1276 c->ctype = AVC_CTYPE_STATUS; in avc_ca_enter_menu()
1277 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit; in avc_ca_enter_menu()
1278 c->opcode = AVC_OPCODE_VENDOR; in avc_ca_enter_menu()
1280 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0; in avc_ca_enter_menu()
1281 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1; in avc_ca_enter_menu()
1282 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2; in avc_ca_enter_menu()
1283 c->operand[3] = SFE_VENDOR_OPCODE_HOST2CA; in avc_ca_enter_menu()
1284 c->operand[4] = 0; /* slot */ in avc_ca_enter_menu()
1285 c->operand[5] = SFE_VENDOR_TAG_CA_ENTER_MENU; in avc_ca_enter_menu()
1286 clear_operands(c, 6, 8); in avc_ca_enter_menu()
1300 struct avc_command_frame *c = (void *)fdtv->avc_data; in avc_ca_get_mmi() local
1306 c->ctype = AVC_CTYPE_STATUS; in avc_ca_get_mmi()
1307 c->subunit = AVC_SUBUNIT_TYPE_TUNER | fdtv->subunit; in avc_ca_get_mmi()
1308 c->opcode = AVC_OPCODE_VENDOR; in avc_ca_get_mmi()
1310 c->operand[0] = SFE_VENDOR_DE_COMPANYID_0; in avc_ca_get_mmi()
1311 c->operand[1] = SFE_VENDOR_DE_COMPANYID_1; in avc_ca_get_mmi()
1312 c->operand[2] = SFE_VENDOR_DE_COMPANYID_2; in avc_ca_get_mmi()
1313 c->operand[3] = SFE_VENDOR_OPCODE_CA2HOST; in avc_ca_get_mmi()
1314 c->operand[4] = 0; /* slot */ in avc_ca_get_mmi()
1315 c->operand[5] = SFE_VENDOR_TAG_CA_MMI; in avc_ca_get_mmi()
1316 clear_operands(c, 6, LAST_OPERAND); in avc_ca_get_mmi()