Lines Matching refs:tnr_dmd

24 				       *tnr_dmd, u8 *sync_stat,  in cxd2880_tnrdmd_dvbt2_mon_sync_stat()
31 if (!tnr_dmd || !sync_stat || !ts_lock_stat || !unlock_detected) in cxd2880_tnrdmd_dvbt2_mon_sync_stat()
34 if (tnr_dmd->state != CXD2880_TNRDMD_STATE_ACTIVE) in cxd2880_tnrdmd_dvbt2_mon_sync_stat()
37 if (tnr_dmd->sys != CXD2880_DTV_SYS_DVBT2) in cxd2880_tnrdmd_dvbt2_mon_sync_stat()
40 ret = tnr_dmd->io->write_reg(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_sync_stat()
46 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_sync_stat()
63 *tnr_dmd, in cxd2880_tnrdmd_dvbt2_mon_sync_stat_sub()
69 if (!tnr_dmd || !sync_stat || !unlock_detected) in cxd2880_tnrdmd_dvbt2_mon_sync_stat_sub()
72 if (tnr_dmd->diver_mode != CXD2880_TNRDMD_DIVERMODE_MAIN) in cxd2880_tnrdmd_dvbt2_mon_sync_stat_sub()
75 return cxd2880_tnrdmd_dvbt2_mon_sync_stat(tnr_dmd->diver_sub, in cxd2880_tnrdmd_dvbt2_mon_sync_stat_sub()
82 *tnr_dmd, int *offset) in cxd2880_tnrdmd_dvbt2_mon_carrier_offset()
91 if (!tnr_dmd || !offset) in cxd2880_tnrdmd_dvbt2_mon_carrier_offset()
94 if (tnr_dmd->state != CXD2880_TNRDMD_STATE_ACTIVE) in cxd2880_tnrdmd_dvbt2_mon_carrier_offset()
97 if (tnr_dmd->sys != CXD2880_DTV_SYS_DVBT2) in cxd2880_tnrdmd_dvbt2_mon_carrier_offset()
100 ret = slvt_freeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_carrier_offset()
105 cxd2880_tnrdmd_dvbt2_mon_sync_stat(tnr_dmd, &sync_state, in cxd2880_tnrdmd_dvbt2_mon_carrier_offset()
109 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_carrier_offset()
114 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_carrier_offset()
118 ret = tnr_dmd->io->write_reg(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_carrier_offset()
122 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_carrier_offset()
126 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_carrier_offset()
130 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_carrier_offset()
134 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_carrier_offset()
141 switch (tnr_dmd->bandwidth) { in cxd2880_tnrdmd_dvbt2_mon_carrier_offset()
149 *offset = -1 * ((*offset) * tnr_dmd->bandwidth / 940); in cxd2880_tnrdmd_dvbt2_mon_carrier_offset()
160 *tnr_dmd, in cxd2880_tnrdmd_dvbt2_mon_carrier_offset_sub()
163 if (!tnr_dmd || !offset) in cxd2880_tnrdmd_dvbt2_mon_carrier_offset_sub()
166 if (tnr_dmd->diver_mode != CXD2880_TNRDMD_DIVERMODE_MAIN) in cxd2880_tnrdmd_dvbt2_mon_carrier_offset_sub()
169 return cxd2880_tnrdmd_dvbt2_mon_carrier_offset(tnr_dmd->diver_sub, in cxd2880_tnrdmd_dvbt2_mon_carrier_offset_sub()
173 int cxd2880_tnrdmd_dvbt2_mon_l1_pre(struct cxd2880_tnrdmd *tnr_dmd, in cxd2880_tnrdmd_dvbt2_mon_l1_pre() argument
185 if (!tnr_dmd || !l1_pre) in cxd2880_tnrdmd_dvbt2_mon_l1_pre()
188 if (tnr_dmd->diver_mode == CXD2880_TNRDMD_DIVERMODE_SUB) in cxd2880_tnrdmd_dvbt2_mon_l1_pre()
191 if (tnr_dmd->state != CXD2880_TNRDMD_STATE_ACTIVE) in cxd2880_tnrdmd_dvbt2_mon_l1_pre()
194 if (tnr_dmd->sys != CXD2880_DTV_SYS_DVBT2) in cxd2880_tnrdmd_dvbt2_mon_l1_pre()
197 ret = slvt_freeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_l1_pre()
202 cxd2880_tnrdmd_dvbt2_mon_sync_stat(tnr_dmd, &sync_state, in cxd2880_tnrdmd_dvbt2_mon_l1_pre()
206 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_l1_pre()
211 if (tnr_dmd->diver_mode == in cxd2880_tnrdmd_dvbt2_mon_l1_pre()
215 (tnr_dmd, &sync_state, &unlock_detected); in cxd2880_tnrdmd_dvbt2_mon_l1_pre()
217 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_l1_pre()
222 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_l1_pre()
226 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_l1_pre()
231 ret = cxd2880_tnrdmd_dvbt2_mon_profile(tnr_dmd, &profile); in cxd2880_tnrdmd_dvbt2_mon_l1_pre()
233 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_l1_pre()
237 ret = tnr_dmd->io->write_reg(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_l1_pre()
241 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_l1_pre()
245 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_l1_pre()
249 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_l1_pre()
252 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_l1_pre()
351 *tnr_dmd, in cxd2880_tnrdmd_dvbt2_mon_version()
362 if (!tnr_dmd || !ver) in cxd2880_tnrdmd_dvbt2_mon_version()
365 if (tnr_dmd->diver_mode == CXD2880_TNRDMD_DIVERMODE_SUB) in cxd2880_tnrdmd_dvbt2_mon_version()
368 if (tnr_dmd->state != CXD2880_TNRDMD_STATE_ACTIVE) in cxd2880_tnrdmd_dvbt2_mon_version()
371 if (tnr_dmd->sys != CXD2880_DTV_SYS_DVBT2) in cxd2880_tnrdmd_dvbt2_mon_version()
374 ret = slvt_freeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_version()
379 cxd2880_tnrdmd_dvbt2_mon_sync_stat(tnr_dmd, &sync_state, in cxd2880_tnrdmd_dvbt2_mon_version()
383 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_version()
388 if (tnr_dmd->diver_mode == in cxd2880_tnrdmd_dvbt2_mon_version()
392 (tnr_dmd, &sync_state, &unlock_detected); in cxd2880_tnrdmd_dvbt2_mon_version()
394 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_version()
399 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_version()
403 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_version()
408 ret = tnr_dmd->io->write_reg(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_version()
412 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_version()
416 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_version()
420 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_version()
424 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_version()
433 int cxd2880_tnrdmd_dvbt2_mon_ofdm(struct cxd2880_tnrdmd *tnr_dmd, in cxd2880_tnrdmd_dvbt2_mon_ofdm() argument
442 if (!tnr_dmd || !ofdm) in cxd2880_tnrdmd_dvbt2_mon_ofdm()
445 if (tnr_dmd->state != CXD2880_TNRDMD_STATE_ACTIVE) in cxd2880_tnrdmd_dvbt2_mon_ofdm()
448 if (tnr_dmd->sys != CXD2880_DTV_SYS_DVBT2) in cxd2880_tnrdmd_dvbt2_mon_ofdm()
451 ret = slvt_freeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_ofdm()
456 cxd2880_tnrdmd_dvbt2_mon_sync_stat(tnr_dmd, &sync_state, in cxd2880_tnrdmd_dvbt2_mon_ofdm()
460 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_ofdm()
465 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_ofdm()
469 if (tnr_dmd->diver_mode == in cxd2880_tnrdmd_dvbt2_mon_ofdm()
472 cxd2880_tnrdmd_dvbt2_mon_ofdm(tnr_dmd->diver_sub, in cxd2880_tnrdmd_dvbt2_mon_ofdm()
478 ret = tnr_dmd->io->write_reg(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_ofdm()
482 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_ofdm()
486 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_ofdm()
490 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_ofdm()
494 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_ofdm()
509 *tnr_dmd, u8 *plp_ids, in cxd2880_tnrdmd_dvbt2_mon_data_plps()
515 if (!tnr_dmd || !num_plps) in cxd2880_tnrdmd_dvbt2_mon_data_plps()
518 if (tnr_dmd->diver_mode == CXD2880_TNRDMD_DIVERMODE_SUB) in cxd2880_tnrdmd_dvbt2_mon_data_plps()
521 if (tnr_dmd->state != CXD2880_TNRDMD_STATE_ACTIVE) in cxd2880_tnrdmd_dvbt2_mon_data_plps()
524 if (tnr_dmd->sys != CXD2880_DTV_SYS_DVBT2) in cxd2880_tnrdmd_dvbt2_mon_data_plps()
527 ret = tnr_dmd->io->write_reg(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_data_plps()
533 ret = slvt_freeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_data_plps()
537 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_data_plps()
541 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_data_plps()
546 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_data_plps()
550 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_data_plps()
554 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_data_plps()
559 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_data_plps()
564 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_data_plps()
568 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_data_plps()
575 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_data_plps()
580 ret = tnr_dmd->io->write_reg(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_data_plps()
584 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_data_plps()
588 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_data_plps()
593 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_data_plps()
598 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_data_plps()
604 *tnr_dmd, in cxd2880_tnrdmd_dvbt2_mon_active_plp()
617 if (!tnr_dmd || !plp_info) in cxd2880_tnrdmd_dvbt2_mon_active_plp()
620 if (tnr_dmd->diver_mode == CXD2880_TNRDMD_DIVERMODE_SUB) in cxd2880_tnrdmd_dvbt2_mon_active_plp()
623 if (tnr_dmd->state != CXD2880_TNRDMD_STATE_ACTIVE) in cxd2880_tnrdmd_dvbt2_mon_active_plp()
626 if (tnr_dmd->sys != CXD2880_DTV_SYS_DVBT2) in cxd2880_tnrdmd_dvbt2_mon_active_plp()
629 ret = slvt_freeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_active_plp()
633 ret = tnr_dmd->io->write_reg(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_active_plp()
637 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_active_plp()
641 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_active_plp()
645 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_active_plp()
650 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_active_plp()
659 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_active_plp()
663 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_active_plp()
667 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_active_plp()
710 *tnr_dmd, in cxd2880_tnrdmd_dvbt2_mon_data_plp_error()
716 if (!tnr_dmd || !plp_error) in cxd2880_tnrdmd_dvbt2_mon_data_plp_error()
719 if (tnr_dmd->diver_mode == CXD2880_TNRDMD_DIVERMODE_SUB) in cxd2880_tnrdmd_dvbt2_mon_data_plp_error()
722 if (tnr_dmd->state != CXD2880_TNRDMD_STATE_ACTIVE) in cxd2880_tnrdmd_dvbt2_mon_data_plp_error()
725 if (tnr_dmd->sys != CXD2880_DTV_SYS_DVBT2) in cxd2880_tnrdmd_dvbt2_mon_data_plp_error()
728 ret = slvt_freeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_data_plp_error()
732 ret = tnr_dmd->io->write_reg(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_data_plp_error()
736 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_data_plp_error()
740 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_data_plp_error()
744 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_data_plp_error()
749 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_data_plp_error()
753 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_data_plp_error()
757 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_data_plp_error()
761 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_data_plp_error()
769 *tnr_dmd, u8 *l1_change) in cxd2880_tnrdmd_dvbt2_mon_l1_change()
777 if (!tnr_dmd || !l1_change) in cxd2880_tnrdmd_dvbt2_mon_l1_change()
780 if (tnr_dmd->diver_mode == CXD2880_TNRDMD_DIVERMODE_SUB) in cxd2880_tnrdmd_dvbt2_mon_l1_change()
783 if (tnr_dmd->state != CXD2880_TNRDMD_STATE_ACTIVE) in cxd2880_tnrdmd_dvbt2_mon_l1_change()
786 if (tnr_dmd->sys != CXD2880_DTV_SYS_DVBT2) in cxd2880_tnrdmd_dvbt2_mon_l1_change()
789 ret = slvt_freeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_l1_change()
794 cxd2880_tnrdmd_dvbt2_mon_sync_stat(tnr_dmd, &sync_state, in cxd2880_tnrdmd_dvbt2_mon_l1_change()
798 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_l1_change()
803 if (tnr_dmd->diver_mode == in cxd2880_tnrdmd_dvbt2_mon_l1_change()
807 (tnr_dmd, &sync_state, &unlock_detected); in cxd2880_tnrdmd_dvbt2_mon_l1_change()
809 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_l1_change()
814 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_l1_change()
818 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_l1_change()
823 ret = tnr_dmd->io->write_reg(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_l1_change()
827 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_l1_change()
831 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_l1_change()
835 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_l1_change()
841 ret = tnr_dmd->io->write_reg(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_l1_change()
845 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_l1_change()
849 ret = tnr_dmd->io->write_reg(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_l1_change()
853 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_l1_change()
857 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_l1_change()
863 *tnr_dmd, in cxd2880_tnrdmd_dvbt2_mon_l1_post()
870 if (!tnr_dmd || !l1_post) in cxd2880_tnrdmd_dvbt2_mon_l1_post()
873 if (tnr_dmd->diver_mode == CXD2880_TNRDMD_DIVERMODE_SUB) in cxd2880_tnrdmd_dvbt2_mon_l1_post()
876 if (tnr_dmd->state != CXD2880_TNRDMD_STATE_ACTIVE) in cxd2880_tnrdmd_dvbt2_mon_l1_post()
879 if (tnr_dmd->sys != CXD2880_DTV_SYS_DVBT2) in cxd2880_tnrdmd_dvbt2_mon_l1_post()
882 ret = tnr_dmd->io->write_reg(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_l1_post()
888 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_l1_post()
917 *tnr_dmd, in cxd2880_tnrdmd_dvbt2_mon_bbheader()
930 if (!tnr_dmd || !bbheader) in cxd2880_tnrdmd_dvbt2_mon_bbheader()
933 if (tnr_dmd->diver_mode == CXD2880_TNRDMD_DIVERMODE_SUB) in cxd2880_tnrdmd_dvbt2_mon_bbheader()
936 if (tnr_dmd->state != CXD2880_TNRDMD_STATE_ACTIVE) in cxd2880_tnrdmd_dvbt2_mon_bbheader()
939 if (tnr_dmd->sys != CXD2880_DTV_SYS_DVBT2) in cxd2880_tnrdmd_dvbt2_mon_bbheader()
942 ret = slvt_freeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_bbheader()
947 cxd2880_tnrdmd_dvbt2_mon_sync_stat(tnr_dmd, &sync_state, in cxd2880_tnrdmd_dvbt2_mon_bbheader()
951 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_bbheader()
956 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_bbheader()
960 ret = tnr_dmd->io->write_reg(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_bbheader()
964 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_bbheader()
972 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_bbheader()
976 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_bbheader()
981 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_bbheader()
985 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_bbheader()
989 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_bbheader()
994 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_bbheader()
1004 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_bbheader()
1008 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_bbheader()
1012 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_bbheader()
1045 *tnr_dmd, in cxd2880_tnrdmd_dvbt2_mon_in_bandb_ts_rate()
1060 if (!tnr_dmd || !ts_rate_bps) in cxd2880_tnrdmd_dvbt2_mon_in_bandb_ts_rate()
1063 if (tnr_dmd->diver_mode == CXD2880_TNRDMD_DIVERMODE_SUB) in cxd2880_tnrdmd_dvbt2_mon_in_bandb_ts_rate()
1066 if (tnr_dmd->state != CXD2880_TNRDMD_STATE_ACTIVE) in cxd2880_tnrdmd_dvbt2_mon_in_bandb_ts_rate()
1069 if (tnr_dmd->sys != CXD2880_DTV_SYS_DVBT2) in cxd2880_tnrdmd_dvbt2_mon_in_bandb_ts_rate()
1072 ret = slvt_freeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_in_bandb_ts_rate()
1077 cxd2880_tnrdmd_dvbt2_mon_sync_stat(tnr_dmd, &sync_state, in cxd2880_tnrdmd_dvbt2_mon_in_bandb_ts_rate()
1081 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_in_bandb_ts_rate()
1086 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_in_bandb_ts_rate()
1090 ret = tnr_dmd->io->write_reg(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_in_bandb_ts_rate()
1094 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_in_bandb_ts_rate()
1098 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_in_bandb_ts_rate()
1102 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_in_bandb_ts_rate()
1107 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_in_bandb_ts_rate()
1116 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_in_bandb_ts_rate()
1120 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_in_bandb_ts_rate()
1125 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_in_bandb_ts_rate()
1129 ret = tnr_dmd->io->write_reg(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_in_bandb_ts_rate()
1133 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_in_bandb_ts_rate()
1142 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_in_bandb_ts_rate()
1146 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_in_bandb_ts_rate()
1157 *tnr_dmd, in cxd2880_tnrdmd_dvbt2_mon_spectrum_sense()
1168 if (!tnr_dmd || !sense) in cxd2880_tnrdmd_dvbt2_mon_spectrum_sense()
1171 if (tnr_dmd->state != CXD2880_TNRDMD_STATE_ACTIVE) in cxd2880_tnrdmd_dvbt2_mon_spectrum_sense()
1174 if (tnr_dmd->sys != CXD2880_DTV_SYS_DVBT2) in cxd2880_tnrdmd_dvbt2_mon_spectrum_sense()
1177 ret = slvt_freeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_spectrum_sense()
1182 cxd2880_tnrdmd_dvbt2_mon_sync_stat(tnr_dmd, &sync_state, &ts_lock, in cxd2880_tnrdmd_dvbt2_mon_spectrum_sense()
1185 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_spectrum_sense()
1190 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_spectrum_sense()
1194 if (tnr_dmd->diver_mode == CXD2880_TNRDMD_DIVERMODE_MAIN) in cxd2880_tnrdmd_dvbt2_mon_spectrum_sense()
1196 cxd2880_tnrdmd_dvbt2_mon_spectrum_sense(tnr_dmd->diver_sub, in cxd2880_tnrdmd_dvbt2_mon_spectrum_sense()
1202 ret = tnr_dmd->io->write_reg(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_spectrum_sense()
1206 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_spectrum_sense()
1210 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_spectrum_sense()
1214 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_spectrum_sense()
1218 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_spectrum_sense()
1227 static int dvbt2_read_snr_reg(struct cxd2880_tnrdmd *tnr_dmd, in dvbt2_read_snr_reg() argument
1236 if (!tnr_dmd || !reg_value) in dvbt2_read_snr_reg()
1239 ret = slvt_freeze_reg(tnr_dmd); in dvbt2_read_snr_reg()
1244 cxd2880_tnrdmd_dvbt2_mon_sync_stat(tnr_dmd, &sync_state, in dvbt2_read_snr_reg()
1248 slvt_unfreeze_reg(tnr_dmd); in dvbt2_read_snr_reg()
1253 slvt_unfreeze_reg(tnr_dmd); in dvbt2_read_snr_reg()
1257 ret = tnr_dmd->io->write_reg(tnr_dmd->io, in dvbt2_read_snr_reg()
1261 slvt_unfreeze_reg(tnr_dmd); in dvbt2_read_snr_reg()
1265 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in dvbt2_read_snr_reg()
1269 slvt_unfreeze_reg(tnr_dmd); in dvbt2_read_snr_reg()
1273 slvt_unfreeze_reg(tnr_dmd); in dvbt2_read_snr_reg()
1280 static int dvbt2_calc_snr(struct cxd2880_tnrdmd *tnr_dmd, in dvbt2_calc_snr() argument
1283 if (!tnr_dmd || !snr) in dvbt2_calc_snr()
1298 int cxd2880_tnrdmd_dvbt2_mon_snr(struct cxd2880_tnrdmd *tnr_dmd, in cxd2880_tnrdmd_dvbt2_mon_snr() argument
1304 if (!tnr_dmd || !snr) in cxd2880_tnrdmd_dvbt2_mon_snr()
1309 if (tnr_dmd->diver_mode == CXD2880_TNRDMD_DIVERMODE_SUB) in cxd2880_tnrdmd_dvbt2_mon_snr()
1312 if (tnr_dmd->state != CXD2880_TNRDMD_STATE_ACTIVE) in cxd2880_tnrdmd_dvbt2_mon_snr()
1315 if (tnr_dmd->sys != CXD2880_DTV_SYS_DVBT2) in cxd2880_tnrdmd_dvbt2_mon_snr()
1318 if (tnr_dmd->diver_mode == CXD2880_TNRDMD_DIVERMODE_SINGLE) { in cxd2880_tnrdmd_dvbt2_mon_snr()
1319 ret = dvbt2_read_snr_reg(tnr_dmd, &reg_value); in cxd2880_tnrdmd_dvbt2_mon_snr()
1323 ret = dvbt2_calc_snr(tnr_dmd, reg_value, snr); in cxd2880_tnrdmd_dvbt2_mon_snr()
1329 cxd2880_tnrdmd_dvbt2_mon_snr_diver(tnr_dmd, snr, &snr_main, in cxd2880_tnrdmd_dvbt2_mon_snr()
1337 *tnr_dmd, int *snr, in cxd2880_tnrdmd_dvbt2_mon_snr_diver()
1344 if (!tnr_dmd || !snr || !snr_main || !snr_sub) in cxd2880_tnrdmd_dvbt2_mon_snr_diver()
1351 if (tnr_dmd->diver_mode != CXD2880_TNRDMD_DIVERMODE_MAIN) in cxd2880_tnrdmd_dvbt2_mon_snr_diver()
1354 if (tnr_dmd->state != CXD2880_TNRDMD_STATE_ACTIVE) in cxd2880_tnrdmd_dvbt2_mon_snr_diver()
1357 if (tnr_dmd->sys != CXD2880_DTV_SYS_DVBT2) in cxd2880_tnrdmd_dvbt2_mon_snr_diver()
1360 ret = dvbt2_read_snr_reg(tnr_dmd, &reg_value); in cxd2880_tnrdmd_dvbt2_mon_snr_diver()
1362 ret = dvbt2_calc_snr(tnr_dmd, reg_value, snr_main); in cxd2880_tnrdmd_dvbt2_mon_snr_diver()
1373 ret = dvbt2_read_snr_reg(tnr_dmd->diver_sub, &reg_value); in cxd2880_tnrdmd_dvbt2_mon_snr_diver()
1375 ret = dvbt2_calc_snr(tnr_dmd->diver_sub, reg_value, snr_sub); in cxd2880_tnrdmd_dvbt2_mon_snr_diver()
1386 return dvbt2_calc_snr(tnr_dmd, reg_value_sum, snr); in cxd2880_tnrdmd_dvbt2_mon_snr_diver()
1391 *tnr_dmd, in cxd2880_tnrdmd_dvbt2_mon_packet_error_number()
1397 if (!tnr_dmd || !pen) in cxd2880_tnrdmd_dvbt2_mon_packet_error_number()
1400 if (tnr_dmd->diver_mode == CXD2880_TNRDMD_DIVERMODE_SUB) in cxd2880_tnrdmd_dvbt2_mon_packet_error_number()
1403 if (tnr_dmd->state != CXD2880_TNRDMD_STATE_ACTIVE) in cxd2880_tnrdmd_dvbt2_mon_packet_error_number()
1406 if (tnr_dmd->sys != CXD2880_DTV_SYS_DVBT2) in cxd2880_tnrdmd_dvbt2_mon_packet_error_number()
1409 ret = tnr_dmd->io->write_reg(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_packet_error_number()
1415 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_packet_error_number()
1430 *tnr_dmd, int *ppm) in cxd2880_tnrdmd_dvbt2_mon_sampling_offset()
1444 if (!tnr_dmd || !ppm) in cxd2880_tnrdmd_dvbt2_mon_sampling_offset()
1447 if (tnr_dmd->state != CXD2880_TNRDMD_STATE_ACTIVE) in cxd2880_tnrdmd_dvbt2_mon_sampling_offset()
1450 if (tnr_dmd->sys != CXD2880_DTV_SYS_DVBT2) in cxd2880_tnrdmd_dvbt2_mon_sampling_offset()
1453 ret = slvt_freeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_sampling_offset()
1458 cxd2880_tnrdmd_dvbt2_mon_sync_stat(tnr_dmd, &sync_state, in cxd2880_tnrdmd_dvbt2_mon_sampling_offset()
1462 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_sampling_offset()
1467 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_sampling_offset()
1471 ret = tnr_dmd->io->write_reg(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_sampling_offset()
1475 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_sampling_offset()
1479 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_sampling_offset()
1484 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_sampling_offset()
1488 ret = tnr_dmd->io->write_reg(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_sampling_offset()
1492 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_sampling_offset()
1496 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_sampling_offset()
1501 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_sampling_offset()
1505 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_sampling_offset()
1555 *tnr_dmd, in cxd2880_tnrdmd_dvbt2_mon_sampling_offset_sub()
1558 if (!tnr_dmd || !ppm) in cxd2880_tnrdmd_dvbt2_mon_sampling_offset_sub()
1561 if (tnr_dmd->diver_mode != CXD2880_TNRDMD_DIVERMODE_MAIN) in cxd2880_tnrdmd_dvbt2_mon_sampling_offset_sub()
1564 return cxd2880_tnrdmd_dvbt2_mon_sampling_offset(tnr_dmd->diver_sub, in cxd2880_tnrdmd_dvbt2_mon_sampling_offset_sub()
1568 int cxd2880_tnrdmd_dvbt2_mon_qam(struct cxd2880_tnrdmd *tnr_dmd, in cxd2880_tnrdmd_dvbt2_mon_qam() argument
1576 if (!tnr_dmd || !qam) in cxd2880_tnrdmd_dvbt2_mon_qam()
1579 if (tnr_dmd->diver_mode == CXD2880_TNRDMD_DIVERMODE_SUB) in cxd2880_tnrdmd_dvbt2_mon_qam()
1582 if (tnr_dmd->state != CXD2880_TNRDMD_STATE_ACTIVE) in cxd2880_tnrdmd_dvbt2_mon_qam()
1585 if (tnr_dmd->sys != CXD2880_DTV_SYS_DVBT2) in cxd2880_tnrdmd_dvbt2_mon_qam()
1588 ret = slvt_freeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_qam()
1592 ret = tnr_dmd->io->write_reg(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_qam()
1596 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_qam()
1600 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_qam()
1604 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_qam()
1609 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_qam()
1614 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_qam()
1618 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_qam()
1623 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_qam()
1627 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_qam()
1631 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_qam()
1635 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_qam()
1639 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_qam()
1644 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_qam()
1652 *tnr_dmd, in cxd2880_tnrdmd_dvbt2_mon_code_rate()
1663 if (!tnr_dmd || !code_rate) in cxd2880_tnrdmd_dvbt2_mon_code_rate()
1666 if (tnr_dmd->diver_mode == CXD2880_TNRDMD_DIVERMODE_SUB) in cxd2880_tnrdmd_dvbt2_mon_code_rate()
1669 if (tnr_dmd->state != CXD2880_TNRDMD_STATE_ACTIVE) in cxd2880_tnrdmd_dvbt2_mon_code_rate()
1672 if (tnr_dmd->sys != CXD2880_DTV_SYS_DVBT2) in cxd2880_tnrdmd_dvbt2_mon_code_rate()
1675 ret = slvt_freeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_code_rate()
1679 ret = tnr_dmd->io->write_reg(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_code_rate()
1683 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_code_rate()
1687 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_code_rate()
1691 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_code_rate()
1696 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_code_rate()
1701 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_code_rate()
1705 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_code_rate()
1710 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_code_rate()
1714 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_code_rate()
1718 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_code_rate()
1722 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_code_rate()
1726 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_code_rate()
1731 slvt_unfreeze_reg(tnr_dmd); in cxd2880_tnrdmd_dvbt2_mon_code_rate()
1739 *tnr_dmd, in cxd2880_tnrdmd_dvbt2_mon_profile()
1746 if (!tnr_dmd || !profile) in cxd2880_tnrdmd_dvbt2_mon_profile()
1749 if (tnr_dmd->state != CXD2880_TNRDMD_STATE_ACTIVE) in cxd2880_tnrdmd_dvbt2_mon_profile()
1752 if (tnr_dmd->sys != CXD2880_DTV_SYS_DVBT2) in cxd2880_tnrdmd_dvbt2_mon_profile()
1755 ret = tnr_dmd->io->write_reg(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_profile()
1761 ret = tnr_dmd->io->read_regs(tnr_dmd->io, in cxd2880_tnrdmd_dvbt2_mon_profile()
1774 if (tnr_dmd->diver_mode == in cxd2880_tnrdmd_dvbt2_mon_profile()
1777 cxd2880_tnrdmd_dvbt2_mon_profile(tnr_dmd->diver_sub, in cxd2880_tnrdmd_dvbt2_mon_profile()
1786 static int dvbt2_calc_ssi(struct cxd2880_tnrdmd *tnr_dmd, in dvbt2_calc_ssi() argument
1795 if (!tnr_dmd || !ssi) in dvbt2_calc_ssi()
1799 cxd2880_tnrdmd_dvbt2_mon_qam(tnr_dmd, CXD2880_DVBT2_PLP_DATA, &qam); in dvbt2_calc_ssi()
1804 cxd2880_tnrdmd_dvbt2_mon_code_rate(tnr_dmd, CXD2880_DVBT2_PLP_DATA, in dvbt2_calc_ssi()
1830 int cxd2880_tnrdmd_dvbt2_mon_ssi(struct cxd2880_tnrdmd *tnr_dmd, in cxd2880_tnrdmd_dvbt2_mon_ssi() argument
1836 if (!tnr_dmd || !ssi) in cxd2880_tnrdmd_dvbt2_mon_ssi()
1839 if (tnr_dmd->diver_mode == CXD2880_TNRDMD_DIVERMODE_SUB) in cxd2880_tnrdmd_dvbt2_mon_ssi()
1842 if (tnr_dmd->state != CXD2880_TNRDMD_STATE_ACTIVE) in cxd2880_tnrdmd_dvbt2_mon_ssi()
1845 if (tnr_dmd->sys != CXD2880_DTV_SYS_DVBT2) in cxd2880_tnrdmd_dvbt2_mon_ssi()
1848 ret = cxd2880_tnrdmd_mon_rf_lvl(tnr_dmd, &rf_lvl); in cxd2880_tnrdmd_dvbt2_mon_ssi()
1852 return dvbt2_calc_ssi(tnr_dmd, rf_lvl, ssi); in cxd2880_tnrdmd_dvbt2_mon_ssi()
1856 *tnr_dmd, u8 *ssi) in cxd2880_tnrdmd_dvbt2_mon_ssi_sub()
1861 if (!tnr_dmd || !ssi) in cxd2880_tnrdmd_dvbt2_mon_ssi_sub()
1864 if (tnr_dmd->diver_mode != CXD2880_TNRDMD_DIVERMODE_MAIN) in cxd2880_tnrdmd_dvbt2_mon_ssi_sub()
1867 if (tnr_dmd->state != CXD2880_TNRDMD_STATE_ACTIVE) in cxd2880_tnrdmd_dvbt2_mon_ssi_sub()
1870 if (tnr_dmd->sys != CXD2880_DTV_SYS_DVBT2) in cxd2880_tnrdmd_dvbt2_mon_ssi_sub()
1873 ret = cxd2880_tnrdmd_mon_rf_lvl(tnr_dmd->diver_sub, &rf_lvl); in cxd2880_tnrdmd_dvbt2_mon_ssi_sub()
1877 return dvbt2_calc_ssi(tnr_dmd, rf_lvl, ssi); in cxd2880_tnrdmd_dvbt2_mon_ssi_sub()