#ifndef __DRXJ_H__ #define __DRXJ_H__ /*------------------------------------------------------------------------- INCLUDES
-------------------------------------------------------------------------*/
#include"drx_driver.h" #include"drx_dap_fasi.h"
/* Check DRX-J specific dap condition */ /* Multi master mode and short addr format only will not work. RMW,CRCreset,broadcastandswitchingbacktosinglemastermode
cannot be done with short addr only in multi master mode. */ #if ((DRXDAP_SINGLE_MASTER == 0) && (DRXDAPFASI_LONG_ADDR_ALLOWED == 0)) #error"Multi master mode and short addressing only is an illegal combination"
*; /* Generate a fatal compiler error to make sure it stops here,
this is necessary because not all compilers stop after a #error. */ #endif
/*============================================================================*/ /*============================================================================*/ /*== SCU cmd if =============================================================*/ /*============================================================================*/ /*============================================================================*/
struct drxjscu_cmd {
u16 command; /*< Command number */
u16 parameter_len; /*< Data length in byte */
u16 result_len; /*< result length in byte */
u16 *parameter; /*< General purpose param */
u16 *result; /*< General purpose param */};
/*============================================================================*/ /*============================================================================*/ /*== CTRL CFG related data structures ========================================*/ /*============================================================================*/ /*============================================================================*/
/* extra intermediate lock state for VSB,QAM,NTSC */ #define DRXJ_DEMOD_LOCK (DRX_LOCK_STATE_1)
/* OOB lock states */ #define DRXJ_OOB_AGC_LOCK (DRX_LOCK_STATE_1) /* analog gain control lock */ #define DRXJ_OOB_SYNC_LOCK (DRX_LOCK_STATE_2) /* digital gain control lock */
/* ATV (FM) */
DRXJ_CFG_ATV_OUTPUT, /* also for FM (SIF control) but not likely */
DRXJ_CFG_ATV_MISC,
DRXJ_CFG_ATV_EQU_COEF,
DRXJ_CFG_ATV_AGC_STATUS, /* also for FM ( IF,RF, audioAGC ) */
/* */structdrxj_cfg_agc*GenericinterfaceforallAGCspresentontheDRXJ.
*/ struct drxj_cfg_agc { enum drx_standard standard; /* standard for which these settings apply */ enum drxj_agc_ctrl_mode ctrl_mode; /* off, user, auto */
u16 output_level; /* range dependent on AGC */
u16 min_output_level; /* range dependent on AGC */
u16 max_output_level; /* range dependent on AGC */
u16 speed; /* range dependent on AGC */
u16 top; /* rf-agc take over point */
u16 cut_off_current; /* rf-agc is accelerated if output current
is below cut-off current */};
/* DRXJ_CFG_PRE_SAW */
/* */structdrxj_cfg_pre_saw*InterfacetoconfigurepreSAWsense.
*/ struct drxj_cfg_pre_saw { enum drx_standard standard; /* standard to which these settings apply */
u16 reference; /* pre SAW reference value, range 0 .. 31 */ bool use_pre_saw; /* true algorithms must use pre SAW sense */};
/* DRXJ_CFG_AFE_GAIN */
/* */structdrxj_cfg_afe_gain*InterfacetoconfiguregainofAFE(LNA+PGA).
*/ struct drxj_cfg_afe_gain { enum drx_standard standard; /* standard to which these settings apply */
u16 gain; /* gain in 0.1 dB steps, DRXJ range 140 .. 335 */};
/* */structdrxjrs_errors *AvailablefailureinformationinDRXJ_FEC_RS. * *Containerforerrorsthatarereceivedinthemostrecentlyfinishedmeasurementperiod *
*/ struct drxjrs_errors {
u16 nr_bit_errors; /*< no of pre RS bit errors */
u16 nr_symbol_errors; /*< no of pre RS symbol errors */
u16 nr_packet_errors; /*< no of pre RS packet errors */
u16 nr_failures; /*< no of post RS failures to decode */
u16 nr_snc_par_fail_count; /*< no of post RS bit erros */
};
/* */structDRXJCfgMisc_t *ChangeTEIbitofMPEGoutput *reverseMPEGoutputbitorder *setMPEGoutputclockrate
*/ struct drxj_cfg_mpeg_output_misc { bool disable_tei_handling; /*< if true pass (not change) TEI bit */ bool bit_reverse_mpeg_outout; /*< if true, parallel: msb on MD0; serial: lsb out first */ enum drxj_mpeg_output_clock_rate mpeg_output_clock_rate; /*< set MPEG output clock rate that overwirtes the derived one from symbol rate */ enum drxj_mpeg_start_width mpeg_start_width; /*< set MPEG output start width */};
/* DRXJ_CFG_ATV_AGC_STATUS(getonly)
*/ /* TODO : AFE interface not yet finished, subject to change */ struct drxj_cfg_atv_agc_status {
u16 rf_agc_gain; /* 0 .. 877 uA */
u16 if_agc_gain; /* 0 .. 877 uA */
s16 video_agc_gain; /* -75 .. 1972 in 0.1 dB steps */
s16 audio_agc_gain; /* -4 .. 1020 in 0.1 dB steps */
u16 rf_agc_loop_gain; /* 0 .. 7 */
u16 if_agc_loop_gain; /* 0 .. 7 */
u16 video_agc_loop_gain; /* 0 .. 7 */};
/*============================================================================*/ /*============================================================================*/ /*== CTRL related data structures ============================================*/ /*============================================================================*/ /*============================================================================*/
/*========================================*/ /* */structstructdrxj_data*DRXJspecificattributes. * *GlobaldatacontainerforDRXJspecificdata. *
*/ struct drxj_data { /* device capabilities (determined during drx_open()) */ bool has_lna; /*< true if LNA (aka PGA) present */ bool has_oob; /*< true if OOB supported */ bool has_ntsc; /*< true if NTSC supported */ bool has_btsc; /*< true if BTSC supported */ bool has_smatx; /*< true if mat_tx is available */ bool has_smarx; /*< true if mat_rx is available */ bool has_gpio; /*< true if GPIO is available */ bool has_irqn; /*< true if IRQN is available */ /* A1/A2/A... */
u8 mfx; /*< metal fix */
/* tuner settings */ bool mirror_freq_spect_oob;/*< tuner inversion (true = tuner mirrors the signal */
/* standard/channel settings */ enum drx_standard standard; /*< current standard information */ enum drx_modulation constellation; /*< current constellation */
s32 frequency; /*< center signal frequency in KHz */ enum drx_bandwidth curr_bandwidth; /*< current channel bandwidth */ enum drx_mirror mirror; /*< current channel mirror */
/* signal quality information */
u32 fec_bits_desired; /*< BER accounting period */
u16 fec_vd_plen; /*< no of trellis symbols: VD SER measurement period */
u16 qam_vd_prescale; /*< Viterbi Measurement Prescale */
u16 qam_vd_period; /*< Viterbi Measurement period */
u16 fec_rs_plen; /*< defines RS BER measurement period */
u16 fec_rs_prescale; /*< ReedSolomon Measurement Prescale */
u16 fec_rs_period; /*< ReedSolomon Measurement period */ bool reset_pkt_err_acc; /*< Set a flag to reset accumulated packet error */
u16 pkt_err_acc_start; /*< Set a flag to reset accumulated packet error */
/* HI configuration */
u16 hi_cfg_timing_div; /*< HI Configure() parameter 2 */
u16 hi_cfg_bridge_delay; /*< HI Configure() parameter 3 */
u16 hi_cfg_wake_up_key; /*< HI Configure() parameter 4 */
u16 hi_cfg_ctrl; /*< HI Configure() parameter 5 */
u16 hi_cfg_transmit; /*< HI Configure() parameter 6 */
/* UIO configuration */ enum drxuio_mode uio_sma_rx_mode;/*< current mode of SmaRx pin */ enum drxuio_mode uio_sma_tx_mode;/*< current mode of SmaTx pin */ enum drxuio_mode uio_gpio_mode; /*< current mode of ASEL pin */ enum drxuio_mode uio_irqn_mode; /*< current mode of IRQN pin */
/* IQM fs frequency shift and inversion */
u32 iqm_fs_rate_ofs; /*< frequency shifter setting after setchannel */ bool pos_image; /*< True: positive image */ /* IQM RC frequency shift */
u32 iqm_rc_rate_ofs; /*< frequency shifter setting after setchannel */
/* ATV configuration */
u32 atv_cfg_changed_flags; /*< flag: flags cfg changes */
s16 atv_top_equ0[DRXJ_COEF_IDX_MAX]; /*< shadow of ATV_TOP_EQU0__A */
s16 atv_top_equ1[DRXJ_COEF_IDX_MAX]; /*< shadow of ATV_TOP_EQU1__A */
s16 atv_top_equ2[DRXJ_COEF_IDX_MAX]; /*< shadow of ATV_TOP_EQU2__A */
s16 atv_top_equ3[DRXJ_COEF_IDX_MAX]; /*< shadow of ATV_TOP_EQU3__A */ bool phase_correction_bypass;/*< flag: true=bypass */
s16 atv_top_vid_peak; /*< shadow of ATV_TOP_VID_PEAK__A */
u16 atv_top_noise_th; /*< shadow of ATV_TOP_NOISE_TH__A */ bool enable_cvbs_output; /*< flag CVBS output enable */ bool enable_sif_output; /*< flag SIF output enable */ enum drxjsif_attenuation sif_attenuation; /*< current SIF att setting */ /* Agc configuration for QAM and VSB */ struct drxj_cfg_agc qam_rf_agc_cfg; /*< qam RF AGC config */ struct drxj_cfg_agc qam_if_agc_cfg; /*< qam IF AGC config */ struct drxj_cfg_agc vsb_rf_agc_cfg; /*< vsb RF AGC config */ struct drxj_cfg_agc vsb_if_agc_cfg; /*< vsb IF AGC config */
/* PGA gain configuration for QAM and VSB */
u16 qam_pga_cfg; /*< qam PGA config */
u16 vsb_pga_cfg; /*< vsb PGA config */
/* Pre SAW configuration for QAM and VSB */ struct drxj_cfg_pre_saw qam_pre_saw_cfg; /*< qam pre SAW config */ struct drxj_cfg_pre_saw vsb_pre_saw_cfg; /*< qam pre SAW config */
/* Version information */ char v_text[2][12]; /*< allocated text versions */ struct drx_version v_version[2]; /*< allocated versions structs */ struct drx_version_list v_list_elements[2]; /*< allocated version list */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.