diff options
Diffstat (limited to 'linux/drivers/media/dvb/frontends/tda18271-priv.h')
-rw-r--r-- | linux/drivers/media/dvb/frontends/tda18271-priv.h | 70 |
1 files changed, 67 insertions, 3 deletions
diff --git a/linux/drivers/media/dvb/frontends/tda18271-priv.h b/linux/drivers/media/dvb/frontends/tda18271-priv.h index 912b81e0c..6e04258ca 100644 --- a/linux/drivers/media/dvb/frontends/tda18271-priv.h +++ b/linux/drivers/media/dvb/frontends/tda18271-priv.h @@ -1,7 +1,7 @@ /* tda18271-priv.h - private header for the NXP TDA18271 silicon tuner - Copyright (C) 2007 Michael Krufky (mkrufky@linuxtv.org) + Copyright (C) 2007, 2008 Michael Krufky <mkrufky@linuxtv.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -69,11 +69,33 @@ /*---------------------------------------------------------------------*/ +struct tda18271_rf_tracking_filter_cal { + u32 rfmax; + u8 rfband; + u32 rf1_def; + u32 rf2_def; + u32 rf3_def; + u32 rf1; + u32 rf2; + u32 rf3; + int rf_a1; + int rf_b1; + int rf_a2; + int rf_b2; +}; + enum tda18271_mode { TDA18271_ANALOG, TDA18271_DIGITAL, }; +struct tda18271_map_layout; + +enum tda18271_ver { + TDA18271HDC1, + TDA18271HDC2, +}; + struct tda18271_priv { u8 i2c_addr; struct i2c_adapter *i2c_adap; @@ -81,6 +103,16 @@ struct tda18271_priv { enum tda18271_mode mode; enum tda18271_i2c_gate gate; + enum tda18271_ver id; + + unsigned int cal_initialized:1; + + struct tda18271_map_layout *maps; + struct tda18271_std_map std; + struct tda18271_rf_tracking_filter_cal rf_cal_state[8]; + + int (*tune) (struct dvb_frontend *fe, + u32 ifc, u32 freq, u32 bw, u8 std); u32 frequency; u32 bandwidth; @@ -93,6 +125,7 @@ extern int tda18271_debug; #define DBG_INFO 1 #define DBG_MAP 2 #define DBG_REG 4 +#define DBG_ADV 8 #define tda_printk(kern, fmt, arg...) \ printk(kern "%s: " fmt, __FUNCTION__, ##arg) @@ -117,17 +150,48 @@ enum tda18271_map_type { /* tda18271_map */ RF_CAL, RF_CAL_KMCO, + RF_CAL_DC_OVER_DT, BP_FILTER, RF_BAND, GAIN_TAPER, IR_MEASURE, }; -extern int tda18271_lookup_pll_map(enum tda18271_map_type map_type, +extern int tda18271_lookup_pll_map(struct dvb_frontend *fe, + enum tda18271_map_type map_type, u32 *freq, u8 *post_div, u8 *div); -extern int tda18271_lookup_map(enum tda18271_map_type map_type, +extern int tda18271_lookup_map(struct dvb_frontend *fe, + enum tda18271_map_type map_type, u32 *freq, u8 *val); +extern int tda18271_lookup_thermometer(struct dvb_frontend *fe); + +extern int tda18271_lookup_rf_band(struct dvb_frontend *fe, + u32 *freq, u8 *rf_band); + +extern int tda18271_lookup_cid_target(struct dvb_frontend *fe, + u32 *freq, u8 *cid_target, + u16 *count_limit); + +extern int tda18271_assign_map_layout(struct dvb_frontend *fe); + +/*---------------------------------------------------------------------*/ + +extern int tda18271_read_regs(struct dvb_frontend *fe); +extern int tda18271_read_extended(struct dvb_frontend *fe); +extern int tda18271_write_regs(struct dvb_frontend *fe, int idx, int len); +extern int tda18271_init_regs(struct dvb_frontend *fe); + +extern int tda18271_calc_main_pll(struct dvb_frontend *fe, u32 freq); +extern int tda18271_calc_cal_pll(struct dvb_frontend *fe, u32 freq); + +extern int tda18271_calc_bp_filter(struct dvb_frontend *fe, u32 *freq); +extern int tda18271_calc_km(struct dvb_frontend *fe, u32 *freq); +extern int tda18271_calc_rf_band(struct dvb_frontend *fe, u32 *freq); +extern int tda18271_calc_gain_taper(struct dvb_frontend *fe, u32 *freq); +extern int tda18271_calc_ir_measure(struct dvb_frontend *fe, u32 *freq); +extern int tda18271_calc_rf_cal(struct dvb_frontend *fe, u32 *freq); + #endif /* __TDA18271_PRIV_H__ */ /* |