Searched refs:fe (Results 1 - 200 of 472) sorted by relevance

123

/linux-4.4.14/drivers/media/dvb-frontends/
H A Dcxd2820r_priv.h39 struct dvb_frontend fe; member in struct:cxd2820r_priv
59 int cxd2820r_gpio(struct dvb_frontend *fe, u8 *gpio);
79 int cxd2820r_get_frontend_c(struct dvb_frontend *fe);
81 int cxd2820r_set_frontend_c(struct dvb_frontend *fe);
83 int cxd2820r_read_status_c(struct dvb_frontend *fe, enum fe_status *status);
85 int cxd2820r_read_ber_c(struct dvb_frontend *fe, u32 *ber);
87 int cxd2820r_read_signal_strength_c(struct dvb_frontend *fe, u16 *strength);
89 int cxd2820r_read_snr_c(struct dvb_frontend *fe, u16 *snr);
91 int cxd2820r_read_ucblocks_c(struct dvb_frontend *fe, u32 *ucblocks);
93 int cxd2820r_init_c(struct dvb_frontend *fe);
95 int cxd2820r_sleep_c(struct dvb_frontend *fe);
97 int cxd2820r_get_tune_settings_c(struct dvb_frontend *fe,
102 int cxd2820r_get_frontend_t(struct dvb_frontend *fe);
104 int cxd2820r_set_frontend_t(struct dvb_frontend *fe);
106 int cxd2820r_read_status_t(struct dvb_frontend *fe, enum fe_status *status);
108 int cxd2820r_read_ber_t(struct dvb_frontend *fe, u32 *ber);
110 int cxd2820r_read_signal_strength_t(struct dvb_frontend *fe, u16 *strength);
112 int cxd2820r_read_snr_t(struct dvb_frontend *fe, u16 *snr);
114 int cxd2820r_read_ucblocks_t(struct dvb_frontend *fe, u32 *ucblocks);
116 int cxd2820r_init_t(struct dvb_frontend *fe);
118 int cxd2820r_sleep_t(struct dvb_frontend *fe);
120 int cxd2820r_get_tune_settings_t(struct dvb_frontend *fe,
125 int cxd2820r_get_frontend_t2(struct dvb_frontend *fe);
127 int cxd2820r_set_frontend_t2(struct dvb_frontend *fe);
129 int cxd2820r_read_status_t2(struct dvb_frontend *fe, enum fe_status *status);
131 int cxd2820r_read_ber_t2(struct dvb_frontend *fe, u32 *ber);
133 int cxd2820r_read_signal_strength_t2(struct dvb_frontend *fe, u16 *strength);
135 int cxd2820r_read_snr_t2(struct dvb_frontend *fe, u16 *snr);
137 int cxd2820r_read_ucblocks_t2(struct dvb_frontend *fe, u32 *ucblocks);
139 int cxd2820r_init_t2(struct dvb_frontend *fe);
141 int cxd2820r_sleep_t2(struct dvb_frontend *fe);
143 int cxd2820r_get_tune_settings_t2(struct dvb_frontend *fe,
H A Dstb6000.c44 static int stb6000_release(struct dvb_frontend *fe) stb6000_release() argument
46 kfree(fe->tuner_priv); stb6000_release()
47 fe->tuner_priv = NULL; stb6000_release()
51 static int stb6000_sleep(struct dvb_frontend *fe) stb6000_sleep() argument
53 struct stb6000_priv *priv = fe->tuner_priv; stb6000_sleep()
65 if (fe->ops.i2c_gate_ctrl) stb6000_sleep()
66 fe->ops.i2c_gate_ctrl(fe, 1); stb6000_sleep()
72 if (fe->ops.i2c_gate_ctrl) stb6000_sleep()
73 fe->ops.i2c_gate_ctrl(fe, 0); stb6000_sleep()
78 static int stb6000_set_params(struct dvb_frontend *fe) stb6000_set_params() argument
80 struct dtv_frontend_properties *p = &fe->dtv_property_cache; stb6000_set_params()
81 struct stb6000_priv *priv = fe->tuner_priv; stb6000_set_params()
146 if (fe->ops.i2c_gate_ctrl) stb6000_set_params()
147 fe->ops.i2c_gate_ctrl(fe, 1); stb6000_set_params()
154 if (fe->ops.i2c_gate_ctrl) stb6000_set_params()
155 fe->ops.i2c_gate_ctrl(fe, 0); stb6000_set_params()
164 if (fe->ops.i2c_gate_ctrl) stb6000_set_params()
165 fe->ops.i2c_gate_ctrl(fe, 1); stb6000_set_params()
172 if (fe->ops.i2c_gate_ctrl) stb6000_set_params()
173 fe->ops.i2c_gate_ctrl(fe, 0); stb6000_set_params()
182 static int stb6000_get_frequency(struct dvb_frontend *fe, u32 *frequency) stb6000_get_frequency() argument
184 struct stb6000_priv *priv = fe->tuner_priv; stb6000_get_frequency()
201 struct dvb_frontend *stb6000_attach(struct dvb_frontend *fe, int addr, stb6000_attach() argument
224 if (fe->ops.i2c_gate_ctrl) stb6000_attach()
225 fe->ops.i2c_gate_ctrl(fe, 1); stb6000_attach()
229 if (fe->ops.i2c_gate_ctrl) stb6000_attach()
230 fe->ops.i2c_gate_ctrl(fe, 0); stb6000_attach()
242 memcpy(&fe->ops.tuner_ops, &stb6000_tuner_ops, stb6000_attach()
245 fe->tuner_priv = priv; stb6000_attach()
247 return fe; stb6000_attach()
H A Dtua6100.c45 static int tua6100_release(struct dvb_frontend *fe) tua6100_release() argument
47 kfree(fe->tuner_priv); tua6100_release()
48 fe->tuner_priv = NULL; tua6100_release()
52 static int tua6100_sleep(struct dvb_frontend *fe) tua6100_sleep() argument
54 struct tua6100_priv *priv = fe->tuner_priv; tua6100_sleep()
59 if (fe->ops.i2c_gate_ctrl) tua6100_sleep()
60 fe->ops.i2c_gate_ctrl(fe, 1); tua6100_sleep()
64 if (fe->ops.i2c_gate_ctrl) tua6100_sleep()
65 fe->ops.i2c_gate_ctrl(fe, 0); tua6100_sleep()
70 static int tua6100_set_params(struct dvb_frontend *fe) tua6100_set_params() argument
72 struct dtv_frontend_properties *c = &fe->dtv_property_cache; tua6100_set_params()
73 struct tua6100_priv *priv = fe->tuner_priv; tua6100_set_params()
132 if (fe->ops.i2c_gate_ctrl) tua6100_set_params()
133 fe->ops.i2c_gate_ctrl(fe, 1); tua6100_set_params()
137 if (fe->ops.i2c_gate_ctrl) tua6100_set_params()
138 fe->ops.i2c_gate_ctrl(fe, 1); tua6100_set_params()
142 if (fe->ops.i2c_gate_ctrl) tua6100_set_params()
143 fe->ops.i2c_gate_ctrl(fe, 1); tua6100_set_params()
147 if (fe->ops.i2c_gate_ctrl) tua6100_set_params()
148 fe->ops.i2c_gate_ctrl(fe, 0); tua6100_set_params()
153 static int tua6100_get_frequency(struct dvb_frontend *fe, u32 *frequency) tua6100_get_frequency() argument
155 struct tua6100_priv *priv = fe->tuner_priv; tua6100_get_frequency()
173 struct dvb_frontend *tua6100_attach(struct dvb_frontend *fe, int addr, struct i2c_adapter *i2c) tua6100_attach() argument
182 if (fe->ops.i2c_gate_ctrl) tua6100_attach()
183 fe->ops.i2c_gate_ctrl(fe, 1); tua6100_attach()
185 if (fe->ops.i2c_gate_ctrl) tua6100_attach()
186 fe->ops.i2c_gate_ctrl(fe, 0); tua6100_attach()
198 memcpy(&fe->ops.tuner_ops, &tua6100_tuner_ops, sizeof(struct dvb_tuner_ops)); tua6100_attach()
199 fe->tuner_priv = priv; tua6100_attach()
200 return fe; tua6100_attach()
H A Ddib9000.h33 extern struct i2c_adapter *dib9000_get_tuner_interface(struct dvb_frontend *fe);
34 extern struct i2c_adapter *dib9000_get_i2c_master(struct dvb_frontend *fe, enum dibx000_i2c_interface intf, int gating);
35 extern int dib9000_set_gpio(struct dvb_frontend *fe, u8 num, u8 dir, u8 val);
36 extern int dib9000_fw_pid_filter_ctrl(struct dvb_frontend *fe, u8 onoff);
37 extern int dib9000_fw_pid_filter(struct dvb_frontend *fe, u8 id, u16 pid, u8 onoff);
38 extern int dib9000_firmware_post_pll_init(struct dvb_frontend *fe);
39 extern int dib9000_set_slave_frontend(struct dvb_frontend *fe, struct dvb_frontend *fe_slave);
40 extern int dib9000_remove_slave_frontend(struct dvb_frontend *fe);
41 extern struct dvb_frontend *dib9000_get_slave_frontend(struct dvb_frontend *fe, int slave_index);
42 extern struct i2c_adapter *dib9000_get_component_bus_interface(struct dvb_frontend *fe);
43 extern int dib9000_set_i2c_adapter(struct dvb_frontend *fe, struct i2c_adapter *i2c);
44 extern int dib9000_fw_set_component_bus_speed(struct dvb_frontend *fe, u16 speed);
52 static inline struct i2c_adapter *dib9000_get_i2c_master(struct dvb_frontend *fe, enum dibx000_i2c_interface intf, int gating) dib9000_get_i2c_master() argument
64 static inline struct i2c_adapter *dib9000_get_tuner_interface(struct dvb_frontend *fe) dib9000_get_tuner_interface() argument
70 static inline int dib9000_set_gpio(struct dvb_frontend *fe, u8 num, u8 dir, u8 val) dib9000_set_gpio() argument
76 static inline int dib9000_fw_pid_filter_ctrl(struct dvb_frontend *fe, u8 onoff) dib9000_fw_pid_filter_ctrl() argument
82 static inline int dib9000_fw_pid_filter(struct dvb_frontend *fe, u8 id, u16 pid, u8 onoff) dib9000_fw_pid_filter() argument
88 static inline int dib9000_firmware_post_pll_init(struct dvb_frontend *fe) dib9000_firmware_post_pll_init() argument
94 static inline int dib9000_set_slave_frontend(struct dvb_frontend *fe, struct dvb_frontend *fe_slave) dib9000_set_slave_frontend() argument
100 static inline int dib9000_remove_slave_frontend(struct dvb_frontend *fe) dib9000_remove_slave_frontend() argument
106 static inline struct dvb_frontend *dib9000_get_slave_frontend(struct dvb_frontend *fe, int slave_index) dib9000_get_slave_frontend() argument
112 static inline struct i2c_adapter *dib9000_get_component_bus_interface(struct dvb_frontend *fe) dib9000_get_component_bus_interface() argument
118 static inline int dib9000_set_i2c_adapter(struct dvb_frontend *fe, struct i2c_adapter *i2c) dib9000_set_i2c_adapter() argument
124 static inline int dib9000_fw_set_component_bus_speed(struct dvb_frontend *fe, u16 speed) dib9000_fw_set_component_bus_speed() argument
H A Ddib8000.h43 int (*set_wbd_ref)(struct dvb_frontend *fe, u16 value);
44 int (*update_pll)(struct dvb_frontend *fe,
46 int (*set_gpio)(struct dvb_frontend *fe, u8 num, u8 dir, u8 val);
47 void (*pwm_agc_reset)(struct dvb_frontend *fe);
48 struct i2c_adapter *(*get_i2c_tuner)(struct dvb_frontend *fe);
49 int (*tuner_sleep)(struct dvb_frontend *fe, int onoff);
50 s32 (*get_adc_power)(struct dvb_frontend *fe, u8 mode);
51 int (*get_dc_power)(struct dvb_frontend *fe, u8 IQ);
52 u32 (*ctrl_timf)(struct dvb_frontend *fe, uint8_t op, uint32_t timf);
53 enum frontend_tune_state (*get_tune_state)(struct dvb_frontend *fe);
54 int (*set_tune_state)(struct dvb_frontend *fe, enum frontend_tune_state tune_state);
55 int (*set_slave_frontend)(struct dvb_frontend *fe, struct dvb_frontend *fe_slave);
56 int (*remove_slave_frontend)(struct dvb_frontend *fe);
57 struct dvb_frontend *(*get_slave_frontend)(struct dvb_frontend *fe, int slave_index);
60 struct i2c_adapter *(*get_i2c_master)(struct dvb_frontend *fe, enum dibx000_i2c_interface intf, int gating);
61 int (*pid_filter_ctrl)(struct dvb_frontend *fe, u8 onoff);
62 int (*pid_filter)(struct dvb_frontend *fe, u8 id, u16 pid, u8 onoff);
H A Dtda826x.c44 static int tda826x_release(struct dvb_frontend *fe) tda826x_release() argument
46 kfree(fe->tuner_priv); tda826x_release()
47 fe->tuner_priv = NULL; tda826x_release()
51 static int tda826x_sleep(struct dvb_frontend *fe) tda826x_sleep() argument
53 struct tda826x_priv *priv = fe->tuner_priv; tda826x_sleep()
63 if (fe->ops.i2c_gate_ctrl) tda826x_sleep()
64 fe->ops.i2c_gate_ctrl(fe, 1); tda826x_sleep()
68 if (fe->ops.i2c_gate_ctrl) tda826x_sleep()
69 fe->ops.i2c_gate_ctrl(fe, 0); tda826x_sleep()
74 static int tda826x_set_params(struct dvb_frontend *fe) tda826x_set_params() argument
76 struct dtv_frontend_properties *p = &fe->dtv_property_cache; tda826x_set_params()
77 struct tda826x_priv *priv = fe->tuner_priv; tda826x_set_params()
112 if (fe->ops.i2c_gate_ctrl) tda826x_set_params()
113 fe->ops.i2c_gate_ctrl(fe, 1); tda826x_set_params()
117 if (fe->ops.i2c_gate_ctrl) tda826x_set_params()
118 fe->ops.i2c_gate_ctrl(fe, 0); tda826x_set_params()
125 static int tda826x_get_frequency(struct dvb_frontend *fe, u32 *frequency) tda826x_get_frequency() argument
127 struct tda826x_priv *priv = fe->tuner_priv; tda826x_get_frequency()
144 struct dvb_frontend *tda826x_attach(struct dvb_frontend *fe, int addr, struct i2c_adapter *i2c, int has_loopthrough) tda826x_attach() argument
156 if (fe->ops.i2c_gate_ctrl) tda826x_attach()
157 fe->ops.i2c_gate_ctrl(fe, 1); tda826x_attach()
159 if (fe->ops.i2c_gate_ctrl) tda826x_attach()
160 fe->ops.i2c_gate_ctrl(fe, 0); tda826x_attach()
175 memcpy(&fe->ops.tuner_ops, &tda826x_tuner_ops, sizeof(struct dvb_tuner_ops)); tda826x_attach()
177 fe->tuner_priv = priv; tda826x_attach()
179 return fe; tda826x_attach()
H A Dstv6110.c62 static int stv6110_release(struct dvb_frontend *fe) stv6110_release() argument
64 kfree(fe->tuner_priv); stv6110_release()
65 fe->tuner_priv = NULL; stv6110_release()
69 static int stv6110_write_regs(struct dvb_frontend *fe, u8 buf[], stv6110_write_regs() argument
72 struct stv6110_priv *priv = fe->tuner_priv; stv6110_write_regs()
97 if (fe->ops.i2c_gate_ctrl) stv6110_write_regs()
98 fe->ops.i2c_gate_ctrl(fe, 1); stv6110_write_regs()
104 if (fe->ops.i2c_gate_ctrl) stv6110_write_regs()
105 fe->ops.i2c_gate_ctrl(fe, 0); stv6110_write_regs()
110 static int stv6110_read_regs(struct dvb_frontend *fe, u8 regs[], stv6110_read_regs() argument
113 struct stv6110_priv *priv = fe->tuner_priv; stv6110_read_regs()
130 if (fe->ops.i2c_gate_ctrl) stv6110_read_regs()
131 fe->ops.i2c_gate_ctrl(fe, 1); stv6110_read_regs()
137 if (fe->ops.i2c_gate_ctrl) stv6110_read_regs()
138 fe->ops.i2c_gate_ctrl(fe, 0); stv6110_read_regs()
145 static int stv6110_read_reg(struct dvb_frontend *fe, int start) stv6110_read_reg() argument
148 stv6110_read_regs(fe, buf, start, 1); stv6110_read_reg()
153 static int stv6110_sleep(struct dvb_frontend *fe) stv6110_sleep() argument
156 stv6110_write_regs(fe, reg, 0, 1); stv6110_sleep()
180 static int stv6110_set_bandwidth(struct dvb_frontend *fe, u32 bandwidth) stv6110_set_bandwidth() argument
182 struct stv6110_priv *priv = fe->tuner_priv; stv6110_set_bandwidth()
197 stv6110_write_regs(fe, &priv->regs[RSTV6110_CTRL3], RSTV6110_CTRL3, 1); stv6110_set_bandwidth()
200 stv6110_write_regs(fe, &priv->regs[RSTV6110_STAT1], RSTV6110_STAT1, 1); stv6110_set_bandwidth()
205 ret = ((stv6110_read_reg(fe, RSTV6110_STAT1)) & 0x02); stv6110_set_bandwidth()
212 stv6110_write_regs(fe, &priv->regs[RSTV6110_CTRL3], RSTV6110_CTRL3, 1); stv6110_set_bandwidth()
216 static int stv6110_init(struct dvb_frontend *fe) stv6110_init() argument
218 struct stv6110_priv *priv = fe->tuner_priv; stv6110_init()
231 stv6110_write_regs(fe, &priv->regs[RSTV6110_CTRL1], RSTV6110_CTRL1, 8); stv6110_init()
233 stv6110_set_bandwidth(fe, 72000000); stv6110_init()
238 static int stv6110_get_frequency(struct dvb_frontend *fe, u32 *frequency) stv6110_get_frequency() argument
240 struct stv6110_priv *priv = fe->tuner_priv; stv6110_get_frequency()
244 stv6110_read_regs(fe, regs, 0, 8); stv6110_get_frequency()
263 static int stv6110_set_frequency(struct dvb_frontend *fe, u32 frequency) stv6110_set_frequency() argument
265 struct stv6110_priv *priv = fe->tuner_priv; stv6110_set_frequency()
266 struct dtv_frontend_properties *c = &fe->dtv_property_cache; stv6110_set_frequency()
281 if (fe->ops.set_property && fe->ops.get_property) { stv6110_set_frequency()
339 stv6110_write_regs(fe, &priv->regs[RSTV6110_CTRL1], stv6110_set_frequency()
345 ret = ((stv6110_read_reg(fe, RSTV6110_STAT1)) & 0x04); stv6110_set_frequency()
350 ret = stv6110_read_reg(fe, RSTV6110_STAT1); stv6110_set_frequency()
351 stv6110_get_frequency(fe, &result_freq); stv6110_set_frequency()
360 static int stv6110_set_params(struct dvb_frontend *fe) stv6110_set_params() argument
362 struct dtv_frontend_properties *c = &fe->dtv_property_cache; stv6110_set_params()
365 stv6110_set_frequency(fe, c->frequency); stv6110_set_params()
366 stv6110_set_bandwidth(fe, bandwidth); stv6110_set_params()
371 static int stv6110_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth) stv6110_get_bandwidth() argument
373 struct stv6110_priv *priv = fe->tuner_priv; stv6110_get_bandwidth()
376 stv6110_read_regs(fe, regs, 0, 8); stv6110_get_bandwidth()
403 struct dvb_frontend *stv6110_attach(struct dvb_frontend *fe, stv6110_attach() argument
424 if (fe->ops.i2c_gate_ctrl) stv6110_attach()
425 fe->ops.i2c_gate_ctrl(fe, 1); stv6110_attach()
429 if (fe->ops.i2c_gate_ctrl) stv6110_attach()
430 fe->ops.i2c_gate_ctrl(fe, 0); stv6110_attach()
447 memcpy(&fe->ops.tuner_ops, &stv6110_tuner_ops, stv6110_attach()
449 fe->tuner_priv = priv; stv6110_attach()
452 return fe; stv6110_attach()
H A Dstb6100_proc.h20 static int stb6100_get_freq(struct dvb_frontend *fe, u32 *frequency) stb6100_get_freq() argument
22 struct dvb_frontend_ops *frontend_ops = &fe->ops; stb6100_get_freq()
29 frontend_ops->i2c_gate_ctrl(fe, 1); stb6100_get_freq()
31 err = tuner_ops->get_state(fe, DVBFE_TUNER_FREQUENCY, &state); stb6100_get_freq()
38 frontend_ops->i2c_gate_ctrl(fe, 0); stb6100_get_freq()
46 static int stb6100_set_freq(struct dvb_frontend *fe, u32 frequency) stb6100_set_freq() argument
48 struct dvb_frontend_ops *frontend_ops = &fe->ops; stb6100_set_freq()
57 frontend_ops->i2c_gate_ctrl(fe, 1); stb6100_set_freq()
59 err = tuner_ops->set_state(fe, DVBFE_TUNER_FREQUENCY, &state); stb6100_set_freq()
66 frontend_ops->i2c_gate_ctrl(fe, 0); stb6100_set_freq()
73 static int stb6100_get_bandw(struct dvb_frontend *fe, u32 *bandwidth) stb6100_get_bandw() argument
75 struct dvb_frontend_ops *frontend_ops = &fe->ops; stb6100_get_bandw()
82 frontend_ops->i2c_gate_ctrl(fe, 1); stb6100_get_bandw()
84 err = tuner_ops->get_state(fe, DVBFE_TUNER_BANDWIDTH, &state); stb6100_get_bandw()
91 frontend_ops->i2c_gate_ctrl(fe, 0); stb6100_get_bandw()
99 static int stb6100_set_bandw(struct dvb_frontend *fe, u32 bandwidth) stb6100_set_bandw() argument
101 struct dvb_frontend_ops *frontend_ops = &fe->ops; stb6100_set_bandw()
110 frontend_ops->i2c_gate_ctrl(fe, 1); stb6100_set_bandw()
112 err = tuner_ops->set_state(fe, DVBFE_TUNER_BANDWIDTH, &state); stb6100_set_bandw()
119 frontend_ops->i2c_gate_ctrl(fe, 0); stb6100_set_bandw()
H A Dzl10353.c53 static int zl10353_single_write(struct dvb_frontend *fe, u8 reg, u8 val) zl10353_single_write() argument
55 struct zl10353_state *state = fe->demodulator_priv; zl10353_single_write()
67 static int zl10353_write(struct dvb_frontend *fe, const u8 ibuf[], int ilen) zl10353_write() argument
71 if ((err = zl10353_single_write(fe, ibuf[0] + i, ibuf[i + 1]))) zl10353_write()
100 static void zl10353_dump_regs(struct dvb_frontend *fe) zl10353_dump_regs() argument
102 struct zl10353_state *state = fe->demodulator_priv; zl10353_dump_regs()
124 static void zl10353_calc_nominal_rate(struct dvb_frontend *fe, zl10353_calc_nominal_rate() argument
128 struct zl10353_state *state = fe->demodulator_priv; zl10353_calc_nominal_rate()
145 static void zl10353_calc_input_freq(struct dvb_frontend *fe, zl10353_calc_input_freq() argument
148 struct zl10353_state *state = fe->demodulator_priv; zl10353_calc_input_freq()
174 static int zl10353_sleep(struct dvb_frontend *fe) zl10353_sleep() argument
178 zl10353_write(fe, zl10353_softdown, sizeof(zl10353_softdown)); zl10353_sleep()
182 static int zl10353_set_parameters(struct dvb_frontend *fe) zl10353_set_parameters() argument
184 struct dtv_frontend_properties *c = &fe->dtv_property_cache; zl10353_set_parameters()
185 struct zl10353_state *state = fe->demodulator_priv; zl10353_set_parameters()
192 zl10353_single_write(fe, RESET, 0x80); zl10353_set_parameters()
194 zl10353_single_write(fe, 0xEA, 0x01); zl10353_set_parameters()
196 zl10353_single_write(fe, 0xEA, 0x00); zl10353_set_parameters()
198 zl10353_single_write(fe, AGC_TARGET, 0x28); zl10353_set_parameters()
204 zl10353_single_write(fe, ACQ_CTL, acq_ctl); zl10353_set_parameters()
209 zl10353_single_write(fe, MCLK_RATIO, 0x97); zl10353_set_parameters()
210 zl10353_single_write(fe, 0x64, 0x34); zl10353_set_parameters()
211 zl10353_single_write(fe, 0xcc, 0xdd); zl10353_set_parameters()
214 zl10353_single_write(fe, MCLK_RATIO, 0x86); zl10353_set_parameters()
215 zl10353_single_write(fe, 0x64, 0x35); zl10353_set_parameters()
216 zl10353_single_write(fe, 0xcc, 0x73); zl10353_set_parameters()
222 zl10353_single_write(fe, MCLK_RATIO, 0x75); zl10353_set_parameters()
223 zl10353_single_write(fe, 0x64, 0x36); zl10353_set_parameters()
224 zl10353_single_write(fe, 0xcc, 0x73); zl10353_set_parameters()
227 zl10353_calc_nominal_rate(fe, c->bandwidth_hz, &nominal_rate); zl10353_set_parameters()
228 zl10353_single_write(fe, TRL_NOMINAL_RATE_1, msb(nominal_rate)); zl10353_set_parameters()
229 zl10353_single_write(fe, TRL_NOMINAL_RATE_0, lsb(nominal_rate)); zl10353_set_parameters()
232 zl10353_calc_input_freq(fe, &input_freq); zl10353_set_parameters()
233 zl10353_single_write(fe, INPUT_FREQ_1, msb(input_freq)); zl10353_set_parameters()
234 zl10353_single_write(fe, INPUT_FREQ_0, lsb(input_freq)); zl10353_set_parameters()
340 zl10353_single_write(fe, TPS_GIVEN_1, msb(tps)); zl10353_set_parameters()
341 zl10353_single_write(fe, TPS_GIVEN_0, lsb(tps)); zl10353_set_parameters()
343 if (fe->ops.i2c_gate_ctrl) zl10353_set_parameters()
344 fe->ops.i2c_gate_ctrl(fe, 0); zl10353_set_parameters()
352 if (fe->ops.tuner_ops.set_params) { zl10353_set_parameters()
353 fe->ops.tuner_ops.set_params(fe); zl10353_set_parameters()
354 if (fe->ops.i2c_gate_ctrl) zl10353_set_parameters()
355 fe->ops.i2c_gate_ctrl(fe, 0); zl10353_set_parameters()
357 } else if (fe->ops.tuner_ops.calc_regs) { zl10353_set_parameters()
358 fe->ops.tuner_ops.calc_regs(fe, pllbuf + 1, 5); zl10353_set_parameters()
360 zl10353_write(fe, pllbuf, sizeof(pllbuf)); zl10353_set_parameters()
363 zl10353_single_write(fe, 0x5F, 0x13); zl10353_set_parameters()
366 if (state->config.no_tuner || fe->ops.tuner_ops.calc_regs == NULL) zl10353_set_parameters()
367 zl10353_single_write(fe, FSM_GO, 0x01); zl10353_set_parameters()
369 zl10353_single_write(fe, TUNER_GO, 0x01); zl10353_set_parameters()
374 static int zl10353_get_parameters(struct dvb_frontend *fe) zl10353_get_parameters() argument
376 struct dtv_frontend_properties *c = &fe->dtv_property_cache; zl10353_get_parameters()
377 struct zl10353_state *state = fe->demodulator_priv; zl10353_get_parameters()
465 static int zl10353_read_status(struct dvb_frontend *fe, enum fe_status *status) zl10353_read_status() argument
467 struct zl10353_state *state = fe->demodulator_priv; zl10353_read_status()
496 static int zl10353_read_ber(struct dvb_frontend *fe, u32 *ber) zl10353_read_ber() argument
498 struct zl10353_state *state = fe->demodulator_priv; zl10353_read_ber()
507 static int zl10353_read_signal_strength(struct dvb_frontend *fe, u16 *strength) zl10353_read_signal_strength() argument
509 struct zl10353_state *state = fe->demodulator_priv; zl10353_read_signal_strength()
519 static int zl10353_read_snr(struct dvb_frontend *fe, u16 *snr) zl10353_read_snr() argument
521 struct zl10353_state *state = fe->demodulator_priv; zl10353_read_snr()
525 zl10353_dump_regs(fe); zl10353_read_snr()
533 static int zl10353_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) zl10353_read_ucblocks() argument
535 struct zl10353_state *state = fe->demodulator_priv; zl10353_read_ucblocks()
547 static int zl10353_get_tune_settings(struct dvb_frontend *fe, zl10353_get_tune_settings() argument
558 static int zl10353_init(struct dvb_frontend *fe) zl10353_init() argument
560 struct zl10353_state *state = fe->demodulator_priv; zl10353_init()
564 zl10353_dump_regs(fe); zl10353_init()
575 zl10353_write(fe, zl10353_reset_attach, zl10353_init()
578 zl10353_dump_regs(fe); zl10353_init()
584 static int zl10353_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) zl10353_i2c_gate_ctrl() argument
586 struct zl10353_state *state = fe->demodulator_priv; zl10353_i2c_gate_ctrl()
598 return zl10353_single_write(fe, 0x62, val); zl10353_i2c_gate_ctrl()
601 static void zl10353_release(struct dvb_frontend *fe) zl10353_release() argument
603 struct zl10353_state *state = fe->demodulator_priv; zl10353_release()
H A Ddib0090.h79 extern struct dvb_frontend *dib0090_register(struct dvb_frontend *fe, struct i2c_adapter *i2c, const struct dib0090_config *config);
80 extern struct dvb_frontend *dib0090_fw_register(struct dvb_frontend *fe, struct i2c_adapter *i2c, const struct dib0090_config *config);
81 extern void dib0090_dcc_freq(struct dvb_frontend *fe, u8 fast);
82 extern void dib0090_pwm_gain_reset(struct dvb_frontend *fe);
84 extern u16 dib0090_get_wbd_offset(struct dvb_frontend *fe);
85 extern int dib0090_gain_control(struct dvb_frontend *fe);
86 extern enum frontend_tune_state dib0090_get_tune_state(struct dvb_frontend *fe);
87 extern int dib0090_set_tune_state(struct dvb_frontend *fe, enum frontend_tune_state tune_state);
88 extern void dib0090_get_current_gain(struct dvb_frontend *fe, u16 * rf, u16 * bb, u16 * rf_gain_limit, u16 * rflt);
89 extern void dib0090_set_dc_servo(struct dvb_frontend *fe, u8 DC_servo_cutoff);
90 extern int dib0090_set_switch(struct dvb_frontend *fe, u8 sw1, u8 sw2, u8 sw3);
91 extern int dib0090_set_vga(struct dvb_frontend *fe, u8 onoff);
92 extern int dib0090_update_rframp_7090(struct dvb_frontend *fe,
94 extern int dib0090_update_tuning_table_7090(struct dvb_frontend *fe,
97 static inline struct dvb_frontend *dib0090_register(struct dvb_frontend *fe, struct i2c_adapter *i2c, const struct dib0090_config *config) dib0090_register() argument
103 static inline struct dvb_frontend *dib0090_fw_register(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct dib0090_config *config) dib0090_fw_register() argument
109 static inline void dib0090_dcc_freq(struct dvb_frontend *fe, u8 fast) dib0090_dcc_freq() argument
114 static inline void dib0090_pwm_gain_reset(struct dvb_frontend *fe) dib0090_pwm_gain_reset() argument
125 static inline u16 dib0090_get_wbd_offset(struct dvb_frontend *fe) dib0090_get_wbd_offset() argument
131 static inline int dib0090_gain_control(struct dvb_frontend *fe) dib0090_gain_control() argument
137 static inline enum frontend_tune_state dib0090_get_tune_state(struct dvb_frontend *fe) dib0090_get_tune_state() argument
143 static inline int dib0090_set_tune_state(struct dvb_frontend *fe, enum frontend_tune_state tune_state) dib0090_set_tune_state() argument
149 static inline void dib0090_get_current_gain(struct dvb_frontend *fe, u16 * rf, u16 * bb, u16 * rf_gain_limit, u16 * rflt) dib0090_get_current_gain() argument
154 static inline void dib0090_set_dc_servo(struct dvb_frontend *fe, u8 DC_servo_cutoff) dib0090_set_dc_servo() argument
159 static inline int dib0090_set_switch(struct dvb_frontend *fe, dib0090_set_switch() argument
166 static inline int dib0090_set_vga(struct dvb_frontend *fe, u8 onoff) dib0090_set_vga() argument
172 static inline int dib0090_update_rframp_7090(struct dvb_frontend *fe, dib0090_update_rframp_7090() argument
179 static inline int dib0090_update_tuning_table_7090(struct dvb_frontend *fe, dib0090_update_tuning_table_7090() argument
H A Dzl10039.c144 static int zl10039_init(struct dvb_frontend *fe) zl10039_init() argument
146 struct zl10039_state *state = fe->tuner_priv; zl10039_init()
150 if (fe->ops.i2c_gate_ctrl) zl10039_init()
151 fe->ops.i2c_gate_ctrl(fe, 1); zl10039_init()
164 if (fe->ops.i2c_gate_ctrl) zl10039_init()
165 fe->ops.i2c_gate_ctrl(fe, 0); zl10039_init()
170 static int zl10039_sleep(struct dvb_frontend *fe) zl10039_sleep() argument
172 struct zl10039_state *state = fe->tuner_priv; zl10039_sleep()
176 if (fe->ops.i2c_gate_ctrl) zl10039_sleep()
177 fe->ops.i2c_gate_ctrl(fe, 1); zl10039_sleep()
183 if (fe->ops.i2c_gate_ctrl) zl10039_sleep()
184 fe->ops.i2c_gate_ctrl(fe, 0); zl10039_sleep()
189 static int zl10039_set_params(struct dvb_frontend *fe) zl10039_set_params() argument
191 struct dtv_frontend_properties *c = &fe->dtv_property_cache; zl10039_set_params()
192 struct zl10039_state *state = fe->tuner_priv; zl10039_set_params()
224 if (fe->ops.i2c_gate_ctrl) zl10039_set_params()
225 fe->ops.i2c_gate_ctrl(fe, 1); zl10039_set_params()
240 if (fe->ops.i2c_gate_ctrl) zl10039_set_params()
241 fe->ops.i2c_gate_ctrl(fe, 0); zl10039_set_params()
248 static int zl10039_release(struct dvb_frontend *fe) zl10039_release() argument
250 struct zl10039_state *state = fe->tuner_priv; zl10039_release()
254 fe->tuner_priv = NULL; zl10039_release()
265 struct dvb_frontend *zl10039_attach(struct dvb_frontend *fe, zl10039_attach() argument
279 if (fe->ops.i2c_gate_ctrl) zl10039_attach()
280 fe->ops.i2c_gate_ctrl(fe, 1); zl10039_attach()
284 if (fe->ops.i2c_gate_ctrl) zl10039_attach()
285 fe->ops.i2c_gate_ctrl(fe, 0); zl10039_attach()
289 if (fe->ops.i2c_gate_ctrl) zl10039_attach()
290 fe->ops.i2c_gate_ctrl(fe, 0); zl10039_attach()
295 strcpy(fe->ops.tuner_ops.info.name, zl10039_attach()
303 memcpy(&fe->ops.tuner_ops, &zl10039_ops, sizeof(struct dvb_tuner_ops)); zl10039_attach()
304 fe->tuner_priv = state; zl10039_attach()
306 return fe; zl10039_attach()
H A Ddib7000p.h51 int (*get_agc_values)(struct dvb_frontend *fe,
53 int (*set_agc1_min)(struct dvb_frontend *fe, u16 v);
54 int (*update_pll)(struct dvb_frontend *fe, struct dibx000_bandwidth_config *bw);
56 u32 (*ctrl_timf)(struct dvb_frontend *fe, u8 op, u32 timf);
59 int (*pid_filter_ctrl)(struct dvb_frontend *fe, u8 onoff);
60 int (*pid_filter)(struct dvb_frontend *fe, u8 id, u16 pid, u8 onoff);
62 struct i2c_adapter *(*get_i2c_tuner)(struct dvb_frontend *fe);
63 int (*tuner_sleep)(struct dvb_frontend *fe, int onoff);
64 int (*get_adc_power)(struct dvb_frontend *fe);
65 int (*slave_reset)(struct dvb_frontend *fe);
H A Dstv6110x.h42 int (*tuner_init) (struct dvb_frontend *fe);
43 int (*tuner_sleep) (struct dvb_frontend *fe);
44 int (*tuner_set_mode) (struct dvb_frontend *fe, enum tuner_mode mode);
45 int (*tuner_set_frequency) (struct dvb_frontend *fe, u32 frequency);
46 int (*tuner_get_frequency) (struct dvb_frontend *fe, u32 *frequency);
47 int (*tuner_set_bandwidth) (struct dvb_frontend *fe, u32 bandwidth);
48 int (*tuner_get_bandwidth) (struct dvb_frontend *fe, u32 *bandwidth);
49 int (*tuner_set_bbgain) (struct dvb_frontend *fe, u32 gain);
50 int (*tuner_get_bbgain) (struct dvb_frontend *fe, u32 *gain);
51 int (*tuner_set_refclk) (struct dvb_frontend *fe, u32 refclk);
52 int (*tuner_get_status) (struct dvb_frontend *fe, u32 *status);
58 extern struct stv6110x_devctl *stv6110x_attach(struct dvb_frontend *fe,
63 static inline struct stv6110x_devctl *stv6110x_attach(struct dvb_frontend *fe, stv6110x_attach() argument
H A Dstb6100_cfg.h22 static int stb6100_get_frequency(struct dvb_frontend *fe, u32 *frequency) stb6100_get_frequency() argument
24 struct dvb_frontend_ops *frontend_ops = &fe->ops; stb6100_get_frequency()
30 err = tuner_ops->get_state(fe, DVBFE_TUNER_FREQUENCY, &t_state); stb6100_get_frequency()
40 static int stb6100_set_frequency(struct dvb_frontend *fe, u32 frequency) stb6100_set_frequency() argument
42 struct dvb_frontend_ops *frontend_ops = &fe->ops; stb6100_set_frequency()
50 err = tuner_ops->set_state(fe, DVBFE_TUNER_FREQUENCY, &t_state); stb6100_set_frequency()
59 static int stb6100_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth) stb6100_get_bandwidth() argument
61 struct dvb_frontend_ops *frontend_ops = &fe->ops; stb6100_get_bandwidth()
67 err = tuner_ops->get_state(fe, DVBFE_TUNER_BANDWIDTH, &t_state); stb6100_get_bandwidth()
77 static int stb6100_set_bandwidth(struct dvb_frontend *fe, u32 bandwidth) stb6100_set_bandwidth() argument
79 struct dvb_frontend_ops *frontend_ops = &fe->ops; stb6100_set_bandwidth()
87 err = tuner_ops->set_state(fe, DVBFE_TUNER_BANDWIDTH, &t_state); stb6100_set_bandwidth()
H A Dlnbp22.c51 static int lnbp22_set_voltage(struct dvb_frontend *fe, lnbp22_set_voltage() argument
54 struct lnbp22 *lnbp22 = (struct lnbp22 *)fe->sec_priv; lnbp22_set_voltage()
83 static int lnbp22_enable_high_lnb_voltage(struct dvb_frontend *fe, long arg) lnbp22_enable_high_lnb_voltage() argument
85 struct lnbp22 *lnbp22 = (struct lnbp22 *) fe->sec_priv; lnbp22_enable_high_lnb_voltage()
102 static void lnbp22_release(struct dvb_frontend *fe) lnbp22_release() argument
106 lnbp22_set_voltage(fe, SEC_VOLTAGE_OFF); lnbp22_release()
109 kfree(fe->sec_priv); lnbp22_release()
110 fe->sec_priv = NULL; lnbp22_release()
113 struct dvb_frontend *lnbp22_attach(struct dvb_frontend *fe, lnbp22_attach() argument
126 fe->sec_priv = lnbp22; lnbp22_attach()
129 if (lnbp22_set_voltage(fe, SEC_VOLTAGE_OFF)) { lnbp22_attach()
132 fe->sec_priv = NULL; lnbp22_attach()
137 fe->ops.release_sec = lnbp22_release; lnbp22_attach()
140 fe->ops.set_voltage = lnbp22_set_voltage; lnbp22_attach()
141 fe->ops.enable_high_lnb_voltage = lnbp22_enable_high_lnb_voltage; lnbp22_attach()
143 return fe; lnbp22_attach()
H A Dsi21xx.h28 static inline int si21xx_writeregister(struct dvb_frontend *fe, u8 reg, u8 val) si21xx_writeregister() argument
32 if (fe->ops.write) si21xx_writeregister()
33 r = fe->ops.write(fe, buf, 2); si21xx_writeregister()
H A Ds5h1409.c349 static int s5h1409_softreset(struct dvb_frontend *fe) s5h1409_softreset() argument
351 struct s5h1409_state *state = fe->demodulator_priv; s5h1409_softreset()
365 static int s5h1409_set_if_freq(struct dvb_frontend *fe, int KHz) s5h1409_set_if_freq() argument
367 struct s5h1409_state *state = fe->demodulator_priv; s5h1409_set_if_freq()
390 static int s5h1409_set_spectralinversion(struct dvb_frontend *fe, int inverted) s5h1409_set_spectralinversion() argument
392 struct s5h1409_state *state = fe->demodulator_priv; s5h1409_set_spectralinversion()
402 static int s5h1409_enable_modulation(struct dvb_frontend *fe, s5h1409_enable_modulation() argument
405 struct s5h1409_state *state = fe->demodulator_priv; s5h1409_enable_modulation()
413 s5h1409_set_if_freq(fe, S5H1409_VSB_IF_FREQ); s5h1409_enable_modulation()
421 s5h1409_set_if_freq(fe, S5H1409_QAM_IF_FREQ); s5h1409_enable_modulation()
431 s5h1409_softreset(fe); s5h1409_enable_modulation()
436 static int s5h1409_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) s5h1409_i2c_gate_ctrl() argument
438 struct s5h1409_state *state = fe->demodulator_priv; s5h1409_i2c_gate_ctrl()
448 static int s5h1409_set_gpio(struct dvb_frontend *fe, int enable) s5h1409_set_gpio() argument
450 struct s5h1409_state *state = fe->demodulator_priv; s5h1409_set_gpio()
462 static int s5h1409_sleep(struct dvb_frontend *fe, int enable) s5h1409_sleep() argument
464 struct s5h1409_state *state = fe->demodulator_priv; s5h1409_sleep()
471 static int s5h1409_register_reset(struct dvb_frontend *fe) s5h1409_register_reset() argument
473 struct s5h1409_state *state = fe->demodulator_priv; s5h1409_register_reset()
480 static void s5h1409_set_qam_amhum_mode(struct dvb_frontend *fe) s5h1409_set_qam_amhum_mode() argument
482 struct s5h1409_state *state = fe->demodulator_priv; s5h1409_set_qam_amhum_mode()
533 static void s5h1409_set_qam_amhum_mode_legacy(struct dvb_frontend *fe) s5h1409_set_qam_amhum_mode_legacy() argument
535 struct s5h1409_state *state = fe->demodulator_priv; s5h1409_set_qam_amhum_mode_legacy()
565 static void s5h1409_set_qam_interleave_mode(struct dvb_frontend *fe) s5h1409_set_qam_interleave_mode() argument
567 struct s5h1409_state *state = fe->demodulator_priv; s5h1409_set_qam_interleave_mode()
603 static void s5h1409_set_qam_interleave_mode_legacy(struct dvb_frontend *fe) s5h1409_set_qam_interleave_mode_legacy() argument
605 struct s5h1409_state *state = fe->demodulator_priv; s5h1409_set_qam_interleave_mode_legacy()
634 static int s5h1409_set_frontend(struct dvb_frontend *fe) s5h1409_set_frontend() argument
636 struct dtv_frontend_properties *p = &fe->dtv_property_cache; s5h1409_set_frontend()
637 struct s5h1409_state *state = fe->demodulator_priv; s5h1409_set_frontend()
641 s5h1409_softreset(fe); s5h1409_set_frontend()
645 s5h1409_enable_modulation(fe, p->modulation); s5h1409_set_frontend()
647 if (fe->ops.tuner_ops.set_params) { s5h1409_set_frontend()
648 if (fe->ops.i2c_gate_ctrl) s5h1409_set_frontend()
649 fe->ops.i2c_gate_ctrl(fe, 1); s5h1409_set_frontend()
650 fe->ops.tuner_ops.set_params(fe); s5h1409_set_frontend()
651 if (fe->ops.i2c_gate_ctrl) s5h1409_set_frontend()
652 fe->ops.i2c_gate_ctrl(fe, 0); s5h1409_set_frontend()
657 s5h1409_softreset(fe); s5h1409_set_frontend()
665 s5h1409_set_qam_interleave_mode(fe); s5h1409_set_frontend()
666 s5h1409_set_qam_amhum_mode(fe); s5h1409_set_frontend()
668 s5h1409_set_qam_amhum_mode_legacy(fe); s5h1409_set_frontend()
669 s5h1409_set_qam_interleave_mode_legacy(fe); s5h1409_set_frontend()
676 static int s5h1409_set_mpeg_timing(struct dvb_frontend *fe, int mode) s5h1409_set_mpeg_timing() argument
678 struct s5h1409_state *state = fe->demodulator_priv; s5h1409_set_mpeg_timing()
708 static int s5h1409_init(struct dvb_frontend *fe) s5h1409_init() argument
712 struct s5h1409_state *state = fe->demodulator_priv; s5h1409_init()
715 s5h1409_sleep(fe, 0); s5h1409_init()
716 s5h1409_register_reset(fe); s5h1409_init()
746 s5h1409_set_spectralinversion(fe, state->config->inversion); s5h1409_init()
747 s5h1409_set_if_freq(fe, state->if_freq); s5h1409_init()
748 s5h1409_set_gpio(fe, state->config->gpio); s5h1409_init()
749 s5h1409_set_mpeg_timing(fe, state->config->mpeg_timing); s5h1409_init()
750 s5h1409_softreset(fe); s5h1409_init()
753 s5h1409_i2c_gate_ctrl(fe, 0); s5h1409_init()
758 static int s5h1409_read_status(struct dvb_frontend *fe, enum fe_status *status) s5h1409_read_status() argument
760 struct s5h1409_state *state = fe->demodulator_priv; s5h1409_read_status()
772 s5h1409_set_qam_interleave_mode(fe); s5h1409_read_status()
773 s5h1409_set_qam_amhum_mode(fe); s5h1409_read_status()
791 if (fe->ops.tuner_ops.get_status) { s5h1409_read_status()
792 if (fe->ops.i2c_gate_ctrl) s5h1409_read_status()
793 fe->ops.i2c_gate_ctrl(fe, 1); s5h1409_read_status()
795 fe->ops.tuner_ops.get_status(fe, &tuner_status); s5h1409_read_status()
797 if (fe->ops.i2c_gate_ctrl) s5h1409_read_status()
798 fe->ops.i2c_gate_ctrl(fe, 0); s5h1409_read_status()
810 static int s5h1409_qam256_lookup_snr(struct dvb_frontend *fe, u16 *snr, u16 v) s5h1409_qam256_lookup_snr() argument
825 static int s5h1409_qam64_lookup_snr(struct dvb_frontend *fe, u16 *snr, u16 v) s5h1409_qam64_lookup_snr() argument
840 static int s5h1409_vsb_lookup_snr(struct dvb_frontend *fe, u16 *snr, u16 v) s5h1409_vsb_lookup_snr() argument
856 static int s5h1409_read_snr(struct dvb_frontend *fe, u16 *snr) s5h1409_read_snr() argument
858 struct s5h1409_state *state = fe->demodulator_priv; s5h1409_read_snr()
865 return s5h1409_qam64_lookup_snr(fe, snr, reg); s5h1409_read_snr()
868 return s5h1409_qam256_lookup_snr(fe, snr, reg); s5h1409_read_snr()
871 return s5h1409_vsb_lookup_snr(fe, snr, reg); s5h1409_read_snr()
879 static int s5h1409_read_signal_strength(struct dvb_frontend *fe, s5h1409_read_signal_strength() argument
891 int ret = s5h1409_read_snr(fe, &snr); s5h1409_read_signal_strength()
914 static int s5h1409_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) s5h1409_read_ucblocks() argument
916 struct s5h1409_state *state = fe->demodulator_priv; s5h1409_read_ucblocks()
923 static int s5h1409_read_ber(struct dvb_frontend *fe, u32 *ber) s5h1409_read_ber() argument
925 return s5h1409_read_ucblocks(fe, ber); s5h1409_read_ber()
928 static int s5h1409_get_frontend(struct dvb_frontend *fe) s5h1409_get_frontend() argument
930 struct dtv_frontend_properties *p = &fe->dtv_property_cache; s5h1409_get_frontend()
931 struct s5h1409_state *state = fe->demodulator_priv; s5h1409_get_frontend()
939 static int s5h1409_get_tune_settings(struct dvb_frontend *fe, s5h1409_get_tune_settings() argument
946 static void s5h1409_release(struct dvb_frontend *fe) s5h1409_release() argument
948 struct s5h1409_state *state = fe->demodulator_priv; s5h1409_release()
H A Dcxd2820r_core.c188 int cxd2820r_gpio(struct dvb_frontend *fe, u8 *gpio) cxd2820r_gpio() argument
190 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_gpio()
195 fe->dtv_property_cache.delivery_system); cxd2820r_gpio()
247 static int cxd2820r_set_frontend(struct dvb_frontend *fe) cxd2820r_set_frontend() argument
249 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_set_frontend()
250 struct dtv_frontend_properties *c = &fe->dtv_property_cache; cxd2820r_set_frontend()
254 fe->dtv_property_cache.delivery_system); cxd2820r_set_frontend()
258 ret = cxd2820r_init_t(fe); cxd2820r_set_frontend()
261 ret = cxd2820r_set_frontend_t(fe); cxd2820r_set_frontend()
266 ret = cxd2820r_init_t(fe); cxd2820r_set_frontend()
269 ret = cxd2820r_set_frontend_t2(fe); cxd2820r_set_frontend()
274 ret = cxd2820r_init_c(fe); cxd2820r_set_frontend()
277 ret = cxd2820r_set_frontend_c(fe); cxd2820r_set_frontend()
283 fe->dtv_property_cache.delivery_system); cxd2820r_set_frontend()
291 static int cxd2820r_read_status(struct dvb_frontend *fe, enum fe_status *status) cxd2820r_read_status() argument
293 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_read_status()
297 fe->dtv_property_cache.delivery_system); cxd2820r_read_status()
299 switch (fe->dtv_property_cache.delivery_system) { cxd2820r_read_status()
301 ret = cxd2820r_read_status_t(fe, status); cxd2820r_read_status()
304 ret = cxd2820r_read_status_t2(fe, status); cxd2820r_read_status()
307 ret = cxd2820r_read_status_c(fe, status); cxd2820r_read_status()
316 static int cxd2820r_get_frontend(struct dvb_frontend *fe) cxd2820r_get_frontend() argument
318 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_get_frontend()
322 fe->dtv_property_cache.delivery_system); cxd2820r_get_frontend()
327 switch (fe->dtv_property_cache.delivery_system) { cxd2820r_get_frontend()
329 ret = cxd2820r_get_frontend_t(fe); cxd2820r_get_frontend()
332 ret = cxd2820r_get_frontend_t2(fe); cxd2820r_get_frontend()
335 ret = cxd2820r_get_frontend_c(fe); cxd2820r_get_frontend()
344 static int cxd2820r_read_ber(struct dvb_frontend *fe, u32 *ber) cxd2820r_read_ber() argument
346 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_read_ber()
350 fe->dtv_property_cache.delivery_system); cxd2820r_read_ber()
352 switch (fe->dtv_property_cache.delivery_system) { cxd2820r_read_ber()
354 ret = cxd2820r_read_ber_t(fe, ber); cxd2820r_read_ber()
357 ret = cxd2820r_read_ber_t2(fe, ber); cxd2820r_read_ber()
360 ret = cxd2820r_read_ber_c(fe, ber); cxd2820r_read_ber()
369 static int cxd2820r_read_signal_strength(struct dvb_frontend *fe, u16 *strength) cxd2820r_read_signal_strength() argument
371 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_read_signal_strength()
375 fe->dtv_property_cache.delivery_system); cxd2820r_read_signal_strength()
377 switch (fe->dtv_property_cache.delivery_system) { cxd2820r_read_signal_strength()
379 ret = cxd2820r_read_signal_strength_t(fe, strength); cxd2820r_read_signal_strength()
382 ret = cxd2820r_read_signal_strength_t2(fe, strength); cxd2820r_read_signal_strength()
385 ret = cxd2820r_read_signal_strength_c(fe, strength); cxd2820r_read_signal_strength()
394 static int cxd2820r_read_snr(struct dvb_frontend *fe, u16 *snr) cxd2820r_read_snr() argument
396 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_read_snr()
400 fe->dtv_property_cache.delivery_system); cxd2820r_read_snr()
402 switch (fe->dtv_property_cache.delivery_system) { cxd2820r_read_snr()
404 ret = cxd2820r_read_snr_t(fe, snr); cxd2820r_read_snr()
407 ret = cxd2820r_read_snr_t2(fe, snr); cxd2820r_read_snr()
410 ret = cxd2820r_read_snr_c(fe, snr); cxd2820r_read_snr()
419 static int cxd2820r_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) cxd2820r_read_ucblocks() argument
421 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_read_ucblocks()
425 fe->dtv_property_cache.delivery_system); cxd2820r_read_ucblocks()
427 switch (fe->dtv_property_cache.delivery_system) { cxd2820r_read_ucblocks()
429 ret = cxd2820r_read_ucblocks_t(fe, ucblocks); cxd2820r_read_ucblocks()
432 ret = cxd2820r_read_ucblocks_t2(fe, ucblocks); cxd2820r_read_ucblocks()
435 ret = cxd2820r_read_ucblocks_c(fe, ucblocks); cxd2820r_read_ucblocks()
444 static int cxd2820r_init(struct dvb_frontend *fe) cxd2820r_init() argument
449 static int cxd2820r_sleep(struct dvb_frontend *fe) cxd2820r_sleep() argument
451 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_sleep()
455 fe->dtv_property_cache.delivery_system); cxd2820r_sleep()
457 switch (fe->dtv_property_cache.delivery_system) { cxd2820r_sleep()
459 ret = cxd2820r_sleep_t(fe); cxd2820r_sleep()
462 ret = cxd2820r_sleep_t2(fe); cxd2820r_sleep()
465 ret = cxd2820r_sleep_c(fe); cxd2820r_sleep()
474 static int cxd2820r_get_tune_settings(struct dvb_frontend *fe, cxd2820r_get_tune_settings() argument
477 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_get_tune_settings()
481 fe->dtv_property_cache.delivery_system); cxd2820r_get_tune_settings()
483 switch (fe->dtv_property_cache.delivery_system) { cxd2820r_get_tune_settings()
485 ret = cxd2820r_get_tune_settings_t(fe, s); cxd2820r_get_tune_settings()
488 ret = cxd2820r_get_tune_settings_t2(fe, s); cxd2820r_get_tune_settings()
491 ret = cxd2820r_get_tune_settings_c(fe, s); cxd2820r_get_tune_settings()
500 static enum dvbfe_search cxd2820r_search(struct dvb_frontend *fe) cxd2820r_search() argument
502 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_search()
503 struct dtv_frontend_properties *c = &fe->dtv_property_cache; cxd2820r_search()
508 fe->dtv_property_cache.delivery_system); cxd2820r_search()
513 ret = cxd2820r_sleep_t(fe); cxd2820r_search()
519 ret = cxd2820r_sleep_t2(fe); cxd2820r_search()
528 ret = cxd2820r_set_frontend(fe); cxd2820r_search()
552 ret = cxd2820r_read_status(fe, &status); cxd2820r_search()
574 static int cxd2820r_get_frontend_algo(struct dvb_frontend *fe) cxd2820r_get_frontend_algo() argument
579 static void cxd2820r_release(struct dvb_frontend *fe) cxd2820r_release() argument
581 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_release()
595 static int cxd2820r_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) cxd2820r_i2c_gate_ctrl() argument
597 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_i2c_gate_ctrl()
618 return cxd2820r_gpio(&priv->fe, gpio); cxd2820r_gpio_direction_output()
632 (void) cxd2820r_gpio(&priv->fe, gpio); cxd2820r_gpio_set()
712 memcpy(&priv->fe.ops, &cxd2820r_ops, sizeof(struct dvb_frontend_ops)); cxd2820r_attach()
713 priv->fe.demodulator_priv = priv; cxd2820r_attach()
751 ret = cxd2820r_gpio(&priv->fe, gpio); cxd2820r_attach()
757 return &priv->fe; cxd2820r_attach()
H A Dlnbp21.c47 static int lnbp21_set_voltage(struct dvb_frontend *fe, lnbp21_set_voltage() argument
50 struct lnbp21 *lnbp21 = (struct lnbp21 *) fe->sec_priv; lnbp21_set_voltage()
76 static int lnbp21_enable_high_lnb_voltage(struct dvb_frontend *fe, long arg) lnbp21_enable_high_lnb_voltage() argument
78 struct lnbp21 *lnbp21 = (struct lnbp21 *) fe->sec_priv; lnbp21_enable_high_lnb_voltage()
94 static int lnbp21_set_tone(struct dvb_frontend *fe, lnbp21_set_tone() argument
97 struct lnbp21 *lnbp21 = (struct lnbp21 *) fe->sec_priv; lnbp21_set_tone()
119 static void lnbp21_release(struct dvb_frontend *fe) lnbp21_release() argument
122 lnbp21_set_voltage(fe, SEC_VOLTAGE_OFF); lnbp21_release()
125 kfree(fe->sec_priv); lnbp21_release()
126 fe->sec_priv = NULL; lnbp21_release()
129 static struct dvb_frontend *lnbx2x_attach(struct dvb_frontend *fe, lnbx2x_attach() argument
141 fe->sec_priv = lnbp21; lnbx2x_attach()
150 if (lnbp21_set_voltage(fe, SEC_VOLTAGE_OFF)) { lnbx2x_attach()
156 fe->ops.release_sec = lnbp21_release; lnbx2x_attach()
159 fe->ops.set_voltage = lnbp21_set_voltage; lnbx2x_attach()
160 fe->ops.enable_high_lnb_voltage = lnbp21_enable_high_lnb_voltage; lnbx2x_attach()
162 fe->ops.set_tone = lnbp21_set_tone; lnbx2x_attach()
165 return fe; lnbx2x_attach()
168 struct dvb_frontend *lnbh24_attach(struct dvb_frontend *fe, lnbh24_attach() argument
172 return lnbx2x_attach(fe, i2c, override_set, override_clear, lnbh24_attach()
177 struct dvb_frontend *lnbp21_attach(struct dvb_frontend *fe, lnbp21_attach() argument
181 return lnbx2x_attach(fe, i2c, override_set, override_clear, lnbp21_attach()
H A Ds5h1411.c377 static int s5h1411_softreset(struct dvb_frontend *fe) s5h1411_softreset() argument
379 struct s5h1411_state *state = fe->demodulator_priv; s5h1411_softreset()
388 static int s5h1411_set_if_freq(struct dvb_frontend *fe, int KHz) s5h1411_set_if_freq() argument
390 struct s5h1411_state *state = fe->demodulator_priv; s5h1411_set_if_freq()
427 static int s5h1411_set_mpeg_timing(struct dvb_frontend *fe, int mode) s5h1411_set_mpeg_timing() argument
429 struct s5h1411_state *state = fe->demodulator_priv; s5h1411_set_mpeg_timing()
457 static int s5h1411_set_spectralinversion(struct dvb_frontend *fe, int inversion) s5h1411_set_spectralinversion() argument
459 struct s5h1411_state *state = fe->demodulator_priv; s5h1411_set_spectralinversion()
472 static int s5h1411_set_serialmode(struct dvb_frontend *fe, int serial) s5h1411_set_serialmode() argument
474 struct s5h1411_state *state = fe->demodulator_priv; s5h1411_set_serialmode()
486 static int s5h1411_enable_modulation(struct dvb_frontend *fe, s5h1411_enable_modulation() argument
489 struct s5h1411_state *state = fe->demodulator_priv; s5h1411_enable_modulation()
502 s5h1411_set_if_freq(fe, state->config->vsb_if); s5h1411_enable_modulation()
511 s5h1411_set_if_freq(fe, state->config->qam_if); s5h1411_enable_modulation()
524 s5h1411_softreset(fe); s5h1411_enable_modulation()
529 static int s5h1411_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) s5h1411_i2c_gate_ctrl() argument
531 struct s5h1411_state *state = fe->demodulator_priv; s5h1411_i2c_gate_ctrl()
541 static int s5h1411_set_gpio(struct dvb_frontend *fe, int enable) s5h1411_set_gpio() argument
543 struct s5h1411_state *state = fe->demodulator_priv; s5h1411_set_gpio()
557 static int s5h1411_set_powerstate(struct dvb_frontend *fe, int enable) s5h1411_set_powerstate() argument
559 struct s5h1411_state *state = fe->demodulator_priv; s5h1411_set_powerstate()
567 s5h1411_softreset(fe); s5h1411_set_powerstate()
573 static int s5h1411_sleep(struct dvb_frontend *fe) s5h1411_sleep() argument
575 return s5h1411_set_powerstate(fe, 1); s5h1411_sleep()
578 static int s5h1411_register_reset(struct dvb_frontend *fe) s5h1411_register_reset() argument
580 struct s5h1411_state *state = fe->demodulator_priv; s5h1411_register_reset()
588 static int s5h1411_set_frontend(struct dvb_frontend *fe) s5h1411_set_frontend() argument
590 struct dtv_frontend_properties *p = &fe->dtv_property_cache; s5h1411_set_frontend()
591 struct s5h1411_state *state = fe->demodulator_priv; s5h1411_set_frontend()
595 s5h1411_softreset(fe); s5h1411_set_frontend()
599 s5h1411_enable_modulation(fe, p->modulation); s5h1411_set_frontend()
601 if (fe->ops.tuner_ops.set_params) { s5h1411_set_frontend()
602 if (fe->ops.i2c_gate_ctrl) s5h1411_set_frontend()
603 fe->ops.i2c_gate_ctrl(fe, 1); s5h1411_set_frontend()
605 fe->ops.tuner_ops.set_params(fe); s5h1411_set_frontend()
607 if (fe->ops.i2c_gate_ctrl) s5h1411_set_frontend()
608 fe->ops.i2c_gate_ctrl(fe, 0); s5h1411_set_frontend()
613 s5h1411_softreset(fe); s5h1411_set_frontend()
620 static int s5h1411_init(struct dvb_frontend *fe) s5h1411_init() argument
622 struct s5h1411_state *state = fe->demodulator_priv; s5h1411_init()
627 s5h1411_set_powerstate(fe, 0); s5h1411_init()
628 s5h1411_register_reset(fe); s5h1411_init()
645 s5h1411_set_serialmode(fe, 1); s5h1411_init()
648 s5h1411_set_serialmode(fe, 0); s5h1411_init()
650 s5h1411_set_spectralinversion(fe, state->config->inversion); s5h1411_init()
651 s5h1411_set_if_freq(fe, state->config->vsb_if); s5h1411_init()
652 s5h1411_set_gpio(fe, state->config->gpio); s5h1411_init()
653 s5h1411_set_mpeg_timing(fe, state->config->mpeg_timing); s5h1411_init()
654 s5h1411_softreset(fe); s5h1411_init()
657 s5h1411_i2c_gate_ctrl(fe, 0); s5h1411_init()
662 static int s5h1411_read_status(struct dvb_frontend *fe, enum fe_status *status) s5h1411_read_status() argument
664 struct s5h1411_state *state = fe->demodulator_priv; s5h1411_read_status()
705 if (fe->ops.tuner_ops.get_status) { s5h1411_read_status()
706 if (fe->ops.i2c_gate_ctrl) s5h1411_read_status()
707 fe->ops.i2c_gate_ctrl(fe, 1); s5h1411_read_status()
709 fe->ops.tuner_ops.get_status(fe, &tuner_status); s5h1411_read_status()
711 if (fe->ops.i2c_gate_ctrl) s5h1411_read_status()
712 fe->ops.i2c_gate_ctrl(fe, 0); s5h1411_read_status()
724 static int s5h1411_qam256_lookup_snr(struct dvb_frontend *fe, u16 *snr, u16 v) s5h1411_qam256_lookup_snr() argument
739 static int s5h1411_qam64_lookup_snr(struct dvb_frontend *fe, u16 *snr, u16 v) s5h1411_qam64_lookup_snr() argument
754 static int s5h1411_vsb_lookup_snr(struct dvb_frontend *fe, u16 *snr, u16 v) s5h1411_vsb_lookup_snr() argument
770 static int s5h1411_read_snr(struct dvb_frontend *fe, u16 *snr) s5h1411_read_snr() argument
772 struct s5h1411_state *state = fe->demodulator_priv; s5h1411_read_snr()
779 return s5h1411_qam64_lookup_snr(fe, snr, reg); s5h1411_read_snr()
782 return s5h1411_qam256_lookup_snr(fe, snr, reg); s5h1411_read_snr()
786 return s5h1411_vsb_lookup_snr(fe, snr, reg); s5h1411_read_snr()
794 static int s5h1411_read_signal_strength(struct dvb_frontend *fe, s5h1411_read_signal_strength() argument
806 int ret = s5h1411_read_snr(fe, &snr); s5h1411_read_signal_strength()
829 static int s5h1411_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) s5h1411_read_ucblocks() argument
831 struct s5h1411_state *state = fe->demodulator_priv; s5h1411_read_ucblocks()
838 static int s5h1411_read_ber(struct dvb_frontend *fe, u32 *ber) s5h1411_read_ber() argument
840 return s5h1411_read_ucblocks(fe, ber); s5h1411_read_ber()
843 static int s5h1411_get_frontend(struct dvb_frontend *fe) s5h1411_get_frontend() argument
845 struct dtv_frontend_properties *p = &fe->dtv_property_cache; s5h1411_get_frontend()
846 struct s5h1411_state *state = fe->demodulator_priv; s5h1411_get_frontend()
854 static int s5h1411_get_tune_settings(struct dvb_frontend *fe, s5h1411_get_tune_settings() argument
861 static void s5h1411_release(struct dvb_frontend *fe) s5h1411_release() argument
863 struct s5h1411_state *state = fe->demodulator_priv; s5h1411_release()
H A Dtda18271c2dd.h7 struct dvb_frontend *tda18271c2dd_attach(struct dvb_frontend *fe,
10 static inline struct dvb_frontend *tda18271c2dd_attach(struct dvb_frontend *fe, tda18271c2dd_attach() argument
H A Dtda8261.c30 struct dvb_frontend *fe; member in struct:tda8261_state
63 static int tda8261_get_status(struct dvb_frontend *fe, u32 *status) tda8261_get_status() argument
65 struct tda8261_state *state = fe->tuner_priv; tda8261_get_status()
86 static int tda8261_get_state(struct dvb_frontend *fe, tda8261_get_state() argument
90 struct tda8261_state *state = fe->tuner_priv; tda8261_get_state()
109 static int tda8261_set_state(struct dvb_frontend *fe, tda8261_set_state() argument
113 struct tda8261_state *state = fe->tuner_priv; tda8261_set_state()
154 if ((err = tda8261_get_status(fe, &status)) < 0) { tda8261_set_state()
172 static int tda8261_release(struct dvb_frontend *fe) tda8261_release() argument
174 struct tda8261_state *state = fe->tuner_priv; tda8261_release()
176 fe->tuner_priv = NULL; tda8261_release()
197 struct dvb_frontend *tda8261_attach(struct dvb_frontend *fe, tda8261_attach() argument
208 state->fe = fe; tda8261_attach()
209 fe->tuner_priv = state; tda8261_attach()
210 fe->ops.tuner_ops = tda8261_ops; tda8261_attach()
212 fe->ops.tuner_ops.info.frequency_step = div_tab[config->step_size]; tda8261_attach()
213 // fe->ops.tuner_ops.tuner_name = &config->buf; tda8261_attach()
216 // __func__, fe->ops.tuner_ops.tuner_name); tda8261_attach()
219 return fe; tda8261_attach()
H A Ddib9000.c97 struct dvb_frontend *fe[MAX_NUMBER_OF_FRONTENDS]; member in struct:dib9000_state
959 static int dib9000_fw_reset(struct dvb_frontend *fe) dib9000_fw_reset() argument
961 struct dib9000_state *state = fe->demodulator_priv; dib9000_fw_reset()
1154 u32 freq = state->fe[0]->dtv_property_cache.frequency / 1000; dib9000_fw_set_channel_head()
1162 b[4] = (u8) ((state->fe[0]->dtv_property_cache.bandwidth_hz / 1000 >> 0) & 0xff); dib9000_fw_set_channel_head()
1163 b[5] = (u8) ((state->fe[0]->dtv_property_cache.bandwidth_hz / 1000 >> 8) & 0xff); dib9000_fw_set_channel_head()
1164 b[6] = (u8) ((state->fe[0]->dtv_property_cache.bandwidth_hz / 1000 >> 16) & 0xff); dib9000_fw_set_channel_head()
1165 b[7] = (u8) ((state->fe[0]->dtv_property_cache.bandwidth_hz / 1000 >> 24) & 0xff); dib9000_fw_set_channel_head()
1167 if (state->fe[0]->dtv_property_cache.delivery_system == SYS_DVBT) dib9000_fw_set_channel_head()
1172 static int dib9000_fw_get_channel(struct dvb_frontend *fe) dib9000_fw_get_channel() argument
1174 struct dib9000_state *state = fe->demodulator_priv; dib9000_fw_get_channel()
1209 state->fe[0]->dtv_property_cache.inversion = INVERSION_ON; dib9000_fw_get_channel()
1212 state->fe[0]->dtv_property_cache.inversion = INVERSION_OFF; dib9000_fw_get_channel()
1216 state->fe[0]->dtv_property_cache.inversion = INVERSION_AUTO; dib9000_fw_get_channel()
1221 state->fe[0]->dtv_property_cache.transmission_mode = TRANSMISSION_MODE_2K; dib9000_fw_get_channel()
1224 state->fe[0]->dtv_property_cache.transmission_mode = TRANSMISSION_MODE_4K; dib9000_fw_get_channel()
1227 state->fe[0]->dtv_property_cache.transmission_mode = TRANSMISSION_MODE_8K; dib9000_fw_get_channel()
1231 state->fe[0]->dtv_property_cache.transmission_mode = TRANSMISSION_MODE_AUTO; dib9000_fw_get_channel()
1236 state->fe[0]->dtv_property_cache.guard_interval = GUARD_INTERVAL_1_32; dib9000_fw_get_channel()
1239 state->fe[0]->dtv_property_cache.guard_interval = GUARD_INTERVAL_1_16; dib9000_fw_get_channel()
1242 state->fe[0]->dtv_property_cache.guard_interval = GUARD_INTERVAL_1_8; dib9000_fw_get_channel()
1245 state->fe[0]->dtv_property_cache.guard_interval = GUARD_INTERVAL_1_4; dib9000_fw_get_channel()
1249 state->fe[0]->dtv_property_cache.guard_interval = GUARD_INTERVAL_AUTO; dib9000_fw_get_channel()
1254 state->fe[0]->dtv_property_cache.modulation = QAM_64; dib9000_fw_get_channel()
1257 state->fe[0]->dtv_property_cache.modulation = QAM_16; dib9000_fw_get_channel()
1260 state->fe[0]->dtv_property_cache.modulation = QPSK; dib9000_fw_get_channel()
1264 state->fe[0]->dtv_property_cache.modulation = QAM_AUTO; dib9000_fw_get_channel()
1269 state->fe[0]->dtv_property_cache.hierarchy = HIERARCHY_NONE; dib9000_fw_get_channel()
1272 state->fe[0]->dtv_property_cache.hierarchy = HIERARCHY_1; dib9000_fw_get_channel()
1276 state->fe[0]->dtv_property_cache.hierarchy = HIERARCHY_AUTO; dib9000_fw_get_channel()
1281 state->fe[0]->dtv_property_cache.code_rate_HP = FEC_1_2; dib9000_fw_get_channel()
1284 state->fe[0]->dtv_property_cache.code_rate_HP = FEC_2_3; dib9000_fw_get_channel()
1287 state->fe[0]->dtv_property_cache.code_rate_HP = FEC_3_4; dib9000_fw_get_channel()
1290 state->fe[0]->dtv_property_cache.code_rate_HP = FEC_5_6; dib9000_fw_get_channel()
1293 state->fe[0]->dtv_property_cache.code_rate_HP = FEC_7_8; dib9000_fw_get_channel()
1297 state->fe[0]->dtv_property_cache.code_rate_HP = FEC_AUTO; dib9000_fw_get_channel()
1302 state->fe[0]->dtv_property_cache.code_rate_LP = FEC_1_2; dib9000_fw_get_channel()
1305 state->fe[0]->dtv_property_cache.code_rate_LP = FEC_2_3; dib9000_fw_get_channel()
1308 state->fe[0]->dtv_property_cache.code_rate_LP = FEC_3_4; dib9000_fw_get_channel()
1311 state->fe[0]->dtv_property_cache.code_rate_LP = FEC_5_6; dib9000_fw_get_channel()
1314 state->fe[0]->dtv_property_cache.code_rate_LP = FEC_7_8; dib9000_fw_get_channel()
1318 state->fe[0]->dtv_property_cache.code_rate_LP = FEC_AUTO; dib9000_fw_get_channel()
1327 static int dib9000_fw_set_channel_union(struct dvb_frontend *fe) dib9000_fw_set_channel_union() argument
1329 struct dib9000_state *state = fe->demodulator_priv; dib9000_fw_set_channel_union()
1347 switch (state->fe[0]->dtv_property_cache.inversion) { dib9000_fw_set_channel_union()
1359 switch (state->fe[0]->dtv_property_cache.transmission_mode) { dib9000_fw_set_channel_union()
1374 switch (state->fe[0]->dtv_property_cache.guard_interval) { dib9000_fw_set_channel_union()
1392 switch (state->fe[0]->dtv_property_cache.modulation) { dib9000_fw_set_channel_union()
1407 switch (state->fe[0]->dtv_property_cache.hierarchy) { dib9000_fw_set_channel_union()
1422 switch (state->fe[0]->dtv_property_cache.code_rate_HP) { dib9000_fw_set_channel_union()
1443 switch (state->fe[0]->dtv_property_cache.code_rate_LP) { dib9000_fw_set_channel_union()
1472 static int dib9000_fw_tune(struct dvb_frontend *fe) dib9000_fw_tune() argument
1474 struct dib9000_state *state = fe->demodulator_priv; dib9000_fw_tune()
1489 dib9000_fw_set_channel_union(fe); dib9000_fw_tune()
1525 static int dib9000_fw_set_diversity_in(struct dvb_frontend *fe, int onoff) dib9000_fw_set_diversity_in() argument
1527 struct dib9000_state *state = fe->demodulator_priv; dib9000_fw_set_diversity_in()
1532 static int dib9000_fw_set_output_mode(struct dvb_frontend *fe, int mode) dib9000_fw_set_output_mode() argument
1534 struct dib9000_state *state = fe->demodulator_priv; dib9000_fw_set_output_mode()
1537 dprintk("setting output mode for demod %p to %d", fe, mode); dib9000_fw_set_output_mode()
1559 dprintk("Unhandled output_mode passed to be set for demod %p", &state->fe[0]); dib9000_fw_set_output_mode()
1640 int dib9000_fw_set_component_bus_speed(struct dvb_frontend *fe, u16 speed) dib9000_fw_set_component_bus_speed() argument
1642 struct dib9000_state *state = fe->demodulator_priv; dib9000_fw_set_component_bus_speed()
1720 struct i2c_adapter *dib9000_get_tuner_interface(struct dvb_frontend *fe) dib9000_get_tuner_interface() argument
1722 struct dib9000_state *st = fe->demodulator_priv; dib9000_get_tuner_interface()
1727 struct i2c_adapter *dib9000_get_component_bus_interface(struct dvb_frontend *fe) dib9000_get_component_bus_interface() argument
1729 struct dib9000_state *st = fe->demodulator_priv; dib9000_get_component_bus_interface()
1734 struct i2c_adapter *dib9000_get_i2c_master(struct dvb_frontend *fe, enum dibx000_i2c_interface intf, int gating) dib9000_get_i2c_master() argument
1736 struct dib9000_state *st = fe->demodulator_priv; dib9000_get_i2c_master()
1741 int dib9000_set_i2c_adapter(struct dvb_frontend *fe, struct i2c_adapter *i2c) dib9000_set_i2c_adapter() argument
1743 struct dib9000_state *st = fe->demodulator_priv; dib9000_set_i2c_adapter()
1767 int dib9000_set_gpio(struct dvb_frontend *fe, u8 num, u8 dir, u8 val) dib9000_set_gpio() argument
1769 struct dib9000_state *state = fe->demodulator_priv; dib9000_set_gpio()
1774 int dib9000_fw_pid_filter_ctrl(struct dvb_frontend *fe, u8 onoff) dib9000_fw_pid_filter_ctrl() argument
1776 struct dib9000_state *state = fe->demodulator_priv; dib9000_fw_pid_filter_ctrl()
1805 int dib9000_fw_pid_filter(struct dvb_frontend *fe, u8 id, u16 pid, u8 onoff) dib9000_fw_pid_filter() argument
1807 struct dib9000_state *state = fe->demodulator_priv; dib9000_fw_pid_filter()
1836 int dib9000_firmware_post_pll_init(struct dvb_frontend *fe) dib9000_firmware_post_pll_init() argument
1838 struct dib9000_state *state = fe->demodulator_priv; dib9000_firmware_post_pll_init()
1848 for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (st->fe[index_frontend] != NULL); index_frontend++) dib9000_release()
1849 dvb_frontend_detach(st->fe[index_frontend]); dib9000_release()
1855 kfree(st->fe[0]); dib9000_release()
1859 static int dib9000_wakeup(struct dvb_frontend *fe) dib9000_wakeup() argument
1864 static int dib9000_sleep(struct dvb_frontend *fe) dib9000_sleep() argument
1866 struct dib9000_state *state = fe->demodulator_priv; dib9000_sleep()
1874 for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) { dib9000_sleep()
1875 ret = state->fe[index_frontend]->ops.sleep(state->fe[index_frontend]); dib9000_sleep()
1886 static int dib9000_fe_get_tune_settings(struct dvb_frontend *fe, struct dvb_frontend_tune_settings *tune) dib9000_fe_get_tune_settings() argument
1892 static int dib9000_get_frontend(struct dvb_frontend *fe) dib9000_get_frontend() argument
1894 struct dib9000_state *state = fe->demodulator_priv; dib9000_get_frontend()
1906 for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) { dib9000_get_frontend()
1907 state->fe[index_frontend]->ops.read_status(state->fe[index_frontend], &stat); dib9000_get_frontend()
1912 state->fe[index_frontend]->ops.get_frontend(state->fe[index_frontend]); dib9000_get_frontend()
1913 for (sub_index_frontend = 0; (sub_index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[sub_index_frontend] != NULL); dib9000_get_frontend()
1916 state->fe[sub_index_frontend]->dtv_property_cache.modulation = dib9000_get_frontend()
1917 state->fe[index_frontend]->dtv_property_cache.modulation; dib9000_get_frontend()
1918 state->fe[sub_index_frontend]->dtv_property_cache.inversion = dib9000_get_frontend()
1919 state->fe[index_frontend]->dtv_property_cache.inversion; dib9000_get_frontend()
1920 state->fe[sub_index_frontend]->dtv_property_cache.transmission_mode = dib9000_get_frontend()
1921 state->fe[index_frontend]->dtv_property_cache.transmission_mode; dib9000_get_frontend()
1922 state->fe[sub_index_frontend]->dtv_property_cache.guard_interval = dib9000_get_frontend()
1923 state->fe[index_frontend]->dtv_property_cache.guard_interval; dib9000_get_frontend()
1924 state->fe[sub_index_frontend]->dtv_property_cache.hierarchy = dib9000_get_frontend()
1925 state->fe[index_frontend]->dtv_property_cache.hierarchy; dib9000_get_frontend()
1926 state->fe[sub_index_frontend]->dtv_property_cache.code_rate_HP = dib9000_get_frontend()
1927 state->fe[index_frontend]->dtv_property_cache.code_rate_HP; dib9000_get_frontend()
1928 state->fe[sub_index_frontend]->dtv_property_cache.code_rate_LP = dib9000_get_frontend()
1929 state->fe[index_frontend]->dtv_property_cache.code_rate_LP; dib9000_get_frontend()
1930 state->fe[sub_index_frontend]->dtv_property_cache.rolloff = dib9000_get_frontend()
1931 state->fe[index_frontend]->dtv_property_cache.rolloff; dib9000_get_frontend()
1940 ret = dib9000_fw_get_channel(fe); dib9000_get_frontend()
1945 for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) { dib9000_get_frontend()
1946 state->fe[index_frontend]->dtv_property_cache.inversion = fe->dtv_property_cache.inversion; dib9000_get_frontend()
1947 state->fe[index_frontend]->dtv_property_cache.transmission_mode = fe->dtv_property_cache.transmission_mode; dib9000_get_frontend()
1948 state->fe[index_frontend]->dtv_property_cache.guard_interval = fe->dtv_property_cache.guard_interval; dib9000_get_frontend()
1949 state->fe[index_frontend]->dtv_property_cache.modulation = fe->dtv_property_cache.modulation; dib9000_get_frontend()
1950 state->fe[index_frontend]->dtv_property_cache.hierarchy = fe->dtv_property_cache.hierarchy; dib9000_get_frontend()
1951 state->fe[index_frontend]->dtv_property_cache.code_rate_HP = fe->dtv_property_cache.code_rate_HP; dib9000_get_frontend()
1952 state->fe[index_frontend]->dtv_property_cache.code_rate_LP = fe->dtv_property_cache.code_rate_LP; dib9000_get_frontend()
1953 state->fe[index_frontend]->dtv_property_cache.rolloff = fe->dtv_property_cache.rolloff; dib9000_get_frontend()
1963 static int dib9000_set_tune_state(struct dvb_frontend *fe, enum frontend_tune_state tune_state) dib9000_set_tune_state() argument
1965 struct dib9000_state *state = fe->demodulator_priv; dib9000_set_tune_state()
1973 static u32 dib9000_get_status(struct dvb_frontend *fe) dib9000_get_status() argument
1975 struct dib9000_state *state = fe->demodulator_priv; dib9000_get_status()
1979 static int dib9000_set_channel_status(struct dvb_frontend *fe, struct dvb_frontend_parametersContext *channel_status) dib9000_set_channel_status() argument
1981 struct dib9000_state *state = fe->demodulator_priv; dib9000_set_channel_status()
1987 static int dib9000_set_frontend(struct dvb_frontend *fe) dib9000_set_frontend() argument
1989 struct dib9000_state *state = fe->demodulator_priv; dib9000_set_frontend()
1996 if (state->fe[0]->dtv_property_cache.frequency == 0) { dib9000_set_frontend()
2001 if (state->fe[0]->dtv_property_cache.bandwidth_hz == 0) { dib9000_set_frontend()
2012 fe->dtv_property_cache.delivery_system = SYS_DVBT; dib9000_set_frontend()
2015 if (state->fe[0]->dtv_property_cache.transmission_mode == TRANSMISSION_MODE_AUTO || dib9000_set_frontend()
2016 state->fe[0]->dtv_property_cache.guard_interval == GUARD_INTERVAL_AUTO || dib9000_set_frontend()
2017 state->fe[0]->dtv_property_cache.modulation == QAM_AUTO || dib9000_set_frontend()
2018 state->fe[0]->dtv_property_cache.code_rate_HP == FEC_AUTO) { dib9000_set_frontend()
2025 for (index_frontend = 0; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) { dib9000_set_frontend()
2026 dib9000_fw_set_diversity_in(state->fe[index_frontend], 1); dib9000_set_frontend()
2029 memcpy(&state->fe[index_frontend]->dtv_property_cache, &fe->dtv_property_cache, sizeof(struct dtv_frontend_properties)); dib9000_set_frontend()
2031 state->fe[index_frontend]->dtv_property_cache.delivery_system = SYS_DVBT; dib9000_set_frontend()
2032 dib9000_fw_set_output_mode(state->fe[index_frontend], OUTMODE_HIGH_Z); dib9000_set_frontend()
2034 dib9000_set_channel_status(state->fe[index_frontend], &state->channel_status); dib9000_set_frontend()
2035 dib9000_set_tune_state(state->fe[index_frontend], CT_DEMOD_START); dib9000_set_frontend()
2042 sleep_time = dib9000_fw_tune(state->fe[0]); dib9000_set_frontend()
2043 for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) { dib9000_set_frontend()
2044 sleep_time_slave = dib9000_fw_tune(state->fe[index_frontend]); dib9000_set_frontend()
2058 for (index_frontend = 0; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) { dib9000_set_frontend()
2059 frontend_status = -dib9000_get_status(state->fe[index_frontend]); dib9000_set_frontend()
2086 dib9000_get_frontend(state->fe[0]); dib9000_set_frontend()
2091 for (index_frontend = 0; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) { dib9000_set_frontend()
2094 dib9000_set_channel_status(state->fe[index_frontend], &channel_status); dib9000_set_frontend()
2095 dib9000_set_tune_state(state->fe[index_frontend], CT_DEMOD_START); dib9000_set_frontend()
2100 for (index_frontend = 0; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) { dib9000_set_frontend()
2102 sleep_time_slave = dib9000_fw_tune(state->fe[index_frontend]); dib9000_set_frontend()
2115 for (index_frontend = 0; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) { dib9000_set_frontend()
2117 frontend_status = -dib9000_get_status(state->fe[index_frontend]); dib9000_set_frontend()
2125 dib9000_fw_set_output_mode(state->fe[0], state->chip.d9.cfg.output_mode); dib9000_set_frontend()
2126 for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) dib9000_set_frontend()
2127 dib9000_fw_set_output_mode(state->fe[index_frontend], OUTMODE_DIVERSITY); dib9000_set_frontend()
2130 dib9000_fw_set_diversity_in(state->fe[index_frontend - 1], 0); dib9000_set_frontend()
2142 dib9000_fw_pid_filter_ctrl(state->fe[0], dib9000_set_frontend()
2145 dib9000_fw_pid_filter(state->fe[0], dib9000_set_frontend()
2157 static u16 dib9000_read_lock(struct dvb_frontend *fe) dib9000_read_lock() argument
2159 struct dib9000_state *state = fe->demodulator_priv; dib9000_read_lock()
2164 static int dib9000_read_status(struct dvb_frontend *fe, enum fe_status *stat) dib9000_read_status() argument
2166 struct dib9000_state *state = fe->demodulator_priv; dib9000_read_status()
2174 for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) dib9000_read_status()
2175 lock_slave |= dib9000_read_lock(state->fe[index_frontend]); dib9000_read_status()
2197 static int dib9000_read_ber(struct dvb_frontend *fe, u32 * ber) dib9000_read_ber() argument
2199 struct dib9000_state *state = fe->demodulator_priv; dib9000_read_ber()
2230 static int dib9000_read_signal_strength(struct dvb_frontend *fe, u16 * strength) dib9000_read_signal_strength() argument
2232 struct dib9000_state *state = fe->demodulator_priv; dib9000_read_signal_strength()
2243 for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) { dib9000_read_signal_strength()
2244 state->fe[index_frontend]->ops.read_signal_strength(state->fe[index_frontend], &val); dib9000_read_signal_strength()
2275 static u32 dib9000_get_snr(struct dvb_frontend *fe) dib9000_get_snr() argument
2277 struct dib9000_state *state = fe->demodulator_priv; dib9000_get_snr()
2315 static int dib9000_read_snr(struct dvb_frontend *fe, u16 * snr) dib9000_read_snr() argument
2317 struct dib9000_state *state = fe->demodulator_priv; dib9000_read_snr()
2325 snr_master = dib9000_get_snr(fe); dib9000_read_snr()
2326 for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) dib9000_read_snr()
2327 snr_master += dib9000_get_snr(state->fe[index_frontend]); dib9000_read_snr()
2340 static int dib9000_read_unc_blocks(struct dvb_frontend *fe, u32 * unc) dib9000_read_unc_blocks() argument
2342 struct dib9000_state *state = fe->demodulator_priv; dib9000_read_unc_blocks()
2439 int dib9000_set_slave_frontend(struct dvb_frontend *fe, struct dvb_frontend *fe_slave) dib9000_set_slave_frontend() argument
2441 struct dib9000_state *state = fe->demodulator_priv; dib9000_set_slave_frontend()
2444 while ((index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL)) dib9000_set_slave_frontend()
2447 dprintk("set slave fe %p to index %i", fe_slave, index_frontend); dib9000_set_slave_frontend()
2448 state->fe[index_frontend] = fe_slave; dib9000_set_slave_frontend()
2457 int dib9000_remove_slave_frontend(struct dvb_frontend *fe) dib9000_remove_slave_frontend() argument
2459 struct dib9000_state *state = fe->demodulator_priv; dib9000_remove_slave_frontend()
2462 while ((index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL)) dib9000_remove_slave_frontend()
2465 dprintk("remove slave fe %p (index %i)", state->fe[index_frontend - 1], index_frontend - 1); dib9000_remove_slave_frontend()
2466 state->fe[index_frontend] = NULL; dib9000_remove_slave_frontend()
2475 struct dvb_frontend *dib9000_get_slave_frontend(struct dvb_frontend *fe, int slave_index) dib9000_get_slave_frontend() argument
2477 struct dib9000_state *state = fe->demodulator_priv; dib9000_get_slave_frontend()
2481 return state->fe[slave_index]; dib9000_get_slave_frontend()
2488 struct dvb_frontend *fe; dib9000_attach() local
2493 fe = kzalloc(sizeof(struct dvb_frontend), GFP_KERNEL); dib9000_attach()
2494 if (fe == NULL) { dib9000_attach()
2518 st->fe[0] = fe; dib9000_attach()
2519 fe->demodulator_priv = st; dib9000_attach()
2520 memcpy(&st->fe[0]->ops, &dib9000_ops, sizeof(struct dvb_frontend_ops)); dib9000_attach()
2550 dib9000_fw_reset(fe); dib9000_attach()
2552 return fe; dib9000_attach()
H A Dix2505v.c97 static int ix2505v_release(struct dvb_frontend *fe) ix2505v_release() argument
99 struct ix2505v_state *state = fe->tuner_priv; ix2505v_release()
101 fe->tuner_priv = NULL; ix2505v_release()
132 static int ix2505v_set_params(struct dvb_frontend *fe) ix2505v_set_params() argument
134 struct dtv_frontend_properties *c = &fe->dtv_property_cache; ix2505v_set_params()
135 struct ix2505v_state *state = fe->tuner_priv; ix2505v_set_params()
143 if ((frequency < fe->ops.info.frequency_min) ix2505v_set_params()
144 || (frequency > fe->ops.info.frequency_max)) ix2505v_set_params()
217 if (fe->ops.i2c_gate_ctrl) ix2505v_set_params()
218 fe->ops.i2c_gate_ctrl(fe, 1); ix2505v_set_params()
225 if (fe->ops.i2c_gate_ctrl) ix2505v_set_params()
226 fe->ops.i2c_gate_ctrl(fe, 1); ix2505v_set_params()
238 if (fe->ops.i2c_gate_ctrl) ix2505v_set_params()
239 fe->ops.i2c_gate_ctrl(fe, 1); ix2505v_set_params()
252 static int ix2505v_get_frequency(struct dvb_frontend *fe, u32 *frequency) ix2505v_get_frequency() argument
254 struct ix2505v_state *state = fe->tuner_priv; ix2505v_get_frequency()
272 struct dvb_frontend *ix2505v_attach(struct dvb_frontend *fe, ix2505v_attach() argument
292 if (fe->ops.i2c_gate_ctrl) ix2505v_attach()
293 fe->ops.i2c_gate_ctrl(fe, 1); ix2505v_attach()
302 if (fe->ops.i2c_gate_ctrl) ix2505v_attach()
303 fe->ops.i2c_gate_ctrl(fe, 0); ix2505v_attach()
306 fe->tuner_priv = state; ix2505v_attach()
308 memcpy(&fe->ops.tuner_ops, &ix2505v_tuner_ops, ix2505v_attach()
311 __func__, fe->ops.tuner_ops.info.name, config->tuner_address); ix2505v_attach()
313 return fe; ix2505v_attach()
H A Ddvb_dummy_fe.c36 static int dvb_dummy_fe_read_status(struct dvb_frontend *fe, dvb_dummy_fe_read_status() argument
48 static int dvb_dummy_fe_read_ber(struct dvb_frontend* fe, u32* ber) dvb_dummy_fe_read_ber() argument
54 static int dvb_dummy_fe_read_signal_strength(struct dvb_frontend* fe, u16* strength) dvb_dummy_fe_read_signal_strength() argument
60 static int dvb_dummy_fe_read_snr(struct dvb_frontend* fe, u16* snr) dvb_dummy_fe_read_snr() argument
66 static int dvb_dummy_fe_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) dvb_dummy_fe_read_ucblocks() argument
75 static int dvb_dummy_fe_get_frontend(struct dvb_frontend *fe) dvb_dummy_fe_get_frontend() argument
80 static int dvb_dummy_fe_set_frontend(struct dvb_frontend *fe) dvb_dummy_fe_set_frontend() argument
82 if (fe->ops.tuner_ops.set_params) { dvb_dummy_fe_set_frontend()
83 fe->ops.tuner_ops.set_params(fe); dvb_dummy_fe_set_frontend()
84 if (fe->ops.i2c_gate_ctrl) dvb_dummy_fe_set_frontend()
85 fe->ops.i2c_gate_ctrl(fe, 0); dvb_dummy_fe_set_frontend()
91 static int dvb_dummy_fe_sleep(struct dvb_frontend* fe) dvb_dummy_fe_sleep() argument
96 static int dvb_dummy_fe_init(struct dvb_frontend* fe) dvb_dummy_fe_init() argument
101 static int dvb_dummy_fe_set_tone(struct dvb_frontend *fe, dvb_dummy_fe_set_tone() argument
107 static int dvb_dummy_fe_set_voltage(struct dvb_frontend *fe, dvb_dummy_fe_set_voltage() argument
113 static void dvb_dummy_fe_release(struct dvb_frontend* fe) dvb_dummy_fe_release() argument
115 struct dvb_dummy_fe_state* state = fe->demodulator_priv; dvb_dummy_fe_release()
H A Disl6421.c46 static int isl6421_set_voltage(struct dvb_frontend *fe, isl6421_set_voltage() argument
49 struct isl6421 *isl6421 = (struct isl6421 *) fe->sec_priv; isl6421_set_voltage()
75 static int isl6421_enable_high_lnb_voltage(struct dvb_frontend *fe, long arg) isl6421_enable_high_lnb_voltage() argument
77 struct isl6421 *isl6421 = (struct isl6421 *) fe->sec_priv; isl6421_enable_high_lnb_voltage()
93 static int isl6421_set_tone(struct dvb_frontend *fe, isl6421_set_tone() argument
96 struct isl6421 *isl6421 = (struct isl6421 *) fe->sec_priv; isl6421_set_tone()
118 static void isl6421_release(struct dvb_frontend *fe) isl6421_release() argument
121 isl6421_set_voltage(fe, SEC_VOLTAGE_OFF); isl6421_release()
124 kfree(fe->sec_priv); isl6421_release()
125 fe->sec_priv = NULL; isl6421_release()
128 struct dvb_frontend *isl6421_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, u8 i2c_addr, isl6421_attach() argument
139 fe->sec_priv = isl6421; isl6421_attach()
148 if (isl6421_set_voltage(fe, SEC_VOLTAGE_OFF)) { isl6421_attach()
150 fe->sec_priv = NULL; isl6421_attach()
155 fe->ops.release_sec = isl6421_release; isl6421_attach()
158 fe->ops.set_voltage = isl6421_set_voltage; isl6421_attach()
159 fe->ops.enable_high_lnb_voltage = isl6421_enable_high_lnb_voltage; isl6421_attach()
161 fe->ops.set_tone = isl6421_set_tone; isl6421_attach()
163 return fe; isl6421_attach()
H A Dstv090x.h92 int (*tuner_init)(struct dvb_frontend *fe);
93 int (*tuner_sleep)(struct dvb_frontend *fe);
94 int (*tuner_set_mode)(struct dvb_frontend *fe, enum tuner_mode mode);
95 int (*tuner_set_frequency)(struct dvb_frontend *fe, u32 frequency);
96 int (*tuner_get_frequency)(struct dvb_frontend *fe, u32 *frequency);
97 int (*tuner_set_bandwidth)(struct dvb_frontend *fe, u32 bandwidth);
98 int (*tuner_get_bandwidth)(struct dvb_frontend *fe, u32 *bandwidth);
99 int (*tuner_set_bbgain)(struct dvb_frontend *fe, u32 gain);
100 int (*tuner_get_bbgain)(struct dvb_frontend *fe, u32 *gain);
101 int (*tuner_set_refclk)(struct dvb_frontend *fe, u32 refclk);
102 int (*tuner_get_status)(struct dvb_frontend *fe, u32 *status);
103 void (*tuner_i2c_lock)(struct dvb_frontend *fe, int lock);
106 int (*set_gpio)(struct dvb_frontend *fe, u8 gpio, u8 dir, u8 value,
H A Das102_fe.c63 static int as102_fe_set_frontend(struct dvb_frontend *fe) as102_fe_set_frontend() argument
65 struct as102_state *state = fe->demodulator_priv; as102_fe_set_frontend()
66 struct dtv_frontend_properties *c = &fe->dtv_property_cache; as102_fe_set_frontend()
193 static int as102_fe_get_frontend(struct dvb_frontend *fe) as102_fe_get_frontend() argument
195 struct as102_state *state = fe->demodulator_priv; as102_fe_get_frontend()
196 struct dtv_frontend_properties *c = &fe->dtv_property_cache; as102_fe_get_frontend()
301 static int as102_fe_get_tune_settings(struct dvb_frontend *fe, as102_fe_get_tune_settings() argument
309 static int as102_fe_read_status(struct dvb_frontend *fe, enum fe_status *status) as102_fe_read_status() argument
312 struct as102_state *state = fe->demodulator_priv; as102_fe_read_status()
362 static int as102_fe_read_snr(struct dvb_frontend *fe, u16 *snr) as102_fe_read_snr() argument
364 struct as102_state *state = fe->demodulator_priv; as102_fe_read_snr()
371 static int as102_fe_read_ber(struct dvb_frontend *fe, u32 *ber) as102_fe_read_ber() argument
373 struct as102_state *state = fe->demodulator_priv; as102_fe_read_ber()
380 static int as102_fe_read_signal_strength(struct dvb_frontend *fe, as102_fe_read_signal_strength() argument
383 struct as102_state *state = fe->demodulator_priv; as102_fe_read_signal_strength()
390 static int as102_fe_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) as102_fe_read_ucblocks() argument
392 struct as102_state *state = fe->demodulator_priv; as102_fe_read_ucblocks()
402 static int as102_fe_ts_bus_ctrl(struct dvb_frontend *fe, int acquire) as102_fe_ts_bus_ctrl() argument
404 struct as102_state *state = fe->demodulator_priv; as102_fe_ts_bus_ctrl()
410 static void as102_fe_release(struct dvb_frontend *fe) as102_fe_release() argument
412 struct as102_state *state = fe->demodulator_priv; as102_fe_release()
456 struct dvb_frontend *fe; as102_attach() local
463 fe = &state->frontend; as102_attach()
464 fe->demodulator_priv = state; as102_attach()
470 memcpy(&fe->ops, &as102_fe_ops, sizeof(struct dvb_frontend_ops)); as102_attach()
471 strncpy(fe->ops.info.name, name, sizeof(fe->ops.info.name)); as102_attach()
473 return fe; as102_attach()
478 MODULE_DESCRIPTION("as102-fe");
H A Ddvb-pll.c64 void (*set)(struct dvb_frontend *fe, u8 *buf);
95 static void thomson_dtt759x_bw(struct dvb_frontend *fe, u8 *buf) thomson_dtt759x_bw() argument
97 u32 bw = fe->dtv_property_cache.bandwidth_hz; thomson_dtt759x_bw()
119 static void thomson_dtt7520x_bw(struct dvb_frontend *fe, u8 *buf) thomson_dtt7520x_bw() argument
121 u32 bw = fe->dtv_property_cache.bandwidth_hz; thomson_dtt7520x_bw()
213 static void tda665x_bw(struct dvb_frontend *fe, u8 *buf) tda665x_bw() argument
215 u32 bw = fe->dtv_property_cache.bandwidth_hz; tda665x_bw()
247 static void tua6034_bw(struct dvb_frontend *fe, u8 *buf) tua6034_bw() argument
249 u32 bw = fe->dtv_property_cache.bandwidth_hz; tua6034_bw()
271 static void tded4_bw(struct dvb_frontend *fe, u8 *buf) tded4_bw() argument
273 u32 bw = fe->dtv_property_cache.bandwidth_hz; tded4_bw()
346 static void opera1_bw(struct dvb_frontend *fe, u8 *buf) opera1_bw() argument
348 struct dtv_frontend_properties *c = &fe->dtv_property_cache; opera1_bw()
349 struct dvb_pll_priv *priv = fe->tuner_priv; opera1_bw()
360 if (fe->ops.i2c_gate_ctrl) opera1_bw()
361 fe->ops.i2c_gate_ctrl(fe, 1); opera1_bw()
419 static void samsung_dtos403ih102a_set(struct dvb_frontend *fe, u8 *buf) samsung_dtos403ih102a_set() argument
421 struct dvb_pll_priv *priv = fe->tuner_priv; samsung_dtos403ih102a_set()
430 if (fe->ops.i2c_gate_ctrl) samsung_dtos403ih102a_set()
431 fe->ops.i2c_gate_ctrl(fe, 1); samsung_dtos403ih102a_set()
563 static int dvb_pll_configure(struct dvb_frontend *fe, u8 *buf, dvb_pll_configure() argument
566 struct dvb_pll_priv *priv = fe->tuner_priv; dvb_pll_configure()
594 desc->set(fe, buf); dvb_pll_configure()
604 static int dvb_pll_release(struct dvb_frontend *fe) dvb_pll_release() argument
606 kfree(fe->tuner_priv); dvb_pll_release()
607 fe->tuner_priv = NULL; dvb_pll_release()
611 static int dvb_pll_sleep(struct dvb_frontend *fe) dvb_pll_sleep() argument
613 struct dvb_pll_priv *priv = fe->tuner_priv; dvb_pll_sleep()
626 if (fe->ops.i2c_gate_ctrl) dvb_pll_sleep()
627 fe->ops.i2c_gate_ctrl(fe, 1); dvb_pll_sleep()
637 static int dvb_pll_set_params(struct dvb_frontend *fe) dvb_pll_set_params() argument
639 struct dtv_frontend_properties *c = &fe->dtv_property_cache; dvb_pll_set_params()
640 struct dvb_pll_priv *priv = fe->tuner_priv; dvb_pll_set_params()
651 result = dvb_pll_configure(fe, buf, c->frequency); dvb_pll_set_params()
657 if (fe->ops.i2c_gate_ctrl) dvb_pll_set_params()
658 fe->ops.i2c_gate_ctrl(fe, 1); dvb_pll_set_params()
669 static int dvb_pll_calc_regs(struct dvb_frontend *fe, dvb_pll_calc_regs() argument
672 struct dtv_frontend_properties *c = &fe->dtv_property_cache; dvb_pll_calc_regs()
673 struct dvb_pll_priv *priv = fe->tuner_priv; dvb_pll_calc_regs()
680 result = dvb_pll_configure(fe, buf + 1, c->frequency); dvb_pll_calc_regs()
694 static int dvb_pll_get_frequency(struct dvb_frontend *fe, u32 *frequency) dvb_pll_get_frequency() argument
696 struct dvb_pll_priv *priv = fe->tuner_priv; dvb_pll_get_frequency()
701 static int dvb_pll_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth) dvb_pll_get_bandwidth() argument
703 struct dvb_pll_priv *priv = fe->tuner_priv; dvb_pll_get_bandwidth()
708 static int dvb_pll_init(struct dvb_frontend *fe) dvb_pll_init() argument
710 struct dvb_pll_priv *priv = fe->tuner_priv; dvb_pll_init()
722 if (fe->ops.i2c_gate_ctrl) dvb_pll_init()
723 fe->ops.i2c_gate_ctrl(fe, 1); dvb_pll_init()
730 if (fe->ops.i2c_gate_ctrl) dvb_pll_init()
731 fe->ops.i2c_gate_ctrl(fe, 1); dvb_pll_init()
752 struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr, dvb_pll_attach() argument
772 if (fe->ops.i2c_gate_ctrl) dvb_pll_attach()
773 fe->ops.i2c_gate_ctrl(fe, 1); dvb_pll_attach()
778 if (fe->ops.i2c_gate_ctrl) dvb_pll_attach()
779 fe->ops.i2c_gate_ctrl(fe, 0); dvb_pll_attach()
791 memcpy(&fe->ops.tuner_ops, &dvb_pll_tuner_ops, dvb_pll_attach()
794 strncpy(fe->ops.tuner_ops.info.name, desc->name, dvb_pll_attach()
795 sizeof(fe->ops.tuner_ops.info.name)); dvb_pll_attach()
796 fe->ops.tuner_ops.info.frequency_min = desc->min; dvb_pll_attach()
797 fe->ops.tuner_ops.info.frequency_max = desc->max; dvb_pll_attach()
799 fe->ops.tuner_ops.init = NULL; dvb_pll_attach()
801 fe->ops.tuner_ops.sleep = NULL; dvb_pll_attach()
803 fe->tuner_priv = priv; dvb_pll_attach()
814 return fe; dvb_pll_attach()
H A Dtc90522.c42 struct dvb_frontend fe; member in struct:tc90522_state
107 static int tc90522s_set_tsid(struct dvb_frontend *fe) tc90522s_set_tsid() argument
114 set_tsid[0].val = (fe->dtv_property_cache.stream_id & 0xff00) >> 8; tc90522s_set_tsid()
115 set_tsid[1].val = fe->dtv_property_cache.stream_id & 0xff; tc90522s_set_tsid()
116 return reg_write(fe->demodulator_priv, set_tsid, ARRAY_SIZE(set_tsid)); tc90522s_set_tsid()
119 static int tc90522t_set_layers(struct dvb_frontend *fe) tc90522t_set_layers() argument
124 laysel = ~fe->dtv_property_cache.isdbt_layer_enabled & 0x07; tc90522t_set_layers()
128 return reg_write(fe->demodulator_priv, &rv, 1); tc90522t_set_layers()
133 static int tc90522s_read_status(struct dvb_frontend *fe, enum fe_status *status) tc90522s_read_status() argument
139 state = fe->demodulator_priv; tc90522s_read_status()
161 static int tc90522t_read_status(struct dvb_frontend *fe, enum fe_status *status) tc90522t_read_status() argument
167 state = fe->demodulator_priv; tc90522t_read_status()
204 static int tc90522s_get_frontend(struct dvb_frontend *fe) tc90522s_get_frontend() argument
214 state = fe->demodulator_priv; tc90522s_get_frontend()
215 c = &fe->dtv_property_cache; tc90522s_get_frontend()
254 if (fe->ops.tuner_ops.get_rf_strength) { tc90522s_get_frontend()
257 fe->ops.tuner_ops.get_rf_strength(fe, &dummy); tc90522s_get_frontend()
340 static int tc90522t_get_frontend(struct dvb_frontend *fe) tc90522t_get_frontend() argument
350 state = fe->demodulator_priv; tc90522t_get_frontend()
351 c = &fe->dtv_property_cache; tc90522t_get_frontend()
413 if (fe->ops.tuner_ops.get_rf_strength) { tc90522t_get_frontend()
416 fe->ops.tuner_ops.get_rf_strength(fe, &dummy); tc90522t_get_frontend()
488 static int tc90522_set_frontend(struct dvb_frontend *fe) tc90522_set_frontend() argument
493 state = fe->demodulator_priv; tc90522_set_frontend()
495 if (fe->ops.tuner_ops.set_params) tc90522_set_frontend()
496 ret = fe->ops.tuner_ops.set_params(fe); tc90522_set_frontend()
502 if (fe->ops.delsys[0] == SYS_ISDBS) { tc90522_set_frontend()
503 ret = tc90522s_set_tsid(fe); tc90522_set_frontend()
508 ret = tc90522t_set_layers(fe); tc90522_set_frontend()
519 dev_warn(&state->tuner_i2c.dev, "(%s) failed. [adap%d-fe%d]\n", tc90522_set_frontend()
520 __func__, fe->dvb->num, fe->id); tc90522_set_frontend()
524 static int tc90522_get_tune_settings(struct dvb_frontend *fe, tc90522_get_tune_settings() argument
527 if (fe->ops.delsys[0] == SYS_ISDBS) { tc90522_get_tune_settings()
539 static int tc90522_set_if_agc(struct dvb_frontend *fe, bool on) tc90522_set_if_agc() argument
556 state = fe->demodulator_priv; tc90522_set_if_agc()
557 if (fe->ops.delsys[0] == SYS_ISDBS) { tc90522_set_if_agc()
576 static int tc90522_sleep(struct dvb_frontend *fe) tc90522_sleep() argument
581 state = fe->demodulator_priv; tc90522_sleep()
582 if (fe->ops.delsys[0] == SYS_ISDBS) tc90522_sleep()
586 if (ret == 0 && fe->ops.set_lna && tc90522_sleep()
587 fe->dtv_property_cache.lna == LNA_AUTO) { tc90522_sleep()
588 fe->dtv_property_cache.lna = 0; tc90522_sleep()
589 ret = fe->ops.set_lna(fe); tc90522_sleep()
590 fe->dtv_property_cache.lna = LNA_AUTO; tc90522_sleep()
595 "(%s) failed. [adap%d-fe%d]\n", tc90522_sleep()
596 __func__, fe->dvb->num, fe->id); tc90522_sleep()
603 static int tc90522_init(struct dvb_frontend *fe) tc90522_init() argument
614 state = fe->demodulator_priv; tc90522_init()
615 if (fe->ops.delsys[0] == SYS_ISDBS) tc90522_init()
619 if (ret == 0 && fe->ops.set_lna && tc90522_init()
620 fe->dtv_property_cache.lna == LNA_AUTO) { tc90522_init()
621 fe->dtv_property_cache.lna = 1; tc90522_init()
622 ret = fe->ops.set_lna(fe); tc90522_init()
623 fe->dtv_property_cache.lna = LNA_AUTO; tc90522_init()
628 "(%s) failed. [adap%d-fe%d]\n", tc90522_init()
629 __func__, fe->dvb->num, fe->id); tc90522_init()
634 if (fe->dtv_property_cache.isdbt_layer_enabled == 0) tc90522_init()
635 fe->dtv_property_cache.isdbt_layer_enabled = 7; tc90522_init()
636 return tc90522_set_if_agc(fe, true); tc90522_init()
786 cfg->fe = state->cfg.fe = &state->fe; tc90522_probe()
788 memcpy(&state->fe.ops, ops, sizeof(*ops)); tc90522_probe()
789 state->fe.demodulator_priv = state; tc90522_probe()
H A Dcxd2820r_t.c24 int cxd2820r_set_frontend_t(struct dvb_frontend *fe) cxd2820r_set_frontend_t() argument
26 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_set_frontend_t()
27 struct dtv_frontend_properties *c = &fe->dtv_property_cache; cxd2820r_set_frontend_t()
79 if (fe->ops.tuner_ops.set_params) cxd2820r_set_frontend_t()
80 fe->ops.tuner_ops.set_params(fe); cxd2820r_set_frontend_t()
95 if (fe->ops.tuner_ops.get_if_frequency) { cxd2820r_set_frontend_t()
96 ret = fe->ops.tuner_ops.get_if_frequency(fe, &if_freq); cxd2820r_set_frontend_t()
141 int cxd2820r_get_frontend_t(struct dvb_frontend *fe) cxd2820r_get_frontend_t() argument
143 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_get_frontend_t()
144 struct dtv_frontend_properties *c = &fe->dtv_property_cache; cxd2820r_get_frontend_t()
258 int cxd2820r_read_ber_t(struct dvb_frontend *fe, u32 *ber) cxd2820r_read_ber_t() argument
260 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_read_ber_t()
292 int cxd2820r_read_signal_strength_t(struct dvb_frontend *fe, cxd2820r_read_signal_strength_t() argument
295 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_read_signal_strength_t()
316 int cxd2820r_read_snr_t(struct dvb_frontend *fe, u16 *snr) cxd2820r_read_snr_t() argument
318 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_read_snr_t()
345 int cxd2820r_read_ucblocks_t(struct dvb_frontend *fe, u32 *ucblocks) cxd2820r_read_ucblocks_t() argument
352 int cxd2820r_read_status_t(struct dvb_frontend *fe, enum fe_status *status) cxd2820r_read_status_t() argument
354 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_read_status_t()
398 int cxd2820r_init_t(struct dvb_frontend *fe) cxd2820r_init_t() argument
400 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_init_t()
413 int cxd2820r_sleep_t(struct dvb_frontend *fe) cxd2820r_sleep_t() argument
415 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_sleep_t()
442 int cxd2820r_get_tune_settings_t(struct dvb_frontend *fe, cxd2820r_get_tune_settings_t() argument
446 s->step_size = fe->ops.info.frequency_stepsize * 2; cxd2820r_get_tune_settings_t()
447 s->max_drift = (fe->ops.info.frequency_stepsize * 2) + 1; cxd2820r_get_tune_settings_t()
H A Dtdhd1.h31 static int alps_tdhd1_204_request_firmware(struct dvb_frontend *fe, const struct firmware **fw, char *name);
43 static int alps_tdhd1_204a_tuner_set_params(struct dvb_frontend *fe) alps_tdhd1_204a_tuner_set_params() argument
45 struct dtv_frontend_properties *p = &fe->dtv_property_cache; alps_tdhd1_204a_tuner_set_params()
46 struct i2c_adapter *i2c = fe->tuner_priv; alps_tdhd1_204a_tuner_set_params()
66 if (fe->ops.i2c_gate_ctrl) alps_tdhd1_204a_tuner_set_params()
67 fe->ops.i2c_gate_ctrl(fe, 1); alps_tdhd1_204a_tuner_set_params()
H A Dtda8083.c231 static int tda8083_send_diseqc_msg(struct dvb_frontend *fe, tda8083_send_diseqc_msg() argument
234 struct tda8083_state* state = fe->demodulator_priv; tda8083_send_diseqc_msg()
249 static int tda8083_read_status(struct dvb_frontend *fe, tda8083_read_status() argument
252 struct tda8083_state* state = fe->demodulator_priv; tda8083_read_status()
280 static int tda8083_read_ber(struct dvb_frontend* fe, u32* ber) tda8083_read_ber() argument
282 struct tda8083_state* state = fe->demodulator_priv; tda8083_read_ber()
294 static int tda8083_read_signal_strength(struct dvb_frontend* fe, u16* strength) tda8083_read_signal_strength() argument
296 struct tda8083_state* state = fe->demodulator_priv; tda8083_read_signal_strength()
304 static int tda8083_read_snr(struct dvb_frontend* fe, u16* snr) tda8083_read_snr() argument
306 struct tda8083_state* state = fe->demodulator_priv; tda8083_read_snr()
314 static int tda8083_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) tda8083_read_ucblocks() argument
316 struct tda8083_state* state = fe->demodulator_priv; tda8083_read_ucblocks()
325 static int tda8083_set_frontend(struct dvb_frontend *fe) tda8083_set_frontend() argument
327 struct dtv_frontend_properties *p = &fe->dtv_property_cache; tda8083_set_frontend()
328 struct tda8083_state* state = fe->demodulator_priv; tda8083_set_frontend()
330 if (fe->ops.tuner_ops.set_params) { tda8083_set_frontend()
331 fe->ops.tuner_ops.set_params(fe); tda8083_set_frontend()
332 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); tda8083_set_frontend()
345 static int tda8083_get_frontend(struct dvb_frontend *fe) tda8083_get_frontend() argument
347 struct dtv_frontend_properties *p = &fe->dtv_property_cache; tda8083_get_frontend()
348 struct tda8083_state* state = fe->demodulator_priv; tda8083_get_frontend()
360 static int tda8083_sleep(struct dvb_frontend* fe) tda8083_sleep() argument
362 struct tda8083_state* state = fe->demodulator_priv; tda8083_sleep()
368 static int tda8083_init(struct dvb_frontend* fe) tda8083_init() argument
370 struct tda8083_state* state = fe->demodulator_priv; tda8083_init()
382 static int tda8083_diseqc_send_burst(struct dvb_frontend *fe, tda8083_diseqc_send_burst() argument
385 struct tda8083_state* state = fe->demodulator_priv; tda8083_diseqc_send_burst()
394 static int tda8083_diseqc_set_tone(struct dvb_frontend *fe, tda8083_diseqc_set_tone() argument
397 struct tda8083_state* state = fe->demodulator_priv; tda8083_diseqc_set_tone()
406 static int tda8083_diseqc_set_voltage(struct dvb_frontend *fe, tda8083_diseqc_set_voltage() argument
409 struct tda8083_state* state = fe->demodulator_priv; tda8083_diseqc_set_voltage()
418 static void tda8083_release(struct dvb_frontend* fe) tda8083_release() argument
420 struct tda8083_state* state = fe->demodulator_priv; tda8083_release()
H A Dtda8261_cfg.h20 static int tda8261_get_frequency(struct dvb_frontend *fe, u32 *frequency) tda8261_get_frequency() argument
22 struct dvb_frontend_ops *frontend_ops = &fe->ops; tda8261_get_frequency()
28 err = tuner_ops->get_state(fe, DVBFE_TUNER_FREQUENCY, &t_state); tda8261_get_frequency()
39 static int tda8261_set_frequency(struct dvb_frontend *fe, u32 frequency) tda8261_set_frequency() argument
41 struct dvb_frontend_ops *frontend_ops = &fe->ops; tda8261_set_frequency()
49 err = tuner_ops->set_state(fe, DVBFE_TUNER_FREQUENCY, &t_state); tda8261_set_frequency()
59 static int tda8261_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth) tda8261_get_bandwidth() argument
61 struct dvb_frontend_ops *frontend_ops = &fe->ops; tda8261_get_bandwidth()
67 err = tuner_ops->get_state(fe, DVBFE_TUNER_BANDWIDTH, &t_state); tda8261_get_bandwidth()
H A Dbsbe1.h51 static int alps_bsbe1_set_symbol_rate(struct dvb_frontend* fe, u32 srate, u32 ratio) alps_bsbe1_set_symbol_rate() argument
63 stv0299_writereg(fe, 0x13, aclk); alps_bsbe1_set_symbol_rate()
64 stv0299_writereg(fe, 0x14, bclk); alps_bsbe1_set_symbol_rate()
65 stv0299_writereg(fe, 0x1f, (ratio >> 16) & 0xff); alps_bsbe1_set_symbol_rate()
66 stv0299_writereg(fe, 0x20, (ratio >> 8) & 0xff); alps_bsbe1_set_symbol_rate()
67 stv0299_writereg(fe, 0x21, (ratio ) & 0xf0); alps_bsbe1_set_symbol_rate()
72 static int alps_bsbe1_tuner_set_params(struct dvb_frontend *fe) alps_bsbe1_tuner_set_params() argument
74 struct dtv_frontend_properties *p = &fe->dtv_property_cache; alps_bsbe1_tuner_set_params()
79 struct i2c_adapter *i2c = fe->tuner_priv; alps_bsbe1_tuner_set_params()
90 if (fe->ops.i2c_gate_ctrl) alps_bsbe1_tuner_set_params()
91 fe->ops.i2c_gate_ctrl(fe, 1); alps_bsbe1_tuner_set_params()
H A Dcxd2820r_c.c24 int cxd2820r_set_frontend_c(struct dvb_frontend *fe) cxd2820r_set_frontend_c() argument
26 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_set_frontend_c()
27 struct dtv_frontend_properties *c = &fe->dtv_property_cache; cxd2820r_set_frontend_c()
55 if (fe->ops.tuner_ops.set_params) cxd2820r_set_frontend_c()
56 fe->ops.tuner_ops.set_params(fe); cxd2820r_set_frontend_c()
71 if (fe->ops.tuner_ops.get_if_frequency) { cxd2820r_set_frontend_c()
72 ret = fe->ops.tuner_ops.get_if_frequency(fe, &if_freq); cxd2820r_set_frontend_c()
104 int cxd2820r_get_frontend_c(struct dvb_frontend *fe) cxd2820r_get_frontend_c() argument
106 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_get_frontend_c()
107 struct dtv_frontend_properties *c = &fe->dtv_property_cache; cxd2820r_get_frontend_c()
154 int cxd2820r_read_ber_c(struct dvb_frontend *fe, u32 *ber) cxd2820r_read_ber_c() argument
156 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_read_ber_c()
188 int cxd2820r_read_signal_strength_c(struct dvb_frontend *fe, cxd2820r_read_signal_strength_c() argument
191 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_read_signal_strength_c()
218 int cxd2820r_read_snr_c(struct dvb_frontend *fe, u16 *snr) cxd2820r_read_snr_c() argument
220 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_read_snr_c()
255 int cxd2820r_read_ucblocks_c(struct dvb_frontend *fe, u32 *ucblocks) cxd2820r_read_ucblocks_c() argument
262 int cxd2820r_read_status_c(struct dvb_frontend *fe, enum fe_status *status) cxd2820r_read_status_c() argument
264 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_read_status_c()
292 int cxd2820r_init_c(struct dvb_frontend *fe) cxd2820r_init_c() argument
294 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_init_c()
307 int cxd2820r_sleep_c(struct dvb_frontend *fe) cxd2820r_sleep_c() argument
309 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_sleep_c()
336 int cxd2820r_get_tune_settings_c(struct dvb_frontend *fe, cxd2820r_get_tune_settings_c() argument
H A Dcxd2820r_t2.c24 int cxd2820r_set_frontend_t2(struct dvb_frontend *fe) cxd2820r_set_frontend_t2() argument
26 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_set_frontend_t2()
27 struct dtv_frontend_properties *c = &fe->dtv_property_cache; cxd2820r_set_frontend_t2()
97 if (fe->ops.tuner_ops.set_params) cxd2820r_set_frontend_t2()
98 fe->ops.tuner_ops.set_params(fe); cxd2820r_set_frontend_t2()
112 if (fe->ops.tuner_ops.get_if_frequency) { cxd2820r_set_frontend_t2()
113 ret = fe->ops.tuner_ops.get_if_frequency(fe, &if_freq); cxd2820r_set_frontend_t2()
172 int cxd2820r_get_frontend_t2(struct dvb_frontend *fe) cxd2820r_get_frontend_t2() argument
174 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_get_frontend_t2()
175 struct dtv_frontend_properties *c = &fe->dtv_property_cache; cxd2820r_get_frontend_t2()
287 int cxd2820r_read_status_t2(struct dvb_frontend *fe, enum fe_status *status) cxd2820r_read_status_t2() argument
289 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_read_status_t2()
316 int cxd2820r_read_ber_t2(struct dvb_frontend *fe, u32 *ber) cxd2820r_read_ber_t2() argument
318 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_read_ber_t2()
343 int cxd2820r_read_signal_strength_t2(struct dvb_frontend *fe, cxd2820r_read_signal_strength_t2() argument
346 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_read_signal_strength_t2()
367 int cxd2820r_read_snr_t2(struct dvb_frontend *fe, u16 *snr) cxd2820r_read_snr_t2() argument
369 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_read_snr_t2()
396 int cxd2820r_read_ucblocks_t2(struct dvb_frontend *fe, u32 *ucblocks) cxd2820r_read_ucblocks_t2() argument
403 int cxd2820r_sleep_t2(struct dvb_frontend *fe) cxd2820r_sleep_t2() argument
405 struct cxd2820r_priv *priv = fe->demodulator_priv; cxd2820r_sleep_t2()
433 int cxd2820r_get_tune_settings_t2(struct dvb_frontend *fe, cxd2820r_get_tune_settings_t2() argument
437 s->step_size = fe->ops.info.frequency_stepsize * 2; cxd2820r_get_tune_settings_t2()
438 s->max_drift = (fe->ops.info.frequency_stepsize * 2) + 1; cxd2820r_get_tune_settings_t2()
H A Dau8522_dig.c244 static int au8522_set_if(struct dvb_frontend *fe, enum au8522_if_freq if_freq) au8522_set_if() argument
246 struct au8522_state *state = fe->demodulator_priv; au8522_set_if()
554 static int au8522_enable_modulation(struct dvb_frontend *fe, au8522_enable_modulation() argument
557 struct au8522_state *state = fe->demodulator_priv; au8522_enable_modulation()
569 au8522_set_if(fe, state->config->vsb_if); au8522_enable_modulation()
577 au8522_set_if(fe, state->config->qam_if); au8522_enable_modulation()
586 au8522_set_if(fe, state->config->qam_if); au8522_enable_modulation()
595 au8522_set_if(fe, state->config->qam_if); au8522_enable_modulation()
609 static int au8522_set_frontend(struct dvb_frontend *fe) au8522_set_frontend() argument
611 struct dtv_frontend_properties *c = &fe->dtv_property_cache; au8522_set_frontend()
612 struct au8522_state *state = fe->demodulator_priv; au8522_set_frontend()
621 if (fe->ops.tuner_ops.set_params) { au8522_set_frontend()
622 if (fe->ops.i2c_gate_ctrl) au8522_set_frontend()
623 fe->ops.i2c_gate_ctrl(fe, 1); au8522_set_frontend()
624 ret = fe->ops.tuner_ops.set_params(fe); au8522_set_frontend()
625 if (fe->ops.i2c_gate_ctrl) au8522_set_frontend()
626 fe->ops.i2c_gate_ctrl(fe, 0); au8522_set_frontend()
640 au8522_enable_modulation(fe, c->modulation); au8522_set_frontend()
647 static int au8522_read_status(struct dvb_frontend *fe, enum fe_status *status) au8522_read_status() argument
649 struct au8522_state *state = fe->demodulator_priv; au8522_read_status()
678 if (fe->ops.tuner_ops.get_status) { au8522_read_status()
679 if (fe->ops.i2c_gate_ctrl) au8522_read_status()
680 fe->ops.i2c_gate_ctrl(fe, 1); au8522_read_status()
682 fe->ops.tuner_ops.get_status(fe, &tuner_status); au8522_read_status()
684 if (fe->ops.i2c_gate_ctrl) au8522_read_status()
685 fe->ops.i2c_gate_ctrl(fe, 0); au8522_read_status()
738 static int au8522_read_snr(struct dvb_frontend *fe, u16 *snr) au8522_read_snr() argument
740 struct au8522_state *state = fe->demodulator_priv; au8522_read_snr()
767 static int au8522_read_signal_strength(struct dvb_frontend *fe, au8522_read_signal_strength() argument
779 int ret = au8522_read_snr(fe, &snr); au8522_read_signal_strength()
802 static int au8522_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) au8522_read_ucblocks() argument
804 struct au8522_state *state = fe->demodulator_priv; au8522_read_ucblocks()
814 static int au8522_read_ber(struct dvb_frontend *fe, u32 *ber) au8522_read_ber() argument
816 return au8522_read_ucblocks(fe, ber); au8522_read_ber()
819 static int au8522_get_frontend(struct dvb_frontend *fe) au8522_get_frontend() argument
821 struct dtv_frontend_properties *c = &fe->dtv_property_cache; au8522_get_frontend()
822 struct au8522_state *state = fe->demodulator_priv; au8522_get_frontend()
830 static int au8522_get_tune_settings(struct dvb_frontend *fe, au8522_get_tune_settings() argument
840 static void au8522_release(struct dvb_frontend *fe) au8522_release() argument
842 struct au8522_state *state = fe->demodulator_priv; au8522_release()
H A Ddib0070.c56 struct dvb_frontend *fe; member in struct:dib0070_state
146 state->cfg->sleep(state->fe, 0); \
148 state->cfg->reset(state->fe,1); msleep(10); \
149 state->cfg->reset(state->fe,0); msleep(10); \
153 static int dib0070_set_bandwidth(struct dvb_frontend *fe) dib0070_set_bandwidth() argument
155 struct dib0070_state *state = fe->tuner_priv; dib0070_set_bandwidth()
158 if (state->fe->dtv_property_cache.bandwidth_hz/1000 > 7000) dib0070_set_bandwidth()
160 else if (state->fe->dtv_property_cache.bandwidth_hz/1000 > 6000) dib0070_set_bandwidth()
162 else if (state->fe->dtv_property_cache.bandwidth_hz/1000 > 5000) dib0070_set_bandwidth()
170 if (state->fe->dtv_property_cache.delivery_system == SYS_ISDBT) { dib0070_set_bandwidth()
239 static int dib0070_set_ctrl_lo5(struct dvb_frontend *fe, u8 vco_bias_trim, u8 hf_div_trim, u8 cp_current, u8 third_order_filt) dib0070_set_ctrl_lo5() argument
241 struct dib0070_state *state = fe->tuner_priv; dib0070_set_ctrl_lo5()
248 void dib0070_ctrl_agc_filter(struct dvb_frontend *fe, u8 open) dib0070_ctrl_agc_filter() argument
250 struct dib0070_state *state = fe->tuner_priv; dib0070_ctrl_agc_filter()
335 static int dib0070_tune_digital(struct dvb_frontend *fe) dib0070_tune_digital() argument
337 struct dib0070_state *state = fe->tuner_priv; dib0070_tune_digital()
345 u8 band = (u8)BAND_OF_FREQUENCY(fe->dtv_property_cache.frequency/1000); dib0070_tune_digital()
346 u32 freq = fe->dtv_property_cache.frequency/1000 + (band == BAND_VHF ? state->cfg->freq_offset_khz_vhf : state->cfg->freq_offset_khz_uhf); dib0070_tune_digital()
349 if (state->fe->dtv_property_cache.delivery_system == SYS_ISDBT && state->fe->dtv_property_cache.isdbt_sb_mode == 1) dib0070_tune_digital()
350 if (((state->fe->dtv_property_cache.isdbt_sb_segment_count % 2) dib0070_tune_digital()
351 && (state->fe->dtv_property_cache.isdbt_sb_segment_idx == ((state->fe->dtv_property_cache.isdbt_sb_segment_count / 2) + 1))) dib0070_tune_digital()
352 || (((state->fe->dtv_property_cache.isdbt_sb_segment_count % 2) == 0) dib0070_tune_digital()
353 && (state->fe->dtv_property_cache.isdbt_sb_segment_idx == (state->fe->dtv_property_cache.isdbt_sb_segment_count / 2))) dib0070_tune_digital()
354 || (((state->fe->dtv_property_cache.isdbt_sb_segment_count % 2) == 0) dib0070_tune_digital()
355 && (state->fe->dtv_property_cache.isdbt_sb_segment_idx == ((state->fe->dtv_property_cache.isdbt_sb_segment_count / 2) + 1)))) dib0070_tune_digital()
452 dib0070_set_ctrl_lo5(fe, 2, 4, 3, 0); dib0070_tune_digital()
455 dib0070_set_ctrl_lo5(fe, 5, 4, 3, 1); dib0070_tune_digital()
508 dib0070_set_bandwidth(fe); dib0070_tune_digital()
517 static int dib0070_tune(struct dvb_frontend *fe) dib0070_tune() argument
519 struct dib0070_state *state = fe->tuner_priv; dib0070_tune()
525 ret = dib0070_tune_digital(fe); dib0070_tune()
535 static int dib0070_wakeup(struct dvb_frontend *fe) dib0070_wakeup() argument
537 struct dib0070_state *state = fe->tuner_priv; dib0070_wakeup()
539 state->cfg->sleep(fe, 0); dib0070_wakeup()
543 static int dib0070_sleep(struct dvb_frontend *fe) dib0070_sleep() argument
545 struct dib0070_state *state = fe->tuner_priv; dib0070_sleep()
547 state->cfg->sleep(fe, 1); dib0070_sleep()
551 u8 dib0070_get_rf_output(struct dvb_frontend *fe) dib0070_get_rf_output() argument
553 struct dib0070_state *state = fe->tuner_priv; dib0070_get_rf_output()
558 int dib0070_set_rf_output(struct dvb_frontend *fe, u8 no) dib0070_set_rf_output() argument
560 struct dib0070_state *state = fe->tuner_priv; dib0070_set_rf_output()
632 u16 dib0070_wbd_offset(struct dvb_frontend *fe) dib0070_wbd_offset() argument
634 struct dib0070_state *state = fe->tuner_priv; dib0070_wbd_offset()
636 u32 freq = fe->dtv_property_cache.frequency/1000; dib0070_wbd_offset()
650 static int dib0070_reset(struct dvb_frontend *fe) dib0070_reset() argument
652 struct dib0070_state *state = fe->tuner_priv; dib0070_reset()
705 dib0070_set_ctrl_lo5(fe, 2, 4, 3, 0); dib0070_reset()
707 dib0070_set_ctrl_lo5(fe, 5, 4, state->cfg->charge_pump, dib0070_reset()
717 static int dib0070_get_frequency(struct dvb_frontend *fe, u32 *frequency) dib0070_get_frequency() argument
719 struct dib0070_state *state = fe->tuner_priv; dib0070_get_frequency()
725 static int dib0070_release(struct dvb_frontend *fe) dib0070_release() argument
727 kfree(fe->tuner_priv); dib0070_release()
728 fe->tuner_priv = NULL; dib0070_release()
749 struct dvb_frontend *dib0070_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct dib0070_config *cfg) dib0070_attach() argument
757 state->fe = fe; dib0070_attach()
759 fe->tuner_priv = state; dib0070_attach()
761 if (dib0070_reset(fe) != 0) dib0070_attach()
765 memcpy(&fe->ops.tuner_ops, &dib0070_ops, sizeof(struct dvb_tuner_ops)); dib0070_attach()
767 fe->tuner_priv = state; dib0070_attach()
768 return fe; dib0070_attach()
772 fe->tuner_priv = NULL; dib0070_attach()
H A Disl6405.c46 static int isl6405_set_voltage(struct dvb_frontend *fe, isl6405_set_voltage() argument
49 struct isl6405 *isl6405 = (struct isl6405 *) fe->sec_priv; isl6405_set_voltage()
89 static int isl6405_enable_high_lnb_voltage(struct dvb_frontend *fe, long arg) isl6405_enable_high_lnb_voltage() argument
91 struct isl6405 *isl6405 = (struct isl6405 *) fe->sec_priv; isl6405_enable_high_lnb_voltage()
113 static void isl6405_release(struct dvb_frontend *fe) isl6405_release() argument
116 isl6405_set_voltage(fe, SEC_VOLTAGE_OFF); isl6405_release()
119 kfree(fe->sec_priv); isl6405_release()
120 fe->sec_priv = NULL; isl6405_release()
123 struct dvb_frontend *isl6405_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, isl6405_attach() argument
137 fe->sec_priv = isl6405; isl6405_attach()
146 if (isl6405_set_voltage(fe, SEC_VOLTAGE_OFF)) { isl6405_attach()
148 fe->sec_priv = NULL; isl6405_attach()
153 fe->ops.release_sec = isl6405_release; isl6405_attach()
156 fe->ops.set_voltage = isl6405_set_voltage; isl6405_attach()
157 fe->ops.enable_high_lnb_voltage = isl6405_enable_high_lnb_voltage; isl6405_attach()
159 return fe; isl6405_attach()
H A Dlgs8gl5.c232 lgs8gl5_init(struct dvb_frontend *fe) lgs8gl5_init() argument
234 struct lgs8gl5_state *state = fe->demodulator_priv; lgs8gl5_init()
252 lgs8gl5_read_status(struct dvb_frontend *fe, enum fe_status *status) lgs8gl5_read_status() argument
254 struct lgs8gl5_state *state = fe->demodulator_priv; lgs8gl5_read_status()
274 lgs8gl5_read_ber(struct dvb_frontend *fe, u32 *ber) lgs8gl5_read_ber() argument
283 lgs8gl5_read_signal_strength(struct dvb_frontend *fe, u16 *signal_strength) lgs8gl5_read_signal_strength() argument
285 struct lgs8gl5_state *state = fe->demodulator_priv; lgs8gl5_read_signal_strength()
294 lgs8gl5_read_snr(struct dvb_frontend *fe, u16 *snr) lgs8gl5_read_snr() argument
296 struct lgs8gl5_state *state = fe->demodulator_priv; lgs8gl5_read_snr()
305 lgs8gl5_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) lgs8gl5_read_ucblocks() argument
314 lgs8gl5_set_frontend(struct dvb_frontend *fe) lgs8gl5_set_frontend() argument
316 struct dtv_frontend_properties *p = &fe->dtv_property_cache; lgs8gl5_set_frontend()
317 struct lgs8gl5_state *state = fe->demodulator_priv; lgs8gl5_set_frontend()
324 if (fe->ops.tuner_ops.set_params) { lgs8gl5_set_frontend()
325 fe->ops.tuner_ops.set_params(fe); lgs8gl5_set_frontend()
326 if (fe->ops.i2c_gate_ctrl) lgs8gl5_set_frontend()
327 fe->ops.i2c_gate_ctrl(fe, 0); lgs8gl5_set_frontend()
339 lgs8gl5_get_frontend(struct dvb_frontend *fe) lgs8gl5_get_frontend() argument
341 struct dtv_frontend_properties *p = &fe->dtv_property_cache; lgs8gl5_get_frontend()
342 struct lgs8gl5_state *state = fe->demodulator_priv; lgs8gl5_get_frontend()
360 lgs8gl5_get_tune_settings(struct dvb_frontend *fe, lgs8gl5_get_tune_settings() argument
371 lgs8gl5_release(struct dvb_frontend *fe) lgs8gl5_release() argument
373 struct lgs8gl5_state *state = fe->demodulator_priv; lgs8gl5_release()
H A Ds5h1432.c91 static int s5h1432_sleep(struct dvb_frontend *fe) s5h1432_sleep() argument
96 static int s5h1432_set_channel_bandwidth(struct dvb_frontend *fe, s5h1432_set_channel_bandwidth() argument
99 struct s5h1432_state *state = fe->demodulator_priv; s5h1432_set_channel_bandwidth()
123 static int s5h1432_set_IF(struct dvb_frontend *fe, u32 ifFreqHz) s5h1432_set_IF() argument
125 struct s5h1432_state *state = fe->demodulator_priv; s5h1432_set_IF()
181 static int s5h1432_set_frontend(struct dvb_frontend *fe) s5h1432_set_frontend() argument
183 struct dtv_frontend_properties *p = &fe->dtv_property_cache; s5h1432_set_frontend()
185 struct s5h1432_state *state = fe->demodulator_priv; s5h1432_set_frontend()
191 fe->ops.tuner_ops.set_params(fe); s5h1432_set_frontend()
193 s5h1432_set_channel_bandwidth(fe, dvb_bandwidth); s5h1432_set_frontend()
197 s5h1432_set_IF(fe, IF_FREQ_4_MHZ); s5h1432_set_frontend()
201 s5h1432_set_IF(fe, IF_FREQ_4_MHZ); s5h1432_set_frontend()
205 s5h1432_set_IF(fe, IF_FREQ_4_MHZ); s5h1432_set_frontend()
210 /*fe->ops.tuner_ops.set_params(fe); */ s5h1432_set_frontend()
217 s5h1432_set_channel_bandwidth(fe, dvb_bandwidth); s5h1432_set_frontend()
221 s5h1432_set_IF(fe, IF_FREQ_4_MHZ); s5h1432_set_frontend()
225 s5h1432_set_IF(fe, IF_FREQ_4_MHZ); s5h1432_set_frontend()
229 s5h1432_set_IF(fe, IF_FREQ_4_MHZ); s5h1432_set_frontend()
234 /*fe->ops.tuner_ops.set_params(fe); */ s5h1432_set_frontend()
248 static int s5h1432_init(struct dvb_frontend *fe) s5h1432_init() argument
250 struct s5h1432_state *state = fe->demodulator_priv; s5h1432_init()
305 static int s5h1432_read_status(struct dvb_frontend *fe, enum fe_status *status) s5h1432_read_status() argument
310 static int s5h1432_read_signal_strength(struct dvb_frontend *fe, s5h1432_read_signal_strength() argument
316 static int s5h1432_read_snr(struct dvb_frontend *fe, u16 *snr) s5h1432_read_snr() argument
321 static int s5h1432_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) s5h1432_read_ucblocks() argument
327 static int s5h1432_read_ber(struct dvb_frontend *fe, u32 *ber) s5h1432_read_ber() argument
332 static int s5h1432_get_tune_settings(struct dvb_frontend *fe, s5h1432_get_tune_settings() argument
338 static void s5h1432_release(struct dvb_frontend *fe) s5h1432_release() argument
340 struct s5h1432_state *state = fe->demodulator_priv; s5h1432_release()
H A Dtda10048.c34 #define TDA10048_DEFAULT_FIRMWARE "dvb-fe-tda10048-1.0.fw"
303 static int tda10048_set_phy2(struct dvb_frontend *fe, u32 sample_freq_hz, tda10048_set_phy2() argument
306 struct tda10048_state *state = fe->demodulator_priv; tda10048_set_phy2()
339 static int tda10048_set_wref(struct dvb_frontend *fe, u32 sample_freq_hz, tda10048_set_wref() argument
342 struct tda10048_state *state = fe->demodulator_priv; tda10048_set_wref()
369 static int tda10048_set_invwref(struct dvb_frontend *fe, u32 sample_freq_hz, tda10048_set_invwref() argument
372 struct tda10048_state *state = fe->demodulator_priv; tda10048_set_invwref()
395 static int tda10048_set_bandwidth(struct dvb_frontend *fe, tda10048_set_bandwidth() argument
398 struct tda10048_state *state = fe->demodulator_priv; tda10048_set_bandwidth()
406 tda10048_set_wref(fe, state->sample_freq, bw); tda10048_set_bandwidth()
407 tda10048_set_invwref(fe, state->sample_freq, bw); tda10048_set_bandwidth()
419 static int tda10048_set_if(struct dvb_frontend *fe, u32 bw) tda10048_set_if() argument
421 struct tda10048_state *state = fe->demodulator_priv; tda10048_set_if()
472 tda10048_set_phy2(fe, state->sample_freq, state->freq_if_hz); tda10048_set_if()
477 static int tda10048_firmware_upload(struct dvb_frontend *fe) tda10048_firmware_upload() argument
479 struct tda10048_state *state = fe->demodulator_priv; tda10048_firmware_upload()
572 static int tda10048_set_inversion(struct dvb_frontend *fe, int inversion) tda10048_set_inversion() argument
574 struct tda10048_state *state = fe->demodulator_priv; tda10048_set_inversion()
688 static int tda10048_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) tda10048_i2c_gate_ctrl() argument
690 struct tda10048_state *state = fe->demodulator_priv; tda10048_i2c_gate_ctrl()
705 static int tda10048_output_mode(struct dvb_frontend *fe, int serial) tda10048_output_mode() argument
707 struct tda10048_state *state = fe->demodulator_priv; tda10048_output_mode()
727 static int tda10048_set_frontend(struct dvb_frontend *fe) tda10048_set_frontend() argument
729 struct dtv_frontend_properties *p = &fe->dtv_property_cache; tda10048_set_frontend()
730 struct tda10048_state *state = fe->demodulator_priv; tda10048_set_frontend()
736 tda10048_set_if(fe, p->bandwidth_hz); tda10048_set_frontend()
737 tda10048_set_bandwidth(fe, p->bandwidth_hz); tda10048_set_frontend()
740 if (fe->ops.tuner_ops.set_params) { tda10048_set_frontend()
742 if (fe->ops.i2c_gate_ctrl) tda10048_set_frontend()
743 fe->ops.i2c_gate_ctrl(fe, 1); tda10048_set_frontend()
745 fe->ops.tuner_ops.set_params(fe); tda10048_set_frontend()
747 if (fe->ops.i2c_gate_ctrl) tda10048_set_frontend()
748 fe->ops.i2c_gate_ctrl(fe, 0); tda10048_set_frontend()
760 static int tda10048_init(struct dvb_frontend *fe) tda10048_init() argument
762 struct tda10048_state *state = fe->demodulator_priv; tda10048_init()
777 ret = tda10048_firmware_upload(fe); tda10048_init()
780 tda10048_output_mode(fe, config->output_mode); tda10048_init()
783 tda10048_set_inversion(fe, config->inversion); tda10048_init()
786 tda10048_set_if(fe, 8000000); tda10048_init()
787 tda10048_set_bandwidth(fe, 8000000); tda10048_init()
790 tda10048_i2c_gate_ctrl(fe, 0); tda10048_init()
795 static int tda10048_read_status(struct dvb_frontend *fe, enum fe_status *status) tda10048_read_status() argument
797 struct tda10048_state *state = fe->demodulator_priv; tda10048_read_status()
821 static int tda10048_read_ber(struct dvb_frontend *fe, u32 *ber) tda10048_read_ber() argument
823 struct tda10048_state *state = fe->demodulator_priv; tda10048_read_ber()
849 static int tda10048_read_signal_strength(struct dvb_frontend *fe, tda10048_read_signal_strength() argument
852 struct tda10048_state *state = fe->demodulator_priv; tda10048_read_signal_strength()
996 static int tda10048_read_snr(struct dvb_frontend *fe, u16 *snr) tda10048_read_snr() argument
998 struct tda10048_state *state = fe->demodulator_priv; tda10048_read_snr()
1016 static int tda10048_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) tda10048_read_ucblocks() argument
1018 struct tda10048_state *state = fe->demodulator_priv; tda10048_read_ucblocks()
1031 static int tda10048_get_frontend(struct dvb_frontend *fe) tda10048_get_frontend() argument
1033 struct dtv_frontend_properties *p = &fe->dtv_property_cache; tda10048_get_frontend()
1034 struct tda10048_state *state = fe->demodulator_priv; tda10048_get_frontend()
1044 static int tda10048_get_tune_settings(struct dvb_frontend *fe, tda10048_get_tune_settings() argument
1051 static void tda10048_release(struct dvb_frontend *fe) tda10048_release() argument
1053 struct tda10048_state *state = fe->demodulator_priv; tda10048_release()
1058 static void tda10048_establish_defaults(struct dvb_frontend *fe) tda10048_establish_defaults() argument
1060 struct tda10048_state *state = fe->demodulator_priv; tda10048_establish_defaults()
H A Dzl10036.c137 static int zl10036_release(struct dvb_frontend *fe) zl10036_release() argument
139 struct zl10036_state *state = fe->tuner_priv; zl10036_release()
141 fe->tuner_priv = NULL; zl10036_release()
147 static int zl10036_sleep(struct dvb_frontend *fe) zl10036_sleep() argument
149 struct zl10036_state *state = fe->tuner_priv; zl10036_sleep()
155 if (fe->ops.i2c_gate_ctrl) zl10036_sleep()
156 fe->ops.i2c_gate_ctrl(fe, 1); /* open i2c_gate */ zl10036_sleep()
160 if (fe->ops.i2c_gate_ctrl) zl10036_sleep()
161 fe->ops.i2c_gate_ctrl(fe, 0); /* close i2c_gate */ zl10036_sleep()
308 static int zl10036_set_params(struct dvb_frontend *fe) zl10036_set_params() argument
310 struct dtv_frontend_properties *p = &fe->dtv_property_cache; zl10036_set_params()
311 struct zl10036_state *state = fe->tuner_priv; zl10036_set_params()
320 if ((frequency < fe->ops.info.frequency_min) zl10036_set_params()
321 || (frequency > fe->ops.info.frequency_max)) zl10036_set_params()
349 if (fe->ops.i2c_gate_ctrl) zl10036_set_params()
350 fe->ops.i2c_gate_ctrl(fe, 1); /* open i2c_gate */ zl10036_set_params()
378 if (fe->ops.i2c_gate_ctrl) zl10036_set_params()
379 fe->ops.i2c_gate_ctrl(fe, 0); /* close i2c_gate */ zl10036_set_params()
384 static int zl10036_get_frequency(struct dvb_frontend *fe, u32 *frequency) zl10036_get_frequency() argument
386 struct zl10036_state *state = fe->tuner_priv; zl10036_get_frequency()
428 static int zl10036_init(struct dvb_frontend *fe) zl10036_init() argument
430 struct zl10036_state *state = fe->tuner_priv; zl10036_init()
433 if (fe->ops.i2c_gate_ctrl) zl10036_init()
434 fe->ops.i2c_gate_ctrl(fe, 1); /* open i2c_gate */ zl10036_init()
443 if (fe->ops.i2c_gate_ctrl) zl10036_init()
444 fe->ops.i2c_gate_ctrl(fe, 0); /* close i2c_gate */ zl10036_init()
462 struct dvb_frontend *zl10036_attach(struct dvb_frontend *fe, zl10036_attach() argument
481 if (fe->ops.i2c_gate_ctrl) zl10036_attach()
482 fe->ops.i2c_gate_ctrl(fe, 1); /* open i2c_gate */ zl10036_attach()
497 if (fe->ops.i2c_gate_ctrl) zl10036_attach()
498 fe->ops.i2c_gate_ctrl(fe, 0); /* close i2c_gate */ zl10036_attach()
500 fe->tuner_priv = state; zl10036_attach()
502 memcpy(&fe->ops.tuner_ops, &zl10036_tuner_ops, zl10036_attach()
505 __func__, fe->ops.tuner_ops.info.name, config->tuner_address); zl10036_attach()
507 return fe; zl10036_attach()
H A Ddib0070.h52 extern struct dvb_frontend *dib0070_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct dib0070_config *cfg);
55 extern u8 dib0070_get_rf_output(struct dvb_frontend *fe);
56 extern int dib0070_set_rf_output(struct dvb_frontend *fe, u8 no);
58 static inline struct dvb_frontend *dib0070_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct dib0070_config *cfg) dib0070_attach() argument
64 static inline u16 dib0070_wbd_offset(struct dvb_frontend *fe) dib0070_wbd_offset() argument
70 static inline void dib0070_ctrl_agc_filter(struct dvb_frontend *fe, u8 open) dib0070_ctrl_agc_filter() argument
H A Dmt352.c58 static int mt352_single_write(struct dvb_frontend *fe, u8 reg, u8 val) mt352_single_write() argument
60 struct mt352_state* state = fe->demodulator_priv; mt352_single_write()
72 static int _mt352_write(struct dvb_frontend* fe, const u8 ibuf[], int ilen) _mt352_write() argument
76 if ((err = mt352_single_write(fe,ibuf[0]+i,ibuf[i+1]))) _mt352_write()
105 static int mt352_sleep(struct dvb_frontend* fe) mt352_sleep() argument
109 _mt352_write(fe, mt352_softdown, sizeof(mt352_softdown)); mt352_sleep()
169 static int mt352_set_parameters(struct dvb_frontend *fe) mt352_set_parameters() argument
171 struct dtv_frontend_properties *op = &fe->dtv_property_cache; mt352_set_parameters()
172 struct mt352_state* state = fe->demodulator_priv; mt352_set_parameters()
294 if (fe->ops.tuner_ops.set_params) { mt352_set_parameters()
295 fe->ops.tuner_ops.set_params(fe); mt352_set_parameters()
296 if (fe->ops.i2c_gate_ctrl) mt352_set_parameters()
297 fe->ops.i2c_gate_ctrl(fe, 0); mt352_set_parameters()
300 _mt352_write(fe, buf, 8); mt352_set_parameters()
301 _mt352_write(fe, fsm_go, 2); mt352_set_parameters()
303 if (fe->ops.tuner_ops.calc_regs) { mt352_set_parameters()
304 fe->ops.tuner_ops.calc_regs(fe, buf+8, 5); mt352_set_parameters()
306 _mt352_write(fe, buf, sizeof(buf)); mt352_set_parameters()
307 _mt352_write(fe, tuner_go, 2); mt352_set_parameters()
314 static int mt352_get_parameters(struct dvb_frontend* fe) mt352_get_parameters() argument
316 struct dtv_frontend_properties *op = &fe->dtv_property_cache; mt352_get_parameters()
317 struct mt352_state* state = fe->demodulator_priv; mt352_get_parameters()
420 static int mt352_read_status(struct dvb_frontend *fe, enum fe_status *status) mt352_read_status() argument
422 struct mt352_state* state = fe->demodulator_priv; mt352_read_status()
463 static int mt352_read_ber(struct dvb_frontend* fe, u32* ber) mt352_read_ber() argument
465 struct mt352_state* state = fe->demodulator_priv; mt352_read_ber()
474 static int mt352_read_signal_strength(struct dvb_frontend* fe, u16* strength) mt352_read_signal_strength() argument
476 struct mt352_state* state = fe->demodulator_priv; mt352_read_signal_strength()
487 static int mt352_read_snr(struct dvb_frontend* fe, u16* snr) mt352_read_snr() argument
489 struct mt352_state* state = fe->demodulator_priv; mt352_read_snr()
497 static int mt352_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) mt352_read_ucblocks() argument
499 struct mt352_state* state = fe->demodulator_priv; mt352_read_ucblocks()
507 static int mt352_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fe_tune_settings) mt352_get_tune_settings() argument
516 static int mt352_init(struct dvb_frontend* fe) mt352_init() argument
518 struct mt352_state* state = fe->demodulator_priv; mt352_init()
528 _mt352_write(fe, mt352_reset_attach, sizeof(mt352_reset_attach)); mt352_init()
529 return state->config.demod_init(fe); mt352_init()
535 static void mt352_release(struct dvb_frontend* fe) mt352_release() argument
537 struct mt352_state* state = fe->demodulator_priv; mt352_release()
H A Dstv0288.c83 static int stv0288_write(struct dvb_frontend *fe, const u8 buf[], int len) stv0288_write() argument
85 struct stv0288_state *state = fe->demodulator_priv; stv0288_write()
121 static int stv0288_set_symbolrate(struct dvb_frontend *fe, u32 srate) stv0288_set_symbolrate() argument
123 struct stv0288_state *state = fe->demodulator_priv; stv0288_set_symbolrate()
155 static int stv0288_send_diseqc_msg(struct dvb_frontend *fe, stv0288_send_diseqc_msg() argument
158 struct stv0288_state *state = fe->demodulator_priv; stv0288_send_diseqc_msg()
176 static int stv0288_send_diseqc_burst(struct dvb_frontend *fe, stv0288_send_diseqc_burst() argument
179 struct stv0288_state *state = fe->demodulator_priv; stv0288_send_diseqc_burst()
196 static int stv0288_set_tone(struct dvb_frontend *fe, enum fe_sec_tone_mode tone) stv0288_set_tone() argument
198 struct stv0288_state *state = fe->demodulator_priv; stv0288_set_tone()
326 static int stv0288_set_voltage(struct dvb_frontend *fe, stv0288_set_voltage() argument
336 static int stv0288_init(struct dvb_frontend *fe) stv0288_init() argument
338 struct stv0288_state *state = fe->demodulator_priv; stv0288_init()
365 static int stv0288_read_status(struct dvb_frontend *fe, enum fe_status *status) stv0288_read_status() argument
367 struct stv0288_state *state = fe->demodulator_priv; stv0288_read_status()
388 static int stv0288_read_ber(struct dvb_frontend *fe, u32 *ber) stv0288_read_ber() argument
390 struct stv0288_state *state = fe->demodulator_priv; stv0288_read_ber()
402 static int stv0288_read_signal_strength(struct dvb_frontend *fe, u16 *strength) stv0288_read_signal_strength() argument
404 struct stv0288_state *state = fe->demodulator_priv; stv0288_read_signal_strength()
415 static int stv0288_sleep(struct dvb_frontend *fe) stv0288_sleep() argument
417 struct stv0288_state *state = fe->demodulator_priv; stv0288_sleep()
424 static int stv0288_read_snr(struct dvb_frontend *fe, u16 *snr) stv0288_read_snr() argument
426 struct stv0288_state *state = fe->demodulator_priv; stv0288_read_snr()
437 static int stv0288_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) stv0288_read_ucblocks() argument
439 struct stv0288_state *state = fe->demodulator_priv; stv0288_read_ucblocks()
450 static int stv0288_set_property(struct dvb_frontend *fe, struct dtv_property *p) stv0288_set_property() argument
456 static int stv0288_set_frontend(struct dvb_frontend *fe) stv0288_set_frontend() argument
458 struct stv0288_state *state = fe->demodulator_priv; stv0288_set_frontend()
459 struct dtv_frontend_properties *c = &fe->dtv_property_cache; stv0288_set_frontend()
475 state->config->set_ts_params(fe, 0); stv0288_set_frontend()
478 if (fe->ops.tuner_ops.set_params) { stv0288_set_frontend()
479 fe->ops.tuner_ops.set_params(fe); stv0288_set_frontend()
480 if (fe->ops.i2c_gate_ctrl) stv0288_set_frontend()
481 fe->ops.i2c_gate_ctrl(fe, 0); stv0288_set_frontend()
485 stv0288_set_symbolrate(fe, c->symbol_rate); stv0288_set_frontend()
519 static int stv0288_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) stv0288_i2c_gate_ctrl() argument
521 struct stv0288_state *state = fe->demodulator_priv; stv0288_i2c_gate_ctrl()
533 static void stv0288_release(struct dvb_frontend *fe) stv0288_release() argument
535 struct stv0288_state *state = fe->demodulator_priv; stv0288_release()
H A Dcx22700.c237 static int cx22700_init (struct dvb_frontend* fe) cx22700_init() argument
239 { struct cx22700_state* state = fe->demodulator_priv; cx22700_init()
257 static int cx22700_read_status(struct dvb_frontend *fe, enum fe_status *status) cx22700_read_status() argument
259 struct cx22700_state* state = fe->demodulator_priv; cx22700_read_status()
285 static int cx22700_read_ber(struct dvb_frontend* fe, u32* ber) cx22700_read_ber() argument
287 struct cx22700_state* state = fe->demodulator_priv; cx22700_read_ber()
295 static int cx22700_read_signal_strength(struct dvb_frontend* fe, u16* signal_strength) cx22700_read_signal_strength() argument
297 struct cx22700_state* state = fe->demodulator_priv; cx22700_read_signal_strength()
306 static int cx22700_read_snr(struct dvb_frontend* fe, u16* snr) cx22700_read_snr() argument
308 struct cx22700_state* state = fe->demodulator_priv; cx22700_read_snr()
317 static int cx22700_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) cx22700_read_ucblocks() argument
319 struct cx22700_state* state = fe->demodulator_priv; cx22700_read_ucblocks()
327 static int cx22700_set_frontend(struct dvb_frontend *fe) cx22700_set_frontend() argument
329 struct dtv_frontend_properties *c = &fe->dtv_property_cache; cx22700_set_frontend()
330 struct cx22700_state* state = fe->demodulator_priv; cx22700_set_frontend()
335 if (fe->ops.tuner_ops.set_params) { cx22700_set_frontend()
336 fe->ops.tuner_ops.set_params(fe); cx22700_set_frontend()
337 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); cx22700_set_frontend()
348 static int cx22700_get_frontend(struct dvb_frontend *fe) cx22700_get_frontend() argument
350 struct dtv_frontend_properties *c = &fe->dtv_property_cache; cx22700_get_frontend()
351 struct cx22700_state* state = fe->demodulator_priv; cx22700_get_frontend()
358 static int cx22700_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) cx22700_i2c_gate_ctrl() argument
360 struct cx22700_state* state = fe->demodulator_priv; cx22700_i2c_gate_ctrl()
369 static int cx22700_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings) cx22700_get_tune_settings() argument
377 static void cx22700_release(struct dvb_frontend* fe) cx22700_release() argument
379 struct cx22700_state* state = fe->demodulator_priv; cx22700_release()
H A Dstv6110x.c103 static int stv6110x_init(struct dvb_frontend *fe) stv6110x_init() argument
105 struct stv6110x_state *stv6110x = fe->tuner_priv; stv6110x_init()
118 static int stv6110x_set_frequency(struct dvb_frontend *fe, u32 frequency) stv6110x_set_frequency() argument
120 struct stv6110x_state *stv6110x = fe->tuner_priv; stv6110x_set_frequency()
179 static int stv6110x_get_frequency(struct dvb_frontend *fe, u32 *frequency) stv6110x_get_frequency() argument
181 struct stv6110x_state *stv6110x = fe->tuner_priv; stv6110x_get_frequency()
197 static int stv6110x_set_bandwidth(struct dvb_frontend *fe, u32 bandwidth) stv6110x_set_bandwidth() argument
199 struct stv6110x_state *stv6110x = fe->tuner_priv; stv6110x_set_bandwidth()
231 static int stv6110x_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth) stv6110x_get_bandwidth() argument
233 struct stv6110x_state *stv6110x = fe->tuner_priv; stv6110x_get_bandwidth()
241 static int stv6110x_set_refclock(struct dvb_frontend *fe, u32 refclock) stv6110x_set_refclock() argument
243 struct stv6110x_state *stv6110x = fe->tuner_priv; stv6110x_set_refclock()
267 static int stv6110x_get_bbgain(struct dvb_frontend *fe, u32 *gain) stv6110x_get_bbgain() argument
269 struct stv6110x_state *stv6110x = fe->tuner_priv; stv6110x_get_bbgain()
277 static int stv6110x_set_bbgain(struct dvb_frontend *fe, u32 gain) stv6110x_set_bbgain() argument
279 struct stv6110x_state *stv6110x = fe->tuner_priv; stv6110x_set_bbgain()
287 static int stv6110x_set_mode(struct dvb_frontend *fe, enum tuner_mode mode) stv6110x_set_mode() argument
289 struct stv6110x_state *stv6110x = fe->tuner_priv; stv6110x_set_mode()
315 static int stv6110x_sleep(struct dvb_frontend *fe) stv6110x_sleep() argument
317 if (fe->tuner_priv) stv6110x_sleep()
318 return stv6110x_set_mode(fe, TUNER_SLEEP); stv6110x_sleep()
323 static int stv6110x_get_status(struct dvb_frontend *fe, u32 *status) stv6110x_get_status() argument
325 struct stv6110x_state *stv6110x = fe->tuner_priv; stv6110x_get_status()
338 static int stv6110x_release(struct dvb_frontend *fe) stv6110x_release() argument
340 struct stv6110x_state *stv6110x = fe->tuner_priv; stv6110x_release()
342 fe->tuner_priv = NULL; stv6110x_release()
372 struct stv6110x_devctl *stv6110x_attach(struct dvb_frontend *fe, stv6110x_attach() argument
406 fe->tuner_priv = stv6110x; stv6110x_attach()
407 fe->ops.tuner_ops = stv6110x_ops; stv6110x_attach()
H A Dves1820.c192 static int ves1820_init(struct dvb_frontend* fe) ves1820_init() argument
194 struct ves1820_state* state = fe->demodulator_priv; ves1820_init()
209 static int ves1820_set_parameters(struct dvb_frontend *fe) ves1820_set_parameters() argument
211 struct dtv_frontend_properties *p = &fe->dtv_property_cache; ves1820_set_parameters()
212 struct ves1820_state* state = fe->demodulator_priv; ves1820_set_parameters()
223 if (fe->ops.tuner_ops.set_params) { ves1820_set_parameters()
224 fe->ops.tuner_ops.set_params(fe); ves1820_set_parameters()
225 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); ves1820_set_parameters()
241 static int ves1820_read_status(struct dvb_frontend *fe, ves1820_read_status() argument
244 struct ves1820_state* state = fe->demodulator_priv; ves1820_read_status()
268 static int ves1820_read_ber(struct dvb_frontend* fe, u32* ber) ves1820_read_ber() argument
270 struct ves1820_state* state = fe->demodulator_priv; ves1820_read_ber()
280 static int ves1820_read_signal_strength(struct dvb_frontend* fe, u16* strength) ves1820_read_signal_strength() argument
282 struct ves1820_state* state = fe->demodulator_priv; ves1820_read_signal_strength()
290 static int ves1820_read_snr(struct dvb_frontend* fe, u16* snr) ves1820_read_snr() argument
292 struct ves1820_state* state = fe->demodulator_priv; ves1820_read_snr()
300 static int ves1820_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) ves1820_read_ucblocks() argument
302 struct ves1820_state* state = fe->demodulator_priv; ves1820_read_ucblocks()
315 static int ves1820_get_frontend(struct dvb_frontend *fe) ves1820_get_frontend() argument
317 struct dtv_frontend_properties *p = &fe->dtv_property_cache; ves1820_get_frontend()
318 struct ves1820_state* state = fe->demodulator_priv; ves1820_get_frontend()
347 static int ves1820_sleep(struct dvb_frontend* fe) ves1820_sleep() argument
349 struct ves1820_state* state = fe->demodulator_priv; ves1820_sleep()
357 static int ves1820_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings) ves1820_get_tune_settings() argument
366 static void ves1820_release(struct dvb_frontend* fe) ves1820_release() argument
368 struct ves1820_state* state = fe->demodulator_priv; ves1820_release()
H A Dsp887x.c11 #define SP887X_DEFAULT_FIRMWARE "dvb-fe-sp887x.fw"
137 static int sp887x_initial_setup (struct dvb_frontend* fe, const struct firmware *fw) sp887x_initial_setup() argument
139 struct sp887x_state* state = fe->demodulator_priv; sp887x_initial_setup()
349 static int sp887x_setup_frontend_parameters(struct dvb_frontend *fe) sp887x_setup_frontend_parameters() argument
351 struct dtv_frontend_properties *p = &fe->dtv_property_cache; sp887x_setup_frontend_parameters()
352 struct sp887x_state* state = fe->demodulator_priv; sp887x_setup_frontend_parameters()
368 if (fe->ops.tuner_ops.set_params) { sp887x_setup_frontend_parameters()
369 fe->ops.tuner_ops.set_params(fe); sp887x_setup_frontend_parameters()
370 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); sp887x_setup_frontend_parameters()
372 if (fe->ops.tuner_ops.get_frequency) { sp887x_setup_frontend_parameters()
373 fe->ops.tuner_ops.get_frequency(fe, &actual_freq); sp887x_setup_frontend_parameters()
374 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); sp887x_setup_frontend_parameters()
419 static int sp887x_read_status(struct dvb_frontend *fe, enum fe_status *status) sp887x_read_status() argument
421 struct sp887x_state* state = fe->demodulator_priv; sp887x_read_status()
453 static int sp887x_read_ber(struct dvb_frontend* fe, u32* ber) sp887x_read_ber() argument
455 struct sp887x_state* state = fe->demodulator_priv; sp887x_read_ber()
467 static int sp887x_read_signal_strength(struct dvb_frontend* fe, u16* strength) sp887x_read_signal_strength() argument
469 struct sp887x_state* state = fe->demodulator_priv; sp887x_read_signal_strength()
478 static int sp887x_read_snr(struct dvb_frontend* fe, u16* snr) sp887x_read_snr() argument
480 struct sp887x_state* state = fe->demodulator_priv; sp887x_read_snr()
488 static int sp887x_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) sp887x_read_ucblocks() argument
490 struct sp887x_state* state = fe->demodulator_priv; sp887x_read_ucblocks()
499 static int sp887x_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) sp887x_i2c_gate_ctrl() argument
501 struct sp887x_state* state = fe->demodulator_priv; sp887x_i2c_gate_ctrl()
510 static int sp887x_sleep(struct dvb_frontend* fe) sp887x_sleep() argument
512 struct sp887x_state* state = fe->demodulator_priv; sp887x_sleep()
520 static int sp887x_init(struct dvb_frontend* fe) sp887x_init() argument
522 struct sp887x_state* state = fe->demodulator_priv; sp887x_init()
529 ret = state->config->request_firmware(fe, &fw, SP887X_DEFAULT_FIRMWARE); sp887x_init()
535 ret = sp887x_initial_setup(fe, fw); sp887x_init()
551 static int sp887x_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings) sp887x_get_tune_settings() argument
559 static void sp887x_release(struct dvb_frontend* fe) sp887x_release() argument
561 struct sp887x_state* state = fe->demodulator_priv; sp887x_release()
H A Dlnbh25.c90 static int lnbh25_set_voltage(struct dvb_frontend *fe, lnbh25_set_voltage() argument
96 struct lnbh25_priv *priv = fe->sec_priv; lnbh25_set_voltage()
143 static void lnbh25_release(struct dvb_frontend *fe) lnbh25_release() argument
145 struct lnbh25_priv *priv = fe->sec_priv; lnbh25_release()
148 lnbh25_set_voltage(fe, SEC_VOLTAGE_OFF); lnbh25_release()
149 kfree(fe->sec_priv); lnbh25_release()
150 fe->sec_priv = NULL; lnbh25_release()
153 struct dvb_frontend *lnbh25_attach(struct dvb_frontend *fe, lnbh25_attach() argument
168 fe->sec_priv = priv; lnbh25_attach()
169 if (lnbh25_set_voltage(fe, SEC_VOLTAGE_OFF)) { lnbh25_attach()
174 fe->sec_priv = NULL; lnbh25_attach()
178 fe->ops.release_sec = lnbh25_release; lnbh25_attach()
179 fe->ops.set_voltage = lnbh25_set_voltage; lnbh25_attach()
183 return fe; lnbh25_attach()
H A Ds5h1420.c66 static int s5h1420_get_tune_settings(struct dvb_frontend* fe,
127 static int s5h1420_set_voltage(struct dvb_frontend *fe, s5h1420_set_voltage() argument
130 struct s5h1420_state* state = fe->demodulator_priv; s5h1420_set_voltage()
153 static int s5h1420_set_tone(struct dvb_frontend *fe, s5h1420_set_tone() argument
156 struct s5h1420_state* state = fe->demodulator_priv; s5h1420_set_tone()
175 static int s5h1420_send_master_cmd (struct dvb_frontend* fe, s5h1420_send_master_cmd() argument
178 struct s5h1420_state* state = fe->demodulator_priv; s5h1420_send_master_cmd()
220 static int s5h1420_recv_slave_reply (struct dvb_frontend* fe, s5h1420_recv_slave_reply() argument
223 struct s5h1420_state* state = fe->demodulator_priv; s5h1420_recv_slave_reply()
275 static int s5h1420_send_burst(struct dvb_frontend *fe, s5h1420_send_burst() argument
278 struct s5h1420_state* state = fe->demodulator_priv; s5h1420_send_burst()
334 static int s5h1420_read_status(struct dvb_frontend *fe, s5h1420_read_status() argument
337 struct s5h1420_state* state = fe->demodulator_priv; s5h1420_read_status()
435 static int s5h1420_read_ber(struct dvb_frontend* fe, u32* ber) s5h1420_read_ber() argument
437 struct s5h1420_state* state = fe->demodulator_priv; s5h1420_read_ber()
447 static int s5h1420_read_signal_strength(struct dvb_frontend* fe, u16* strength) s5h1420_read_signal_strength() argument
449 struct s5h1420_state* state = fe->demodulator_priv; s5h1420_read_signal_strength()
458 static int s5h1420_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) s5h1420_read_ucblocks() argument
460 struct s5h1420_state* state = fe->demodulator_priv; s5h1420_read_ucblocks()
642 static int s5h1420_set_frontend(struct dvb_frontend *fe) s5h1420_set_frontend() argument
644 struct dtv_frontend_properties *p = &fe->dtv_property_cache; s5h1420_set_frontend()
645 struct s5h1420_state* state = fe->demodulator_priv; s5h1420_set_frontend()
652 s5h1420_get_tune_settings(fe, &fesettings); s5h1420_set_frontend()
660 if (fe->ops.tuner_ops.set_params) { s5h1420_set_frontend()
661 fe->ops.tuner_ops.set_params(fe); s5h1420_set_frontend()
662 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); s5h1420_set_frontend()
664 if (fe->ops.tuner_ops.get_frequency) { s5h1420_set_frontend()
666 fe->ops.tuner_ops.get_frequency(fe, &tmp); s5h1420_set_frontend()
667 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); s5h1420_set_frontend()
736 if (fe->ops.tuner_ops.set_params) { s5h1420_set_frontend()
737 fe->ops.tuner_ops.set_params(fe); s5h1420_set_frontend()
738 if (fe->ops.i2c_gate_ctrl) s5h1420_set_frontend()
739 fe->ops.i2c_gate_ctrl(fe, 0); s5h1420_set_frontend()
759 static int s5h1420_get_frontend(struct dvb_frontend* fe) s5h1420_get_frontend() argument
761 struct dtv_frontend_properties *p = &fe->dtv_property_cache; s5h1420_get_frontend()
762 struct s5h1420_state* state = fe->demodulator_priv; s5h1420_get_frontend()
772 static int s5h1420_get_tune_settings(struct dvb_frontend* fe, s5h1420_get_tune_settings() argument
775 struct dtv_frontend_properties *p = &fe->dtv_property_cache; s5h1420_get_tune_settings()
805 static int s5h1420_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) s5h1420_i2c_gate_ctrl() argument
807 struct s5h1420_state* state = fe->demodulator_priv; s5h1420_i2c_gate_ctrl()
815 static int s5h1420_init (struct dvb_frontend* fe) s5h1420_init() argument
817 struct s5h1420_state* state = fe->demodulator_priv; s5h1420_init()
828 static int s5h1420_sleep(struct dvb_frontend* fe) s5h1420_sleep() argument
830 struct s5h1420_state* state = fe->demodulator_priv; s5h1420_sleep()
835 static void s5h1420_release(struct dvb_frontend* fe) s5h1420_release() argument
837 struct s5h1420_state* state = fe->demodulator_priv; s5h1420_release()
876 struct i2c_adapter *s5h1420_get_tuner_i2c_adapter(struct dvb_frontend *fe) s5h1420_get_tuner_i2c_adapter() argument
878 struct s5h1420_state *state = fe->demodulator_priv; s5h1420_get_tuner_i2c_adapter()
H A Dm88rs2000.c56 printk(KERN_DEBUG "m88rs2000-fe: " args); \
61 printk(KERN_INFO "m88rs2000-fe: " format "\n" , ## arg)
113 static u32 m88rs2000_get_mclk(struct dvb_frontend *fe) m88rs2000_get_mclk() argument
115 struct m88rs2000_state *state = fe->demodulator_priv; m88rs2000_get_mclk()
131 static int m88rs2000_set_carrieroffset(struct dvb_frontend *fe, s16 offset) m88rs2000_set_carrieroffset() argument
133 struct m88rs2000_state *state = fe->demodulator_priv; m88rs2000_set_carrieroffset()
139 mclk = m88rs2000_get_mclk(fe); m88rs2000_set_carrieroffset()
159 static int m88rs2000_set_symbolrate(struct dvb_frontend *fe, u32 srate) m88rs2000_set_symbolrate() argument
161 struct m88rs2000_state *state = fe->demodulator_priv; m88rs2000_set_symbolrate()
170 mclk = m88rs2000_get_mclk(fe); m88rs2000_set_symbolrate()
205 static int m88rs2000_send_diseqc_msg(struct dvb_frontend *fe, m88rs2000_send_diseqc_msg() argument
208 struct m88rs2000_state *state = fe->demodulator_priv; m88rs2000_send_diseqc_msg()
249 static int m88rs2000_send_diseqc_burst(struct dvb_frontend *fe, m88rs2000_send_diseqc_burst() argument
252 struct m88rs2000_state *state = fe->demodulator_priv; m88rs2000_send_diseqc_burst()
267 static int m88rs2000_set_tone(struct dvb_frontend *fe, m88rs2000_set_tone() argument
270 struct m88rs2000_state *state = fe->demodulator_priv; m88rs2000_set_tone()
416 static int m88rs2000_set_voltage(struct dvb_frontend *fe, m88rs2000_set_voltage() argument
419 struct m88rs2000_state *state = fe->demodulator_priv; m88rs2000_set_voltage()
442 static int m88rs2000_init(struct dvb_frontend *fe) m88rs2000_init() argument
444 struct m88rs2000_state *state = fe->demodulator_priv; m88rs2000_init()
458 static int m88rs2000_sleep(struct dvb_frontend *fe) m88rs2000_sleep() argument
460 struct m88rs2000_state *state = fe->demodulator_priv; m88rs2000_sleep()
467 static int m88rs2000_read_status(struct dvb_frontend *fe, m88rs2000_read_status() argument
470 struct m88rs2000_state *state = fe->demodulator_priv; m88rs2000_read_status()
479 state->config->set_ts_params(fe, CALL_IS_READ); m88rs2000_read_status()
484 static int m88rs2000_read_ber(struct dvb_frontend *fe, u32 *ber) m88rs2000_read_ber() argument
486 struct m88rs2000_state *state = fe->demodulator_priv; m88rs2000_read_ber()
510 static int m88rs2000_read_signal_strength(struct dvb_frontend *fe, m88rs2000_read_signal_strength() argument
513 if (fe->ops.tuner_ops.get_rf_strength) m88rs2000_read_signal_strength()
514 fe->ops.tuner_ops.get_rf_strength(fe, strength); m88rs2000_read_signal_strength()
519 static int m88rs2000_read_snr(struct dvb_frontend *fe, u16 *snr) m88rs2000_read_snr() argument
521 struct m88rs2000_state *state = fe->demodulator_priv; m88rs2000_read_snr()
528 static int m88rs2000_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) m88rs2000_read_ucblocks() argument
530 struct m88rs2000_state *state = fe->demodulator_priv; m88rs2000_read_ucblocks()
608 static int m88rs2000_set_frontend(struct dvb_frontend *fe) m88rs2000_set_frontend() argument
610 struct m88rs2000_state *state = fe->demodulator_priv; m88rs2000_set_frontend()
611 struct dtv_frontend_properties *c = &fe->dtv_property_cache; m88rs2000_set_frontend()
628 if (fe->ops.tuner_ops.set_params) m88rs2000_set_frontend()
629 ret = fe->ops.tuner_ops.set_params(fe); m88rs2000_set_frontend()
634 if (fe->ops.tuner_ops.get_frequency) m88rs2000_set_frontend()
635 ret = fe->ops.tuner_ops.get_frequency(fe, &tuner_freq); m88rs2000_set_frontend()
649 ret |= m88rs2000_set_carrieroffset(fe, offset); m88rs2000_set_frontend()
675 ret = m88rs2000_set_symbolrate(fe, c->symbol_rate); m88rs2000_set_frontend()
711 static int m88rs2000_get_frontend(struct dvb_frontend *fe) m88rs2000_get_frontend() argument
713 struct dtv_frontend_properties *c = &fe->dtv_property_cache; m88rs2000_get_frontend()
714 struct m88rs2000_state *state = fe->demodulator_priv; m88rs2000_get_frontend()
721 static int m88rs2000_get_tune_settings(struct dvb_frontend *fe, m88rs2000_get_tune_settings() argument
724 struct dtv_frontend_properties *c = &fe->dtv_property_cache; m88rs2000_get_tune_settings()
737 static int m88rs2000_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) m88rs2000_i2c_gate_ctrl() argument
739 struct m88rs2000_state *state = fe->demodulator_priv; m88rs2000_i2c_gate_ctrl()
749 static void m88rs2000_release(struct dvb_frontend *fe) m88rs2000_release() argument
751 struct m88rs2000_state *state = fe->demodulator_priv; m88rs2000_release()
H A Dts2020.c35 struct dvb_frontend *fe; member in struct:ts2020_priv
37 int (*get_agc_pwm)(struct dvb_frontend *fe, u8 *_agc_pwm);
59 static int ts2020_release(struct dvb_frontend *fe) ts2020_release() argument
61 struct ts2020_priv *priv = fe->tuner_priv; ts2020_release()
70 static int ts2020_sleep(struct dvb_frontend *fe) ts2020_sleep() argument
72 struct ts2020_priv *priv = fe->tuner_priv; ts2020_sleep()
91 static int ts2020_init(struct dvb_frontend *fe) ts2020_init() argument
93 struct dtv_frontend_properties *c = &fe->dtv_property_cache; ts2020_init()
94 struct ts2020_priv *priv = fe->tuner_priv; ts2020_init()
165 static int ts2020_tuner_gate_ctrl(struct dvb_frontend *fe, u8 offset) ts2020_tuner_gate_ctrl() argument
167 struct ts2020_priv *priv = fe->tuner_priv; ts2020_tuner_gate_ctrl()
177 static int ts2020_set_tuner_rf(struct dvb_frontend *fe) ts2020_set_tuner_rf() argument
179 struct ts2020_priv *dev = fe->tuner_priv; ts2020_set_tuner_rf()
193 ret = ts2020_tuner_gate_ctrl(fe, 0x08); ts2020_set_tuner_rf()
198 static int ts2020_set_params(struct dvb_frontend *fe) ts2020_set_params() argument
200 struct dtv_frontend_properties *c = &fe->dtv_property_cache; ts2020_set_params()
201 struct ts2020_priv *priv = fe->tuner_priv; ts2020_set_params()
255 ret |= ts2020_tuner_gate_ctrl(fe, 0x10); ts2020_set_params()
259 ret |= ts2020_tuner_gate_ctrl(fe, 0x08); ts2020_set_params()
263 ret |= ts2020_set_tuner_rf(fe); ts2020_set_params()
267 ret |= ts2020_tuner_gate_ctrl(fe, 0x04); ts2020_set_params()
315 ret |= ts2020_tuner_gate_ctrl(fe, 0x04); ts2020_set_params()
317 ret |= ts2020_tuner_gate_ctrl(fe, 0x01); ts2020_set_params()
324 static int ts2020_get_frequency(struct dvb_frontend *fe, u32 *frequency) ts2020_get_frequency() argument
326 struct ts2020_priv *priv = fe->tuner_priv; ts2020_get_frequency()
332 static int ts2020_get_if_frequency(struct dvb_frontend *fe, u32 *frequency) ts2020_get_if_frequency() argument
340 * @fe: The front end for which we're determining the gain
346 static int ts2020_read_tuner_gain(struct dvb_frontend *fe, unsigned v_agc, ts2020_read_tuner_gain() argument
349 struct ts2020_priv *priv = fe->tuner_priv; ts2020_read_tuner_gain()
406 static int ts2020_get_tuner_gain(struct dvb_frontend *fe, __s64 *_gain) ts2020_get_tuner_gain() argument
408 struct ts2020_priv *priv = fe->tuner_priv; ts2020_get_tuner_gain()
414 ret = priv->get_agc_pwm(fe, &agc_pwm); ts2020_get_tuner_gain()
431 return ts2020_read_tuner_gain(fe, v_agc, _gain); ts2020_get_tuner_gain()
442 struct dtv_frontend_properties *c = &priv->fe->dtv_property_cache; ts2020_stat_work()
447 ret = ts2020_get_tuner_gain(priv->fe, &c->strength.stat[0].svalue); ts2020_stat_work()
463 static int ts2020_read_signal_strength(struct dvb_frontend *fe, ts2020_read_signal_strength() argument
466 struct dtv_frontend_properties *c = &fe->dtv_property_cache; ts2020_read_signal_strength()
467 struct ts2020_priv *priv = fe->tuner_priv; ts2020_read_signal_strength()
514 struct dvb_frontend *ts2020_attach(struct dvb_frontend *fe, ts2020_attach() argument
525 pdata.fe = fe; ts2020_attach()
536 return fe; ts2020_attach()
550 if (dev->fe->ops.i2c_gate_ctrl) ts2020_regmap_lock()
551 dev->fe->ops.i2c_gate_ctrl(dev->fe, 1); ts2020_regmap_lock()
558 if (dev->fe->ops.i2c_gate_ctrl) ts2020_regmap_unlock()
559 dev->fe->ops.i2c_gate_ctrl(dev->fe, 0); ts2020_regmap_unlock()
567 struct dvb_frontend *fe = pdata->fe; ts2020_probe() local
600 dev->fe = fe; ts2020_probe()
602 fe->tuner_priv = dev; ts2020_probe()
693 memcpy(&fe->ops.tuner_ops, &ts2020_tuner_ops, ts2020_probe()
696 fe->ops.tuner_ops.release = NULL; ts2020_probe()
H A Datbm8830.c230 static int atbm8830_init(struct dvb_frontend *fe) atbm8830_init() argument
232 struct atbm_state *priv = fe->demodulator_priv; atbm8830_init()
262 static void atbm8830_release(struct dvb_frontend *fe) atbm8830_release() argument
264 struct atbm_state *state = fe->demodulator_priv; atbm8830_release()
270 static int atbm8830_set_fe(struct dvb_frontend *fe) atbm8830_set_fe() argument
272 struct atbm_state *priv = fe->demodulator_priv; atbm8830_set_fe()
278 if (fe->ops.tuner_ops.set_params) { atbm8830_set_fe()
279 if (fe->ops.i2c_gate_ctrl) atbm8830_set_fe()
280 fe->ops.i2c_gate_ctrl(fe, 1); atbm8830_set_fe()
281 fe->ops.tuner_ops.set_params(fe); atbm8830_set_fe()
282 if (fe->ops.i2c_gate_ctrl) atbm8830_set_fe()
283 fe->ops.i2c_gate_ctrl(fe, 0); atbm8830_set_fe()
300 static int atbm8830_get_fe(struct dvb_frontend *fe) atbm8830_get_fe() argument
302 struct dtv_frontend_properties *c = &fe->dtv_property_cache; atbm8830_get_fe()
329 static int atbm8830_get_tune_settings(struct dvb_frontend *fe, atbm8830_get_tune_settings() argument
338 static int atbm8830_read_status(struct dvb_frontend *fe, atbm8830_read_status() argument
341 struct atbm_state *priv = fe->demodulator_priv; atbm8830_read_status()
361 static int atbm8830_read_ber(struct dvb_frontend *fe, u32 *ber) atbm8830_read_ber() argument
363 struct atbm_state *priv = fe->demodulator_priv; atbm8830_read_ber()
385 static int atbm8830_read_signal_strength(struct dvb_frontend *fe, u16 *signal) atbm8830_read_signal_strength() argument
387 struct atbm_state *priv = fe->demodulator_priv; atbm8830_read_signal_strength()
410 static int atbm8830_read_snr(struct dvb_frontend *fe, u16 *snr) atbm8830_read_snr() argument
417 static int atbm8830_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) atbm8830_read_ucblocks() argument
424 static int atbm8830_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) atbm8830_i2c_gate_ctrl() argument
426 struct atbm_state *priv = fe->demodulator_priv; atbm8830_i2c_gate_ctrl()
H A Disl6423.c87 static int isl6423_set_modulation(struct dvb_frontend *fe) isl6423_set_modulation() argument
89 struct isl6423_dev *isl6423 = (struct isl6423_dev *) fe->sec_priv; isl6423_set_modulation()
111 static int isl6423_voltage_boost(struct dvb_frontend *fe, long arg) isl6423_voltage_boost() argument
113 struct isl6423_dev *isl6423 = (struct isl6423_dev *) fe->sec_priv; isl6423_voltage_boost()
147 static int isl6423_set_voltage(struct dvb_frontend *fe, isl6423_set_voltage() argument
150 struct isl6423_dev *isl6423 = (struct isl6423_dev *) fe->sec_priv; isl6423_set_voltage()
196 static int isl6423_set_current(struct dvb_frontend *fe) isl6423_set_current() argument
198 struct isl6423_dev *isl6423 = (struct isl6423_dev *) fe->sec_priv; isl6423_set_current()
259 static void isl6423_release(struct dvb_frontend *fe) isl6423_release() argument
261 isl6423_set_voltage(fe, SEC_VOLTAGE_OFF); isl6423_release()
263 kfree(fe->sec_priv); isl6423_release()
264 fe->sec_priv = NULL; isl6423_release()
267 struct dvb_frontend *isl6423_attach(struct dvb_frontend *fe, isl6423_attach() argument
279 fe->sec_priv = isl6423; isl6423_attach()
286 if (isl6423_set_current(fe)) isl6423_attach()
289 if (isl6423_set_modulation(fe)) isl6423_attach()
292 fe->ops.release_sec = isl6423_release; isl6423_attach()
293 fe->ops.set_voltage = isl6423_set_voltage; isl6423_attach()
294 fe->ops.enable_high_lnb_voltage = isl6423_voltage_boost; isl6423_attach()
297 return fe; isl6423_attach()
301 fe->sec_priv = NULL; isl6423_attach()
H A Dnxt6000.c179 static void nxt6000_setup(struct dvb_frontend* fe) nxt6000_setup() argument
181 struct nxt6000_state* state = fe->demodulator_priv; nxt6000_setup()
219 printk("RS_COR_STAT: 0x%02X\n", nxt6000_readreg(fe, RS_COR_STAT)); nxt6000_dump_status()
220 printk("VIT_SYNC_STATUS: 0x%02X\n", nxt6000_readreg(fe, VIT_SYNC_STATUS)); nxt6000_dump_status()
221 printk("OFDM_COR_STAT: 0x%02X\n", nxt6000_readreg(fe, OFDM_COR_STAT)); nxt6000_dump_status()
222 printk("OFDM_SYR_STAT: 0x%02X\n", nxt6000_readreg(fe, OFDM_SYR_STAT)); nxt6000_dump_status()
223 printk("OFDM_TPS_RCVD_1: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RCVD_1)); nxt6000_dump_status()
224 printk("OFDM_TPS_RCVD_2: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RCVD_2)); nxt6000_dump_status()
225 printk("OFDM_TPS_RCVD_3: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RCVD_3)); nxt6000_dump_status()
226 printk("OFDM_TPS_RCVD_4: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RCVD_4)); nxt6000_dump_status()
227 printk("OFDM_TPS_RESERVED_1: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RESERVED_1)); nxt6000_dump_status()
228 printk("OFDM_TPS_RESERVED_2: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RESERVED_2)); nxt6000_dump_status()
423 static int nxt6000_read_status(struct dvb_frontend *fe, enum fe_status *status) nxt6000_read_status() argument
426 struct nxt6000_state* state = fe->demodulator_priv; nxt6000_read_status()
453 static int nxt6000_init(struct dvb_frontend* fe) nxt6000_init() argument
455 struct nxt6000_state* state = fe->demodulator_priv; nxt6000_init()
458 nxt6000_setup(fe); nxt6000_init()
463 static int nxt6000_set_frontend(struct dvb_frontend *fe) nxt6000_set_frontend() argument
465 struct dtv_frontend_properties *p = &fe->dtv_property_cache; nxt6000_set_frontend()
466 struct nxt6000_state* state = fe->demodulator_priv; nxt6000_set_frontend()
469 if (fe->ops.tuner_ops.set_params) { nxt6000_set_frontend()
470 fe->ops.tuner_ops.set_params(fe); nxt6000_set_frontend()
471 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); nxt6000_set_frontend()
494 static void nxt6000_release(struct dvb_frontend* fe) nxt6000_release() argument
496 struct nxt6000_state* state = fe->demodulator_priv; nxt6000_release()
500 static int nxt6000_read_snr(struct dvb_frontend* fe, u16* snr) nxt6000_read_snr() argument
502 struct nxt6000_state* state = fe->demodulator_priv; nxt6000_read_snr()
509 static int nxt6000_read_ber(struct dvb_frontend* fe, u32* ber) nxt6000_read_ber() argument
511 struct nxt6000_state* state = fe->demodulator_priv; nxt6000_read_ber()
523 static int nxt6000_read_signal_strength(struct dvb_frontend* fe, u16* signal_strength) nxt6000_read_signal_strength() argument
525 struct nxt6000_state* state = fe->demodulator_priv; nxt6000_read_signal_strength()
534 static int nxt6000_fe_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings *tune) nxt6000_fe_get_tune_settings() argument
540 static int nxt6000_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) nxt6000_i2c_gate_ctrl() argument
542 struct nxt6000_state* state = fe->demodulator_priv; nxt6000_i2c_gate_ctrl()
H A Dor51211.c33 #define OR51211_DEFAULT_FIRMWARE "dvb-fe-or51211.fw"
107 static int or51211_load_firmware (struct dvb_frontend* fe, or51211_load_firmware() argument
110 struct or51211_state* state = fe->demodulator_priv; or51211_load_firmware()
134 state->config->reset(fe); or51211_load_firmware()
166 static int or51211_setmode(struct dvb_frontend* fe, int mode) or51211_setmode() argument
168 struct or51211_state* state = fe->demodulator_priv; or51211_setmode()
171 state->config->setmode(fe, mode); or51211_setmode()
219 static int or51211_set_parameters(struct dvb_frontend *fe) or51211_set_parameters() argument
221 struct dtv_frontend_properties *p = &fe->dtv_property_cache; or51211_set_parameters()
222 struct or51211_state* state = fe->demodulator_priv; or51211_set_parameters()
226 if (fe->ops.tuner_ops.set_params) { or51211_set_parameters()
227 fe->ops.tuner_ops.set_params(fe); or51211_set_parameters()
228 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); or51211_set_parameters()
232 or51211_setmode(fe,0); or51211_set_parameters()
240 static int or51211_read_status(struct dvb_frontend *fe, enum fe_status *status) or51211_read_status() argument
242 struct or51211_state* state = fe->demodulator_priv; or51211_read_status()
295 static int or51211_read_snr(struct dvb_frontend* fe, u16* snr) or51211_read_snr() argument
297 struct or51211_state* state = fe->demodulator_priv; or51211_read_snr()
324 static int or51211_read_signal_strength(struct dvb_frontend* fe, u16* strength) or51211_read_signal_strength() argument
329 struct or51211_state* state = (struct or51211_state*)fe->demodulator_priv; or51211_read_signal_strength()
333 ret = fe->ops.read_snr(fe, &snr); or51211_read_signal_strength()
346 static int or51211_read_ber(struct dvb_frontend* fe, u32* ber) or51211_read_ber() argument
352 static int or51211_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) or51211_read_ucblocks() argument
358 static int or51211_sleep(struct dvb_frontend* fe) or51211_sleep() argument
363 static int or51211_init(struct dvb_frontend* fe) or51211_init() argument
365 struct or51211_state* state = fe->demodulator_priv; or51211_init()
376 ret = config->request_firmware(fe, &fw, or51211_init()
385 ret = or51211_load_firmware(fe, fw); or51211_init()
495 static int or51211_get_tune_settings(struct dvb_frontend* fe, or51211_get_tune_settings() argument
504 static void or51211_release(struct dvb_frontend* fe) or51211_release() argument
506 struct or51211_state* state = fe->demodulator_priv; or51211_release()
507 state->config->sleep(fe); or51211_release()
H A Dstv0288.h43 int (*set_ts_params)(struct dvb_frontend *fe, int is_punctured);
58 static inline int stv0288_writereg(struct dvb_frontend *fe, u8 reg, u8 val) stv0288_writereg() argument
62 if (fe->ops.write) stv0288_writereg()
63 r = fe->ops.write(fe, buf, 2); stv0288_writereg()
H A Dstv0299.c97 static int stv0299_write(struct dvb_frontend* fe, const u8 buf[], int len) stv0299_write() argument
99 struct stv0299_state* state = fe->demodulator_priv; stv0299_write()
225 static int stv0299_set_symbolrate (struct dvb_frontend* fe, u32 srate) stv0299_set_symbolrate() argument
227 struct stv0299_state* state = fe->demodulator_priv; stv0299_set_symbolrate()
240 return state->config->set_symbol_rate(fe, srate, ratio); stv0299_set_symbolrate()
275 static int stv0299_send_diseqc_msg (struct dvb_frontend* fe, stv0299_send_diseqc_msg() argument
278 struct stv0299_state* state = fe->demodulator_priv; stv0299_send_diseqc_msg()
306 static int stv0299_send_diseqc_burst(struct dvb_frontend *fe, stv0299_send_diseqc_burst() argument
309 struct stv0299_state* state = fe->demodulator_priv; stv0299_send_diseqc_burst()
334 static int stv0299_set_tone(struct dvb_frontend *fe, stv0299_set_tone() argument
337 struct stv0299_state* state = fe->demodulator_priv; stv0299_set_tone()
357 static int stv0299_set_voltage(struct dvb_frontend *fe, stv0299_set_voltage() argument
360 struct stv0299_state* state = fe->demodulator_priv; stv0299_set_voltage()
403 static int stv0299_send_legacy_dish_cmd (struct dvb_frontend* fe, unsigned long cmd) stv0299_send_legacy_dish_cmd() argument
405 struct stv0299_state* state = fe->demodulator_priv; stv0299_send_legacy_dish_cmd()
448 __func__, fe->dvb->num); stv0299_send_legacy_dish_cmd()
457 static int stv0299_init (struct dvb_frontend* fe) stv0299_init() argument
459 struct stv0299_state* state = fe->demodulator_priv; stv0299_init()
484 static int stv0299_read_status(struct dvb_frontend *fe, stv0299_read_status() argument
487 struct stv0299_state* state = fe->demodulator_priv; stv0299_read_status()
513 static int stv0299_read_ber(struct dvb_frontend* fe, u32* ber) stv0299_read_ber() argument
515 struct stv0299_state* state = fe->demodulator_priv; stv0299_read_ber()
525 static int stv0299_read_signal_strength(struct dvb_frontend* fe, u16* strength) stv0299_read_signal_strength() argument
527 struct stv0299_state* state = fe->demodulator_priv; stv0299_read_signal_strength()
542 static int stv0299_read_snr(struct dvb_frontend* fe, u16* snr) stv0299_read_snr() argument
544 struct stv0299_state* state = fe->demodulator_priv; stv0299_read_snr()
554 static int stv0299_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) stv0299_read_ucblocks() argument
556 struct stv0299_state* state = fe->demodulator_priv; stv0299_read_ucblocks()
568 static int stv0299_set_frontend(struct dvb_frontend *fe) stv0299_set_frontend() argument
570 struct dtv_frontend_properties *p = &fe->dtv_property_cache; stv0299_set_frontend()
571 struct stv0299_state* state = fe->demodulator_priv; stv0299_set_frontend()
576 state->config->set_ts_params(fe, 0); stv0299_set_frontend()
588 if (fe->ops.tuner_ops.set_params) { stv0299_set_frontend()
589 fe->ops.tuner_ops.set_params(fe); stv0299_set_frontend()
590 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); stv0299_set_frontend()
594 stv0299_set_symbolrate(fe, p->symbol_rate); stv0299_set_frontend()
605 static int stv0299_get_frontend(struct dvb_frontend *fe) stv0299_get_frontend() argument
607 struct dtv_frontend_properties *p = &fe->dtv_property_cache; stv0299_get_frontend()
608 struct stv0299_state* state = fe->demodulator_priv; stv0299_get_frontend()
631 static int stv0299_sleep(struct dvb_frontend* fe) stv0299_sleep() argument
633 struct stv0299_state* state = fe->demodulator_priv; stv0299_sleep()
641 static int stv0299_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) stv0299_i2c_gate_ctrl() argument
643 struct stv0299_state* state = fe->demodulator_priv; stv0299_i2c_gate_ctrl()
654 static int stv0299_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings) stv0299_get_tune_settings() argument
656 struct stv0299_state* state = fe->demodulator_priv; stv0299_get_tune_settings()
657 struct dtv_frontend_properties *p = &fe->dtv_property_cache; stv0299_get_tune_settings()
670 static void stv0299_release(struct dvb_frontend* fe) stv0299_release() argument
672 struct stv0299_state* state = fe->demodulator_priv; stv0299_release()
H A Ddib8000.c93 struct dvb_frontend *fe[MAX_NUMBER_OF_FRONTENDS]; member in struct:dib8000_state
378 switch (state->fe[0]->dtv_property_cache.transmission_mode) { fft_to_mode()
401 static int dib8000_set_output_mode(struct dvb_frontend *fe, int mode) dib8000_set_output_mode() argument
403 struct dib8000_state *state = fe->demodulator_priv; dib8000_set_output_mode()
412 &state->fe[0], mode); dib8000_set_output_mode()
447 &state->fe[0]); dib8000_set_output_mode()
462 static int dib8000_set_diversity_in(struct dvb_frontend *fe, int onoff) dib8000_set_diversity_in() argument
464 struct dib8000_state *state = fe->demodulator_priv; dib8000_set_diversity_in()
613 static int dib8000_set_bandwidth(struct dvb_frontend *fe, u32 bw) dib8000_set_bandwidth() argument
615 struct dib8000_state *state = fe->demodulator_priv; dib8000_set_bandwidth()
659 static int dib8000_set_wbd_ref(struct dvb_frontend *fe, u16 value) dib8000_set_wbd_ref() argument
661 struct dib8000_state *state = fe->demodulator_priv; dib8000_set_wbd_ref()
741 static int dib8000_update_pll(struct dvb_frontend *fe, dib8000_update_pll() argument
744 struct dib8000_state *state = fe->demodulator_priv; dib8000_update_pll()
849 static int dib8000_set_gpio(struct dvb_frontend *fe, u8 num, u8 dir, u8 val) dib8000_set_gpio() argument
851 struct dib8000_state *state = fe->demodulator_priv; dib8000_set_gpio()
989 static int dib8000_read_unc_blocks(struct dvb_frontend *fe, u32 *unc);
991 static void dib8000_reset_stats(struct dvb_frontend *fe) dib8000_reset_stats() argument
993 struct dib8000_state *state = fe->demodulator_priv; dib8000_reset_stats()
994 struct dtv_frontend_properties *c = &state->fe[0]->dtv_property_cache; dib8000_reset_stats()
1019 dib8000_read_unc_blocks(fe, &ucb); dib8000_reset_stats()
1028 static int dib8000_reset(struct dvb_frontend *fe) dib8000_reset() argument
1030 struct dib8000_state *state = fe->demodulator_priv; dib8000_reset()
1086 (dib8000_set_output_mode(fe, OUTMODE_HIGH_Z) != 0)) dib8000_reset()
1122 dib8000_set_bandwidth(fe, 6000); dib8000_reset()
1134 dib8000_reset_stats(fe); dib8000_reset()
1154 if (state->cfg.update_lna(state->fe[0], dyn_gain)) { dib8000_update_lna()
1228 static void dib8000_pwm_agc_reset(struct dvb_frontend *fe) dib8000_pwm_agc_reset() argument
1230 struct dib8000_state *state = fe->demodulator_priv; dib8000_pwm_agc_reset()
1232 dib8000_set_agc_config(state, (unsigned char)(BAND_OF_FREQUENCY(fe->dtv_property_cache.frequency / 1000))); dib8000_pwm_agc_reset()
1261 static int dib8000_agc_startup(struct dvb_frontend *fe) dib8000_agc_startup() argument
1263 struct dib8000_state *state = fe->demodulator_priv; dib8000_agc_startup()
1291 if (dib8000_set_agc_config(state, (unsigned char)(BAND_OF_FREQUENCY(fe->dtv_property_cache.frequency / 1000))) != 0) { dib8000_agc_startup()
1304 state->cfg.agc_control(fe, 1); dib8000_agc_startup()
1328 state->cfg.agc_control(fe, 0); dib8000_agc_startup()
1522 static int dib8096p_set_diversity_in(struct dvb_frontend *fe, int onoff) dib8096p_set_diversity_in() argument
1524 struct dib8000_state *state = fe->demodulator_priv; dib8096p_set_diversity_in()
1553 dib8000_set_diversity_in(state->fe[0], onoff); dib8096p_set_diversity_in()
1557 static int dib8096p_set_output_mode(struct dvb_frontend *fe, int mode) dib8096p_set_output_mode() argument
1559 struct dib8000_state *state = fe->demodulator_priv; dib8096p_set_output_mode()
1881 static struct i2c_adapter *dib8096p_get_i2c_tuner(struct dvb_frontend *fe) dib8096p_get_i2c_tuner() argument
1883 struct dib8000_state *st = fe->demodulator_priv; dib8096p_get_i2c_tuner()
1887 static int dib8096p_tuner_sleep(struct dvb_frontend *fe, int onoff) dib8096p_tuner_sleep() argument
1889 struct dib8000_state *state = fe->demodulator_priv; dib8096p_tuner_sleep()
1917 static s32 dib8000_get_adc_power(struct dvb_frontend *fe, u8 mode) dib8000_get_adc_power() argument
1919 struct dib8000_state *state = fe->demodulator_priv; dib8000_get_adc_power()
1936 static int dib8090p_get_dc_power(struct dvb_frontend *fe, u8 IQ) dib8090p_get_dc_power() argument
1938 struct dib8000_state *state = fe->demodulator_priv; dib8090p_get_dc_power()
1964 static u32 dib8000_ctrl_timf(struct dvb_frontend *fe, uint8_t op, uint32_t timf) dib8000_ctrl_timf() argument
1966 struct dib8000_state *state = fe->demodulator_priv; dib8000_ctrl_timf()
1978 dib8000_set_bandwidth(state->fe[0], 6000); dib8000_ctrl_timf()
1992 struct dtv_frontend_properties *c = &state->fe[0]->dtv_property_cache; dib8000_set_layer()
2123 switch (state->fe[0]->dtv_property_cache.transmission_mode) { dib8000_get_init_prbs()
2186 struct dtv_frontend_properties *c = &state->fe[0]->dtv_property_cache; dib8000_small_fine_tune()
2270 struct dtv_frontend_properties *c = &state->fe[0]->dtv_property_cache; dib8000_set_sb_channel()
2345 struct dtv_frontend_properties *c = &state->fe[0]->dtv_property_cache; dib8000_set_isdbt_common_channel()
2488 static int dib8000_autosearch_start(struct dvb_frontend *fe) dib8000_autosearch_start() argument
2490 struct dib8000_state *state = fe->demodulator_priv; dib8000_autosearch_start()
2491 struct dtv_frontend_properties *c = &state->fe[0]->dtv_property_cache; dib8000_autosearch_start()
2633 static int dib8000_autosearch_irq(struct dvb_frontend *fe) dib8000_autosearch_irq() argument
2635 struct dib8000_state *state = fe->demodulator_priv; dib8000_autosearch_irq()
2714 struct dtv_frontend_properties *c = &state->fe[0]->dtv_property_cache; dib8000_set_frequency_offset()
2719 if (state->fe[0]->ops.tuner_ops.get_frequency) dib8000_set_frequency_offset()
2720 state->fe[0]->ops.tuner_ops.get_frequency(state->fe[0], &current_rf); dib8000_set_frequency_offset()
2751 struct dtv_frontend_properties *c = &state->fe[0]->dtv_property_cache; dib8000_get_symbol_duration()
2773 struct dtv_frontend_properties *c = &state->fe[0]->dtv_property_cache; dib8000_set_isdbt_loop_params()
2819 struct dtv_frontend_properties *c = &state->fe[0]->dtv_property_cache; dib8000_set_sync_wait()
2852 static s32 dib8000_get_status(struct dvb_frontend *fe) dib8000_get_status() argument
2854 struct dib8000_state *state = fe->demodulator_priv; dib8000_get_status()
2858 static enum frontend_tune_state dib8000_get_tune_state(struct dvb_frontend *fe) dib8000_get_tune_state() argument
2860 struct dib8000_state *state = fe->demodulator_priv; dib8000_get_tune_state()
2864 static int dib8000_set_tune_state(struct dvb_frontend *fe, enum frontend_tune_state tune_state) dib8000_set_tune_state() argument
2866 struct dib8000_state *state = fe->demodulator_priv; dib8000_set_tune_state()
2872 static int dib8000_tune_restart_from_demod(struct dvb_frontend *fe) dib8000_tune_restart_from_demod() argument
2874 struct dib8000_state *state = fe->demodulator_priv; dib8000_tune_restart_from_demod()
2881 static u16 dib8000_read_lock(struct dvb_frontend *fe) dib8000_read_lock() argument
2883 struct dib8000_state *state = fe->demodulator_priv; dib8000_read_lock()
2992 static int dib8000_tune(struct dvb_frontend *fe) dib8000_tune() argument
2994 struct dib8000_state *state = fe->demodulator_priv; dib8000_tune()
2995 struct dtv_frontend_properties *c = &state->fe[0]->dtv_property_cache; dib8000_tune()
3018 dib8000_reset_stats(fe); dib8000_tune()
3034 dib8000_set_bandwidth(fe, c->bandwidth_hz / 1000); dib8000_tune()
3063 dib8000_autosearch_start(fe); dib8000_tune()
3072 switch (dib8000_autosearch_irq(fe)) { dib8000_tune()
3163 dib8000_set_diversity_in(state->fe[0], state->diversity_onoff); dib8000_tune()
3172 locks = dib8000_read_lock(fe); dib8000_tune()
3188 if ((state->fe[1] != NULL) && (state->output_mode != OUTMODE_DIVERSITY)) { dib8000_tune()
3189 /* if there is a diversity fe in input and this fe is has not already failled : wait here until this this fe has succedeed or failled */ dib8000_tune()
3190 if (dib8000_get_status(state->fe[1]) <= FE_STATUS_STD_SUCCESS) /* Something is locked on the input fe */ dib8000_tune()
3192 else if (dib8000_get_status(state->fe[1]) >= FE_STATUS_TUNE_TIME_TOO_SHORT) { /* fe in input failled also, break the current one */ dib8000_tune()
3207 locks = dib8000_read_lock(fe); dib8000_tune()
3232 if ((state->revision == 0x8090) || ((dib8000_read_word(state, 1291) >> 9) & 0x1)) { /* fe capable of deinterleaving : esram */ dib8000_tune()
3264 locks = dib8000_read_lock(fe); dib8000_tune()
3342 static int dib8000_wakeup(struct dvb_frontend *fe) dib8000_wakeup() argument
3344 struct dib8000_state *state = fe->demodulator_priv; dib8000_wakeup()
3356 for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) { dib8000_wakeup()
3357 ret = state->fe[index_frontend]->ops.init(state->fe[index_frontend]); dib8000_wakeup()
3365 static int dib8000_sleep(struct dvb_frontend *fe) dib8000_sleep() argument
3367 struct dib8000_state *state = fe->demodulator_priv; dib8000_sleep()
3371 for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) { dib8000_sleep()
3372 ret = state->fe[index_frontend]->ops.sleep(state->fe[index_frontend]); dib8000_sleep()
3378 dib8000_set_output_mode(fe, OUTMODE_HIGH_Z); dib8000_sleep()
3383 static int dib8000_read_status(struct dvb_frontend *fe, enum fe_status *stat);
3385 static int dib8000_get_frontend(struct dvb_frontend *fe) dib8000_get_frontend() argument
3387 struct dib8000_state *state = fe->demodulator_priv; dib8000_get_frontend()
3392 fe->dtv_property_cache.bandwidth_hz = 6000000; dib8000_get_frontend()
3399 dib8000_read_status(fe, &stat); dib8000_get_frontend()
3404 for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) { dib8000_get_frontend()
3405 state->fe[index_frontend]->ops.read_status(state->fe[index_frontend], &stat); dib8000_get_frontend()
3409 state->fe[index_frontend]->ops.get_frontend(state->fe[index_frontend]); dib8000_get_frontend()
3410 for (sub_index_frontend = 0; (sub_index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[sub_index_frontend] != NULL); sub_index_frontend++) { dib8000_get_frontend()
3412 state->fe[sub_index_frontend]->dtv_property_cache.isdbt_sb_mode = state->fe[index_frontend]->dtv_property_cache.isdbt_sb_mode; dib8000_get_frontend()
3413 state->fe[sub_index_frontend]->dtv_property_cache.inversion = state->fe[index_frontend]->dtv_property_cache.inversion; dib8000_get_frontend()
3414 state->fe[sub_index_frontend]->dtv_property_cache.transmission_mode = state->fe[index_frontend]->dtv_property_cache.transmission_mode; dib8000_get_frontend()
3415 state->fe[sub_index_frontend]->dtv_property_cache.guard_interval = state->fe[index_frontend]->dtv_property_cache.guard_interval; dib8000_get_frontend()
3416 state->fe[sub_index_frontend]->dtv_property_cache.isdbt_partial_reception = state->fe[index_frontend]->dtv_property_cache.isdbt_partial_reception; dib8000_get_frontend()
3418 state->fe[sub_index_frontend]->dtv_property_cache.layer[i].segment_count = state->fe[index_frontend]->dtv_property_cache.layer[i].segment_count; dib8000_get_frontend()
3419 state->fe[sub_index_frontend]->dtv_property_cache.layer[i].interleaving = state->fe[index_frontend]->dtv_property_cache.layer[i].interleaving; dib8000_get_frontend()
3420 state->fe[sub_index_frontend]->dtv_property_cache.layer[i].fec = state->fe[index_frontend]->dtv_property_cache.layer[i].fec; dib8000_get_frontend()
3421 state->fe[sub_index_frontend]->dtv_property_cache.layer[i].modulation = state->fe[index_frontend]->dtv_property_cache.layer[i].modulation; dib8000_get_frontend()
3429 fe->dtv_property_cache.isdbt_sb_mode = dib8000_read_word(state, 508) & 0x1; dib8000_get_frontend()
3435 fe->dtv_property_cache.inversion = (val & 0x40) >> 6; dib8000_get_frontend()
3438 fe->dtv_property_cache.transmission_mode = TRANSMISSION_MODE_2K; dib8000_get_frontend()
3442 fe->dtv_property_cache.transmission_mode = TRANSMISSION_MODE_4K; dib8000_get_frontend()
3447 fe->dtv_property_cache.transmission_mode = TRANSMISSION_MODE_8K; dib8000_get_frontend()
3454 fe->dtv_property_cache.guard_interval = GUARD_INTERVAL_1_32; dib8000_get_frontend()
3458 fe->dtv_property_cache.guard_interval = GUARD_INTERVAL_1_16; dib8000_get_frontend()
3463 fe->dtv_property_cache.guard_interval = GUARD_INTERVAL_1_8; dib8000_get_frontend()
3467 fe->dtv_property_cache.guard_interval = GUARD_INTERVAL_1_4; dib8000_get_frontend()
3472 fe->dtv_property_cache.isdbt_partial_reception = val & 1; dib8000_get_frontend()
3473 dprintk("dib8000_get_frontend: partial_reception = %d ", fe->dtv_property_cache.isdbt_partial_reception); dib8000_get_frontend()
3479 fe->dtv_property_cache.layer[i].segment_count = val; dib8000_get_frontend()
3488 i, fe->dtv_property_cache.layer[i].segment_count); dib8000_get_frontend()
3494 fe->dtv_property_cache.layer[i].interleaving = val; dib8000_get_frontend()
3497 i, fe->dtv_property_cache.layer[i].interleaving); dib8000_get_frontend()
3502 fe->dtv_property_cache.layer[i].fec = FEC_1_2; dib8000_get_frontend()
3507 fe->dtv_property_cache.layer[i].fec = FEC_2_3; dib8000_get_frontend()
3512 fe->dtv_property_cache.layer[i].fec = FEC_3_4; dib8000_get_frontend()
3517 fe->dtv_property_cache.layer[i].fec = FEC_5_6; dib8000_get_frontend()
3522 fe->dtv_property_cache.layer[i].fec = FEC_7_8; dib8000_get_frontend()
3531 fe->dtv_property_cache.layer[i].modulation = DQPSK; dib8000_get_frontend()
3536 fe->dtv_property_cache.layer[i].modulation = QPSK; dib8000_get_frontend()
3541 fe->dtv_property_cache.layer[i].modulation = QAM_16; dib8000_get_frontend()
3547 fe->dtv_property_cache.layer[i].modulation = QAM_64; dib8000_get_frontend()
3555 for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) { dib8000_get_frontend()
3556 state->fe[index_frontend]->dtv_property_cache.isdbt_sb_mode = fe->dtv_property_cache.isdbt_sb_mode; dib8000_get_frontend()
3557 state->fe[index_frontend]->dtv_property_cache.inversion = fe->dtv_property_cache.inversion; dib8000_get_frontend()
3558 state->fe[index_frontend]->dtv_property_cache.transmission_mode = fe->dtv_property_cache.transmission_mode; dib8000_get_frontend()
3559 state->fe[index_frontend]->dtv_property_cache.guard_interval = fe->dtv_property_cache.guard_interval; dib8000_get_frontend()
3560 state->fe[index_frontend]->dtv_property_cache.isdbt_partial_reception = fe->dtv_property_cache.isdbt_partial_reception; dib8000_get_frontend()
3562 state->fe[index_frontend]->dtv_property_cache.layer[i].segment_count = fe->dtv_property_cache.layer[i].segment_count; dib8000_get_frontend()
3563 state->fe[index_frontend]->dtv_property_cache.layer[i].interleaving = fe->dtv_property_cache.layer[i].interleaving; dib8000_get_frontend()
3564 state->fe[index_frontend]->dtv_property_cache.layer[i].fec = fe->dtv_property_cache.layer[i].fec; dib8000_get_frontend()
3565 state->fe[index_frontend]->dtv_property_cache.layer[i].modulation = fe->dtv_property_cache.layer[i].modulation; dib8000_get_frontend()
3571 static int dib8000_set_frontend(struct dvb_frontend *fe) dib8000_set_frontend() argument
3573 struct dib8000_state *state = fe->demodulator_priv; dib8000_set_frontend()
3574 struct dtv_frontend_properties *c = &state->fe[0]->dtv_property_cache; dib8000_set_frontend()
3589 for (index_frontend = 0; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) { dib8000_set_frontend()
3591 state->fe[index_frontend]->dtv_property_cache.delivery_system = SYS_ISDBT; dib8000_set_frontend()
3592 memcpy(&state->fe[index_frontend]->dtv_property_cache, &fe->dtv_property_cache, sizeof(struct dtv_frontend_properties)); dib8000_set_frontend()
3596 dib8000_set_diversity_in(state->fe[index_frontend], 1); dib8000_set_frontend()
3598 dib8000_set_output_mode(state->fe[index_frontend], dib8000_set_frontend()
3601 dib8000_set_output_mode(state->fe[0], OUTMODE_HIGH_Z); dib8000_set_frontend()
3603 dib8096p_set_diversity_in(state->fe[index_frontend], 1); dib8000_set_frontend()
3605 dib8096p_set_output_mode(state->fe[index_frontend], dib8000_set_frontend()
3608 dib8096p_set_output_mode(state->fe[0], OUTMODE_HIGH_Z); dib8000_set_frontend()
3612 if (state->fe[index_frontend]->ops.tuner_ops.set_params) dib8000_set_frontend()
3613 state->fe[index_frontend]->ops.tuner_ops.set_params(state->fe[index_frontend]); dib8000_set_frontend()
3615 dib8000_set_tune_state(state->fe[index_frontend], CT_AGC_START); dib8000_set_frontend()
3620 dib8000_set_diversity_in(state->fe[index_frontend - 1], 0); dib8000_set_frontend()
3622 dib8096p_set_diversity_in(state->fe[index_frontend - 1], 0); dib8000_set_frontend()
3626 time = dib8000_agc_startup(state->fe[0]); dib8000_set_frontend()
3627 for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) { dib8000_set_frontend()
3628 time_slave = dib8000_agc_startup(state->fe[index_frontend]); dib8000_set_frontend()
3648 for (index_frontend = 0; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) { dib8000_set_frontend()
3649 if (dib8000_get_tune_state(state->fe[index_frontend]) != CT_AGC_STOP) { dib8000_set_frontend()
3656 for (index_frontend = 0; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) dib8000_set_frontend()
3657 dib8000_set_tune_state(state->fe[index_frontend], CT_DEMOD_START); dib8000_set_frontend()
3662 for (index_frontend = 0; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) { dib8000_set_frontend()
3663 delay = dib8000_tune(state->fe[index_frontend]); dib8000_set_frontend()
3672 if ((dib8000_get_status(state->fe[index_frontend]) == FE_STATUS_DEMOD_SUCCESS) || (dib8000_get_status(state->fe[index_frontend]) == FE_STATUS_FFT_SUCCESS)) { dib8000_set_frontend()
3673 dprintk("autosearch succeeded on fe%i", index_frontend); dib8000_set_frontend()
3674 dib8000_get_frontend(state->fe[index_frontend]); /* we read the channel parameters from the frontend which was successful */ dib8000_set_frontend()
3677 for (l = 0; (l < MAX_NUMBER_OF_FRONTENDS) && (state->fe[l] != NULL); l++) { dib8000_set_frontend()
3680 dib8000_tune_restart_from_demod(state->fe[l]); dib8000_set_frontend()
3682 state->fe[l]->dtv_property_cache.isdbt_sb_mode = state->fe[index_frontend]->dtv_property_cache.isdbt_sb_mode; dib8000_set_frontend()
3683 state->fe[l]->dtv_property_cache.inversion = state->fe[index_frontend]->dtv_property_cache.inversion; dib8000_set_frontend()
3684 state->fe[l]->dtv_property_cache.transmission_mode = state->fe[index_frontend]->dtv_property_cache.transmission_mode; dib8000_set_frontend()
3685 state->fe[l]->dtv_property_cache.guard_interval = state->fe[index_frontend]->dtv_property_cache.guard_interval; dib8000_set_frontend()
3686 state->fe[l]->dtv_property_cache.isdbt_partial_reception = state->fe[index_frontend]->dtv_property_cache.isdbt_partial_reception; dib8000_set_frontend()
3688 state->fe[l]->dtv_property_cache.layer[i].segment_count = state->fe[index_frontend]->dtv_property_cache.layer[i].segment_count; dib8000_set_frontend()
3689 state->fe[l]->dtv_property_cache.layer[i].interleaving = state->fe[index_frontend]->dtv_property_cache.layer[i].interleaving; dib8000_set_frontend()
3690 state->fe[l]->dtv_property_cache.layer[i].fec = state->fe[index_frontend]->dtv_property_cache.layer[i].fec; dib8000_set_frontend()
3691 state->fe[l]->dtv_property_cache.layer[i].modulation = state->fe[index_frontend]->dtv_property_cache.layer[i].modulation; dib8000_set_frontend()
3700 if (dib8000_get_status(state->fe[0]) == FE_STATUS_TUNE_FAILED || dib8000_set_frontend()
3701 dib8000_get_status(state->fe[0]) == FE_STATUS_LOCKED || dib8000_set_frontend()
3702 dib8000_get_status(state->fe[0]) == FE_STATUS_DATA_LOCKED) { dib8000_set_frontend()
3705 for (index_frontend = 0; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) { dib8000_set_frontend()
3706 if (dib8000_get_tune_state(state->fe[index_frontend]) != CT_DEMOD_STOP) dib8000_set_frontend()
3710 dprintk("tuning done with status %d", dib8000_get_status(state->fe[0])); dib8000_set_frontend()
3724 dib8000_set_output_mode(state->fe[0], state->cfg.output_mode); dib8000_set_frontend()
3726 dib8096p_set_output_mode(state->fe[0], state->cfg.output_mode); dib8000_set_frontend()
3736 static int dib8000_get_stats(struct dvb_frontend *fe, enum fe_status stat);
3738 static int dib8000_read_status(struct dvb_frontend *fe, enum fe_status *stat) dib8000_read_status() argument
3740 struct dib8000_state *state = fe->demodulator_priv; dib8000_read_status()
3744 lock = dib8000_read_lock(fe); dib8000_read_status()
3745 for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) dib8000_read_status()
3746 lock_slave |= dib8000_read_lock(state->fe[index_frontend]); dib8000_read_status()
3775 dib8000_get_stats(fe, *stat); dib8000_read_status()
3780 static int dib8000_read_ber(struct dvb_frontend *fe, u32 * ber) dib8000_read_ber() argument
3782 struct dib8000_state *state = fe->demodulator_priv; dib8000_read_ber()
3794 static int dib8000_read_unc_blocks(struct dvb_frontend *fe, u32 * unc) dib8000_read_unc_blocks() argument
3796 struct dib8000_state *state = fe->demodulator_priv; dib8000_read_unc_blocks()
3806 static int dib8000_read_signal_strength(struct dvb_frontend *fe, u16 * strength) dib8000_read_signal_strength() argument
3808 struct dib8000_state *state = fe->demodulator_priv; dib8000_read_signal_strength()
3813 for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) { dib8000_read_signal_strength()
3814 state->fe[index_frontend]->ops.read_signal_strength(state->fe[index_frontend], &val); dib8000_read_signal_strength()
3829 static u32 dib8000_get_snr(struct dvb_frontend *fe) dib8000_get_snr() argument
3831 struct dib8000_state *state = fe->demodulator_priv; dib8000_get_snr()
3862 static int dib8000_read_snr(struct dvb_frontend *fe, u16 * snr) dib8000_read_snr() argument
3864 struct dib8000_state *state = fe->demodulator_priv; dib8000_read_snr()
3868 snr_master = dib8000_get_snr(fe); dib8000_read_snr()
3869 for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) dib8000_read_snr()
3870 snr_master += dib8000_get_snr(state->fe[index_frontend]); dib8000_read_snr()
3978 static u32 dib8000_get_time_us(struct dvb_frontend *fe, int layer) dib8000_get_time_us() argument
3980 struct dib8000_state *state = fe->demodulator_priv; dib8000_get_time_us()
3981 struct dtv_frontend_properties *c = &state->fe[0]->dtv_property_cache; dib8000_get_time_us()
4092 static int dib8000_get_stats(struct dvb_frontend *fe, enum fe_status stat) dib8000_get_stats() argument
4094 struct dib8000_state *state = fe->demodulator_priv; dib8000_get_stats()
4095 struct dtv_frontend_properties *c = &state->fe[0]->dtv_property_cache; dib8000_get_stats()
4104 dib8000_read_signal_strength(fe, &strength); dib8000_get_stats()
4131 snr = dib8000_get_snr(fe); dib8000_get_stats()
4133 if (state->fe[i]) dib8000_get_stats()
4134 snr += dib8000_get_snr(state->fe[i]); dib8000_get_stats()
4148 dib8000_read_unc_blocks(fe, &val); dib8000_get_stats()
4157 time_us = dib8000_get_time_us(fe, -1); dib8000_get_stats()
4171 time_us = dib8000_get_time_us(fe, -1); dib8000_get_stats()
4176 dib8000_read_ber(fe, &val); dib8000_get_stats()
4200 time_us = dib8000_get_time_us(fe, i); dib8000_get_stats()
4221 time_us = dib8000_get_time_us(fe, i); dib8000_get_stats()
4233 static int dib8000_set_slave_frontend(struct dvb_frontend *fe, struct dvb_frontend *fe_slave) dib8000_set_slave_frontend() argument
4235 struct dib8000_state *state = fe->demodulator_priv; dib8000_set_slave_frontend()
4238 while ((index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL)) dib8000_set_slave_frontend()
4241 dprintk("set slave fe %p to index %i", fe_slave, index_frontend); dib8000_set_slave_frontend()
4242 state->fe[index_frontend] = fe_slave; dib8000_set_slave_frontend()
4250 static int dib8000_remove_slave_frontend(struct dvb_frontend *fe) dib8000_remove_slave_frontend() argument
4252 struct dib8000_state *state = fe->demodulator_priv; dib8000_remove_slave_frontend()
4255 while ((index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL)) dib8000_remove_slave_frontend()
4258 dprintk("remove slave fe %p (index %i)", state->fe[index_frontend-1], index_frontend-1); dib8000_remove_slave_frontend()
4259 state->fe[index_frontend] = NULL; dib8000_remove_slave_frontend()
4267 static struct dvb_frontend *dib8000_get_slave_frontend(struct dvb_frontend *fe, int slave_index) dib8000_get_slave_frontend() argument
4269 struct dib8000_state *state = fe->demodulator_priv; dib8000_get_slave_frontend()
4273 return state->fe[slave_index]; dib8000_get_slave_frontend()
4353 static int dib8000_fe_get_tune_settings(struct dvb_frontend *fe, struct dvb_frontend_tune_settings *tune) dib8000_fe_get_tune_settings() argument
4361 static void dib8000_release(struct dvb_frontend *fe) dib8000_release() argument
4363 struct dib8000_state *st = fe->demodulator_priv; dib8000_release()
4366 for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (st->fe[index_frontend] != NULL); index_frontend++) dib8000_release()
4367 dvb_frontend_detach(st->fe[index_frontend]); dib8000_release()
4371 kfree(st->fe[0]); dib8000_release()
4375 static struct i2c_adapter *dib8000_get_i2c_master(struct dvb_frontend *fe, enum dibx000_i2c_interface intf, int gating) dib8000_get_i2c_master() argument
4377 struct dib8000_state *st = fe->demodulator_priv; dib8000_get_i2c_master()
4381 static int dib8000_pid_filter_ctrl(struct dvb_frontend *fe, u8 onoff) dib8000_pid_filter_ctrl() argument
4383 struct dib8000_state *st = fe->demodulator_priv; dib8000_pid_filter_ctrl()
4391 static int dib8000_pid_filter(struct dvb_frontend *fe, u8 id, u16 pid, u8 onoff) dib8000_pid_filter() argument
4393 struct dib8000_state *st = fe->demodulator_priv; dib8000_pid_filter()
4430 struct dvb_frontend *fe; dib8000_init() local
4438 fe = kzalloc(sizeof(struct dvb_frontend), GFP_KERNEL); dib8000_init()
4439 if (fe == NULL) dib8000_init()
4458 state->fe[0] = fe; dib8000_init()
4459 fe->demodulator_priv = state; dib8000_init()
4460 memcpy(&state->fe[0]->ops, &dib8000_ops, sizeof(struct dvb_frontend_ops)); dib8000_init()
4478 dib8000_reset(fe); dib8000_init()
4483 return fe; dib8000_init()
H A Dbsru6.h70 static int alps_bsru6_set_symbol_rate(struct dvb_frontend *fe, u32 srate, u32 ratio) alps_bsru6_set_symbol_rate() argument
95 stv0299_writereg(fe, 0x13, aclk); alps_bsru6_set_symbol_rate()
96 stv0299_writereg(fe, 0x14, bclk); alps_bsru6_set_symbol_rate()
97 stv0299_writereg(fe, 0x1f, (ratio >> 16) & 0xff); alps_bsru6_set_symbol_rate()
98 stv0299_writereg(fe, 0x20, (ratio >> 8) & 0xff); alps_bsru6_set_symbol_rate()
99 stv0299_writereg(fe, 0x21, ratio & 0xf0); alps_bsru6_set_symbol_rate()
104 static int alps_bsru6_tuner_set_params(struct dvb_frontend *fe) alps_bsru6_tuner_set_params() argument
106 struct dtv_frontend_properties *p = &fe->dtv_property_cache; alps_bsru6_tuner_set_params()
110 struct i2c_adapter *i2c = fe->tuner_priv; alps_bsru6_tuner_set_params()
124 if (fe->ops.i2c_gate_ctrl) alps_bsru6_tuner_set_params()
125 fe->ops.i2c_gate_ctrl(fe, 1); alps_bsru6_tuner_set_params()
H A Ddvb-pll.h35 * @param fe Frontend to attach to.
42 extern struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe,
47 static inline struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, dvb_pll_attach() argument
H A Dstb6100.c64 static int stb6100_release(struct dvb_frontend *fe);
238 static int stb6100_get_status(struct dvb_frontend *fe, u32 *status) stb6100_get_status() argument
241 struct stb6100_state *state = fe->tuner_priv; stb6100_get_status()
251 static int stb6100_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth) stb6100_get_bandwidth() argument
255 struct stb6100_state *state = fe->tuner_priv; stb6100_get_bandwidth()
269 static int stb6100_set_bandwidth(struct dvb_frontend *fe, u32 bandwidth) stb6100_set_bandwidth() argument
273 struct stb6100_state *state = fe->tuner_priv; stb6100_set_bandwidth()
307 static int stb6100_get_frequency(struct dvb_frontend *fe, u32 *frequency) stb6100_get_frequency() argument
312 struct stb6100_state *state = fe->tuner_priv; stb6100_get_frequency()
333 static int stb6100_set_frequency(struct dvb_frontend *fe, u32 frequency) stb6100_set_frequency() argument
337 struct stb6100_state *state = fe->tuner_priv; stb6100_set_frequency()
338 struct dtv_frontend_properties *p = &fe->dtv_property_cache; stb6100_set_frequency()
346 if (fe->ops.get_frontend) { stb6100_set_frequency()
348 fe->ops.get_frontend(fe); stb6100_set_frequency()
489 static int stb6100_sleep(struct dvb_frontend *fe) stb6100_sleep() argument
495 static int stb6100_init(struct dvb_frontend *fe) stb6100_init() argument
497 struct stb6100_state *state = fe->tuner_priv; stb6100_init()
512 static int stb6100_get_state(struct dvb_frontend *fe, stb6100_get_state() argument
518 stb6100_get_frequency(fe, &state->frequency); stb6100_get_state()
525 stb6100_get_bandwidth(fe, &state->bandwidth); stb6100_get_state()
536 static int stb6100_set_state(struct dvb_frontend *fe, stb6100_set_state() argument
540 struct stb6100_state *tstate = fe->tuner_priv; stb6100_set_state()
544 stb6100_set_frequency(fe, state->frequency); stb6100_set_state()
552 stb6100_set_bandwidth(fe, state->bandwidth); stb6100_set_state()
580 struct dvb_frontend *stb6100_attach(struct dvb_frontend *fe, stb6100_attach() argument
592 state->frontend = fe; stb6100_attach()
594 fe->tuner_priv = state; stb6100_attach()
595 fe->ops.tuner_ops = stb6100_ops; stb6100_attach()
598 return fe; stb6100_attach()
601 static int stb6100_release(struct dvb_frontend *fe) stb6100_release() argument
603 struct stb6100_state *state = fe->tuner_priv; stb6100_release()
605 fe->tuner_priv = NULL; stb6100_release()
H A Dz0194a.h15 static int sharp_z0194a_set_symbol_rate(struct dvb_frontend *fe, sharp_z0194a_set_symbol_rate() argument
34 stv0299_writereg(fe, 0x13, aclk); sharp_z0194a_set_symbol_rate()
35 stv0299_writereg(fe, 0x14, bclk); sharp_z0194a_set_symbol_rate()
36 stv0299_writereg(fe, 0x1f, (ratio >> 16) & 0xff); sharp_z0194a_set_symbol_rate()
37 stv0299_writereg(fe, 0x20, (ratio >> 8) & 0xff); sharp_z0194a_set_symbol_rate()
38 stv0299_writereg(fe, 0x21, (ratio) & 0xf0); sharp_z0194a_set_symbol_rate()
H A Dsp8870.c28 #define SP8870_DEFAULT_FIRMWARE "dvb-fe-sp8870.fw"
248 static int sp8870_set_frontend_parameters(struct dvb_frontend *fe) sp8870_set_frontend_parameters() argument
250 struct dtv_frontend_properties *p = &fe->dtv_property_cache; sp8870_set_frontend_parameters()
251 struct sp8870_state* state = fe->demodulator_priv; sp8870_set_frontend_parameters()
262 if (fe->ops.tuner_ops.set_params) { sp8870_set_frontend_parameters()
263 fe->ops.tuner_ops.set_params(fe); sp8870_set_frontend_parameters()
264 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); sp8870_set_frontend_parameters()
304 static int sp8870_init (struct dvb_frontend* fe) sp8870_init() argument
306 struct sp8870_state* state = fe->demodulator_priv; sp8870_init()
318 if (state->config->request_firmware(fe, &fw, SP8870_DEFAULT_FIRMWARE)) { sp8870_init()
353 static int sp8870_read_status(struct dvb_frontend *fe, sp8870_read_status() argument
356 struct sp8870_state* state = fe->demodulator_priv; sp8870_read_status()
380 static int sp8870_read_ber (struct dvb_frontend* fe, u32 * ber) sp8870_read_ber() argument
382 struct sp8870_state* state = fe->demodulator_priv; sp8870_read_ber()
407 static int sp8870_read_signal_strength(struct dvb_frontend* fe, u16 * signal) sp8870_read_signal_strength() argument
409 struct sp8870_state* state = fe->demodulator_priv; sp8870_read_signal_strength()
433 static int sp8870_read_uncorrected_blocks (struct dvb_frontend* fe, u32* ublocks) sp8870_read_uncorrected_blocks() argument
435 struct sp8870_state* state = fe->demodulator_priv; sp8870_read_uncorrected_blocks()
462 static int sp8870_set_frontend(struct dvb_frontend *fe) sp8870_set_frontend() argument
464 struct dtv_frontend_properties *p = &fe->dtv_property_cache; sp8870_set_frontend()
465 struct sp8870_state* state = fe->demodulator_priv; sp8870_set_frontend()
483 err = sp8870_set_frontend_parameters(fe); sp8870_set_frontend()
521 static int sp8870_sleep(struct dvb_frontend* fe) sp8870_sleep() argument
523 struct sp8870_state* state = fe->demodulator_priv; sp8870_sleep()
529 static int sp8870_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings) sp8870_get_tune_settings() argument
537 static int sp8870_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) sp8870_i2c_gate_ctrl() argument
539 struct sp8870_state* state = fe->demodulator_priv; sp8870_i2c_gate_ctrl()
548 static void sp8870_release(struct dvb_frontend* fe) sp8870_release() argument
550 struct sp8870_state* state = fe->demodulator_priv; sp8870_release()
H A Dtda10021.c202 static int tda10021_init (struct dvb_frontend *fe) tda10021_init() argument
204 struct tda10021_state* state = fe->demodulator_priv; tda10021_init()
207 dprintk("DVB: TDA10021(%d): init chip\n", fe->adapter->num); tda10021_init()
209 //_tda10021_writereg (fe, 0, 0); tda10021_init()
231 static int tda10021_set_parameters(struct dvb_frontend *fe) tda10021_set_parameters() argument
233 struct dtv_frontend_properties *c = &fe->dtv_property_cache; tda10021_set_parameters()
238 struct tda10021_state* state = fe->demodulator_priv; tda10021_set_parameters()
284 if (fe->ops.tuner_ops.set_params) { tda10021_set_parameters()
285 fe->ops.tuner_ops.set_params(fe); tda10021_set_parameters()
286 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); tda10021_set_parameters()
311 static int tda10021_read_status(struct dvb_frontend *fe, tda10021_read_status() argument
314 struct tda10021_state* state = fe->demodulator_priv; tda10021_read_status()
337 static int tda10021_read_ber(struct dvb_frontend* fe, u32* ber) tda10021_read_ber() argument
339 struct tda10021_state* state = fe->demodulator_priv; tda10021_read_ber()
351 static int tda10021_read_signal_strength(struct dvb_frontend* fe, u16* strength) tda10021_read_signal_strength() argument
353 struct tda10021_state* state = fe->demodulator_priv; tda10021_read_signal_strength()
365 static int tda10021_read_snr(struct dvb_frontend* fe, u16* snr) tda10021_read_snr() argument
367 struct tda10021_state* state = fe->demodulator_priv; tda10021_read_snr()
375 static int tda10021_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) tda10021_read_ucblocks() argument
377 struct tda10021_state* state = fe->demodulator_priv; tda10021_read_ucblocks()
390 static int tda10021_get_frontend(struct dvb_frontend *fe) tda10021_get_frontend() argument
392 struct dtv_frontend_properties *p = &fe->dtv_property_cache; tda10021_get_frontend()
393 struct tda10021_state* state = fe->demodulator_priv; tda10021_get_frontend()
419 static int tda10021_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) tda10021_i2c_gate_ctrl() argument
421 struct tda10021_state* state = fe->demodulator_priv; tda10021_i2c_gate_ctrl()
431 static int tda10021_sleep(struct dvb_frontend* fe) tda10021_sleep() argument
433 struct tda10021_state* state = fe->demodulator_priv; tda10021_sleep()
441 static void tda10021_release(struct dvb_frontend* fe) tda10021_release() argument
443 struct tda10021_state* state = fe->demodulator_priv; tda10021_release()
H A Dtda665x.c29 struct dvb_frontend *fe; member in struct:tda665x_state
69 static int tda665x_get_state(struct dvb_frontend *fe, tda665x_get_state() argument
73 struct tda665x_state *state = fe->tuner_priv; tda665x_get_state()
91 static int tda665x_get_status(struct dvb_frontend *fe, u32 *status) tda665x_get_status() argument
93 struct tda665x_state *state = fe->tuner_priv; tda665x_get_status()
114 static int tda665x_set_state(struct dvb_frontend *fe, tda665x_set_state() argument
118 struct tda665x_state *state = fe->tuner_priv; tda665x_set_state()
185 err = tda665x_get_status(fe, &status); tda665x_set_state()
206 static int tda665x_release(struct dvb_frontend *fe) tda665x_release() argument
208 struct tda665x_state *state = fe->tuner_priv; tda665x_release()
210 fe->tuner_priv = NULL; tda665x_release()
223 struct dvb_frontend *tda665x_attach(struct dvb_frontend *fe, tda665x_attach() argument
236 state->fe = fe; tda665x_attach()
237 fe->tuner_priv = state; tda665x_attach()
238 fe->ops.tuner_ops = tda665x_ops; tda665x_attach()
239 info = &fe->ops.tuner_ops.info; tda665x_attach()
248 return fe; tda665x_attach()
H A Dves1x93.c265 static int ves1x93_init (struct dvb_frontend* fe) ves1x93_init() argument
267 struct ves1x93_state* state = fe->demodulator_priv; ves1x93_init()
285 static int ves1x93_set_voltage(struct dvb_frontend *fe, ves1x93_set_voltage() argument
288 struct ves1x93_state* state = fe->demodulator_priv; ves1x93_set_voltage()
302 static int ves1x93_read_status(struct dvb_frontend *fe, ves1x93_read_status() argument
305 struct ves1x93_state* state = fe->demodulator_priv; ves1x93_read_status()
344 static int ves1x93_read_ber(struct dvb_frontend* fe, u32* ber) ves1x93_read_ber() argument
346 struct ves1x93_state* state = fe->demodulator_priv; ves1x93_read_ber()
356 static int ves1x93_read_signal_strength(struct dvb_frontend* fe, u16* strength) ves1x93_read_signal_strength() argument
358 struct ves1x93_state* state = fe->demodulator_priv; ves1x93_read_signal_strength()
366 static int ves1x93_read_snr(struct dvb_frontend* fe, u16* snr) ves1x93_read_snr() argument
368 struct ves1x93_state* state = fe->demodulator_priv; ves1x93_read_snr()
376 static int ves1x93_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) ves1x93_read_ucblocks() argument
378 struct ves1x93_state* state = fe->demodulator_priv; ves1x93_read_ucblocks()
391 static int ves1x93_set_frontend(struct dvb_frontend *fe) ves1x93_set_frontend() argument
393 struct dtv_frontend_properties *p = &fe->dtv_property_cache; ves1x93_set_frontend()
394 struct ves1x93_state* state = fe->demodulator_priv; ves1x93_set_frontend()
396 if (fe->ops.tuner_ops.set_params) { ves1x93_set_frontend()
397 fe->ops.tuner_ops.set_params(fe); ves1x93_set_frontend()
398 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); ves1x93_set_frontend()
409 static int ves1x93_get_frontend(struct dvb_frontend *fe) ves1x93_get_frontend() argument
411 struct dtv_frontend_properties *p = &fe->dtv_property_cache; ves1x93_get_frontend()
412 struct ves1x93_state* state = fe->demodulator_priv; ves1x93_get_frontend()
433 static int ves1x93_sleep(struct dvb_frontend* fe) ves1x93_sleep() argument
435 struct ves1x93_state* state = fe->demodulator_priv; ves1x93_sleep()
440 static void ves1x93_release(struct dvb_frontend* fe) ves1x93_release() argument
442 struct ves1x93_state* state = fe->demodulator_priv; ves1x93_release()
446 static int ves1x93_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) ves1x93_i2c_gate_ctrl() argument
448 struct ves1x93_state* state = fe->demodulator_priv; ves1x93_i2c_gate_ctrl()
H A Dhorus3a.c146 static int horus3a_init(struct dvb_frontend *fe) horus3a_init() argument
148 struct horus3a_priv *priv = fe->tuner_priv; horus3a_init()
154 static int horus3a_release(struct dvb_frontend *fe) horus3a_release() argument
156 struct horus3a_priv *priv = fe->tuner_priv; horus3a_release()
159 kfree(fe->tuner_priv); horus3a_release()
160 fe->tuner_priv = NULL; horus3a_release()
164 static int horus3a_sleep(struct dvb_frontend *fe) horus3a_sleep() argument
166 struct horus3a_priv *priv = fe->tuner_priv; horus3a_sleep()
173 static int horus3a_set_params(struct dvb_frontend *fe) horus3a_set_params() argument
175 struct dtv_frontend_properties *p = &fe->dtv_property_cache; horus3a_set_params()
176 struct horus3a_priv *priv = fe->tuner_priv; horus3a_set_params()
341 static int horus3a_get_frequency(struct dvb_frontend *fe, u32 *frequency) horus3a_get_frequency() argument
343 struct horus3a_priv *priv = fe->tuner_priv; horus3a_get_frequency()
363 struct dvb_frontend *horus3a_attach(struct dvb_frontend *fe, horus3a_attach() argument
378 if (fe->ops.i2c_gate_ctrl) horus3a_attach()
379 fe->ops.i2c_gate_ctrl(fe, 1); horus3a_attach()
415 if (fe->ops.i2c_gate_ctrl) horus3a_attach()
416 fe->ops.i2c_gate_ctrl(fe, 0); horus3a_attach()
418 memcpy(&fe->ops.tuner_ops, &horus3a_tuner_ops, horus3a_attach()
420 fe->tuner_priv = priv; horus3a_attach()
424 return fe; horus3a_attach()
H A Ds921.c265 static int s921_pll_tune(struct dvb_frontend *fe) s921_pll_tune() argument
267 struct dtv_frontend_properties *p = &fe->dtv_property_cache; s921_pll_tune()
268 struct s921_state *state = fe->demodulator_priv; s921_pll_tune()
337 static int s921_initfe(struct dvb_frontend *fe) s921_initfe() argument
339 struct s921_state *state = fe->demodulator_priv; s921_initfe()
351 static int s921_read_status(struct dvb_frontend *fe, enum fe_status *status) s921_read_status() argument
353 struct s921_state *state = fe->demodulator_priv; s921_read_status()
390 static int s921_read_signal_strength(struct dvb_frontend *fe, u16 *strength) s921_read_signal_strength() argument
393 struct s921_state *state = fe->demodulator_priv; s921_read_signal_strength()
397 rc = s921_read_status(fe, &status); s921_read_signal_strength()
417 static int s921_set_frontend(struct dvb_frontend *fe) s921_set_frontend() argument
419 struct dtv_frontend_properties *p = &fe->dtv_property_cache; s921_set_frontend()
420 struct s921_state *state = fe->demodulator_priv; s921_set_frontend()
427 rc = s921_pll_tune(fe); s921_set_frontend()
436 static int s921_get_frontend(struct dvb_frontend *fe) s921_get_frontend() argument
438 struct dtv_frontend_properties *p = &fe->dtv_property_cache; s921_get_frontend()
439 struct s921_state *state = fe->demodulator_priv; s921_get_frontend()
448 static int s921_tune(struct dvb_frontend *fe, s921_tune() argument
459 rc = s921_set_frontend(fe); s921_tune()
462 s921_read_status(fe, status); s921_tune()
467 static int s921_get_algo(struct dvb_frontend *fe) s921_get_algo() argument
472 static void s921_release(struct dvb_frontend *fe) s921_release() argument
474 struct s921_state *state = fe->demodulator_priv; s921_release()
H A Dmt312.c246 static int mt312_initfe(struct dvb_frontend *fe) mt312_initfe() argument
248 struct mt312_state *state = fe->demodulator_priv; mt312_initfe()
346 static int mt312_send_master_cmd(struct dvb_frontend *fe, mt312_send_master_cmd() argument
349 struct mt312_state *state = fe->demodulator_priv; mt312_send_master_cmd()
383 static int mt312_send_burst(struct dvb_frontend *fe, mt312_send_burst() argument
386 struct mt312_state *state = fe->demodulator_priv; mt312_send_burst()
407 static int mt312_set_tone(struct dvb_frontend *fe, mt312_set_tone() argument
410 struct mt312_state *state = fe->demodulator_priv; mt312_set_tone()
431 static int mt312_set_voltage(struct dvb_frontend *fe, mt312_set_voltage() argument
434 struct mt312_state *state = fe->demodulator_priv; mt312_set_voltage()
448 static int mt312_read_status(struct dvb_frontend *fe, enum fe_status *s) mt312_read_status() argument
450 struct mt312_state *state = fe->demodulator_priv; mt312_read_status()
477 static int mt312_read_ber(struct dvb_frontend *fe, u32 *ber) mt312_read_ber() argument
479 struct mt312_state *state = fe->demodulator_priv; mt312_read_ber()
492 static int mt312_read_signal_strength(struct dvb_frontend *fe, mt312_read_signal_strength() argument
495 struct mt312_state *state = fe->demodulator_priv; mt312_read_signal_strength()
515 static int mt312_read_snr(struct dvb_frontend *fe, u16 *snr) mt312_read_snr() argument
517 struct mt312_state *state = fe->demodulator_priv; mt312_read_snr()
530 static int mt312_read_ucblocks(struct dvb_frontend *fe, u32 *ubc) mt312_read_ucblocks() argument
532 struct mt312_state *state = fe->demodulator_priv; mt312_read_ucblocks()
545 static int mt312_set_frontend(struct dvb_frontend *fe) mt312_set_frontend() argument
547 struct dtv_frontend_properties *p = &fe->dtv_property_cache; mt312_set_frontend()
548 struct mt312_state *state = fe->demodulator_priv; mt312_set_frontend()
559 if ((p->frequency < fe->ops.info.frequency_min) mt312_set_frontend()
560 || (p->frequency > fe->ops.info.frequency_max)) mt312_set_frontend()
567 if ((p->symbol_rate < fe->ops.info.symbol_rate_min) mt312_set_frontend()
568 || (p->symbol_rate > fe->ops.info.symbol_rate_max)) mt312_set_frontend()
593 ret = mt312_initfe(fe); mt312_set_frontend()
601 ret = mt312_initfe(fe); mt312_set_frontend()
616 if (fe->ops.tuner_ops.set_params) { mt312_set_frontend()
617 fe->ops.tuner_ops.set_params(fe); mt312_set_frontend()
618 if (fe->ops.i2c_gate_ctrl) mt312_set_frontend()
619 fe->ops.i2c_gate_ctrl(fe, 0); mt312_set_frontend()
650 static int mt312_get_frontend(struct dvb_frontend *fe) mt312_get_frontend() argument
652 struct dtv_frontend_properties *p = &fe->dtv_property_cache; mt312_get_frontend()
653 struct mt312_state *state = fe->demodulator_priv; mt312_get_frontend()
671 static int mt312_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) mt312_i2c_gate_ctrl() argument
673 struct mt312_state *state = fe->demodulator_priv; mt312_i2c_gate_ctrl()
700 static int mt312_sleep(struct dvb_frontend *fe) mt312_sleep() argument
702 struct mt312_state *state = fe->demodulator_priv; mt312_sleep()
735 static int mt312_get_tune_settings(struct dvb_frontend *fe, mt312_get_tune_settings() argument
744 static void mt312_release(struct dvb_frontend *fe) mt312_release() argument
746 struct mt312_state *state = fe->demodulator_priv; mt312_release()
H A Dtda10086.c106 static int tda10086_init(struct dvb_frontend* fe) tda10086_init() argument
108 struct tda10086_state* state = fe->demodulator_priv; tda10086_init()
188 static int tda10086_set_tone(struct dvb_frontend *fe, tda10086_set_tone() argument
191 struct tda10086_state* state = fe->demodulator_priv; tda10086_set_tone()
212 static int tda10086_send_master_cmd (struct dvb_frontend* fe, tda10086_send_master_cmd() argument
215 struct tda10086_state* state = fe->demodulator_priv; tda10086_send_master_cmd()
242 static int tda10086_send_burst(struct dvb_frontend *fe, tda10086_send_burst() argument
245 struct tda10086_state* state = fe->demodulator_priv; tda10086_send_burst()
414 static int tda10086_set_frontend(struct dvb_frontend *fe) tda10086_set_frontend() argument
416 struct dtv_frontend_properties *fe_params = &fe->dtv_property_cache; tda10086_set_frontend()
417 struct tda10086_state *state = fe->demodulator_priv; tda10086_set_frontend()
429 if (fe->ops.tuner_ops.set_params) { tda10086_set_frontend()
430 fe->ops.tuner_ops.set_params(fe); tda10086_set_frontend()
431 if (fe->ops.i2c_gate_ctrl) tda10086_set_frontend()
432 fe->ops.i2c_gate_ctrl(fe, 0); tda10086_set_frontend()
434 if (fe->ops.tuner_ops.get_frequency) tda10086_set_frontend()
435 fe->ops.tuner_ops.get_frequency(fe, &freq); tda10086_set_frontend()
436 if (fe->ops.i2c_gate_ctrl) tda10086_set_frontend()
437 fe->ops.i2c_gate_ctrl(fe, 0); tda10086_set_frontend()
462 static int tda10086_get_frontend(struct dvb_frontend *fe) tda10086_get_frontend() argument
464 struct dtv_frontend_properties *fe_params = &fe->dtv_property_cache; tda10086_get_frontend()
465 struct tda10086_state* state = fe->demodulator_priv; tda10086_get_frontend()
556 static int tda10086_read_status(struct dvb_frontend *fe, tda10086_read_status() argument
559 struct tda10086_state* state = fe->demodulator_priv; tda10086_read_status()
586 static int tda10086_read_signal_strength(struct dvb_frontend* fe, u16 * signal) tda10086_read_signal_strength() argument
588 struct tda10086_state* state = fe->demodulator_priv; tda10086_read_signal_strength()
599 static int tda10086_read_snr(struct dvb_frontend* fe, u16 * snr) tda10086_read_snr() argument
601 struct tda10086_state* state = fe->demodulator_priv; tda10086_read_snr()
612 static int tda10086_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) tda10086_read_ucblocks() argument
614 struct tda10086_state* state = fe->demodulator_priv; tda10086_read_ucblocks()
628 static int tda10086_read_ber(struct dvb_frontend* fe, u32* ber) tda10086_read_ber() argument
630 struct tda10086_state* state = fe->demodulator_priv; tda10086_read_ber()
643 static int tda10086_sleep(struct dvb_frontend* fe) tda10086_sleep() argument
645 struct tda10086_state* state = fe->demodulator_priv; tda10086_sleep()
654 static int tda10086_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) tda10086_i2c_gate_ctrl() argument
656 struct tda10086_state* state = fe->demodulator_priv; tda10086_i2c_gate_ctrl()
669 static int tda10086_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings) tda10086_get_tune_settings() argument
671 struct dtv_frontend_properties *p = &fe->dtv_property_cache; tda10086_get_tune_settings()
702 static void tda10086_release(struct dvb_frontend* fe) tda10086_release() argument
704 struct tda10086_state *state = fe->demodulator_priv; tda10086_release()
705 tda10086_sleep(fe); tda10086_release()
H A Dstv0297.c294 static int stv0297_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) stv0297_i2c_gate_ctrl() argument
296 struct stv0297_state *state = fe->demodulator_priv; stv0297_i2c_gate_ctrl()
306 static int stv0297_init(struct dvb_frontend *fe) stv0297_init() argument
308 struct stv0297_state *state = fe->demodulator_priv; stv0297_init()
321 static int stv0297_sleep(struct dvb_frontend *fe) stv0297_sleep() argument
323 struct stv0297_state *state = fe->demodulator_priv; stv0297_sleep()
330 static int stv0297_read_status(struct dvb_frontend *fe, stv0297_read_status() argument
333 struct stv0297_state *state = fe->demodulator_priv; stv0297_read_status()
344 static int stv0297_read_ber(struct dvb_frontend *fe, u32 * ber) stv0297_read_ber() argument
346 struct stv0297_state *state = fe->demodulator_priv; stv0297_read_ber()
361 static int stv0297_read_signal_strength(struct dvb_frontend *fe, u16 * strength) stv0297_read_signal_strength() argument
363 struct stv0297_state *state = fe->demodulator_priv; stv0297_read_signal_strength()
384 static int stv0297_read_snr(struct dvb_frontend *fe, u16 * snr) stv0297_read_snr() argument
386 struct stv0297_state *state = fe->demodulator_priv; stv0297_read_snr()
395 static int stv0297_read_ucblocks(struct dvb_frontend *fe, u32 * ucblocks) stv0297_read_ucblocks() argument
397 struct stv0297_state *state = fe->demodulator_priv; stv0297_read_ucblocks()
410 static int stv0297_set_frontend(struct dvb_frontend *fe) stv0297_set_frontend() argument
412 struct dtv_frontend_properties *p = &fe->dtv_property_cache; stv0297_set_frontend()
413 struct stv0297_state *state = fe->demodulator_priv; stv0297_set_frontend()
459 stv0297_init(fe); stv0297_set_frontend()
460 if (fe->ops.tuner_ops.set_params) { stv0297_set_frontend()
461 fe->ops.tuner_ops.set_params(fe); stv0297_set_frontend()
462 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); stv0297_set_frontend()
618 static int stv0297_get_frontend(struct dvb_frontend *fe) stv0297_get_frontend() argument
620 struct dtv_frontend_properties *p = &fe->dtv_property_cache; stv0297_get_frontend()
621 struct stv0297_state *state = fe->demodulator_priv; stv0297_get_frontend()
655 static void stv0297_release(struct dvb_frontend *fe) stv0297_release() argument
657 struct stv0297_state *state = fe->demodulator_priv; stv0297_release()
H A Dtda10023.c231 static int tda10023_init (struct dvb_frontend *fe) tda10023_init() argument
233 struct tda10023_state* state = fe->demodulator_priv; tda10023_init()
285 dprintk("DVB: TDA10023(%d): init chip\n", fe->dvb->num); tda10023_init()
305 static int tda10023_set_parameters(struct dvb_frontend *fe) tda10023_set_parameters() argument
307 struct dtv_frontend_properties *c = &fe->dtv_property_cache; tda10023_set_parameters()
311 struct tda10023_state* state = fe->demodulator_priv; tda10023_set_parameters()
352 if (fe->ops.tuner_ops.set_params) { tda10023_set_parameters()
353 fe->ops.tuner_ops.set_params(fe); tda10023_set_parameters()
354 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); tda10023_set_parameters()
379 static int tda10023_read_status(struct dvb_frontend *fe, tda10023_read_status() argument
382 struct tda10023_state* state = fe->demodulator_priv; tda10023_read_status()
405 static int tda10023_read_ber(struct dvb_frontend* fe, u32* ber) tda10023_read_ber() argument
407 struct tda10023_state* state = fe->demodulator_priv; tda10023_read_ber()
418 static int tda10023_read_signal_strength(struct dvb_frontend* fe, u16* strength) tda10023_read_signal_strength() argument
420 struct tda10023_state* state = fe->demodulator_priv; tda10023_read_signal_strength()
434 static int tda10023_read_snr(struct dvb_frontend* fe, u16* snr) tda10023_read_snr() argument
436 struct tda10023_state* state = fe->demodulator_priv; tda10023_read_snr()
443 static int tda10023_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) tda10023_read_ucblocks() argument
445 struct tda10023_state* state = fe->demodulator_priv; tda10023_read_ucblocks()
460 static int tda10023_get_frontend(struct dvb_frontend *fe) tda10023_get_frontend() argument
462 struct dtv_frontend_properties *p = &fe->dtv_property_cache; tda10023_get_frontend()
463 struct tda10023_state* state = fe->demodulator_priv; tda10023_get_frontend()
491 static int tda10023_sleep(struct dvb_frontend* fe) tda10023_sleep() argument
493 struct tda10023_state* state = fe->demodulator_priv; tda10023_sleep()
501 static int tda10023_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) tda10023_i2c_gate_ctrl() argument
503 struct tda10023_state* state = fe->demodulator_priv; tda10023_i2c_gate_ctrl()
513 static void tda10023_release(struct dvb_frontend* fe) tda10023_release() argument
515 struct tda10023_state* state = fe->demodulator_priv; tda10023_release()
H A Ddib3000mb.c115 static int dib3000mb_get_frontend(struct dvb_frontend* fe);
117 static int dib3000mb_set_frontend(struct dvb_frontend *fe, int tuner) dib3000mb_set_frontend() argument
119 struct dib3000_state* state = fe->demodulator_priv; dib3000mb_set_frontend()
120 struct dtv_frontend_properties *c = &fe->dtv_property_cache; dib3000mb_set_frontend()
124 if (tuner && fe->ops.tuner_ops.set_params) { dib3000mb_set_frontend()
125 fe->ops.tuner_ops.set_params(fe); dib3000mb_set_frontend()
126 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); dib3000mb_set_frontend()
362 if (dib3000mb_get_frontend(fe) == 0) { dib3000mb_set_frontend()
364 return dib3000mb_set_frontend(fe, 0); dib3000mb_set_frontend()
376 static int dib3000mb_fe_init(struct dvb_frontend* fe, int mobile_mode) dib3000mb_fe_init() argument
378 struct dib3000_state* state = fe->demodulator_priv; dib3000mb_fe_init()
453 static int dib3000mb_get_frontend(struct dvb_frontend* fe) dib3000mb_get_frontend() argument
455 struct dtv_frontend_properties *c = &fe->dtv_property_cache; dib3000mb_get_frontend()
456 struct dib3000_state* state = fe->demodulator_priv; dib3000mb_get_frontend()
614 static int dib3000mb_read_status(struct dvb_frontend *fe, dib3000mb_read_status() argument
617 struct dib3000_state* state = fe->demodulator_priv; dib3000mb_read_status()
647 static int dib3000mb_read_ber(struct dvb_frontend* fe, u32 *ber) dib3000mb_read_ber() argument
649 struct dib3000_state* state = fe->demodulator_priv; dib3000mb_read_ber()
656 static int dib3000mb_read_signal_strength(struct dvb_frontend* fe, u16 *strength) dib3000mb_read_signal_strength() argument
658 struct dib3000_state* state = fe->demodulator_priv; dib3000mb_read_signal_strength()
664 static int dib3000mb_read_snr(struct dvb_frontend* fe, u16 *snr) dib3000mb_read_snr() argument
666 struct dib3000_state* state = fe->demodulator_priv; dib3000mb_read_snr()
674 static int dib3000mb_read_unc_blocks(struct dvb_frontend* fe, u32 *unc) dib3000mb_read_unc_blocks() argument
676 struct dib3000_state* state = fe->demodulator_priv; dib3000mb_read_unc_blocks()
682 static int dib3000mb_sleep(struct dvb_frontend* fe) dib3000mb_sleep() argument
684 struct dib3000_state* state = fe->demodulator_priv; dib3000mb_sleep()
690 static int dib3000mb_fe_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings *tune) dib3000mb_fe_get_tune_settings() argument
696 static int dib3000mb_fe_init_nonmobile(struct dvb_frontend* fe) dib3000mb_fe_init_nonmobile() argument
698 return dib3000mb_fe_init(fe, 0); dib3000mb_fe_init_nonmobile()
701 static int dib3000mb_set_frontend_and_tuner(struct dvb_frontend *fe) dib3000mb_set_frontend_and_tuner() argument
703 return dib3000mb_set_frontend(fe, 1); dib3000mb_set_frontend_and_tuner()
706 static void dib3000mb_release(struct dvb_frontend* fe) dib3000mb_release() argument
708 struct dib3000_state *state = fe->demodulator_priv; dib3000mb_release()
713 static int dib3000mb_pid_control(struct dvb_frontend *fe,int index, int pid,int onoff) dib3000mb_pid_control() argument
715 struct dib3000_state *state = fe->demodulator_priv; dib3000mb_pid_control()
721 static int dib3000mb_fifo_control(struct dvb_frontend *fe, int onoff) dib3000mb_fifo_control() argument
723 struct dib3000_state *state = fe->demodulator_priv; dib3000mb_fifo_control()
734 static int dib3000mb_pid_parse(struct dvb_frontend *fe, int onoff) dib3000mb_pid_parse() argument
736 struct dib3000_state *state = fe->demodulator_priv; dib3000mb_pid_parse()
742 static int dib3000mb_tuner_pass_ctrl(struct dvb_frontend *fe, int onoff, u8 pll_addr) dib3000mb_tuner_pass_ctrl() argument
744 struct dib3000_state *state = fe->demodulator_priv; dib3000mb_tuner_pass_ctrl()
H A Dec100.c89 static int ec100_set_frontend(struct dvb_frontend *fe) ec100_set_frontend() argument
91 struct dtv_frontend_properties *c = &fe->dtv_property_cache; ec100_set_frontend()
92 struct ec100_state *state = fe->demodulator_priv; ec100_set_frontend()
100 if (fe->ops.tuner_ops.set_params) ec100_set_frontend()
101 fe->ops.tuner_ops.set_params(fe); ec100_set_frontend()
167 static int ec100_get_tune_settings(struct dvb_frontend *fe, ec100_get_tune_settings() argument
177 static int ec100_read_status(struct dvb_frontend *fe, enum fe_status *status) ec100_read_status() argument
179 struct ec100_state *state = fe->demodulator_priv; ec100_read_status()
213 static int ec100_read_ber(struct dvb_frontend *fe, u32 *ber) ec100_read_ber() argument
215 struct ec100_state *state = fe->demodulator_priv; ec100_read_ber()
245 static int ec100_read_signal_strength(struct dvb_frontend *fe, u16 *strength) ec100_read_signal_strength() argument
247 struct ec100_state *state = fe->demodulator_priv; ec100_read_signal_strength()
265 static int ec100_read_snr(struct dvb_frontend *fe, u16 *snr) ec100_read_snr() argument
271 static int ec100_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) ec100_read_ucblocks() argument
277 static void ec100_release(struct dvb_frontend *fe) ec100_release() argument
279 struct ec100_state *state = fe->demodulator_priv; ec100_release()
H A Dcx22702.c248 static int cx22702_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) cx22702_i2c_gate_ctrl() argument
250 struct cx22702_state *state = fe->demodulator_priv; cx22702_i2c_gate_ctrl()
263 static int cx22702_set_tps(struct dvb_frontend *fe) cx22702_set_tps() argument
265 struct dtv_frontend_properties *p = &fe->dtv_property_cache; cx22702_set_tps()
267 struct cx22702_state *state = fe->demodulator_priv; cx22702_set_tps()
269 if (fe->ops.tuner_ops.set_params) { cx22702_set_tps()
270 fe->ops.tuner_ops.set_params(fe); cx22702_set_tps()
271 if (fe->ops.i2c_gate_ctrl) cx22702_set_tps()
272 fe->ops.i2c_gate_ctrl(fe, 0); cx22702_set_tps()
435 static int cx22702_init(struct dvb_frontend *fe) cx22702_init() argument
438 struct cx22702_state *state = fe->demodulator_priv; cx22702_init()
450 cx22702_i2c_gate_ctrl(fe, 0); cx22702_init()
455 static int cx22702_read_status(struct dvb_frontend *fe, enum fe_status *status) cx22702_read_status() argument
457 struct cx22702_state *state = fe->demodulator_priv; cx22702_read_status()
484 static int cx22702_read_ber(struct dvb_frontend *fe, u32 *ber) cx22702_read_ber() argument
486 struct cx22702_state *state = fe->demodulator_priv; cx22702_read_ber()
501 static int cx22702_read_signal_strength(struct dvb_frontend *fe, cx22702_read_signal_strength() argument
504 struct cx22702_state *state = fe->demodulator_priv; cx22702_read_signal_strength()
529 static int cx22702_read_snr(struct dvb_frontend *fe, u16 *snr) cx22702_read_snr() argument
531 struct cx22702_state *state = fe->demodulator_priv; cx22702_read_snr()
548 static int cx22702_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) cx22702_read_ucblocks() argument
550 struct cx22702_state *state = fe->demodulator_priv; cx22702_read_ucblocks()
565 static int cx22702_get_frontend(struct dvb_frontend *fe) cx22702_get_frontend() argument
567 struct dtv_frontend_properties *c = &fe->dtv_property_cache; cx22702_get_frontend()
568 struct cx22702_state *state = fe->demodulator_priv; cx22702_get_frontend()
576 static int cx22702_get_tune_settings(struct dvb_frontend *fe, cx22702_get_tune_settings() argument
583 static void cx22702_release(struct dvb_frontend *fe) cx22702_release() argument
585 struct cx22702_state *state = fe->demodulator_priv; cx22702_release()
H A Dl64781.c120 static int apply_frontend_param(struct dvb_frontend *fe) apply_frontend_param() argument
122 struct dtv_frontend_properties *p = &fe->dtv_property_cache; apply_frontend_param()
123 struct l64781_state* state = fe->demodulator_priv; apply_frontend_param()
155 if (fe->ops.tuner_ops.set_params) { apply_frontend_param()
156 fe->ops.tuner_ops.set_params(fe); apply_frontend_param()
157 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); apply_frontend_param()
246 static int get_frontend(struct dvb_frontend *fe) get_frontend() argument
248 struct dtv_frontend_properties *p = &fe->dtv_property_cache; get_frontend()
249 struct l64781_state* state = fe->demodulator_priv; get_frontend()
362 static int l64781_read_status(struct dvb_frontend *fe, enum fe_status *status) l64781_read_status() argument
364 struct l64781_state* state = fe->demodulator_priv; l64781_read_status()
391 static int l64781_read_ber(struct dvb_frontend* fe, u32* ber) l64781_read_ber() argument
393 struct l64781_state* state = fe->demodulator_priv; l64781_read_ber()
403 static int l64781_read_signal_strength(struct dvb_frontend* fe, u16* signal_strength) l64781_read_signal_strength() argument
405 struct l64781_state* state = fe->demodulator_priv; l64781_read_signal_strength()
413 static int l64781_read_snr(struct dvb_frontend* fe, u16* snr) l64781_read_snr() argument
415 struct l64781_state* state = fe->demodulator_priv; l64781_read_snr()
423 static int l64781_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) l64781_read_ucblocks() argument
425 struct l64781_state* state = fe->demodulator_priv; l64781_read_ucblocks()
433 static int l64781_sleep(struct dvb_frontend* fe) l64781_sleep() argument
435 struct l64781_state* state = fe->demodulator_priv; l64781_sleep()
441 static int l64781_init(struct dvb_frontend* fe) l64781_init() argument
443 struct l64781_state* state = fe->demodulator_priv; l64781_init()
484 static int l64781_get_tune_settings(struct dvb_frontend* fe, l64781_get_tune_settings() argument
493 static void l64781_release(struct dvb_frontend* fe) l64781_release() argument
495 struct l64781_state* state = fe->demodulator_priv; l64781_release()
H A Dcx24110.h36 static inline int cx24110_pll_write(struct dvb_frontend *fe, u32 val) cx24110_pll_write() argument
44 if (fe->ops.write) cx24110_pll_write()
45 return fe->ops.write(fe, buf, 3); cx24110_pll_write()
H A Ddib3000.h38 int (*pid_parse)(struct dvb_frontend *fe, int onoff);
39 int (*fifo_ctrl)(struct dvb_frontend *fe, int onoff);
40 int (*pid_ctrl)(struct dvb_frontend *fe, int index, int pid, int onoff);
41 int (*tuner_pass_ctrl)(struct dvb_frontend *fe, int onoff, u8 pll_ctrl);
H A Dor51211.h34 int (*request_firmware)(struct dvb_frontend* fe, const struct firmware **fw, char* name);
35 void (*setmode)(struct dvb_frontend * fe, int mode);
36 void (*reset)(struct dvb_frontend * fe);
37 void (*sleep)(struct dvb_frontend * fe);
H A Dcx24117.c39 #define CX24117_DEFAULT_FIRMWARE "dvb-fe-cx24117.fw"
196 /* common to both fe's */
208 /* one per each fe */
449 static int cx24117_load_firmware(struct dvb_frontend *fe,
452 static int cx24117_firmware_ondemand(struct dvb_frontend *fe) cx24117_firmware_ondemand() argument
454 struct cx24117_state *state = fe->demodulator_priv; cx24117_firmware_ondemand()
486 ret = cx24117_load_firmware(fe, fw); cx24117_firmware_ondemand()
506 static int cx24117_cmd_execute_nolock(struct dvb_frontend *fe, cx24117_cmd_execute_nolock() argument
509 struct cx24117_state *state = fe->demodulator_priv; cx24117_cmd_execute_nolock()
516 ret = cx24117_firmware_ondemand(fe); cx24117_cmd_execute_nolock()
539 static int cx24117_cmd_execute(struct dvb_frontend *fe, struct cx24117_cmd *cmd) cx24117_cmd_execute() argument
541 struct cx24117_state *state = fe->demodulator_priv; cx24117_cmd_execute()
545 ret = cx24117_cmd_execute_nolock(fe, cmd); cx24117_cmd_execute()
551 static int cx24117_load_firmware(struct dvb_frontend *fe, cx24117_load_firmware() argument
554 struct cx24117_state *state = fe->demodulator_priv; cx24117_load_firmware()
648 ret = cx24117_cmd_execute_nolock(fe, &cmd); cx24117_load_firmware()
667 ret = cx24117_cmd_execute_nolock(fe, &cmd); cx24117_load_firmware()
686 ret = cx24117_cmd_execute_nolock(fe, &cmd); cx24117_load_firmware()
698 ret = cx24117_cmd_execute_nolock(fe, &cmd); cx24117_load_firmware()
713 ret = cx24117_cmd_execute_nolock(fe, &cmd); cx24117_load_firmware()
727 ret = cx24117_cmd_execute_nolock(fe, &cmd); cx24117_load_firmware()
742 static int cx24117_read_status(struct dvb_frontend *fe, enum fe_status *status) cx24117_read_status() argument
744 struct cx24117_state *state = fe->demodulator_priv; cx24117_read_status()
769 static int cx24117_read_ber(struct dvb_frontend *fe, u32 *ber) cx24117_read_ber() argument
771 struct cx24117_state *state = fe->demodulator_priv; cx24117_read_ber()
791 static int cx24117_read_signal_strength(struct dvb_frontend *fe, cx24117_read_signal_strength() argument
794 struct cx24117_state *state = fe->demodulator_priv; cx24117_read_signal_strength()
806 ret = cx24117_cmd_execute(fe, &cmd); cx24117_read_signal_strength()
824 static int cx24117_read_snr(struct dvb_frontend *fe, u16 *snr) cx24117_read_snr() argument
826 struct cx24117_state *state = fe->demodulator_priv; cx24117_read_snr()
845 static int cx24117_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) cx24117_read_ucblocks() argument
847 struct cx24117_state *state = fe->demodulator_priv; cx24117_read_ucblocks()
848 enum fe_delivery_system delsys = fe->dtv_property_cache.delivery_system; cx24117_read_ucblocks()
877 static void cx24117_clone_params(struct dvb_frontend *fe) cx24117_clone_params() argument
879 struct cx24117_state *state = fe->demodulator_priv; cx24117_clone_params()
884 static int cx24117_wait_for_lnb(struct dvb_frontend *fe) cx24117_wait_for_lnb() argument
886 struct cx24117_state *state = fe->demodulator_priv; cx24117_wait_for_lnb()
908 static int cx24117_set_voltage(struct dvb_frontend *fe, cx24117_set_voltage() argument
911 struct cx24117_state *state = fe->demodulator_priv; cx24117_set_voltage()
931 ret = cx24117_cmd_execute(fe, &cmd); cx24117_set_voltage()
935 ret = cx24117_wait_for_lnb(fe); cx24117_set_voltage()
947 ret = cx24117_cmd_execute(fe, &cmd); cx24117_set_voltage()
954 ret = cx24117_cmd_execute(fe, &cmd); cx24117_set_voltage()
960 static int cx24117_set_tone(struct dvb_frontend *fe, cx24117_set_tone() argument
963 struct cx24117_state *state = fe->demodulator_priv; cx24117_set_tone()
976 ret = cx24117_wait_for_lnb(fe); cx24117_set_tone()
1000 return cx24117_cmd_execute(fe, &cmd); cx24117_set_tone()
1004 static int cx24117_diseqc_init(struct dvb_frontend *fe) cx24117_diseqc_init() argument
1006 struct cx24117_state *state = fe->demodulator_priv; cx24117_diseqc_init()
1034 static int cx24117_send_diseqc_msg(struct dvb_frontend *fe, cx24117_send_diseqc_msg() argument
1037 struct cx24117_state *state = fe->demodulator_priv; cx24117_send_diseqc_msg()
1089 ret = cx24117_wait_for_lnb(fe); cx24117_send_diseqc_msg()
1097 ret = cx24117_cmd_execute(fe, &state->dsec_cmd); cx24117_send_diseqc_msg()
1116 static int cx24117_diseqc_send_burst(struct dvb_frontend *fe, cx24117_diseqc_send_burst() argument
1119 struct cx24117_state *state = fe->demodulator_priv; cx24117_diseqc_send_burst()
1158 static void cx24117_release(struct dvb_frontend *fe) cx24117_release() argument
1160 struct cx24117_state *state = fe->demodulator_priv; cx24117_release()
1227 static int cx24117_initfe(struct dvb_frontend *fe) cx24117_initfe() argument
1229 struct cx24117_state *state = fe->demodulator_priv; cx24117_initfe()
1243 ret = cx24117_cmd_execute_nolock(fe, &cmd); cx24117_initfe()
1247 ret = cx24117_diseqc_init(fe); cx24117_initfe()
1257 ret = cx24117_cmd_execute_nolock(fe, &cmd); cx24117_initfe()
1266 ret = cx24117_cmd_execute_nolock(fe, &cmd); cx24117_initfe()
1276 ret = cx24117_cmd_execute_nolock(fe, &cmd); cx24117_initfe()
1287 static int cx24117_sleep(struct dvb_frontend *fe) cx24117_sleep() argument
1289 struct cx24117_state *state = fe->demodulator_priv; cx24117_sleep()
1300 return cx24117_cmd_execute(fe, &cmd); cx24117_sleep()
1306 static int cx24117_set_frontend(struct dvb_frontend *fe) cx24117_set_frontend() argument
1308 struct cx24117_state *state = fe->demodulator_priv; cx24117_set_frontend()
1309 struct dtv_frontend_properties *c = &fe->dtv_property_cache; cx24117_set_frontend()
1420 cx24117_clone_params(fe); cx24117_set_frontend()
1508 ret = cx24117_cmd_execute(fe, &cmd); cx24117_set_frontend()
1519 cx24117_read_status(fe, &tunerstat); cx24117_set_frontend()
1541 static int cx24117_tune(struct dvb_frontend *fe, bool re_tune, cx24117_tune() argument
1544 struct cx24117_state *state = fe->demodulator_priv; cx24117_tune()
1551 int ret = cx24117_set_frontend(fe); cx24117_tune()
1555 return cx24117_read_status(fe, status); cx24117_tune()
1558 static int cx24117_get_algo(struct dvb_frontend *fe) cx24117_get_algo() argument
1563 static int cx24117_get_frontend(struct dvb_frontend *fe) cx24117_get_frontend() argument
1565 struct cx24117_state *state = fe->demodulator_priv; cx24117_get_frontend()
1566 struct dtv_frontend_properties *c = &fe->dtv_property_cache; cx24117_get_frontend()
1579 ret = cx24117_cmd_execute(fe, &cmd); cx24117_get_frontend()
H A Dlg2160.c160 static int lg216x_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) lg216x_i2c_gate_ctrl() argument
162 struct lg216x_state *state = fe->demodulator_priv; lg216x_i2c_gate_ctrl()
945 static int lg216x_get_frontend(struct dvb_frontend *fe) lg216x_get_frontend() argument
947 struct lg216x_state *state = fe->demodulator_priv; lg216x_get_frontend()
952 fe->dtv_property_cache.modulation = VSB_8; lg216x_get_frontend()
953 fe->dtv_property_cache.frequency = state->current_frequency; lg216x_get_frontend()
954 fe->dtv_property_cache.delivery_system = SYS_ATSCMH; lg216x_get_frontend()
957 &fe->dtv_property_cache.atscmh_fic_ver); lg216x_get_frontend()
960 if (state->fic_ver != fe->dtv_property_cache.atscmh_fic_ver) { lg216x_get_frontend()
961 state->fic_ver = fe->dtv_property_cache.atscmh_fic_ver; lg216x_get_frontend()
965 &fe->dtv_property_cache.atscmh_parade_id); lg216x_get_frontend()
969 fe->dtv_property_cache.atscmh_parade_id = state->parade_id; lg216x_get_frontend()
972 &fe->dtv_property_cache.atscmh_nog); lg216x_get_frontend()
976 &fe->dtv_property_cache.atscmh_tnog); lg216x_get_frontend()
980 &fe->dtv_property_cache.atscmh_sgn); lg216x_get_frontend()
984 &fe->dtv_property_cache.atscmh_prc); lg216x_get_frontend()
990 &fe->dtv_property_cache.atscmh_rs_frame_mode); lg216x_get_frontend()
995 &fe->dtv_property_cache.atscmh_rs_frame_ensemble); lg216x_get_frontend()
1000 &fe->dtv_property_cache.atscmh_rs_code_mode_pri, lg216x_get_frontend()
1002 &fe->dtv_property_cache.atscmh_rs_code_mode_sec); lg216x_get_frontend()
1007 &fe->dtv_property_cache.atscmh_sccc_block_mode); lg216x_get_frontend()
1012 &fe->dtv_property_cache.atscmh_sccc_code_mode_a, lg216x_get_frontend()
1014 &fe->dtv_property_cache.atscmh_sccc_code_mode_b, lg216x_get_frontend()
1016 &fe->dtv_property_cache.atscmh_sccc_code_mode_c, lg216x_get_frontend()
1018 &fe->dtv_property_cache.atscmh_sccc_code_mode_d); lg216x_get_frontend()
1024 (u8 *)&fe->dtv_property_cache.atscmh_fic_err); lg216x_get_frontend()
1028 &fe->dtv_property_cache.atscmh_crc_err); lg216x_get_frontend()
1032 &fe->dtv_property_cache.atscmh_rs_err); lg216x_get_frontend()
1038 if (((fe->dtv_property_cache.atscmh_rs_err >= 240) && lg216x_get_frontend()
1039 (fe->dtv_property_cache.atscmh_crc_err >= 240)) && lg216x_get_frontend()
1054 static int lg216x_get_property(struct dvb_frontend *fe, lg216x_get_property() argument
1058 lg216x_get_frontend(fe) : 0; lg216x_get_property()
1062 static int lg2160_set_frontend(struct dvb_frontend *fe) lg2160_set_frontend() argument
1064 struct lg216x_state *state = fe->demodulator_priv; lg2160_set_frontend()
1067 lg_dbg("(%d)\n", fe->dtv_property_cache.frequency); lg2160_set_frontend()
1069 if (fe->ops.tuner_ops.set_params) { lg2160_set_frontend()
1070 ret = fe->ops.tuner_ops.set_params(fe); lg2160_set_frontend()
1071 if (fe->ops.i2c_gate_ctrl) lg2160_set_frontend()
1072 fe->ops.i2c_gate_ctrl(fe, 0); lg2160_set_frontend()
1075 state->current_frequency = fe->dtv_property_cache.frequency; lg2160_set_frontend()
1116 ret = lg216x_set_parade(state, fe->dtv_property_cache.atscmh_parade_id); lg2160_set_frontend()
1121 fe->dtv_property_cache.atscmh_rs_frame_ensemble); lg2160_set_frontend()
1132 lg216x_get_frontend(fe); lg2160_set_frontend()
1206 static int lg216x_read_status(struct dvb_frontend *fe, enum fe_status *status) lg216x_read_status() argument
1208 struct lg216x_state *state = fe->demodulator_priv; lg216x_read_status()
1235 static int lg2160_read_snr(struct dvb_frontend *fe, u16 *snr) lg2160_read_snr() argument
1237 struct lg216x_state *state = fe->demodulator_priv; lg2160_read_snr()
1263 static int lg2161_read_snr(struct dvb_frontend *fe, u16 *snr) lg2161_read_snr() argument
1265 struct lg216x_state *state = fe->demodulator_priv; lg2161_read_snr()
1288 static int lg216x_read_signal_strength(struct dvb_frontend *fe, lg216x_read_signal_strength() argument
1299 struct lg216x_state *state = fe->demodulator_priv; lg216x_read_signal_strength()
1305 ret = fe->ops.read_snr(fe, &snr); lg216x_read_signal_strength()
1323 static int lg216x_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) lg216x_read_ucblocks() argument
1326 struct lg216x_state *state = fe->demodulator_priv; lg216x_read_ucblocks()
1330 &fe->dtv_property_cache.atscmh_rs_err); lg216x_read_ucblocks()
1334 *ucblocks = fe->dtv_property_cache.atscmh_rs_err; lg216x_read_ucblocks()
1342 static int lg216x_get_tune_settings(struct dvb_frontend *fe, lg216x_get_tune_settings() argument
1351 static void lg216x_release(struct dvb_frontend *fe) lg216x_release() argument
1353 struct lg216x_state *state = fe->demodulator_priv; lg216x_release()
H A Dmt352.h51 int (*demod_init)(struct dvb_frontend* fe);
66 static inline int mt352_write(struct dvb_frontend *fe, const u8 buf[], int len) { mt352_write() argument
68 if (fe->ops.write) mt352_write()
69 r = fe->ops.write(fe, buf, len); mt352_write()
H A Dor51132.c30 * "dvb-fe-or51132-vsb.fw" and "dvb-fe-or51132-qam.fw" to
34 #define OR51132_VSB_FIRMWARE "dvb-fe-or51132-vsb.fw"
35 #define OR51132_QAM_FIRMWARE "dvb-fe-or51132-qam.fw"
132 static int or51132_load_firmware (struct dvb_frontend* fe, const struct firmware *fw) or51132_load_firmware() argument
134 struct or51132_state* state = fe->demodulator_priv; or51132_load_firmware()
212 static int or51132_init(struct dvb_frontend* fe) or51132_init() argument
217 static int or51132_read_ber(struct dvb_frontend* fe, u32* ber) or51132_read_ber() argument
223 static int or51132_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) or51132_read_ucblocks() argument
229 static int or51132_sleep(struct dvb_frontend* fe) or51132_sleep() argument
234 static int or51132_setmode(struct dvb_frontend* fe) or51132_setmode() argument
236 struct or51132_state* state = fe->demodulator_priv; or51132_setmode()
309 static int or51132_set_parameters(struct dvb_frontend *fe) or51132_set_parameters() argument
311 struct dtv_frontend_properties *p = &fe->dtv_property_cache; or51132_set_parameters()
313 struct or51132_state* state = fe->demodulator_priv; or51132_set_parameters()
349 ret = or51132_load_firmware(fe, fw); or51132_set_parameters()
357 state->config->set_ts_params(fe, clock_mode); or51132_set_parameters()
362 or51132_setmode(fe); or51132_set_parameters()
365 if (fe->ops.tuner_ops.set_params) { or51132_set_parameters()
366 fe->ops.tuner_ops.set_params(fe); or51132_set_parameters()
367 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); or51132_set_parameters()
371 or51132_setmode(fe); or51132_set_parameters()
378 static int or51132_get_parameters(struct dvb_frontend* fe) or51132_get_parameters() argument
380 struct dtv_frontend_properties *p = &fe->dtv_property_cache; or51132_get_parameters()
381 struct or51132_state* state = fe->demodulator_priv; or51132_get_parameters()
418 static int or51132_read_status(struct dvb_frontend *fe, enum fe_status *status) or51132_read_status() argument
420 struct or51132_state* state = fe->demodulator_priv; or51132_read_status()
475 static int or51132_read_snr(struct dvb_frontend* fe, u16* snr) or51132_read_snr() argument
477 struct or51132_state* state = fe->demodulator_priv; or51132_read_snr()
527 static int or51132_read_signal_strength(struct dvb_frontend* fe, u16* strength) or51132_read_signal_strength() argument
532 struct or51132_state* state = (struct or51132_state*) fe->demodulator_priv; or51132_read_signal_strength()
536 ret = fe->ops.read_snr(fe, &snr); or51132_read_signal_strength()
549 static int or51132_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fe_tune_settings) or51132_get_tune_settings() argument
558 static void or51132_release(struct dvb_frontend* fe) or51132_release() argument
560 struct or51132_state* state = fe->demodulator_priv; or51132_release()
H A Dascot2e.c249 static int ascot2e_init(struct dvb_frontend *fe) ascot2e_init() argument
251 struct ascot2e_priv *priv = fe->tuner_priv; ascot2e_init()
257 static int ascot2e_release(struct dvb_frontend *fe) ascot2e_release() argument
259 struct ascot2e_priv *priv = fe->tuner_priv; ascot2e_release()
262 kfree(fe->tuner_priv); ascot2e_release()
263 fe->tuner_priv = NULL; ascot2e_release()
267 static int ascot2e_sleep(struct dvb_frontend *fe) ascot2e_sleep() argument
269 struct ascot2e_priv *priv = fe->tuner_priv; ascot2e_sleep()
276 static enum ascot2e_tv_system_t ascot2e_get_tv_system(struct dvb_frontend *fe) ascot2e_get_tv_system() argument
279 struct dtv_frontend_properties *p = &fe->dtv_property_cache; ascot2e_get_tv_system()
280 struct ascot2e_priv *priv = fe->tuner_priv; ascot2e_get_tv_system()
320 static int ascot2e_set_params(struct dvb_frontend *fe) ascot2e_set_params() argument
325 struct dtv_frontend_properties *p = &fe->dtv_property_cache; ascot2e_set_params()
326 struct ascot2e_priv *priv = fe->tuner_priv; ascot2e_set_params()
330 tv_system = ascot2e_get_tv_system(fe); ascot2e_set_params()
459 static int ascot2e_get_frequency(struct dvb_frontend *fe, u32 *frequency) ascot2e_get_frequency() argument
461 struct ascot2e_priv *priv = fe->tuner_priv; ascot2e_get_frequency()
481 struct dvb_frontend *ascot2e_attach(struct dvb_frontend *fe, ascot2e_attach() argument
496 if (fe->ops.i2c_gate_ctrl) ascot2e_attach()
497 fe->ops.i2c_gate_ctrl(fe, 1); ascot2e_attach()
533 if (fe->ops.i2c_gate_ctrl) ascot2e_attach()
534 fe->ops.i2c_gate_ctrl(fe, 0); ascot2e_attach()
536 memcpy(&fe->ops.tuner_ops, &ascot2e_tuner_ops, ascot2e_attach()
538 fe->tuner_priv = priv; ascot2e_attach()
542 return fe; ascot2e_attach()
H A Dds3000.c43 #define DS3000_DEFAULT_FIRMWARE "dvb-fe-ds3000.fw"
259 static int ds3000_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) ds3000_i2c_gate_ctrl() argument
261 struct ds3000_state *state = fe->demodulator_priv; ds3000_i2c_gate_ctrl()
344 static int ds3000_load_firmware(struct dvb_frontend *fe,
347 static int ds3000_firmware_ondemand(struct dvb_frontend *fe) ds3000_firmware_ondemand() argument
349 struct ds3000_state *state = fe->demodulator_priv; ds3000_firmware_ondemand()
372 ret = ds3000_load_firmware(fe, fw); ds3000_firmware_ondemand()
384 static int ds3000_load_firmware(struct dvb_frontend *fe, ds3000_load_firmware() argument
387 struct ds3000_state *state = fe->demodulator_priv; ds3000_load_firmware()
407 static int ds3000_set_voltage(struct dvb_frontend *fe, ds3000_set_voltage() argument
410 struct ds3000_state *state = fe->demodulator_priv; ds3000_set_voltage()
435 static int ds3000_read_status(struct dvb_frontend *fe, enum fe_status *status) ds3000_read_status() argument
437 struct ds3000_state *state = fe->demodulator_priv; ds3000_read_status()
438 struct dtv_frontend_properties *c = &fe->dtv_property_cache; ds3000_read_status()
465 state->config->set_lock_led(fe, *status == 0 ? 0 : 1); ds3000_read_status()
473 static int ds3000_read_ber(struct dvb_frontend *fe, u32* ber) ds3000_read_ber() argument
475 struct ds3000_state *state = fe->demodulator_priv; ds3000_read_ber()
476 struct dtv_frontend_properties *c = &fe->dtv_property_cache; ds3000_read_ber()
537 static int ds3000_read_signal_strength(struct dvb_frontend *fe, ds3000_read_signal_strength() argument
540 if (fe->ops.tuner_ops.get_rf_strength) ds3000_read_signal_strength()
541 fe->ops.tuner_ops.get_rf_strength(fe, signal_strength); ds3000_read_signal_strength()
547 static int ds3000_read_snr(struct dvb_frontend *fe, u16 *snr) ds3000_read_snr() argument
549 struct ds3000_state *state = fe->demodulator_priv; ds3000_read_snr()
550 struct dtv_frontend_properties *c = &fe->dtv_property_cache; ds3000_read_snr()
633 static int ds3000_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) ds3000_read_ucblocks() argument
635 struct ds3000_state *state = fe->demodulator_priv; ds3000_read_ucblocks()
636 struct dtv_frontend_properties *c = &fe->dtv_property_cache; ds3000_read_ucblocks()
670 static int ds3000_set_tone(struct dvb_frontend *fe, enum fe_sec_tone_mode tone) ds3000_set_tone() argument
672 struct ds3000_state *state = fe->demodulator_priv; ds3000_set_tone()
704 static int ds3000_send_diseqc_msg(struct dvb_frontend *fe, ds3000_send_diseqc_msg() argument
707 struct ds3000_state *state = fe->demodulator_priv; ds3000_send_diseqc_msg()
769 static int ds3000_diseqc_send_burst(struct dvb_frontend *fe, ds3000_diseqc_send_burst() argument
772 struct ds3000_state *state = fe->demodulator_priv; ds3000_diseqc_send_burst()
822 static void ds3000_release(struct dvb_frontend *fe) ds3000_release() argument
824 struct ds3000_state *state = fe->demodulator_priv; ds3000_release()
827 state->config->set_lock_led(fe, 0); ds3000_release()
884 static int ds3000_set_carrier_offset(struct dvb_frontend *fe, ds3000_set_carrier_offset() argument
887 struct ds3000_state *state = fe->demodulator_priv; ds3000_set_carrier_offset()
903 static int ds3000_set_frontend(struct dvb_frontend *fe) ds3000_set_frontend() argument
905 struct ds3000_state *state = fe->demodulator_priv; ds3000_set_frontend()
906 struct dtv_frontend_properties *c = &fe->dtv_property_cache; ds3000_set_frontend()
917 state->config->set_ts_params(fe, 0); ds3000_set_frontend()
919 if (fe->ops.tuner_ops.set_params) ds3000_set_frontend()
920 fe->ops.tuner_ops.set_params(fe); ds3000_set_frontend()
1028 if (fe->ops.tuner_ops.get_frequency) { ds3000_set_frontend()
1029 fe->ops.tuner_ops.get_frequency(fe, &frequency); ds3000_set_frontend()
1031 ds3000_set_carrier_offset(fe, offset_khz); ds3000_set_frontend()
1035 ds3000_read_status(fe, &status); ds3000_set_frontend()
1045 static int ds3000_tune(struct dvb_frontend *fe, ds3000_tune() argument
1052 int ret = ds3000_set_frontend(fe); ds3000_tune()
1059 return ds3000_read_status(fe, status); ds3000_tune()
1062 static enum dvbfe_algo ds3000_get_algo(struct dvb_frontend *fe) ds3000_get_algo() argument
1064 struct ds3000_state *state = fe->demodulator_priv; ds3000_get_algo()
1067 state->config->set_lock_led(fe, 0); ds3000_get_algo()
1078 static int ds3000_initfe(struct dvb_frontend *fe) ds3000_initfe() argument
1080 struct ds3000_state *state = fe->demodulator_priv; ds3000_initfe()
1089 ret = ds3000_firmware_ondemand(fe); ds3000_initfe()
H A Drtl2830.c57 static int rtl2830_init(struct dvb_frontend *fe) rtl2830_init() argument
59 struct i2c_client *client = fe->demodulator_priv; rtl2830_init()
61 struct dtv_frontend_properties *c = &dev->fe.dtv_property_cache; rtl2830_init()
149 static int rtl2830_sleep(struct dvb_frontend *fe) rtl2830_sleep() argument
151 struct i2c_client *client = fe->demodulator_priv; rtl2830_sleep()
162 static int rtl2830_get_tune_settings(struct dvb_frontend *fe, rtl2830_get_tune_settings() argument
166 s->step_size = fe->ops.info.frequency_stepsize * 2; rtl2830_get_tune_settings()
167 s->max_drift = (fe->ops.info.frequency_stepsize * 2) + 1; rtl2830_get_tune_settings()
172 static int rtl2830_set_frontend(struct dvb_frontend *fe) rtl2830_set_frontend() argument
174 struct i2c_client *client = fe->demodulator_priv; rtl2830_set_frontend()
176 struct dtv_frontend_properties *c = &fe->dtv_property_cache; rtl2830_set_frontend()
209 if (fe->ops.tuner_ops.set_params) rtl2830_set_frontend()
210 fe->ops.tuner_ops.set_params(fe); rtl2830_set_frontend()
233 if (fe->ops.tuner_ops.get_if_frequency) rtl2830_set_frontend()
234 ret = fe->ops.tuner_ops.get_if_frequency(fe, &if_frequency); rtl2830_set_frontend()
282 static int rtl2830_get_frontend(struct dvb_frontend *fe) rtl2830_get_frontend() argument
284 struct i2c_client *client = fe->demodulator_priv; rtl2830_get_frontend()
286 struct dtv_frontend_properties *c = &fe->dtv_property_cache; rtl2830_get_frontend()
395 static int rtl2830_read_status(struct dvb_frontend *fe, enum fe_status *status) rtl2830_read_status() argument
397 struct i2c_client *client = fe->demodulator_priv; rtl2830_read_status()
428 static int rtl2830_read_snr(struct dvb_frontend *fe, u16 *snr) rtl2830_read_snr() argument
430 struct dtv_frontend_properties *c = &fe->dtv_property_cache; rtl2830_read_snr()
440 static int rtl2830_read_ber(struct dvb_frontend *fe, u32 *ber) rtl2830_read_ber() argument
442 struct i2c_client *client = fe->demodulator_priv; rtl2830_read_ber()
451 static int rtl2830_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) rtl2830_read_ucblocks() argument
458 static int rtl2830_read_signal_strength(struct dvb_frontend *fe, u16 *strength) rtl2830_read_signal_strength() argument
460 struct dtv_frontend_properties *c = &fe->dtv_property_cache; rtl2830_read_signal_strength()
510 struct dtv_frontend_properties *c = &dev->fe.dtv_property_cache; rtl2830_stat_work()
609 static int rtl2830_pid_filter_ctrl(struct dvb_frontend *fe, int onoff) rtl2830_pid_filter_ctrl() argument
611 struct i2c_client *client = fe->demodulator_priv; rtl2830_pid_filter_ctrl()
633 static int rtl2830_pid_filter(struct dvb_frontend *fe, u8 index, u16 pid, int onoff) rtl2830_pid_filter() argument
635 struct i2c_client *client = fe->demodulator_priv; rtl2830_pid_filter()
706 return &dev->fe; rtl2830_get_dvb_frontend()
876 memcpy(&dev->fe.ops, &rtl2830_ops, sizeof(dev->fe.ops)); rtl2830_probe()
877 dev->fe.demodulator_priv = client; rtl2830_probe()
H A Dcx24116.c57 #define CX24116_DEFAULT_FIRMWARE "dvb-fe-cx24116.fw"
476 static int cx24116_load_firmware(struct dvb_frontend *fe,
479 static int cx24116_firmware_ondemand(struct dvb_frontend *fe) cx24116_firmware_ondemand() argument
481 struct cx24116_state *state = fe->demodulator_priv; cx24116_firmware_ondemand()
510 ret = cx24116_load_firmware(fe, fw); cx24116_firmware_ondemand()
530 static int cx24116_cmd_execute(struct dvb_frontend *fe, struct cx24116_cmd *cmd) cx24116_cmd_execute() argument
532 struct cx24116_state *state = fe->demodulator_priv; cx24116_cmd_execute()
538 ret = cx24116_firmware_ondemand(fe); cx24116_cmd_execute()
566 static int cx24116_load_firmware(struct dvb_frontend *fe, cx24116_load_firmware() argument
569 struct cx24116_state *state = fe->demodulator_priv; cx24116_load_firmware()
584 state->config->reset_device(fe); cx24116_load_firmware()
640 ret = cx24116_cmd_execute(fe, &cmd); cx24116_load_firmware()
651 ret = cx24116_cmd_execute(fe, &cmd); cx24116_load_firmware()
668 ret = cx24116_cmd_execute(fe, &cmd); cx24116_load_firmware()
677 ret = cx24116_cmd_execute(fe, &cmd); cx24116_load_firmware()
688 static int cx24116_read_status(struct dvb_frontend *fe, enum fe_status *status) cx24116_read_status() argument
690 struct cx24116_state *state = fe->demodulator_priv; cx24116_read_status()
711 static int cx24116_read_ber(struct dvb_frontend *fe, u32 *ber) cx24116_read_ber() argument
713 struct cx24116_state *state = fe->demodulator_priv; cx24116_read_ber()
726 static int cx24116_read_signal_strength(struct dvb_frontend *fe, cx24116_read_signal_strength() argument
729 struct cx24116_state *state = fe->demodulator_priv; cx24116_read_signal_strength()
739 ret = cx24116_cmd_execute(fe, &cmd); cx24116_read_signal_strength()
756 static int cx24116_read_snr_pct(struct dvb_frontend *fe, u16 *snr) cx24116_read_snr_pct() argument
758 struct cx24116_state *state = fe->demodulator_priv; cx24116_read_snr_pct()
786 static int cx24116_read_snr_esno(struct dvb_frontend *fe, u16 *snr) cx24116_read_snr_esno() argument
788 struct cx24116_state *state = fe->demodulator_priv; cx24116_read_snr_esno()
800 static int cx24116_read_snr(struct dvb_frontend *fe, u16 *snr) cx24116_read_snr() argument
803 return cx24116_read_snr_esno(fe, snr); cx24116_read_snr()
805 return cx24116_read_snr_pct(fe, snr); cx24116_read_snr()
808 static int cx24116_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) cx24116_read_ucblocks() argument
810 struct cx24116_state *state = fe->demodulator_priv; cx24116_read_ucblocks()
821 static void cx24116_clone_params(struct dvb_frontend *fe) cx24116_clone_params() argument
823 struct cx24116_state *state = fe->demodulator_priv; cx24116_clone_params()
828 static int cx24116_wait_for_lnb(struct dvb_frontend *fe) cx24116_wait_for_lnb() argument
830 struct cx24116_state *state = fe->demodulator_priv; cx24116_wait_for_lnb()
848 static int cx24116_set_voltage(struct dvb_frontend *fe, cx24116_set_voltage() argument
859 ret = cx24116_wait_for_lnb(fe); cx24116_set_voltage()
873 return cx24116_cmd_execute(fe, &cmd); cx24116_set_voltage()
876 static int cx24116_set_tone(struct dvb_frontend *fe, cx24116_set_tone() argument
889 ret = cx24116_wait_for_lnb(fe); cx24116_set_tone()
916 return cx24116_cmd_execute(fe, &cmd); cx24116_set_tone()
920 static int cx24116_diseqc_init(struct dvb_frontend *fe) cx24116_diseqc_init() argument
922 struct cx24116_state *state = fe->demodulator_priv; cx24116_diseqc_init()
936 ret = cx24116_cmd_execute(fe, &cmd); cx24116_diseqc_init()
962 static int cx24116_send_diseqc_msg(struct dvb_frontend *fe, cx24116_send_diseqc_msg() argument
965 struct cx24116_state *state = fe->demodulator_priv; cx24116_send_diseqc_msg()
1031 ret = cx24116_wait_for_lnb(fe); cx24116_send_diseqc_msg()
1039 ret = cx24116_cmd_execute(fe, &state->dsec_cmd); cx24116_send_diseqc_msg()
1059 static int cx24116_diseqc_send_burst(struct dvb_frontend *fe, cx24116_diseqc_send_burst() argument
1062 struct cx24116_state *state = fe->demodulator_priv; cx24116_diseqc_send_burst()
1085 ret = cx24116_wait_for_lnb(fe); cx24116_diseqc_send_burst()
1093 ret = cx24116_cmd_execute(fe, &state->dsec_cmd); cx24116_diseqc_send_burst()
1112 static void cx24116_release(struct dvb_frontend *fe) cx24116_release() argument
1114 struct cx24116_state *state = fe->demodulator_priv; cx24116_release()
1161 static int cx24116_initfe(struct dvb_frontend *fe) cx24116_initfe() argument
1163 struct cx24116_state *state = fe->demodulator_priv; cx24116_initfe()
1178 ret = cx24116_cmd_execute(fe, &cmd); cx24116_initfe()
1182 ret = cx24116_diseqc_init(fe); cx24116_initfe()
1187 return cx24116_set_voltage(fe, SEC_VOLTAGE_13); cx24116_initfe()
1193 static int cx24116_sleep(struct dvb_frontend *fe) cx24116_sleep() argument
1195 struct cx24116_state *state = fe->demodulator_priv; cx24116_sleep()
1205 ret = cx24116_cmd_execute(fe, &cmd); cx24116_sleep()
1220 static int cx24116_set_frontend(struct dvb_frontend *fe) cx24116_set_frontend() argument
1222 struct cx24116_state *state = fe->demodulator_priv; cx24116_set_frontend()
1223 struct dtv_frontend_properties *c = &fe->dtv_property_cache; cx24116_set_frontend()
1327 cx24116_clone_params(fe); cx24116_set_frontend()
1345 state->config->set_ts_params(fe, 0); cx24116_set_frontend()
1351 ret = cx24116_cmd_execute(fe, &cmd); cx24116_set_frontend()
1411 ret = cx24116_cmd_execute(fe, &cmd); cx24116_set_frontend()
1422 cx24116_read_status(fe, &tunerstat); cx24116_set_frontend()
1442 return cx24116_cmd_execute(fe, &cmd); cx24116_set_frontend()
1445 static int cx24116_tune(struct dvb_frontend *fe, bool re_tune, cx24116_tune() argument
1450 * fe->dtv_property_cache with fepriv->parameters_in, where the cx24116_tune()
1458 int ret = cx24116_set_frontend(fe); cx24116_tune()
1462 return cx24116_read_status(fe, status); cx24116_tune()
1465 static int cx24116_get_algo(struct dvb_frontend *fe) cx24116_get_algo() argument
H A Dcx24110.c312 static int _cx24110_pll_write (struct dvb_frontend* fe, const u8 buf[], int len) _cx24110_pll_write() argument
314 struct cx24110_state *state = fe->demodulator_priv; _cx24110_pll_write()
354 static int cx24110_initfe(struct dvb_frontend* fe) cx24110_initfe() argument
356 struct cx24110_state *state = fe->demodulator_priv; cx24110_initfe()
369 static int cx24110_set_voltage(struct dvb_frontend *fe, cx24110_set_voltage() argument
372 struct cx24110_state *state = fe->demodulator_priv; cx24110_set_voltage()
384 static int cx24110_diseqc_send_burst(struct dvb_frontend *fe, cx24110_diseqc_send_burst() argument
388 struct cx24110_state *state = fe->demodulator_priv; cx24110_diseqc_send_burst()
411 static int cx24110_send_diseqc_msg(struct dvb_frontend* fe, cx24110_send_diseqc_msg() argument
415 struct cx24110_state *state = fe->demodulator_priv; cx24110_send_diseqc_msg()
440 static int cx24110_read_status(struct dvb_frontend *fe, cx24110_read_status() argument
443 struct cx24110_state *state = fe->demodulator_priv; cx24110_read_status()
469 static int cx24110_read_ber(struct dvb_frontend* fe, u32* ber) cx24110_read_ber() argument
471 struct cx24110_state *state = fe->demodulator_priv; cx24110_read_ber()
487 static int cx24110_read_signal_strength(struct dvb_frontend* fe, u16* signal_strength) cx24110_read_signal_strength() argument
489 struct cx24110_state *state = fe->demodulator_priv; cx24110_read_signal_strength()
498 static int cx24110_read_snr(struct dvb_frontend* fe, u16* snr) cx24110_read_snr() argument
500 struct cx24110_state *state = fe->demodulator_priv; cx24110_read_snr()
514 static int cx24110_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) cx24110_read_ucblocks() argument
516 struct cx24110_state *state = fe->demodulator_priv; cx24110_read_ucblocks()
535 static int cx24110_set_frontend(struct dvb_frontend *fe) cx24110_set_frontend() argument
537 struct cx24110_state *state = fe->demodulator_priv; cx24110_set_frontend()
538 struct dtv_frontend_properties *p = &fe->dtv_property_cache; cx24110_set_frontend()
540 if (fe->ops.tuner_ops.set_params) { cx24110_set_frontend()
541 fe->ops.tuner_ops.set_params(fe); cx24110_set_frontend()
542 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); cx24110_set_frontend()
553 static int cx24110_get_frontend(struct dvb_frontend *fe) cx24110_get_frontend() argument
555 struct dtv_frontend_properties *p = &fe->dtv_property_cache; cx24110_get_frontend()
556 struct cx24110_state *state = fe->demodulator_priv; cx24110_get_frontend()
581 static int cx24110_set_tone(struct dvb_frontend *fe, cx24110_set_tone() argument
584 struct cx24110_state *state = fe->demodulator_priv; cx24110_set_tone()
589 static void cx24110_release(struct dvb_frontend* fe) cx24110_release() argument
591 struct cx24110_state* state = fe->demodulator_priv; cx24110_release()
H A Dlgdt330x.c183 static int lgdt330x_init(struct dvb_frontend* fe) lgdt330x_init() argument
241 struct lgdt330x_state* state = fe->demodulator_priv; lgdt330x_init()
281 static int lgdt330x_read_ber(struct dvb_frontend* fe, u32* ber) lgdt330x_read_ber() argument
287 static int lgdt330x_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) lgdt330x_read_ucblocks() argument
289 struct lgdt330x_state* state = fe->demodulator_priv; lgdt330x_read_ucblocks()
316 static int lgdt330x_set_parameters(struct dvb_frontend *fe) lgdt330x_set_parameters() argument
318 struct dtv_frontend_properties *p = &fe->dtv_property_cache; lgdt330x_set_parameters()
348 struct lgdt330x_state* state = fe->demodulator_priv; lgdt330x_set_parameters()
364 state->config->pll_rf_set(fe, 1); lgdt330x_set_parameters()
380 state->config->pll_rf_set(fe, 0); lgdt330x_set_parameters()
396 state->config->pll_rf_set(fe, 0); lgdt330x_set_parameters()
423 state->config->set_ts_params(fe, 0); lgdt330x_set_parameters()
428 if (fe->ops.tuner_ops.set_params) { lgdt330x_set_parameters()
429 fe->ops.tuner_ops.set_params(fe); lgdt330x_set_parameters()
430 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); lgdt330x_set_parameters()
442 static int lgdt330x_get_frontend(struct dvb_frontend *fe) lgdt330x_get_frontend() argument
444 struct dtv_frontend_properties *p = &fe->dtv_property_cache; lgdt330x_get_frontend()
445 struct lgdt330x_state *state = fe->demodulator_priv; lgdt330x_get_frontend()
450 static int lgdt3302_read_status(struct dvb_frontend *fe, lgdt3302_read_status() argument
453 struct lgdt330x_state* state = fe->demodulator_priv; lgdt3302_read_status()
509 static int lgdt3303_read_status(struct dvb_frontend *fe, lgdt3303_read_status() argument
512 struct lgdt330x_state* state = fe->demodulator_priv; lgdt3303_read_status()
606 static int lgdt3302_read_snr(struct dvb_frontend* fe, u16* snr) lgdt3302_read_snr() argument
608 struct lgdt330x_state* state = (struct lgdt330x_state*) fe->demodulator_priv; lgdt3302_read_snr()
650 static int lgdt3303_read_snr(struct dvb_frontend* fe, u16* snr) lgdt3303_read_snr() argument
652 struct lgdt330x_state* state = (struct lgdt330x_state*) fe->demodulator_priv; lgdt3303_read_snr()
694 static int lgdt330x_read_signal_strength(struct dvb_frontend* fe, u16* strength) lgdt330x_read_signal_strength() argument
699 struct lgdt330x_state* state = (struct lgdt330x_state*) fe->demodulator_priv; lgdt330x_read_signal_strength()
703 ret = fe->ops.read_snr(fe, &snr); lgdt330x_read_signal_strength()
716 static int lgdt330x_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fe_tune_settings) lgdt330x_get_tune_settings() argument
725 static void lgdt330x_release(struct dvb_frontend* fe) lgdt330x_release() argument
727 struct lgdt330x_state* state = (struct lgdt330x_state*) fe->demodulator_priv; lgdt330x_release()
H A Dmb86a20s.c297 static int mb86a20s_read_status(struct dvb_frontend *fe, enum fe_status *status) mb86a20s_read_status() argument
299 struct mb86a20s_state *state = fe->demodulator_priv; mb86a20s_read_status()
329 static int mb86a20s_read_signal_strength(struct dvb_frontend *fe) mb86a20s_read_signal_strength() argument
331 struct mb86a20s_state *state = fe->demodulator_priv; mb86a20s_read_signal_strength()
332 struct dtv_frontend_properties *c = &fe->dtv_property_cache; mb86a20s_read_signal_strength()
508 static void mb86a20s_reset_frontend_cache(struct dvb_frontend *fe) mb86a20s_reset_frontend_cache() argument
510 struct mb86a20s_state *state = fe->demodulator_priv; mb86a20s_reset_frontend_cache()
511 struct dtv_frontend_properties *c = &fe->dtv_property_cache; mb86a20s_reset_frontend_cache()
553 static void mb86a20s_layer_bitrate(struct dvb_frontend *fe, u32 layer, mb86a20s_layer_bitrate() argument
558 struct mb86a20s_state *state = fe->demodulator_priv; mb86a20s_layer_bitrate()
635 static int mb86a20s_get_frontend(struct dvb_frontend *fe) mb86a20s_get_frontend() argument
637 struct mb86a20s_state *state = fe->demodulator_priv; mb86a20s_get_frontend()
638 struct dtv_frontend_properties *c = &fe->dtv_property_cache; mb86a20s_get_frontend()
644 mb86a20s_reset_frontend_cache(fe); mb86a20s_get_frontend()
690 mb86a20s_layer_bitrate(fe, layer, c->layer[layer].modulation, mb86a20s_get_frontend()
747 static int mb86a20s_reset_counters(struct dvb_frontend *fe) mb86a20s_reset_counters() argument
749 struct mb86a20s_state *state = fe->demodulator_priv; mb86a20s_reset_counters()
750 struct dtv_frontend_properties *c = &fe->dtv_property_cache; mb86a20s_reset_counters()
811 static int mb86a20s_get_pre_ber(struct dvb_frontend *fe, mb86a20s_get_pre_ber() argument
815 struct mb86a20s_state *state = fe->demodulator_priv; mb86a20s_get_pre_ber()
944 static int mb86a20s_get_post_ber(struct dvb_frontend *fe, mb86a20s_get_post_ber() argument
948 struct mb86a20s_state *state = fe->demodulator_priv; mb86a20s_get_post_ber()
1072 static int mb86a20s_get_blk_error(struct dvb_frontend *fe, mb86a20s_get_blk_error() argument
1076 struct mb86a20s_state *state = fe->demodulator_priv; mb86a20s_get_blk_error()
1394 static int mb86a20s_get_main_CNR(struct dvb_frontend *fe) mb86a20s_get_main_CNR() argument
1396 struct mb86a20s_state *state = fe->demodulator_priv; mb86a20s_get_main_CNR()
1397 struct dtv_frontend_properties *c = &fe->dtv_property_cache; mb86a20s_get_main_CNR()
1441 static int mb86a20s_get_blk_error_layer_CNR(struct dvb_frontend *fe) mb86a20s_get_blk_error_layer_CNR() argument
1443 struct mb86a20s_state *state = fe->demodulator_priv; mb86a20s_get_blk_error_layer_CNR()
1444 struct dtv_frontend_properties *c = &fe->dtv_property_cache; mb86a20s_get_blk_error_layer_CNR()
1543 static void mb86a20s_stats_not_ready(struct dvb_frontend *fe) mb86a20s_stats_not_ready() argument
1545 struct mb86a20s_state *state = fe->demodulator_priv; mb86a20s_stats_not_ready()
1546 struct dtv_frontend_properties *c = &fe->dtv_property_cache; mb86a20s_stats_not_ready()
1581 static int mb86a20s_get_stats(struct dvb_frontend *fe, int status_nr) mb86a20s_get_stats() argument
1583 struct mb86a20s_state *state = fe->demodulator_priv; mb86a20s_get_stats()
1584 struct dtv_frontend_properties *c = &fe->dtv_property_cache; mb86a20s_get_stats()
1596 mb86a20s_get_main_CNR(fe); mb86a20s_get_stats()
1599 mb86a20s_get_blk_error_layer_CNR(fe); mb86a20s_get_stats()
1615 rc = mb86a20s_get_pre_ber(fe, layer, mb86a20s_get_stats()
1637 rc = mb86a20s_get_post_ber(fe, layer, mb86a20s_get_stats()
1659 rc = mb86a20s_get_blk_error(fe, layer, mb86a20s_get_stats()
1763 static int mb86a20s_initfe(struct dvb_frontend *fe) mb86a20s_initfe() argument
1765 struct mb86a20s_state *state = fe->demodulator_priv; mb86a20s_initfe()
1773 if (fe->ops.i2c_gate_ctrl) mb86a20s_initfe()
1774 fe->ops.i2c_gate_ctrl(fe, 0); mb86a20s_initfe()
1807 if (fe->ops.tuner_ops.get_if_frequency) mb86a20s_initfe()
1808 fe->ops.tuner_ops.get_if_frequency(fe, &state->if_freq); mb86a20s_initfe()
1865 if (fe->ops.i2c_gate_ctrl) mb86a20s_initfe()
1866 fe->ops.i2c_gate_ctrl(fe, 1); mb86a20s_initfe()
1879 static int mb86a20s_set_frontend(struct dvb_frontend *fe) mb86a20s_set_frontend() argument
1881 struct mb86a20s_state *state = fe->demodulator_priv; mb86a20s_set_frontend()
1882 struct dtv_frontend_properties *c = &fe->dtv_property_cache; mb86a20s_set_frontend()
1914 if (fe->ops.i2c_gate_ctrl) mb86a20s_set_frontend()
1915 fe->ops.i2c_gate_ctrl(fe, 1); mb86a20s_set_frontend()
1916 fe->ops.tuner_ops.set_params(fe); mb86a20s_set_frontend()
1918 if (fe->ops.tuner_ops.get_if_frequency) mb86a20s_set_frontend()
1919 fe->ops.tuner_ops.get_if_frequency(fe, &if_freq); mb86a20s_set_frontend()
1938 mb86a20s_initfe(fe); mb86a20s_set_frontend()
1940 if (fe->ops.i2c_gate_ctrl) mb86a20s_set_frontend()
1941 fe->ops.i2c_gate_ctrl(fe, 0); mb86a20s_set_frontend()
1944 mb86a20s_reset_counters(fe); mb86a20s_set_frontend()
1945 mb86a20s_stats_not_ready(fe); mb86a20s_set_frontend()
1947 if (fe->ops.i2c_gate_ctrl) mb86a20s_set_frontend()
1948 fe->ops.i2c_gate_ctrl(fe, 1); mb86a20s_set_frontend()
1953 static int mb86a20s_read_status_and_stats(struct dvb_frontend *fe, mb86a20s_read_status_and_stats() argument
1956 struct mb86a20s_state *state = fe->demodulator_priv; mb86a20s_read_status_and_stats()
1961 if (fe->ops.i2c_gate_ctrl) mb86a20s_read_status_and_stats()
1962 fe->ops.i2c_gate_ctrl(fe, 0); mb86a20s_read_status_and_stats()
1965 status_nr = mb86a20s_read_status(fe, status); mb86a20s_read_status_and_stats()
1967 mb86a20s_stats_not_ready(fe); mb86a20s_read_status_and_stats()
1968 mb86a20s_reset_frontend_cache(fe); mb86a20s_read_status_and_stats()
1977 rc = mb86a20s_read_signal_strength(fe); mb86a20s_read_status_and_stats()
1981 mb86a20s_stats_not_ready(fe); mb86a20s_read_status_and_stats()
1982 mb86a20s_reset_frontend_cache(fe); mb86a20s_read_status_and_stats()
1990 rc = mb86a20s_get_frontend(fe); mb86a20s_read_status_and_stats()
1999 rc = mb86a20s_get_stats(fe, status_nr); mb86a20s_read_status_and_stats()
2011 mb86a20s_stats_not_ready(fe); mb86a20s_read_status_and_stats()
2014 if (fe->ops.i2c_gate_ctrl) mb86a20s_read_status_and_stats()
2015 fe->ops.i2c_gate_ctrl(fe, 1); mb86a20s_read_status_and_stats()
2020 static int mb86a20s_read_signal_strength_from_cache(struct dvb_frontend *fe, mb86a20s_read_signal_strength_from_cache() argument
2023 struct dtv_frontend_properties *c = &fe->dtv_property_cache; mb86a20s_read_signal_strength_from_cache()
2031 static int mb86a20s_get_frontend_dummy(struct dvb_frontend *fe) mb86a20s_get_frontend_dummy() argument
2041 static int mb86a20s_tune(struct dvb_frontend *fe, mb86a20s_tune() argument
2047 struct mb86a20s_state *state = fe->demodulator_priv; mb86a20s_tune()
2053 rc = mb86a20s_set_frontend(fe); mb86a20s_tune()
2056 mb86a20s_read_status_and_stats(fe, status); mb86a20s_tune()
2061 static void mb86a20s_release(struct dvb_frontend *fe) mb86a20s_release() argument
2063 struct mb86a20s_state *state = fe->demodulator_priv; mb86a20s_release()
H A Dsi21xx.c274 static int si21_write(struct dvb_frontend *fe, const u8 buf[], int len) si21_write() argument
276 struct si21xx_state *state = fe->demodulator_priv; si21_write()
354 static int si21xx_set_symbolrate(struct dvb_frontend *fe, u32 srate) si21xx_set_symbolrate() argument
356 struct si21xx_state *state = fe->demodulator_priv; si21xx_set_symbolrate()
383 static int si21xx_send_diseqc_msg(struct dvb_frontend *fe, si21xx_send_diseqc_msg() argument
386 struct si21xx_state *state = fe->demodulator_priv; si21xx_send_diseqc_msg()
412 static int si21xx_send_diseqc_burst(struct dvb_frontend *fe, si21xx_send_diseqc_burst() argument
415 struct si21xx_state *state = fe->demodulator_priv; si21xx_send_diseqc_burst()
437 static int si21xx_set_tone(struct dvb_frontend *fe, enum fe_sec_tone_mode tone) si21xx_set_tone() argument
439 struct si21xx_state *state = fe->demodulator_priv; si21xx_set_tone()
457 static int si21xx_set_voltage(struct dvb_frontend *fe, enum fe_sec_voltage volt) si21xx_set_voltage() argument
459 struct si21xx_state *state = fe->demodulator_priv; si21xx_set_voltage()
481 static int si21xx_init(struct dvb_frontend *fe) si21xx_init() argument
483 struct si21xx_state *state = fe->demodulator_priv; si21xx_init()
539 static int si21_read_status(struct dvb_frontend *fe, enum fe_status *status) si21_read_status() argument
541 struct si21xx_state *state = fe->demodulator_priv; si21_read_status()
577 static int si21_read_signal_strength(struct dvb_frontend *fe, u16 *strength) si21_read_signal_strength() argument
579 struct si21xx_state *state = fe->demodulator_priv; si21_read_signal_strength()
597 static int si21_read_ber(struct dvb_frontend *fe, u32 *ber) si21_read_ber() argument
599 struct si21xx_state *state = fe->demodulator_priv; si21_read_ber()
612 static int si21_read_snr(struct dvb_frontend *fe, u16 *snr) si21_read_snr() argument
614 struct si21xx_state *state = fe->demodulator_priv; si21_read_snr()
626 static int si21_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) si21_read_ucblocks() argument
628 struct si21xx_state *state = fe->demodulator_priv; si21_read_ucblocks()
643 static int si21xx_setacquire(struct dvb_frontend *fe, int symbrate, si21xx_setacquire() argument
647 struct si21xx_state *state = fe->demodulator_priv; si21xx_setacquire()
663 si21xx_set_symbolrate(fe, symbrate); si21xx_setacquire()
696 static int si21xx_set_frontend(struct dvb_frontend *fe) si21xx_set_frontend() argument
698 struct si21xx_state *state = fe->demodulator_priv; si21xx_set_frontend()
699 struct dtv_frontend_properties *c = &fe->dtv_property_cache; si21xx_set_frontend()
840 si21xx_setacquire(fe, c->symbol_rate, c->fec_inner); si21xx_set_frontend()
845 static int si21xx_sleep(struct dvb_frontend *fe) si21xx_sleep() argument
847 struct si21xx_state *state = fe->demodulator_priv; si21xx_sleep()
860 static void si21xx_release(struct dvb_frontend *fe) si21xx_release() argument
862 struct si21xx_state *state = fe->demodulator_priv; si21xx_release()
H A Dstv0299.h92 int (*set_symbol_rate)(struct dvb_frontend *fe, u32 srate, u32 ratio);
95 int (*set_ts_params)(struct dvb_frontend *fe, int is_punctured);
110 static inline int stv0299_writereg(struct dvb_frontend *fe, u8 reg, u8 val) { stv0299_writereg() argument
113 if (fe->ops.write) stv0299_writereg()
114 r = fe->ops.write(fe, buf, 2); stv0299_writereg()
H A Dcx24123.c515 static int cx24123_pll_calculate(struct dvb_frontend *fe) cx24123_pll_calculate() argument
517 struct dtv_frontend_properties *p = &fe->dtv_property_cache; cx24123_pll_calculate()
518 struct cx24123_state *state = fe->demodulator_priv; cx24123_pll_calculate()
590 static int cx24123_pll_writereg(struct dvb_frontend *fe, u32 data) cx24123_pll_writereg() argument
592 struct cx24123_state *state = fe->demodulator_priv; cx24123_pll_writereg()
647 static int cx24123_pll_tune(struct dvb_frontend *fe) cx24123_pll_tune() argument
649 struct dtv_frontend_properties *p = &fe->dtv_property_cache; cx24123_pll_tune()
650 struct cx24123_state *state = fe->demodulator_priv; cx24123_pll_tune()
655 if (cx24123_pll_calculate(fe) != 0) { cx24123_pll_tune()
661 cx24123_pll_writereg(fe, state->VCAarg); cx24123_pll_tune()
662 cx24123_pll_writereg(fe, state->VGAarg); cx24123_pll_tune()
665 cx24123_pll_writereg(fe, state->bandselectarg); cx24123_pll_tune()
666 cx24123_pll_writereg(fe, state->pllarg); cx24123_pll_tune()
699 static int cx24123_initfe(struct dvb_frontend *fe) cx24123_initfe() argument
701 struct cx24123_state *state = fe->demodulator_priv; cx24123_initfe()
722 static int cx24123_set_voltage(struct dvb_frontend *fe, cx24123_set_voltage() argument
725 struct cx24123_state *state = fe->demodulator_priv; cx24123_set_voltage()
761 static int cx24123_send_diseqc_msg(struct dvb_frontend *fe, cx24123_send_diseqc_msg() argument
764 struct cx24123_state *state = fe->demodulator_priv; cx24123_send_diseqc_msg()
797 static int cx24123_diseqc_send_burst(struct dvb_frontend *fe, cx24123_diseqc_send_burst() argument
800 struct cx24123_state *state = fe->demodulator_priv; cx24123_diseqc_send_burst()
834 static int cx24123_read_status(struct dvb_frontend *fe, enum fe_status *status) cx24123_read_status() argument
836 struct cx24123_state *state = fe->demodulator_priv; cx24123_read_status()
842 if (fe->ops.tuner_ops.get_status) cx24123_read_status()
843 fe->ops.tuner_ops.get_status(fe, &tun_status); cx24123_read_status()
871 static int cx24123_read_ber(struct dvb_frontend *fe, u32 *ber) cx24123_read_ber() argument
873 struct cx24123_state *state = fe->demodulator_priv; cx24123_read_ber()
886 static int cx24123_read_signal_strength(struct dvb_frontend *fe, cx24123_read_signal_strength() argument
889 struct cx24123_state *state = fe->demodulator_priv; cx24123_read_signal_strength()
899 static int cx24123_read_snr(struct dvb_frontend *fe, u16 *snr) cx24123_read_snr() argument
901 struct cx24123_state *state = fe->demodulator_priv; cx24123_read_snr()
913 static int cx24123_set_frontend(struct dvb_frontend *fe) cx24123_set_frontend() argument
915 struct cx24123_state *state = fe->demodulator_priv; cx24123_set_frontend()
916 struct dtv_frontend_properties *p = &fe->dtv_property_cache; cx24123_set_frontend()
921 state->config->set_ts_params(fe, 0); cx24123_set_frontend()
931 cx24123_pll_tune(fe); cx24123_set_frontend()
932 else if (fe->ops.tuner_ops.set_params) cx24123_set_frontend()
933 fe->ops.tuner_ops.set_params(fe); cx24123_set_frontend()
943 state->config->agc_callback(fe); cx24123_set_frontend()
948 static int cx24123_get_frontend(struct dvb_frontend *fe) cx24123_get_frontend() argument
950 struct dtv_frontend_properties *p = &fe->dtv_property_cache; cx24123_get_frontend()
951 struct cx24123_state *state = fe->demodulator_priv; cx24123_get_frontend()
969 static int cx24123_set_tone(struct dvb_frontend *fe, enum fe_sec_tone_mode tone) cx24123_set_tone() argument
971 struct cx24123_state *state = fe->demodulator_priv; cx24123_set_tone()
994 static int cx24123_tune(struct dvb_frontend *fe, cx24123_tune() argument
1003 retval = cx24123_set_frontend(fe); cx24123_tune()
1006 cx24123_read_status(fe, status); cx24123_tune()
1012 static int cx24123_get_algo(struct dvb_frontend *fe) cx24123_get_algo() argument
1017 static void cx24123_release(struct dvb_frontend *fe) cx24123_release() argument
1019 struct cx24123_state *state = fe->demodulator_priv; cx24123_release()
1045 cx24123_get_tuner_i2c_adapter(struct dvb_frontend *fe) cx24123_get_tuner_i2c_adapter() argument
1047 struct cx24123_state *state = fe->demodulator_priv; cx24123_get_tuner_i2c_adapter()
H A Dhd29l2.c171 static int hd29l2_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) hd29l2_i2c_gate_ctrl() argument
174 struct hd29l2_priv *priv = fe->demodulator_priv; hd29l2_i2c_gate_ctrl()
214 static int hd29l2_read_status(struct dvb_frontend *fe, enum fe_status *status) hd29l2_read_status() argument
217 struct hd29l2_priv *priv = fe->demodulator_priv; hd29l2_read_status()
249 static int hd29l2_read_snr(struct dvb_frontend *fe, u16 *snr) hd29l2_read_snr() argument
252 struct hd29l2_priv *priv = fe->demodulator_priv; hd29l2_read_snr()
281 static int hd29l2_read_signal_strength(struct dvb_frontend *fe, u16 *strength) hd29l2_read_signal_strength() argument
284 struct hd29l2_priv *priv = fe->demodulator_priv; hd29l2_read_signal_strength()
306 static int hd29l2_read_ber(struct dvb_frontend *fe, u32 *ber) hd29l2_read_ber() argument
309 struct hd29l2_priv *priv = fe->demodulator_priv; hd29l2_read_ber()
333 static int hd29l2_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) hd29l2_read_ucblocks() argument
340 static enum dvbfe_search hd29l2_search(struct dvb_frontend *fe) hd29l2_search() argument
343 struct hd29l2_priv *priv = fe->demodulator_priv; hd29l2_search()
344 struct dtv_frontend_properties *c = &fe->dtv_property_cache; hd29l2_search()
362 if (fe->ops.tuner_ops.set_params) hd29l2_search()
363 fe->ops.tuner_ops.set_params(fe); hd29l2_search()
366 if (fe->ops.tuner_ops.get_if_frequency) hd29l2_search()
367 fe->ops.tuner_ops.get_if_frequency(fe, &if_freq); hd29l2_search()
558 static int hd29l2_get_frontend_algo(struct dvb_frontend *fe) hd29l2_get_frontend_algo() argument
563 static int hd29l2_get_frontend(struct dvb_frontend *fe) hd29l2_get_frontend() argument
566 struct hd29l2_priv *priv = fe->demodulator_priv; hd29l2_get_frontend()
567 struct dtv_frontend_properties *c = &fe->dtv_property_cache; hd29l2_get_frontend()
727 static int hd29l2_init(struct dvb_frontend *fe) hd29l2_init() argument
730 struct hd29l2_priv *priv = fe->demodulator_priv; hd29l2_init()
746 if (fe->callback) { hd29l2_init()
747 ret = fe->callback(fe, DVB_FRONTEND_COMPONENT_DEMOD, 0, 0); hd29l2_init()
790 static void hd29l2_release(struct dvb_frontend *fe) hd29l2_release() argument
792 struct hd29l2_priv *priv = fe->demodulator_priv; hd29l2_release()
821 memcpy(&priv->fe.ops, &hd29l2_ops, sizeof(struct dvb_frontend_ops)); hd29l2_attach()
822 priv->fe.demodulator_priv = priv; hd29l2_attach()
824 return &priv->fe; hd29l2_attach()
H A Daf9013.c32 struct dvb_frontend fe; member in struct:af9013_state
359 static int af9013_statistics_ber_unc_start(struct dvb_frontend *fe) af9013_statistics_ber_unc_start() argument
361 struct af9013_state *state = fe->demodulator_priv; af9013_statistics_ber_unc_start()
377 static int af9013_statistics_ber_unc_result(struct dvb_frontend *fe) af9013_statistics_ber_unc_result() argument
379 struct af9013_state *state = fe->demodulator_priv; af9013_statistics_ber_unc_result()
408 static int af9013_statistics_snr_start(struct dvb_frontend *fe) af9013_statistics_snr_start() argument
410 struct af9013_state *state = fe->demodulator_priv; af9013_statistics_snr_start()
426 static int af9013_statistics_snr_result(struct dvb_frontend *fe) af9013_statistics_snr_result() argument
428 struct af9013_state *state = fe->demodulator_priv; af9013_statistics_snr_result()
489 static int af9013_statistics_signal_strength(struct dvb_frontend *fe) af9013_statistics_signal_strength() argument
491 struct af9013_state *state = fe->demodulator_priv; af9013_statistics_signal_strength()
543 af9013_statistics_signal_strength(&state->fe); af9013_statistics_work()
548 af9013_statistics_snr_start(&state->fe); af9013_statistics_work()
553 af9013_statistics_ber_unc_start(&state->fe); af9013_statistics_work()
558 af9013_statistics_snr_result(&state->fe); af9013_statistics_work()
563 af9013_statistics_ber_unc_result(&state->fe); af9013_statistics_work()
573 static int af9013_get_tune_settings(struct dvb_frontend *fe, af9013_get_tune_settings() argument
583 static int af9013_set_frontend(struct dvb_frontend *fe) af9013_set_frontend() argument
585 struct af9013_state *state = fe->demodulator_priv; af9013_set_frontend()
586 struct dtv_frontend_properties *c = &fe->dtv_property_cache; af9013_set_frontend()
596 if (fe->ops.tuner_ops.set_params) af9013_set_frontend()
597 fe->ops.tuner_ops.set_params(fe); af9013_set_frontend()
619 if (fe->ops.tuner_ops.get_if_frequency) af9013_set_frontend()
620 fe->ops.tuner_ops.get_if_frequency(fe, &if_frequency); af9013_set_frontend()
869 static int af9013_get_frontend(struct dvb_frontend *fe) af9013_get_frontend() argument
871 struct dtv_frontend_properties *c = &fe->dtv_property_cache; af9013_get_frontend()
872 struct af9013_state *state = fe->demodulator_priv; af9013_get_frontend()
986 static int af9013_read_status(struct dvb_frontend *fe, enum fe_status *status) af9013_read_status() argument
988 struct af9013_state *state = fe->demodulator_priv; af9013_read_status()
1036 static int af9013_read_snr(struct dvb_frontend *fe, u16 *snr) af9013_read_snr() argument
1038 struct af9013_state *state = fe->demodulator_priv; af9013_read_snr()
1043 static int af9013_read_signal_strength(struct dvb_frontend *fe, u16 *strength) af9013_read_signal_strength() argument
1045 struct af9013_state *state = fe->demodulator_priv; af9013_read_signal_strength()
1050 static int af9013_read_ber(struct dvb_frontend *fe, u32 *ber) af9013_read_ber() argument
1052 struct af9013_state *state = fe->demodulator_priv; af9013_read_ber()
1057 static int af9013_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) af9013_read_ucblocks() argument
1059 struct af9013_state *state = fe->demodulator_priv; af9013_read_ucblocks()
1064 static int af9013_init(struct dvb_frontend *fe) af9013_init() argument
1066 struct af9013_state *state = fe->demodulator_priv; af9013_init()
1292 static int af9013_sleep(struct dvb_frontend *fe) af9013_sleep() argument
1294 struct af9013_state *state = fe->demodulator_priv; af9013_sleep()
1318 static int af9013_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) af9013_i2c_gate_ctrl() argument
1321 struct af9013_state *state = fe->demodulator_priv; af9013_i2c_gate_ctrl()
1344 static void af9013_release(struct dvb_frontend *fe) af9013_release() argument
1346 struct af9013_state *state = fe->demodulator_priv; af9013_release()
1502 memcpy(&state->fe.ops, &af9013_ops, af9013_attach()
1504 state->fe.demodulator_priv = state; af9013_attach()
1508 return &state->fe; af9013_attach()
/linux-4.4.14/drivers/media/tuners/
H A Dmxl5005s.c299 static u16 MXL_ControlWrite(struct dvb_frontend *fe, u16 ControlNum, u32 value);
300 static u16 MXL_ControlRead(struct dvb_frontend *fe, u16 controlNum, u32 *value);
301 static void MXL_RegWriteBit(struct dvb_frontend *fe, u8 address, u8 bit,
303 static u16 MXL_GetCHRegister(struct dvb_frontend *fe, u8 *RegNum,
306 static u16 MXL_RegRead(struct dvb_frontend *fe, u8 RegNum, u8 *RegVal);
307 static u16 MXL_ControlWrite_Group(struct dvb_frontend *fe, u16 controlNum,
309 static u16 MXL_SetGPIO(struct dvb_frontend *fe, u8 GPIO_Num, u8 GPIO_Val);
310 static u16 MXL_GetInitRegister(struct dvb_frontend *fe, u8 *RegNum,
312 static u16 MXL_TuneRF(struct dvb_frontend *fe, u32 RF_Freq);
313 static void MXL_SynthIFLO_Calc(struct dvb_frontend *fe);
314 static void MXL_SynthRFTGLO_Calc(struct dvb_frontend *fe);
315 static u16 MXL_GetCHRegister_ZeroIF(struct dvb_frontend *fe, u8 *RegNum,
317 static int mxl5005s_writeregs(struct dvb_frontend *fe, u8 *addrtable,
319 static u16 MXL_IFSynthInit(struct dvb_frontend *fe);
320 static int mxl5005s_AssignTunerMode(struct dvb_frontend *fe, u32 mod_type,
322 static int mxl5005s_reconfigure(struct dvb_frontend *fe, u32 mod_type,
337 static int mxl5005s_SetRfFreqHz(struct dvb_frontend *fe, unsigned long RfFreqHz) mxl5005s_SetRfFreqHz() argument
339 struct mxl5005s_state *state = fe->tuner_priv; mxl5005s_SetRfFreqHz()
356 mxl5005s_writeregs(fe, AddrTable, ByteTable, 1); mxl5005s_SetRfFreqHz()
359 MXL_TuneRF(fe, RfFreqHz); mxl5005s_SetRfFreqHz()
361 MXL_ControlRead(fe, IF_DIVVAL, &IfDivval); mxl5005s_SetRfFreqHz()
363 MXL_ControlWrite(fe, SEQ_FSM_PULSE, 0); mxl5005s_SetRfFreqHz()
364 MXL_ControlWrite(fe, SEQ_EXTPOWERUP, 1); mxl5005s_SetRfFreqHz()
365 MXL_ControlWrite(fe, IF_DIVVAL, 8); mxl5005s_SetRfFreqHz()
366 MXL_GetCHRegister(fe, AddrTable, ByteTable, &TableLen); mxl5005s_SetRfFreqHz()
374 mxl5005s_writeregs(fe, AddrTable, ByteTable, TableLen); mxl5005s_SetRfFreqHz()
380 MXL_ControlWrite(fe, SEQ_FSM_PULSE, 1); mxl5005s_SetRfFreqHz()
381 MXL_ControlWrite(fe, IF_DIVVAL, IfDivval); mxl5005s_SetRfFreqHz()
382 MXL_GetCHRegister_ZeroIF(fe, AddrTable, ByteTable, &TableLen); mxl5005s_SetRfFreqHz()
390 mxl5005s_writeregs(fe, AddrTable, ByteTable, TableLen); mxl5005s_SetRfFreqHz()
402 static u16 MXL5005_RegisterInit(struct dvb_frontend *fe) MXL5005_RegisterInit() argument
404 struct mxl5005s_state *state = fe->tuner_priv; MXL5005_RegisterInit()
722 static u16 MXL5005_ControlInit(struct dvb_frontend *fe) MXL5005_ControlInit() argument
724 struct mxl5005s_state *state = fe->tuner_priv; MXL5005_ControlInit()
1662 static void InitTunerControls(struct dvb_frontend *fe) InitTunerControls() argument
1664 MXL5005_RegisterInit(fe); InitTunerControls()
1665 MXL5005_ControlInit(fe); InitTunerControls()
1667 MXL5005_MXLControlInit(fe); InitTunerControls()
1671 static u16 MXL5005_TunerConfig(struct dvb_frontend *fe, MXL5005_TunerConfig() argument
1694 struct mxl5005s_state *state = fe->tuner_priv; MXL5005_TunerConfig()
1712 InitTunerControls(fe); MXL5005_TunerConfig()
1715 MXL_SynthIFLO_Calc(fe); MXL5005_TunerConfig()
1720 static void MXL_SynthIFLO_Calc(struct dvb_frontend *fe) MXL_SynthIFLO_Calc() argument
1722 struct mxl5005s_state *state = fe->tuner_priv; MXL_SynthIFLO_Calc()
1733 static void MXL_SynthRFTGLO_Calc(struct dvb_frontend *fe) MXL_SynthRFTGLO_Calc() argument
1735 struct mxl5005s_state *state = fe->tuner_priv; MXL_SynthRFTGLO_Calc()
1754 static u16 MXL_OverwriteICDefault(struct dvb_frontend *fe) MXL_OverwriteICDefault() argument
1758 status += MXL_ControlWrite(fe, OVERRIDE_1, 1); MXL_OverwriteICDefault()
1759 status += MXL_ControlWrite(fe, OVERRIDE_2, 1); MXL_OverwriteICDefault()
1760 status += MXL_ControlWrite(fe, OVERRIDE_3, 1); MXL_OverwriteICDefault()
1761 status += MXL_ControlWrite(fe, OVERRIDE_4, 1); MXL_OverwriteICDefault()
1766 static u16 MXL_BlockInit(struct dvb_frontend *fe) MXL_BlockInit() argument
1768 struct mxl5005s_state *state = fe->tuner_priv; MXL_BlockInit()
1771 status += MXL_OverwriteICDefault(fe); MXL_BlockInit()
1774 status += MXL_ControlWrite(fe, DN_IQTN_AMP_CUT, state->Mode ? 1 : 0); MXL_BlockInit()
1777 status += MXL_ControlWrite(fe, BB_MODE, state->Mode ? 0 : 1); MXL_BlockInit()
1778 status += MXL_ControlWrite(fe, BB_BUF, state->Mode ? 3 : 2); MXL_BlockInit()
1779 status += MXL_ControlWrite(fe, BB_BUF_OA, state->Mode ? 1 : 0); MXL_BlockInit()
1780 status += MXL_ControlWrite(fe, BB_IQSWAP, state->Mode ? 0 : 1); MXL_BlockInit()
1781 status += MXL_ControlWrite(fe, BB_INITSTATE_DLPF_TUNE, 0); MXL_BlockInit()
1787 status += MXL_ControlWrite(fe, BB_DLPF_BANDSEL, 0); MXL_BlockInit()
1790 status += MXL_ControlWrite(fe, BB_DLPF_BANDSEL, 2); MXL_BlockInit()
1793 status += MXL_ControlWrite(fe, MXL_BlockInit()
1800 status += MXL_ControlWrite(fe, BB_ALPF_BANDSELECT, MXL_BlockInit()
1804 status += MXL_ControlWrite(fe, BB_ALPF_BANDSELECT, MXL_BlockInit()
1808 status += MXL_ControlWrite(fe, BB_ALPF_BANDSELECT, MXL_BlockInit()
1815 status += MXL_ControlWrite(fe, RFSYN_CHP_GAIN, state->Mode ? 5 : 8); MXL_BlockInit()
1816 status += MXL_ControlWrite(fe, MXL_BlockInit()
1818 status += MXL_ControlWrite(fe, EN_CHP_LIN_B, state->Mode ? 0 : 0); MXL_BlockInit()
1822 status += MXL_ControlWrite(fe, AGC_IF, 15); MXL_BlockInit()
1823 status += MXL_ControlWrite(fe, AGC_RF, 15); MXL_BlockInit()
1825 status += MXL_ControlWrite(fe, AGC_RF, state->Mode ? 15 : 12); MXL_BlockInit()
1828 status += MXL_ControlWrite(fe, AGC_IF, 0x0); MXL_BlockInit()
1831 status += MXL_ControlWrite(fe, AGC_IF, 0x1); MXL_BlockInit()
1834 status += MXL_ControlWrite(fe, AGC_IF, 0x2); MXL_BlockInit()
1837 status += MXL_ControlWrite(fe, AGC_IF, 0x3); MXL_BlockInit()
1840 status += MXL_ControlWrite(fe, AGC_IF, 0x4); MXL_BlockInit()
1843 status += MXL_ControlWrite(fe, AGC_IF, 0x5); MXL_BlockInit()
1846 status += MXL_ControlWrite(fe, AGC_IF, 0x6); MXL_BlockInit()
1849 status += MXL_ControlWrite(fe, AGC_IF, 0x7); MXL_BlockInit()
1852 status += MXL_ControlWrite(fe, AGC_IF, 0x9); MXL_BlockInit()
1855 status += MXL_ControlWrite(fe, AGC_IF, 0xA); MXL_BlockInit()
1858 status += MXL_ControlWrite(fe, AGC_IF, 0xB); MXL_BlockInit()
1861 status += MXL_ControlWrite(fe, AGC_IF, 0xC); MXL_BlockInit()
1864 status += MXL_ControlWrite(fe, AGC_IF, 0xD); MXL_BlockInit()
1867 status += MXL_ControlWrite(fe, AGC_IF, 0xE); MXL_BlockInit()
1870 status += MXL_ControlWrite(fe, AGC_IF, 0xF); MXL_BlockInit()
1873 status += MXL_IFSynthInit(fe); MXL_BlockInit()
1877 status += MXL_ControlWrite(fe, DRV_RES_SEL, 6); MXL_BlockInit()
1878 status += MXL_ControlWrite(fe, I_DRIVER, 2); MXL_BlockInit()
1881 status += MXL_ControlWrite(fe, DRV_RES_SEL, 4); MXL_BlockInit()
1882 status += MXL_ControlWrite(fe, I_DRIVER, 1); MXL_BlockInit()
1890 status += MXL_ControlWrite(fe, EN_AAF, 1); MXL_BlockInit()
1891 status += MXL_ControlWrite(fe, EN_3P, 1); MXL_BlockInit()
1892 status += MXL_ControlWrite(fe, EN_AUX_3P, 1); MXL_BlockInit()
1893 status += MXL_ControlWrite(fe, SEL_AAF_BAND, 0); MXL_BlockInit()
1897 status += MXL_ControlWrite(fe, EN_AAF, 1); MXL_BlockInit()
1898 status += MXL_ControlWrite(fe, EN_3P, 1); MXL_BlockInit()
1899 status += MXL_ControlWrite(fe, EN_AUX_3P, 1); MXL_BlockInit()
1900 status += MXL_ControlWrite(fe, SEL_AAF_BAND, 1); MXL_BlockInit()
1903 status += MXL_ControlWrite(fe, EN_AAF, 0); MXL_BlockInit()
1904 status += MXL_ControlWrite(fe, EN_3P, 1); MXL_BlockInit()
1905 status += MXL_ControlWrite(fe, EN_AUX_3P, 1); MXL_BlockInit()
1906 status += MXL_ControlWrite(fe, SEL_AAF_BAND, 1); MXL_BlockInit()
1910 status += MXL_ControlWrite(fe, EN_AAF, 1); MXL_BlockInit()
1911 status += MXL_ControlWrite(fe, EN_3P, 1); MXL_BlockInit()
1912 status += MXL_ControlWrite(fe, EN_AUX_3P, 1); MXL_BlockInit()
1913 status += MXL_ControlWrite(fe, SEL_AAF_BAND, 0); MXL_BlockInit()
1916 status += MXL_ControlWrite(fe, EN_AAF, 0); MXL_BlockInit()
1917 status += MXL_ControlWrite(fe, EN_3P, 0); MXL_BlockInit()
1918 status += MXL_ControlWrite(fe, EN_AUX_3P, 0); MXL_BlockInit()
1919 status += MXL_ControlWrite(fe, SEL_AAF_BAND, 0); MXL_BlockInit()
1925 status += MXL_ControlWrite(fe, SEQ_ENCLK16_CLK_OUT, 1); MXL_BlockInit()
1927 status += MXL_ControlWrite(fe, SEQ_ENCLK16_CLK_OUT, 0); MXL_BlockInit()
1930 status += MXL_ControlWrite(fe, SEQ_SEL4_16B, 1); MXL_BlockInit()
1932 status += MXL_ControlWrite(fe, SEQ_SEL4_16B, 0); MXL_BlockInit()
1936 status += MXL_ControlWrite(fe, XTAL_CAPSELECT, 1); MXL_BlockInit()
1938 status += MXL_ControlWrite(fe, XTAL_CAPSELECT, 0); MXL_BlockInit()
1941 status += MXL_ControlWrite(fe, IF_SEL_DBL, 1); MXL_BlockInit()
1943 status += MXL_ControlWrite(fe, IF_SEL_DBL, 0); MXL_BlockInit()
1946 status += MXL_ControlWrite(fe, RFSYN_R_DIV, 3); MXL_BlockInit()
1948 status += MXL_ControlWrite(fe, RFSYN_R_DIV, 0); MXL_BlockInit()
1952 status += MXL_ControlWrite(fe, SEQ_EXTIQFSMPULSE, 0); MXL_BlockInit()
1954 status += MXL_ControlWrite(fe, SEQ_EXTIQFSMPULSE, 1); MXL_BlockInit()
1956 /* status += MXL_ControlRead(fe, IF_DIVVAL, &IF_DIVVAL_Val); */ MXL_BlockInit()
1959 status += MXL_ControlWrite(fe, TG_R_DIV, MXL_BlockInit()
1966 status += MXL_ControlWrite(fe, SEQ_EXTSYNTHCALIF, 1); MXL_BlockInit()
1967 status += MXL_ControlWrite(fe, SEQ_EXTDCCAL, 1); MXL_BlockInit()
1968 status += MXL_ControlWrite(fe, AGC_EN_RSSI, 1); MXL_BlockInit()
1969 status += MXL_ControlWrite(fe, RFA_ENCLKRFAGC, 1); MXL_BlockInit()
1972 status += MXL_ControlWrite(fe, RFA_RSSI_REF, 2); MXL_BlockInit()
1973 status += MXL_ControlWrite(fe, RFA_RSSI_REFH, 3); MXL_BlockInit()
1974 status += MXL_ControlWrite(fe, RFA_RSSI_REFL, 1); MXL_BlockInit()
1977 status += MXL_ControlWrite(fe, RFA_FLR, 0); MXL_BlockInit()
1978 status += MXL_ControlWrite(fe, RFA_CEIL, 12); MXL_BlockInit()
1988 status += MXL_ControlWrite(fe, SEQ_EXTSYNTHCALIF, 1); MXL_BlockInit()
1989 status += MXL_ControlWrite(fe, SEQ_EXTDCCAL, 1); MXL_BlockInit()
1990 status += MXL_ControlWrite(fe, AGC_EN_RSSI, 1); MXL_BlockInit()
1991 status += MXL_ControlWrite(fe, RFA_ENCLKRFAGC, 1); MXL_BlockInit()
1994 status += MXL_ControlWrite(fe, RFA_RSSI_REF, 3); MXL_BlockInit()
1995 status += MXL_ControlWrite(fe, RFA_RSSI_REFH, 5); MXL_BlockInit()
1996 status += MXL_ControlWrite(fe, RFA_RSSI_REFL, 1); MXL_BlockInit()
1999 status += MXL_ControlWrite(fe, RFA_FLR, 2); MXL_BlockInit()
2000 status += MXL_ControlWrite(fe, RFA_CEIL, 13); MXL_BlockInit()
2002 status += MXL_ControlWrite(fe, BB_IQSWAP, 0); MXL_BlockInit()
2004 status += MXL_ControlWrite(fe, BB_IQSWAP, 1); MXL_BlockInit()
2011 status += MXL_ControlWrite(fe, SEQ_EXTSYNTHCALIF, 1); MXL_BlockInit()
2012 status += MXL_ControlWrite(fe, SEQ_EXTDCCAL, 1); MXL_BlockInit()
2013 status += MXL_ControlWrite(fe, AGC_EN_RSSI, 1); MXL_BlockInit()
2014 status += MXL_ControlWrite(fe, RFA_ENCLKRFAGC, 1); MXL_BlockInit()
2017 status += MXL_ControlWrite(fe, RFA_RSSI_REF, 2); MXL_BlockInit()
2018 status += MXL_ControlWrite(fe, RFA_RSSI_REFH, 4); MXL_BlockInit()
2019 status += MXL_ControlWrite(fe, RFA_RSSI_REFL, 1); MXL_BlockInit()
2022 status += MXL_ControlWrite(fe, RFA_FLR, 2); MXL_BlockInit()
2023 status += MXL_ControlWrite(fe, RFA_CEIL, 13); MXL_BlockInit()
2024 status += MXL_ControlWrite(fe, BB_INITSTATE_DLPF_TUNE, 1); MXL_BlockInit()
2026 status += MXL_ControlWrite(fe, RFSYN_CHP_GAIN, 5); MXL_BlockInit()
2029 status += MXL_ControlWrite(fe, BB_IQSWAP, 0); MXL_BlockInit()
2031 status += MXL_ControlWrite(fe, BB_IQSWAP, 1); MXL_BlockInit()
2039 status += MXL_ControlWrite(fe, SEQ_EXTSYNTHCALIF, 1); MXL_BlockInit()
2040 status += MXL_ControlWrite(fe, SEQ_EXTDCCAL, 1); MXL_BlockInit()
2041 status += MXL_ControlWrite(fe, AGC_EN_RSSI, 0); MXL_BlockInit()
2042 status += MXL_ControlWrite(fe, RFA_ENCLKRFAGC, 1); MXL_BlockInit()
2045 status += MXL_ControlWrite(fe, RFA_RSSI_REFH, 5); MXL_BlockInit()
2046 status += MXL_ControlWrite(fe, RFA_RSSI_REF, 3); MXL_BlockInit()
2047 status += MXL_ControlWrite(fe, RFA_RSSI_REFL, 2); MXL_BlockInit()
2049 status += MXL_ControlWrite(fe, RFSYN_CHP_GAIN, 3); MXL_BlockInit()
2052 status += MXL_ControlWrite(fe, BB_IQSWAP, 0); MXL_BlockInit()
2054 status += MXL_ControlWrite(fe, BB_IQSWAP, 1); MXL_BlockInit()
2055 status += MXL_ControlWrite(fe, RFSYN_CHP_GAIN, 2); MXL_BlockInit()
2065 status += MXL_ControlWrite(fe, SEQ_EXTSYNTHCALIF, 1); MXL_BlockInit()
2066 status += MXL_ControlWrite(fe, SEQ_EXTDCCAL, 1); MXL_BlockInit()
2067 status += MXL_ControlWrite(fe, AGC_EN_RSSI, 0); MXL_BlockInit()
2068 status += MXL_ControlWrite(fe, RFA_ENCLKRFAGC, 1); MXL_BlockInit()
2070 status += MXL_ControlWrite(fe, AGC_IF, 1); MXL_BlockInit()
2071 status += MXL_ControlWrite(fe, AGC_RF, 15); MXL_BlockInit()
2072 status += MXL_ControlWrite(fe, BB_IQSWAP, 1); MXL_BlockInit()
2080 status += MXL_ControlWrite(fe, SEQ_EXTSYNTHCALIF, 1); MXL_BlockInit()
2081 status += MXL_ControlWrite(fe, SEQ_EXTDCCAL, 1); MXL_BlockInit()
2082 status += MXL_ControlWrite(fe, AGC_EN_RSSI, 1); MXL_BlockInit()
2083 status += MXL_ControlWrite(fe, RFA_ENCLKRFAGC, 1); MXL_BlockInit()
2086 status += MXL_ControlWrite(fe, RFA_RSSI_REFH, 5); MXL_BlockInit()
2087 status += MXL_ControlWrite(fe, RFA_RSSI_REF, 3); MXL_BlockInit()
2088 status += MXL_ControlWrite(fe, RFA_RSSI_REFL, 2); MXL_BlockInit()
2089 status += MXL_ControlWrite(fe, RFSYN_CHP_GAIN, 3); MXL_BlockInit()
2090 status += MXL_ControlWrite(fe, BB_IQSWAP, 1); MXL_BlockInit()
2095 status += MXL_ControlWrite(fe, SEQ_EXTSYNTHCALIF, 1); MXL_BlockInit()
2096 status += MXL_ControlWrite(fe, SEQ_EXTDCCAL, 1); MXL_BlockInit()
2097 status += MXL_ControlWrite(fe, AGC_EN_RSSI, 0); MXL_BlockInit()
2098 status += MXL_ControlWrite(fe, RFA_ENCLKRFAGC, 1); MXL_BlockInit()
2104 static u16 MXL_IFSynthInit(struct dvb_frontend *fe) MXL_IFSynthInit() argument
2106 struct mxl5005s_state *state = fe->tuner_priv; MXL_IFSynthInit()
2121 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x08); MXL_IFSynthInit()
2122 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x0C); MXL_IFSynthInit()
2126 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x08); MXL_IFSynthInit()
2127 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08); MXL_IFSynthInit()
2131 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x10); MXL_IFSynthInit()
2132 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x0C); MXL_IFSynthInit()
2136 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x10); MXL_IFSynthInit()
2137 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08); MXL_IFSynthInit()
2141 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x08); MXL_IFSynthInit()
2142 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x0C); MXL_IFSynthInit()
2146 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x08); MXL_IFSynthInit()
2147 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x0C); MXL_IFSynthInit()
2151 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x08); MXL_IFSynthInit()
2152 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x0C); MXL_IFSynthInit()
2156 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x08); MXL_IFSynthInit()
2157 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x0C); MXL_IFSynthInit()
2164 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x10); MXL_IFSynthInit()
2165 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08); MXL_IFSynthInit()
2169 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x08); MXL_IFSynthInit()
2170 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08); MXL_IFSynthInit()
2174 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x08); MXL_IFSynthInit()
2175 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08); MXL_IFSynthInit()
2179 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x04); MXL_IFSynthInit()
2180 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08); MXL_IFSynthInit()
2184 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x04); MXL_IFSynthInit()
2185 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08); MXL_IFSynthInit()
2189 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x04); MXL_IFSynthInit()
2190 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08); MXL_IFSynthInit()
2194 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x04); MXL_IFSynthInit()
2195 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08); MXL_IFSynthInit()
2199 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x04); MXL_IFSynthInit()
2200 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08); MXL_IFSynthInit()
2204 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x07); MXL_IFSynthInit()
2205 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08); MXL_IFSynthInit()
2209 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x09); MXL_IFSynthInit()
2210 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08); MXL_IFSynthInit()
2214 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x06); MXL_IFSynthInit()
2215 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08); MXL_IFSynthInit()
2219 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x06); MXL_IFSynthInit()
2220 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08); MXL_IFSynthInit()
2224 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x05); MXL_IFSynthInit()
2225 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08); MXL_IFSynthInit()
2229 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x10); MXL_IFSynthInit()
2230 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08); MXL_IFSynthInit()
2234 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x08); MXL_IFSynthInit()
2235 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08); MXL_IFSynthInit()
2239 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x08); MXL_IFSynthInit()
2240 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08); MXL_IFSynthInit()
2244 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x04); MXL_IFSynthInit()
2245 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08); MXL_IFSynthInit()
2249 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x04); MXL_IFSynthInit()
2250 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08); MXL_IFSynthInit()
2254 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x04); MXL_IFSynthInit()
2255 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08); MXL_IFSynthInit()
2259 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x07); MXL_IFSynthInit()
2260 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08); MXL_IFSynthInit()
2264 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x07); MXL_IFSynthInit()
2265 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x0C); MXL_IFSynthInit()
2269 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x07); MXL_IFSynthInit()
2270 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x0C); MXL_IFSynthInit()
2274 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x09); MXL_IFSynthInit()
2275 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08); MXL_IFSynthInit()
2279 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x09); MXL_IFSynthInit()
2280 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08); MXL_IFSynthInit()
2284 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x06); MXL_IFSynthInit()
2285 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08); MXL_IFSynthInit()
2289 status += MXL_ControlWrite(fe, IF_DIVVAL, 0x05); MXL_IFSynthInit()
2290 status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08); MXL_IFSynthInit()
2297 status += MXL_ControlWrite(fe, CHCAL_INT_MOD_IF, intModVal); MXL_IFSynthInit()
2303 status += MXL_ControlWrite(fe, CHCAL_FRAC_MOD_IF, fracModVal); MXL_IFSynthInit()
2308 static u16 MXL_TuneRF(struct dvb_frontend *fe, u32 RF_Freq) MXL_TuneRF() argument
2310 struct mxl5005s_state *state = fe->tuner_priv; MXL_TuneRF()
2323 MXL_SynthRFTGLO_Calc(fe); MXL_TuneRF()
2343 status += MXL_ControlWrite(fe, DN_POLY, 2); MXL_TuneRF()
2344 status += MXL_ControlWrite(fe, DN_RFGAIN, 3); MXL_TuneRF()
2345 status += MXL_ControlWrite(fe, DN_CAP_RFLPF, 423); MXL_TuneRF()
2346 status += MXL_ControlWrite(fe, DN_EN_VHFUHFBAR, 1); MXL_TuneRF()
2347 status += MXL_ControlWrite(fe, DN_GAIN_ADJUST, 1); MXL_TuneRF()
2350 status += MXL_ControlWrite(fe, DN_POLY, 3); MXL_TuneRF()
2351 status += MXL_ControlWrite(fe, DN_RFGAIN, 3); MXL_TuneRF()
2352 status += MXL_ControlWrite(fe, DN_CAP_RFLPF, 222); MXL_TuneRF()
2353 status += MXL_ControlWrite(fe, DN_EN_VHFUHFBAR, 1); MXL_TuneRF()
2354 status += MXL_ControlWrite(fe, DN_GAIN_ADJUST, 1); MXL_TuneRF()
2357 status += MXL_ControlWrite(fe, DN_POLY, 3); MXL_TuneRF()
2358 status += MXL_ControlWrite(fe, DN_RFGAIN, 3); MXL_TuneRF()
2359 status += MXL_ControlWrite(fe, DN_CAP_RFLPF, 147); MXL_TuneRF()
2360 status += MXL_ControlWrite(fe, DN_EN_VHFUHFBAR, 1); MXL_TuneRF()
2361 status += MXL_ControlWrite(fe, DN_GAIN_ADJUST, 2); MXL_TuneRF()
2364 status += MXL_ControlWrite(fe, DN_POLY, 3); MXL_TuneRF()
2365 status += MXL_ControlWrite(fe, DN_RFGAIN, 3); MXL_TuneRF()
2366 status += MXL_ControlWrite(fe, DN_CAP_RFLPF, 9); MXL_TuneRF()
2367 status += MXL_ControlWrite(fe, DN_EN_VHFUHFBAR, 1); MXL_TuneRF()
2368 status += MXL_ControlWrite(fe, DN_GAIN_ADJUST, 2); MXL_TuneRF()
2371 status += MXL_ControlWrite(fe, DN_POLY, 3); MXL_TuneRF()
2372 status += MXL_ControlWrite(fe, DN_RFGAIN, 3); MXL_TuneRF()
2373 status += MXL_ControlWrite(fe, DN_CAP_RFLPF, 0); MXL_TuneRF()
2374 status += MXL_ControlWrite(fe, DN_EN_VHFUHFBAR, 1); MXL_TuneRF()
2375 status += MXL_ControlWrite(fe, DN_GAIN_ADJUST, 3); MXL_TuneRF()
2378 status += MXL_ControlWrite(fe, DN_POLY, 3); MXL_TuneRF()
2379 status += MXL_ControlWrite(fe, DN_RFGAIN, 1); MXL_TuneRF()
2380 status += MXL_ControlWrite(fe, DN_CAP_RFLPF, 0); MXL_TuneRF()
2381 status += MXL_ControlWrite(fe, DN_EN_VHFUHFBAR, 0); MXL_TuneRF()
2382 status += MXL_ControlWrite(fe, DN_GAIN_ADJUST, 3); MXL_TuneRF()
2385 status += MXL_ControlWrite(fe, DN_POLY, 3); MXL_TuneRF()
2386 status += MXL_ControlWrite(fe, DN_RFGAIN, 2); MXL_TuneRF()
2387 status += MXL_ControlWrite(fe, DN_CAP_RFLPF, 0); MXL_TuneRF()
2388 status += MXL_ControlWrite(fe, DN_EN_VHFUHFBAR, 0); MXL_TuneRF()
2389 status += MXL_ControlWrite(fe, DN_GAIN_ADJUST, 3); MXL_TuneRF()
2397 status += MXL_ControlWrite(fe, DN_IQTNBUF_AMP, 1); MXL_TuneRF()
2398 status += MXL_ControlWrite(fe, DN_IQTNGNBFBIAS_BST, 0); MXL_TuneRF()
2401 status += MXL_ControlWrite(fe, DN_IQTNBUF_AMP, 1); MXL_TuneRF()
2402 status += MXL_ControlWrite(fe, DN_IQTNGNBFBIAS_BST, 0); MXL_TuneRF()
2405 status += MXL_ControlWrite(fe, DN_IQTNBUF_AMP, 1); MXL_TuneRF()
2406 status += MXL_ControlWrite(fe, DN_IQTNGNBFBIAS_BST, 0); MXL_TuneRF()
2409 status += MXL_ControlWrite(fe, DN_IQTNBUF_AMP, 1); MXL_TuneRF()
2410 status += MXL_ControlWrite(fe, DN_IQTNGNBFBIAS_BST, 0); MXL_TuneRF()
2413 status += MXL_ControlWrite(fe, DN_IQTNBUF_AMP, 1); MXL_TuneRF()
2414 status += MXL_ControlWrite(fe, DN_IQTNGNBFBIAS_BST, 0); MXL_TuneRF()
2417 status += MXL_ControlWrite(fe, DN_IQTNBUF_AMP, 1); MXL_TuneRF()
2418 status += MXL_ControlWrite(fe, DN_IQTNGNBFBIAS_BST, 0); MXL_TuneRF()
2421 status += MXL_ControlWrite(fe, DN_IQTNBUF_AMP, 1); MXL_TuneRF()
2422 status += MXL_ControlWrite(fe, DN_IQTNGNBFBIAS_BST, 0); MXL_TuneRF()
2425 status += MXL_ControlWrite(fe, DN_IQTNBUF_AMP, 1); MXL_TuneRF()
2426 status += MXL_ControlWrite(fe, DN_IQTNGNBFBIAS_BST, 0); MXL_TuneRF()
2429 status += MXL_ControlWrite(fe, DN_IQTNBUF_AMP, 1); MXL_TuneRF()
2430 status += MXL_ControlWrite(fe, DN_IQTNGNBFBIAS_BST, 0); MXL_TuneRF()
2433 status += MXL_ControlWrite(fe, DN_IQTNBUF_AMP, 1); MXL_TuneRF()
2434 status += MXL_ControlWrite(fe, DN_IQTNGNBFBIAS_BST, 0); MXL_TuneRF()
2437 status += MXL_ControlWrite(fe, DN_IQTNBUF_AMP, 1); MXL_TuneRF()
2438 status += MXL_ControlWrite(fe, DN_IQTNGNBFBIAS_BST, 0); MXL_TuneRF()
2441 status += MXL_ControlWrite(fe, DN_IQTNBUF_AMP, 1); MXL_TuneRF()
2442 status += MXL_ControlWrite(fe, DN_IQTNGNBFBIAS_BST, 0); MXL_TuneRF()
2445 status += MXL_ControlWrite(fe, DN_IQTNBUF_AMP, 1); MXL_TuneRF()
2446 status += MXL_ControlWrite(fe, DN_IQTNGNBFBIAS_BST, 0); MXL_TuneRF()
2449 status += MXL_ControlWrite(fe, DN_IQTNBUF_AMP, 1); MXL_TuneRF()
2450 status += MXL_ControlWrite(fe, DN_IQTNGNBFBIAS_BST, 0); MXL_TuneRF()
2453 status += MXL_ControlWrite(fe, DN_IQTNBUF_AMP, 10); MXL_TuneRF()
2454 status += MXL_ControlWrite(fe, DN_IQTNGNBFBIAS_BST, 1); MXL_TuneRF()
2457 status += MXL_ControlWrite(fe, DN_IQTNBUF_AMP, 10); MXL_TuneRF()
2458 status += MXL_ControlWrite(fe, DN_IQTNGNBFBIAS_BST, 1); MXL_TuneRF()
2477 status += MXL_ControlWrite(fe, RFSYN_EN_OUTMUX, 1); MXL_TuneRF()
2478 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_OUT, 0); MXL_TuneRF()
2479 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_HI, 0); MXL_TuneRF()
2480 status += MXL_ControlWrite(fe, RFSYN_SEL_DIVM, 0); MXL_TuneRF()
2481 status += MXL_ControlWrite(fe, RFSYN_RF_DIV_BIAS, 1); MXL_TuneRF()
2482 status += MXL_ControlWrite(fe, DN_SEL_FREQ, 1); MXL_TuneRF()
2490 status += MXL_ControlWrite(fe, RFSYN_EN_OUTMUX, 1); MXL_TuneRF()
2491 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_OUT, 0); MXL_TuneRF()
2492 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_HI, 1); MXL_TuneRF()
2493 status += MXL_ControlWrite(fe, RFSYN_SEL_DIVM, 0); MXL_TuneRF()
2494 status += MXL_ControlWrite(fe, RFSYN_RF_DIV_BIAS, 1); MXL_TuneRF()
2495 status += MXL_ControlWrite(fe, DN_SEL_FREQ, 1); MXL_TuneRF()
2503 status += MXL_ControlWrite(fe, RFSYN_EN_OUTMUX, 0); MXL_TuneRF()
2504 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_OUT, 1); MXL_TuneRF()
2505 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_HI, 0); MXL_TuneRF()
2506 status += MXL_ControlWrite(fe, RFSYN_SEL_DIVM, 0); MXL_TuneRF()
2507 status += MXL_ControlWrite(fe, RFSYN_RF_DIV_BIAS, 1); MXL_TuneRF()
2508 status += MXL_ControlWrite(fe, DN_SEL_FREQ, 1); MXL_TuneRF()
2516 status += MXL_ControlWrite(fe, RFSYN_EN_OUTMUX, 0); MXL_TuneRF()
2517 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_OUT, 1); MXL_TuneRF()
2518 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_HI, 1); MXL_TuneRF()
2519 status += MXL_ControlWrite(fe, RFSYN_SEL_DIVM, 0); MXL_TuneRF()
2520 status += MXL_ControlWrite(fe, RFSYN_RF_DIV_BIAS, 1); MXL_TuneRF()
2521 status += MXL_ControlWrite(fe, DN_SEL_FREQ, 1); MXL_TuneRF()
2529 status += MXL_ControlWrite(fe, RFSYN_EN_OUTMUX, 0); MXL_TuneRF()
2530 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_OUT, 1); MXL_TuneRF()
2531 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_HI, 0); MXL_TuneRF()
2532 status += MXL_ControlWrite(fe, RFSYN_SEL_DIVM, 0); MXL_TuneRF()
2533 status += MXL_ControlWrite(fe, RFSYN_RF_DIV_BIAS, 1); MXL_TuneRF()
2534 status += MXL_ControlWrite(fe, DN_SEL_FREQ, 2); MXL_TuneRF()
2542 status += MXL_ControlWrite(fe, RFSYN_EN_OUTMUX, 0); MXL_TuneRF()
2543 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_OUT, 1); MXL_TuneRF()
2544 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_HI, 1); MXL_TuneRF()
2545 status += MXL_ControlWrite(fe, RFSYN_SEL_DIVM, 0); MXL_TuneRF()
2546 status += MXL_ControlWrite(fe, RFSYN_RF_DIV_BIAS, 1); MXL_TuneRF()
2547 status += MXL_ControlWrite(fe, DN_SEL_FREQ, 2); MXL_TuneRF()
2555 status += MXL_ControlWrite(fe, RFSYN_EN_OUTMUX, 0); MXL_TuneRF()
2556 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_OUT, 1); MXL_TuneRF()
2557 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_HI, 0); MXL_TuneRF()
2558 status += MXL_ControlWrite(fe, RFSYN_SEL_DIVM, 0); MXL_TuneRF()
2559 status += MXL_ControlWrite(fe, RFSYN_RF_DIV_BIAS, 1); MXL_TuneRF()
2560 status += MXL_ControlWrite(fe, DN_SEL_FREQ, 4); MXL_TuneRF()
2568 status += MXL_ControlWrite(fe, RFSYN_EN_OUTMUX, 1); MXL_TuneRF()
2569 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_OUT, 0); MXL_TuneRF()
2570 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_HI, 0); MXL_TuneRF()
2571 status += MXL_ControlWrite(fe, RFSYN_SEL_DIVM, 0); MXL_TuneRF()
2572 status += MXL_ControlWrite(fe, RFSYN_RF_DIV_BIAS, 1); MXL_TuneRF()
2573 status += MXL_ControlWrite(fe, DN_SEL_FREQ, 0); MXL_TuneRF()
2581 status += MXL_ControlWrite(fe, RFSYN_EN_OUTMUX, 1); MXL_TuneRF()
2582 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_OUT, 0); MXL_TuneRF()
2583 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_HI, 1); MXL_TuneRF()
2584 status += MXL_ControlWrite(fe, RFSYN_SEL_DIVM, 0); MXL_TuneRF()
2585 status += MXL_ControlWrite(fe, RFSYN_RF_DIV_BIAS, 2); MXL_TuneRF()
2586 status += MXL_ControlWrite(fe, DN_SEL_FREQ, 0); MXL_TuneRF()
2594 status += MXL_ControlWrite(fe, RFSYN_EN_OUTMUX, 0); MXL_TuneRF()
2595 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_OUT, 1); MXL_TuneRF()
2596 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_HI, 0); MXL_TuneRF()
2597 status += MXL_ControlWrite(fe, RFSYN_SEL_DIVM, 1); MXL_TuneRF()
2598 status += MXL_ControlWrite(fe, RFSYN_RF_DIV_BIAS, 1); MXL_TuneRF()
2599 status += MXL_ControlWrite(fe, DN_SEL_FREQ, 0); MXL_TuneRF()
2607 status += MXL_ControlWrite(fe, RFSYN_EN_OUTMUX, 0); MXL_TuneRF()
2608 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_OUT, 1); MXL_TuneRF()
2609 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_HI, 1); MXL_TuneRF()
2610 status += MXL_ControlWrite(fe, RFSYN_SEL_DIVM, 1); MXL_TuneRF()
2611 status += MXL_ControlWrite(fe, RFSYN_RF_DIV_BIAS, 1); MXL_TuneRF()
2612 status += MXL_ControlWrite(fe, DN_SEL_FREQ, 0); MXL_TuneRF()
2625 status += MXL_ControlWrite(fe, RFSYN_VCO_BIAS, E3); MXL_TuneRF()
2629 MXL_ControlWrite(fe, CHCAL_INT_MOD_RF, E4); MXL_TuneRF()
2636 status += MXL_ControlWrite(fe, CHCAL_FRAC_MOD_RF, E5); MXL_TuneRF()
2640 status += MXL_ControlWrite(fe, RFSYN_LPF_R, E5A); MXL_TuneRF()
2643 status += MXL_ControlWrite(fe, CHCAL_EN_INT_RF, ((E5 == 0) ? 1 : 0)); MXL_TuneRF()
2645 * status += MXL_ControlWrite(fe, CHCAL_EN_INT_RF, 1); MXL_TuneRF()
2647 * status += MXL_ControlWrite(fe, CHCAL_FRAC_MOD_RF, E5); MXL_TuneRF()
2665 status += MXL_ControlWrite(fe, TG_LO_DIVVAL, 0x6); MXL_TuneRF()
2666 status += MXL_ControlWrite(fe, TG_LO_SELVAL, 0x0); MXL_TuneRF()
2674 status += MXL_ControlWrite(fe, TG_LO_DIVVAL, 0x1); MXL_TuneRF()
2675 status += MXL_ControlWrite(fe, TG_LO_SELVAL, 0x0); MXL_TuneRF()
2683 status += MXL_ControlWrite(fe, TG_LO_DIVVAL, 0xC); MXL_TuneRF()
2684 status += MXL_ControlWrite(fe, TG_LO_SELVAL, 0x2); MXL_TuneRF()
2692 status += MXL_ControlWrite(fe, TG_LO_DIVVAL, 0x8); MXL_TuneRF()
2693 status += MXL_ControlWrite(fe, TG_LO_SELVAL, 0x2); MXL_TuneRF()
2701 status += MXL_ControlWrite(fe, TG_LO_DIVVAL, 0x0); MXL_TuneRF()
2702 status += MXL_ControlWrite(fe, TG_LO_SELVAL, 0x2); MXL_TuneRF()
2710 status += MXL_ControlWrite(fe, TG_LO_DIVVAL, 0x8); MXL_TuneRF()
2711 status += MXL_ControlWrite(fe, TG_LO_SELVAL, 0x3); MXL_TuneRF()
2719 status += MXL_ControlWrite(fe, TG_LO_DIVVAL, 0x0); MXL_TuneRF()
2720 status += MXL_ControlWrite(fe, TG_LO_SELVAL, 0x3); MXL_TuneRF()
2728 status += MXL_ControlWrite(fe, TG_LO_DIVVAL, 0x8); MXL_TuneRF()
2729 status += MXL_ControlWrite(fe, TG_LO_SELVAL, 0x7); MXL_TuneRF()
2737 status += MXL_ControlWrite(fe, TG_LO_DIVVAL, 0x0); MXL_TuneRF()
2738 status += MXL_ControlWrite(fe, TG_LO_SELVAL, 0x7); MXL_TuneRF()
2749 status += MXL_ControlWrite(fe, TG_DIV_VAL, tg_divval); MXL_TuneRF()
2752 status += MXL_ControlWrite(fe, TG_DIV_VAL, tg_divval + 1); MXL_TuneRF()
2785 status += MXL_ControlWrite(fe, TG_VCO_BIAS , tg_lo); MXL_TuneRF()
2790 status += MXL_ControlWrite(fe, RFSYN_CHP_GAIN, MXL_TuneRF()
2793 status += MXL_ControlWrite(fe, RFSYN_CHP_GAIN, 3); MXL_TuneRF()
2795 status += MXL_ControlWrite(fe, RFSYN_CHP_GAIN, 2); MXL_TuneRF()
2801 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 0); MXL_TuneRF()
2802 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
2803 status += MXL_SetGPIO(fe, 3, 1); /* Bank1 Off */ MXL_TuneRF()
2804 status += MXL_SetGPIO(fe, 1, 1); /* Bank2 Off */ MXL_TuneRF()
2805 status += MXL_SetGPIO(fe, 4, 1); /* Bank3 Off */ MXL_TuneRF()
2809 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 1); MXL_TuneRF()
2810 status += MXL_ControlWrite(fe, DAC_DIN_A, 0); MXL_TuneRF()
2813 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 0); MXL_TuneRF()
2814 status += MXL_ControlWrite(fe, DAC_DIN_B, 0); MXL_TuneRF()
2815 status += MXL_SetGPIO(fe, 3, 0); MXL_TuneRF()
2816 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
2817 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
2820 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 0); MXL_TuneRF()
2821 status += MXL_ControlWrite(fe, DAC_DIN_B, 0); MXL_TuneRF()
2822 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
2823 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
2824 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
2827 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 0); MXL_TuneRF()
2828 status += MXL_ControlWrite(fe, DAC_DIN_B, 0); MXL_TuneRF()
2829 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
2830 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
2831 status += MXL_SetGPIO(fe, 4, 0); MXL_TuneRF()
2834 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 0); MXL_TuneRF()
2835 status += MXL_ControlWrite(fe, DAC_DIN_B, 0); MXL_TuneRF()
2836 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
2837 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
2838 status += MXL_SetGPIO(fe, 4, 0); MXL_TuneRF()
2841 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 1); MXL_TuneRF()
2842 status += MXL_ControlWrite(fe, DAC_DIN_B, 29); MXL_TuneRF()
2843 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
2844 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
2845 status += MXL_SetGPIO(fe, 4, 0); MXL_TuneRF()
2848 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 1); MXL_TuneRF()
2849 status += MXL_ControlWrite(fe, DAC_DIN_B, 0); MXL_TuneRF()
2850 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
2851 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
2852 status += MXL_SetGPIO(fe, 4, 0); MXL_TuneRF()
2855 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 1); MXL_TuneRF()
2856 status += MXL_ControlWrite(fe, DAC_DIN_B, 16); MXL_TuneRF()
2857 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
2858 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
2859 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
2862 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 1); MXL_TuneRF()
2863 status += MXL_ControlWrite(fe, DAC_DIN_B, 7); MXL_TuneRF()
2864 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
2865 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
2866 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
2869 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 1); MXL_TuneRF()
2870 status += MXL_ControlWrite(fe, DAC_DIN_B, 0); MXL_TuneRF()
2871 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
2872 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
2873 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
2880 status += MXL_ControlWrite(fe, DAC_DIN_A, 0); MXL_TuneRF()
2883 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 0); MXL_TuneRF()
2884 status += MXL_SetGPIO(fe, 4, 0); MXL_TuneRF()
2885 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
2886 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
2889 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 0); MXL_TuneRF()
2890 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
2891 status += MXL_SetGPIO(fe, 3, 0); MXL_TuneRF()
2892 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
2895 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 0); MXL_TuneRF()
2896 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
2897 status += MXL_SetGPIO(fe, 3, 0); MXL_TuneRF()
2898 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
2901 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 0); MXL_TuneRF()
2902 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
2903 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
2904 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
2907 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 1); MXL_TuneRF()
2908 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
2909 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
2910 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
2913 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 1); MXL_TuneRF()
2914 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
2915 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
2916 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
2919 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 1); MXL_TuneRF()
2920 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
2921 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
2922 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
2925 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 1); MXL_TuneRF()
2926 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
2927 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
2928 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
2931 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 1); MXL_TuneRF()
2932 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
2933 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
2934 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
2940 status += MXL_ControlWrite(fe, DAC_DIN_B, 0); MXL_TuneRF()
2943 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
2944 status += MXL_SetGPIO(fe, 4, 0); MXL_TuneRF()
2945 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
2946 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
2949 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
2950 status += MXL_SetGPIO(fe, 4, 0); MXL_TuneRF()
2951 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
2952 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
2955 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
2956 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
2957 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
2958 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
2961 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
2962 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
2963 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
2964 status += MXL_SetGPIO(fe, 3, 0); MXL_TuneRF()
2967 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
2968 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
2969 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
2970 status += MXL_SetGPIO(fe, 3, 0); MXL_TuneRF()
2973 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 1); MXL_TuneRF()
2974 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
2975 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
2976 status += MXL_SetGPIO(fe, 3, 0); MXL_TuneRF()
2979 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 1); MXL_TuneRF()
2980 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
2981 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
2982 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
2989 status += MXL_ControlWrite(fe, DAC_DIN_A, 0); MXL_TuneRF()
2995 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
2996 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
2997 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
2998 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 0); MXL_TuneRF()
2999 status += MXL_ControlWrite(fe, AGC_IF, 10); MXL_TuneRF()
3005 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 0); MXL_TuneRF()
3006 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3007 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
3008 status += MXL_SetGPIO(fe, 3, 0); MXL_TuneRF()
3012 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 0); MXL_TuneRF()
3013 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3014 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
3015 status += MXL_SetGPIO(fe, 3, 0); MXL_TuneRF()
3019 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 0); MXL_TuneRF()
3020 status += MXL_SetGPIO(fe, 4, 0); MXL_TuneRF()
3021 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
3022 status += MXL_SetGPIO(fe, 3, 0); MXL_TuneRF()
3026 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 0); MXL_TuneRF()
3027 status += MXL_SetGPIO(fe, 4, 0); MXL_TuneRF()
3028 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
3029 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3033 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 1); MXL_TuneRF()
3034 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3035 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
3036 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3040 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 1); MXL_TuneRF()
3041 status += MXL_SetGPIO(fe, 4, 0); MXL_TuneRF()
3042 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
3043 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3047 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 0); MXL_TuneRF()
3048 status += MXL_SetGPIO(fe, 4, 0); MXL_TuneRF()
3049 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
3050 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3054 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 1); MXL_TuneRF()
3055 status += MXL_SetGPIO(fe, 4, 0); MXL_TuneRF()
3056 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
3057 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3061 status += MXL_ControlWrite(fe, DAC_A_ENABLE, 1); MXL_TuneRF()
3062 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3063 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
3064 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3071 status += MXL_ControlWrite(fe, DAC_DIN_B, 0); MXL_TuneRF()
3074 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
3075 status += MXL_SetGPIO(fe, 4, 0); MXL_TuneRF()
3076 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
3077 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3080 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
3081 status += MXL_SetGPIO(fe, 4, 0); MXL_TuneRF()
3082 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
3083 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3086 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
3087 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3088 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
3089 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3092 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
3093 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3094 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
3095 status += MXL_SetGPIO(fe, 3, 0); MXL_TuneRF()
3098 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
3099 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3100 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
3101 status += MXL_SetGPIO(fe, 3, 0); MXL_TuneRF()
3104 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 1); MXL_TuneRF()
3105 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3106 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
3107 status += MXL_SetGPIO(fe, 3, 0); MXL_TuneRF()
3110 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 1); MXL_TuneRF()
3111 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3112 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
3113 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3120 status += MXL_ControlWrite(fe, DAC_DIN_B, 0); MXL_TuneRF()
3123 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
3124 status += MXL_SetGPIO(fe, 4, 0); MXL_TuneRF()
3125 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
3126 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3129 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
3130 status += MXL_SetGPIO(fe, 4, 0); MXL_TuneRF()
3131 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
3132 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3135 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
3136 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3137 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
3138 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3141 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
3142 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3143 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
3144 status += MXL_SetGPIO(fe, 3, 0); MXL_TuneRF()
3147 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
3148 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3149 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
3150 status += MXL_SetGPIO(fe, 3, 0); MXL_TuneRF()
3153 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 1); MXL_TuneRF()
3154 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3155 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
3156 status += MXL_SetGPIO(fe, 3, 0); MXL_TuneRF()
3159 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 1); MXL_TuneRF()
3160 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3161 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
3162 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3169 status += MXL_ControlWrite(fe, DAC_DIN_B, 0); MXL_TuneRF()
3172 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
3173 status += MXL_SetGPIO(fe, 4, 0); MXL_TuneRF()
3174 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
3175 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3178 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
3179 status += MXL_SetGPIO(fe, 4, 0); MXL_TuneRF()
3180 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
3181 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3184 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
3185 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3186 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
3187 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3190 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
3191 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3192 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
3193 status += MXL_SetGPIO(fe, 3, 0); MXL_TuneRF()
3196 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
3197 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3198 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
3199 status += MXL_SetGPIO(fe, 3, 0); MXL_TuneRF()
3202 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 1); MXL_TuneRF()
3203 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3204 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
3205 status += MXL_SetGPIO(fe, 3, 0); MXL_TuneRF()
3208 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 1); MXL_TuneRF()
3209 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3210 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
3211 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3218 status += MXL_ControlWrite(fe, DAC_DIN_B, 0); MXL_TuneRF()
3222 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
3223 status += MXL_SetGPIO(fe, 4, 0); MXL_TuneRF()
3224 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
3225 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3228 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
3229 status += MXL_SetGPIO(fe, 4, 0); MXL_TuneRF()
3230 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
3231 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3234 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
3235 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3236 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
3237 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3240 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
3241 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3242 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
3243 status += MXL_SetGPIO(fe, 3, 0); MXL_TuneRF()
3246 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 1); MXL_TuneRF()
3247 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3248 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
3249 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3252 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
3253 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3254 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
3255 status += MXL_SetGPIO(fe, 3, 0); MXL_TuneRF()
3258 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 1); MXL_TuneRF()
3259 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3260 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
3261 status += MXL_SetGPIO(fe, 3, 0); MXL_TuneRF()
3264 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 1); MXL_TuneRF()
3265 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3266 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
3267 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3274 status += MXL_ControlWrite(fe, DAC_DIN_B, 0); MXL_TuneRF()
3281 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3282 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
3283 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3284 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
3287 status += MXL_ControlWrite(fe, SEQ_EXTSYNTHCALIF, 1); MXL_TuneRF()
3288 status += MXL_ControlWrite(fe, SEQ_EXTDCCAL, 1); MXL_TuneRF()
3289 status += MXL_ControlWrite(fe, AGC_EN_RSSI, 1); MXL_TuneRF()
3290 status += MXL_ControlWrite(fe, RFA_ENCLKRFAGC, 1); MXL_TuneRF()
3293 status += MXL_ControlWrite(fe, RFA_RSSI_REFH, 5); MXL_TuneRF()
3294 status += MXL_ControlWrite(fe, RFA_RSSI_REF, 3); MXL_TuneRF()
3295 status += MXL_ControlWrite(fe, RFA_RSSI_REFL, 2); MXL_TuneRF()
3299 status += MXL_ControlWrite(fe, RFSYN_CHP_GAIN, 3); MXL_TuneRF()
3304 status += MXL_ControlWrite(fe, AGC_EN_RSSI, 0); MXL_TuneRF()
3307 status += MXL_ControlWrite(fe, RFSYN_CHP_GAIN, 5); MXL_TuneRF()
3312 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
3313 status += MXL_SetGPIO(fe, 4, 0); MXL_TuneRF()
3314 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
3315 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3318 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
3319 status += MXL_SetGPIO(fe, 4, 0); MXL_TuneRF()
3320 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
3321 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3324 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
3325 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3326 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
3327 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3330 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
3331 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3332 status += MXL_SetGPIO(fe, 1, 0); MXL_TuneRF()
3333 status += MXL_SetGPIO(fe, 3, 0); MXL_TuneRF()
3336 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 0); MXL_TuneRF()
3337 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3338 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
3339 status += MXL_SetGPIO(fe, 3, 0); MXL_TuneRF()
3342 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 1); MXL_TuneRF()
3343 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3344 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
3345 status += MXL_SetGPIO(fe, 3, 0); MXL_TuneRF()
3348 status += MXL_ControlWrite(fe, DAC_B_ENABLE, 1); MXL_TuneRF()
3349 status += MXL_SetGPIO(fe, 4, 1); MXL_TuneRF()
3350 status += MXL_SetGPIO(fe, 1, 1); MXL_TuneRF()
3351 status += MXL_SetGPIO(fe, 3, 1); MXL_TuneRF()
3358 static u16 MXL_SetGPIO(struct dvb_frontend *fe, u8 GPIO_Num, u8 GPIO_Val) MXL_SetGPIO() argument
3363 status += MXL_ControlWrite(fe, GPIO_1B, GPIO_Val ? 0 : 1); MXL_SetGPIO()
3369 status += MXL_ControlWrite(fe, GPIO_3, 0); MXL_SetGPIO()
3370 status += MXL_ControlWrite(fe, GPIO_3B, 0); MXL_SetGPIO()
3373 status += MXL_ControlWrite(fe, GPIO_3, 1); MXL_SetGPIO()
3374 status += MXL_ControlWrite(fe, GPIO_3B, 1); MXL_SetGPIO()
3377 status += MXL_ControlWrite(fe, GPIO_3, 0); MXL_SetGPIO()
3378 status += MXL_ControlWrite(fe, GPIO_3B, 1); MXL_SetGPIO()
3383 status += MXL_ControlWrite(fe, GPIO_4, 0); MXL_SetGPIO()
3384 status += MXL_ControlWrite(fe, GPIO_4B, 0); MXL_SetGPIO()
3387 status += MXL_ControlWrite(fe, GPIO_4, 1); MXL_SetGPIO()
3388 status += MXL_ControlWrite(fe, GPIO_4B, 1); MXL_SetGPIO()
3391 status += MXL_ControlWrite(fe, GPIO_4, 0); MXL_SetGPIO()
3392 status += MXL_ControlWrite(fe, GPIO_4B, 1); MXL_SetGPIO()
3399 static u16 MXL_ControlWrite(struct dvb_frontend *fe, u16 ControlNum, u32 value) MXL_ControlWrite() argument
3405 status += MXL_ControlWrite_Group(fe, ControlNum, value, 1); MXL_ControlWrite()
3407 status += MXL_ControlWrite_Group(fe, ControlNum, value, 2); MXL_ControlWrite()
3410 status += MXL_ControlWrite_Group(fe, ControlNum, value, 3); MXL_ControlWrite()
3415 static u16 MXL_ControlWrite_Group(struct dvb_frontend *fe, u16 controlNum, MXL_ControlWrite_Group() argument
3418 struct mxl5005s_state *state = fe->tuner_priv; MXL_ControlWrite_Group()
3433 MXL_RegWriteBit(fe, (u8)(state->Init_Ctrl[i].addr[j]), MXL_ControlWrite_Group()
3455 MXL_RegWriteBit(fe, (u8)(state->CH_Ctrl[i].addr[j]), MXL_ControlWrite_Group()
3478 MXL_RegWriteBit(fe, (u8)(state->MXL_Ctrl[i].addr[j]), MXL_ControlWrite_Group()
3496 static u16 MXL_RegRead(struct dvb_frontend *fe, u8 RegNum, u8 *RegVal) MXL_RegRead() argument
3498 struct mxl5005s_state *state = fe->tuner_priv; MXL_RegRead()
3511 static u16 MXL_ControlRead(struct dvb_frontend *fe, u16 controlNum, u32 *value) MXL_ControlRead() argument
3513 struct mxl5005s_state *state = fe->tuner_priv; MXL_ControlRead()
3559 static void MXL_RegWriteBit(struct dvb_frontend *fe, u8 address, u8 bit, MXL_RegWriteBit() argument
3562 struct mxl5005s_state *state = fe->tuner_priv; MXL_RegWriteBit()
3590 static u16 MXL_GetInitRegister(struct dvb_frontend *fe, u8 *RegNum, MXL_GetInitRegister() argument
3603 status += MXL_BlockInit(fe); MXL_GetInitRegister()
3607 status += MXL_RegRead(fe, RegNum[i], &RegVal[i]); MXL_GetInitRegister()
3613 static u16 MXL_GetCHRegister(struct dvb_frontend *fe, u8 *RegNum, u8 *RegVal, MXL_GetCHRegister() argument
3637 status += MXL_RegRead(fe, RegNum[i], &RegVal[i]); MXL_GetCHRegister()
3643 static u16 MXL_GetCHRegister_ZeroIF(struct dvb_frontend *fe, u8 *RegNum, MXL_GetCHRegister_ZeroIF() argument
3655 status += MXL_RegRead(fe, RegNum[i], &RegVal[i]); MXL_GetCHRegister_ZeroIF()
3676 static u16 MXL_VCORange_Test(struct dvb_frontend *fe, int VCO_Range) MXL_VCORange_Test() argument
3678 struct mxl5005s_state *state = fe->tuner_priv; MXL_VCORange_Test()
3682 status += MXL_ControlWrite(fe, RFSYN_EN_DIV, 1); MXL_VCORange_Test()
3683 status += MXL_ControlWrite(fe, RFSYN_EN_OUTMUX, 0); MXL_VCORange_Test()
3684 status += MXL_ControlWrite(fe, RFSYN_SEL_DIVM, 0); MXL_VCORange_Test()
3685 status += MXL_ControlWrite(fe, RFSYN_DIVM, 1); MXL_VCORange_Test()
3686 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_OUT, 1); MXL_VCORange_Test()
3687 status += MXL_ControlWrite(fe, RFSYN_RF_DIV_BIAS, 1); MXL_VCORange_Test()
3688 status += MXL_ControlWrite(fe, DN_SEL_FREQ, 0); MXL_VCORange_Test()
3691 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_HI, 1); MXL_VCORange_Test()
3692 status += MXL_ControlWrite(fe, RFSYN_VCO_BIAS, 8); MXL_VCORange_Test()
3693 status += MXL_ControlWrite(fe, CHCAL_INT_MOD_RF, 56); MXL_VCORange_Test()
3694 status += MXL_ControlWrite(fe, MXL_VCORange_Test()
3699 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_HI, 1); MXL_VCORange_Test()
3700 status += MXL_ControlWrite(fe, RFSYN_VCO_BIAS, 8); MXL_VCORange_Test()
3701 status += MXL_ControlWrite(fe, CHCAL_INT_MOD_RF, 56); MXL_VCORange_Test()
3702 status += MXL_ControlWrite(fe, MXL_VCORange_Test()
3706 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_HI, 1); MXL_VCORange_Test()
3707 status += MXL_ControlWrite(fe, RFSYN_VCO_BIAS, 8); MXL_VCORange_Test()
3708 status += MXL_ControlWrite(fe, CHCAL_INT_MOD_RF, 56); MXL_VCORange_Test()
3709 status += MXL_ControlWrite(fe, MXL_VCORange_Test()
3715 status += MXL_ControlWrite(fe, RFSYN_EN_DIV, 1); MXL_VCORange_Test()
3716 status += MXL_ControlWrite(fe, RFSYN_EN_OUTMUX, 0); MXL_VCORange_Test()
3717 status += MXL_ControlWrite(fe, RFSYN_SEL_DIVM, 0); MXL_VCORange_Test()
3718 status += MXL_ControlWrite(fe, RFSYN_DIVM, 1); MXL_VCORange_Test()
3719 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_OUT, 1); MXL_VCORange_Test()
3720 status += MXL_ControlWrite(fe, RFSYN_RF_DIV_BIAS, 1); MXL_VCORange_Test()
3721 status += MXL_ControlWrite(fe, DN_SEL_FREQ, 0); MXL_VCORange_Test()
3722 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_HI, 1); MXL_VCORange_Test()
3723 status += MXL_ControlWrite(fe, RFSYN_VCO_BIAS, 40); MXL_VCORange_Test()
3724 status += MXL_ControlWrite(fe, CHCAL_INT_MOD_RF, 41); MXL_VCORange_Test()
3727 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_HI, 1); MXL_VCORange_Test()
3728 status += MXL_ControlWrite(fe, RFSYN_VCO_BIAS, 40); MXL_VCORange_Test()
3729 status += MXL_ControlWrite(fe, CHCAL_INT_MOD_RF, 42); MXL_VCORange_Test()
3730 status += MXL_ControlWrite(fe, MXL_VCORange_Test()
3735 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_HI, 1); MXL_VCORange_Test()
3736 status += MXL_ControlWrite(fe, RFSYN_VCO_BIAS, 40); MXL_VCORange_Test()
3737 status += MXL_ControlWrite(fe, CHCAL_INT_MOD_RF, 42); MXL_VCORange_Test()
3738 status += MXL_ControlWrite(fe, MXL_VCORange_Test()
3742 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_HI, 1); MXL_VCORange_Test()
3743 status += MXL_ControlWrite(fe, RFSYN_VCO_BIAS, 40); MXL_VCORange_Test()
3744 status += MXL_ControlWrite(fe, CHCAL_INT_MOD_RF, 41); MXL_VCORange_Test()
3745 status += MXL_ControlWrite(fe, MXL_VCORange_Test()
3751 status += MXL_ControlWrite(fe, RFSYN_EN_DIV, 1); MXL_VCORange_Test()
3752 status += MXL_ControlWrite(fe, RFSYN_EN_OUTMUX, 0); MXL_VCORange_Test()
3753 status += MXL_ControlWrite(fe, RFSYN_SEL_DIVM, 0); MXL_VCORange_Test()
3754 status += MXL_ControlWrite(fe, RFSYN_DIVM, 1); MXL_VCORange_Test()
3755 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_OUT, 1); MXL_VCORange_Test()
3756 status += MXL_ControlWrite(fe, RFSYN_RF_DIV_BIAS, 1); MXL_VCORange_Test()
3757 status += MXL_ControlWrite(fe, DN_SEL_FREQ, 0); MXL_VCORange_Test()
3758 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_HI, 0); MXL_VCORange_Test()
3759 status += MXL_ControlWrite(fe, RFSYN_VCO_BIAS, 8); MXL_VCORange_Test()
3760 status += MXL_ControlWrite(fe, CHCAL_INT_MOD_RF, 42); MXL_VCORange_Test()
3763 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_HI, 0); MXL_VCORange_Test()
3764 status += MXL_ControlWrite(fe, RFSYN_VCO_BIAS, 8); MXL_VCORange_Test()
3765 status += MXL_ControlWrite(fe, CHCAL_INT_MOD_RF, 44); MXL_VCORange_Test()
3766 status += MXL_ControlWrite(fe, MXL_VCORange_Test()
3771 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_HI, 0); MXL_VCORange_Test()
3772 status += MXL_ControlWrite(fe, RFSYN_VCO_BIAS, 8); MXL_VCORange_Test()
3773 status += MXL_ControlWrite(fe, CHCAL_INT_MOD_RF, 44); MXL_VCORange_Test()
3774 status += MXL_ControlWrite(fe, MXL_VCORange_Test()
3778 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_HI, 0); MXL_VCORange_Test()
3779 status += MXL_ControlWrite(fe, RFSYN_VCO_BIAS, 8); MXL_VCORange_Test()
3780 status += MXL_ControlWrite(fe, CHCAL_INT_MOD_RF, 42); MXL_VCORange_Test()
3781 status += MXL_ControlWrite(fe, MXL_VCORange_Test()
3787 status += MXL_ControlWrite(fe, RFSYN_EN_DIV, 1); MXL_VCORange_Test()
3788 status += MXL_ControlWrite(fe, RFSYN_EN_OUTMUX, 0); MXL_VCORange_Test()
3789 status += MXL_ControlWrite(fe, RFSYN_SEL_DIVM, 0); MXL_VCORange_Test()
3790 status += MXL_ControlWrite(fe, RFSYN_DIVM, 1); MXL_VCORange_Test()
3791 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_OUT, 1); MXL_VCORange_Test()
3792 status += MXL_ControlWrite(fe, RFSYN_RF_DIV_BIAS, 1); MXL_VCORange_Test()
3793 status += MXL_ControlWrite(fe, DN_SEL_FREQ, 0); MXL_VCORange_Test()
3794 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_HI, 0); MXL_VCORange_Test()
3795 status += MXL_ControlWrite(fe, RFSYN_VCO_BIAS, 40); MXL_VCORange_Test()
3796 status += MXL_ControlWrite(fe, CHCAL_INT_MOD_RF, 27); MXL_VCORange_Test()
3799 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_HI, 0); MXL_VCORange_Test()
3800 status += MXL_ControlWrite(fe, RFSYN_VCO_BIAS, 40); MXL_VCORange_Test()
3801 status += MXL_ControlWrite(fe, CHCAL_INT_MOD_RF, 27); MXL_VCORange_Test()
3802 status += MXL_ControlWrite(fe, MXL_VCORange_Test()
3807 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_HI, 0); MXL_VCORange_Test()
3808 status += MXL_ControlWrite(fe, RFSYN_VCO_BIAS, 40); MXL_VCORange_Test()
3809 status += MXL_ControlWrite(fe, CHCAL_INT_MOD_RF, 27); MXL_VCORange_Test()
3810 status += MXL_ControlWrite(fe, MXL_VCORange_Test()
3814 status += MXL_ControlWrite(fe, RFSYN_SEL_VCO_HI, 0); MXL_VCORange_Test()
3815 status += MXL_ControlWrite(fe, RFSYN_VCO_BIAS, 40); MXL_VCORange_Test()
3816 status += MXL_ControlWrite(fe, CHCAL_INT_MOD_RF, 27); MXL_VCORange_Test()
3817 status += MXL_ControlWrite(fe, MXL_VCORange_Test()
3825 static u16 MXL_Hystersis_Test(struct dvb_frontend *fe, int Hystersis) MXL_Hystersis_Test() argument
3827 struct mxl5005s_state *state = fe->tuner_priv; MXL_Hystersis_Test()
3831 status += MXL_ControlWrite(fe, DN_BYPASS_AGC_I2C, 1); MXL_Hystersis_Test()
3844 static int mxl5005s_reset(struct dvb_frontend *fe) mxl5005s_reset() argument
3846 struct mxl5005s_state *state = fe->tuner_priv; mxl5005s_reset()
3855 if (fe->ops.i2c_gate_ctrl) mxl5005s_reset()
3856 fe->ops.i2c_gate_ctrl(fe, 1); mxl5005s_reset()
3863 if (fe->ops.i2c_gate_ctrl) mxl5005s_reset()
3864 fe->ops.i2c_gate_ctrl(fe, 0); mxl5005s_reset()
3872 static int mxl5005s_writereg(struct dvb_frontend *fe, u8 reg, u8 val, int latch) mxl5005s_writereg() argument
3874 struct mxl5005s_state *state = fe->tuner_priv; mxl5005s_writereg()
3891 static int mxl5005s_writeregs(struct dvb_frontend *fe, u8 *addrtable, mxl5005s_writeregs() argument
3896 if (fe->ops.i2c_gate_ctrl) mxl5005s_writeregs()
3897 fe->ops.i2c_gate_ctrl(fe, 1); mxl5005s_writeregs()
3900 ret = mxl5005s_writereg(fe, addrtable[i], datatable[i], 0); mxl5005s_writeregs()
3905 ret = mxl5005s_writereg(fe, addrtable[i], datatable[i], 1); mxl5005s_writeregs()
3907 if (fe->ops.i2c_gate_ctrl) mxl5005s_writeregs()
3908 fe->ops.i2c_gate_ctrl(fe, 0); mxl5005s_writeregs()
3913 static int mxl5005s_init(struct dvb_frontend *fe) mxl5005s_init() argument
3915 struct mxl5005s_state *state = fe->tuner_priv; mxl5005s_init()
3919 return mxl5005s_reconfigure(fe, MXL_QAM, MXL5005S_BANDWIDTH_6MHZ); mxl5005s_init()
3922 static int mxl5005s_reconfigure(struct dvb_frontend *fe, u32 mod_type, mxl5005s_reconfigure() argument
3925 struct mxl5005s_state *state = fe->tuner_priv; mxl5005s_reconfigure()
3933 mxl5005s_reset(fe); mxl5005s_reconfigure()
3940 mxl5005s_writeregs(fe, AddrTable, ByteTable, 1); mxl5005s_reconfigure()
3942 mxl5005s_AssignTunerMode(fe, mod_type, bandwidth); mxl5005s_reconfigure()
3945 MXL_GetInitRegister(fe, AddrTable, ByteTable, &TableLen); mxl5005s_reconfigure()
3947 mxl5005s_writeregs(fe, AddrTable, ByteTable, TableLen); mxl5005s_reconfigure()
3952 static int mxl5005s_AssignTunerMode(struct dvb_frontend *fe, u32 mod_type, mxl5005s_AssignTunerMode() argument
3955 struct mxl5005s_state *state = fe->tuner_priv; mxl5005s_AssignTunerMode()
3958 InitTunerControls(fe); mxl5005s_AssignTunerMode()
3962 fe, mxl5005s_AssignTunerMode()
3981 static int mxl5005s_set_params(struct dvb_frontend *fe) mxl5005s_set_params() argument
3983 struct mxl5005s_state *state = fe->tuner_priv; mxl5005s_set_params()
3984 struct dtv_frontend_properties *c = &fe->dtv_property_cache; mxl5005s_set_params()
4023 ret = mxl5005s_reconfigure(fe, req_mode, req_bw); mxl5005s_set_params()
4030 ret = mxl5005s_SetRfFreqHz(fe, c->frequency); mxl5005s_set_params()
4036 static int mxl5005s_get_frequency(struct dvb_frontend *fe, u32 *frequency) mxl5005s_get_frequency() argument
4038 struct mxl5005s_state *state = fe->tuner_priv; mxl5005s_get_frequency()
4046 static int mxl5005s_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth) mxl5005s_get_bandwidth() argument
4048 struct mxl5005s_state *state = fe->tuner_priv; mxl5005s_get_bandwidth()
4056 static int mxl5005s_get_if_frequency(struct dvb_frontend *fe, u32 *frequency) mxl5005s_get_if_frequency() argument
4058 struct mxl5005s_state *state = fe->tuner_priv; mxl5005s_get_if_frequency()
4066 static int mxl5005s_release(struct dvb_frontend *fe) mxl5005s_release() argument
4069 kfree(fe->tuner_priv); mxl5005s_release()
4070 fe->tuner_priv = NULL; mxl5005s_release()
4091 struct dvb_frontend *mxl5005s_attach(struct dvb_frontend *fe, mxl5005s_attach() argument
4102 state->frontend = fe; mxl5005s_attach()
4109 memcpy(&fe->ops.tuner_ops, &mxl5005s_tuner_ops, mxl5005s_attach()
4112 fe->tuner_priv = state; mxl5005s_attach()
4113 return fe; mxl5005s_attach()
H A Dtda18271-fe.c2 tda18271-fe.c - driver for the Philips / NXP TDA18271 silicon tuner
40 static int tda18271_toggle_output(struct dvb_frontend *fe, int standby) tda18271_toggle_output() argument
42 struct tda18271_priv *priv = fe->tuner_priv; tda18271_toggle_output()
44 int ret = tda18271_set_standby_mode(fe, standby ? 1 : 0, tda18271_toggle_output()
61 static inline int charge_pump_source(struct dvb_frontend *fe, int force) charge_pump_source() argument
63 struct tda18271_priv *priv = fe->tuner_priv; charge_pump_source()
64 return tda18271_charge_pump_source(fe, charge_pump_source()
70 static inline void tda18271_set_if_notch(struct dvb_frontend *fe) tda18271_set_if_notch() argument
72 struct tda18271_priv *priv = fe->tuner_priv; tda18271_set_if_notch()
85 static int tda18271_channel_configuration(struct dvb_frontend *fe, tda18271_channel_configuration() argument
89 struct tda18271_priv *priv = fe->tuner_priv; tda18271_channel_configuration()
119 ret = tda18271_write_regs(fe, R_EB22, 1); tda18271_channel_configuration()
133 tda18271_calc_ir_measure(fe, &freq); tda18271_channel_configuration()
135 tda18271_calc_bp_filter(fe, &freq); tda18271_channel_configuration()
137 tda18271_calc_rf_band(fe, &freq); tda18271_channel_configuration()
139 tda18271_calc_gain_taper(fe, &freq); tda18271_channel_configuration()
160 ret = tda18271_write_regs(fe, R_EB1, 1); tda18271_channel_configuration()
170 tda18271_calc_main_pll(fe, N); tda18271_channel_configuration()
171 tda18271_set_if_notch(fe); tda18271_channel_configuration()
172 tda18271_write_regs(fe, R_MPD, 4); tda18271_channel_configuration()
175 tda18271_calc_cal_pll(fe, N); tda18271_channel_configuration()
176 tda18271_write_regs(fe, R_CPD, 4); tda18271_channel_configuration()
179 tda18271_set_if_notch(fe); tda18271_channel_configuration()
180 tda18271_write_regs(fe, R_MPD, 1); tda18271_channel_configuration()
184 ret = tda18271_write_regs(fe, R_TM, 7); tda18271_channel_configuration()
189 charge_pump_source(fe, 1); tda18271_channel_configuration()
194 charge_pump_source(fe, 0); tda18271_channel_configuration()
204 ret = tda18271_write_regs(fe, R_EP3, 1); tda18271_channel_configuration()
210 static int tda18271_read_thermometer(struct dvb_frontend *fe) tda18271_read_thermometer() argument
212 struct tda18271_priv *priv = fe->tuner_priv; tda18271_read_thermometer()
218 tda18271_write_regs(fe, R_TM, 1); tda18271_read_thermometer()
221 tda18271_read_regs(fe); tda18271_read_thermometer()
231 tda18271_write_regs(fe, R_TM, 1); tda18271_read_thermometer()
236 tda18271_read_regs(fe); tda18271_read_thermometer()
239 tm = tda18271_lookup_thermometer(fe); tda18271_read_thermometer()
243 tda18271_write_regs(fe, R_TM, 1); tda18271_read_thermometer()
247 tda18271_write_regs(fe, R_EP4, 1); tda18271_read_thermometer()
254 static int tda18271c2_rf_tracking_filters_correction(struct dvb_frontend *fe, tda18271c2_rf_tracking_filters_correction() argument
257 struct tda18271_priv *priv = fe->tuner_priv; tda18271c2_rf_tracking_filters_correction()
265 ret = tda18271_set_standby_mode(fe, 0, 0, 0); tda18271c2_rf_tracking_filters_correction()
270 tm_current = tda18271_read_thermometer(fe); tda18271c2_rf_tracking_filters_correction()
274 tda18271_calc_rf_cal(fe, &freq); tda18271c2_rf_tracking_filters_correction()
277 i = tda18271_lookup_rf_band(fe, &freq, NULL); tda18271c2_rf_tracking_filters_correction()
294 tda18271_lookup_map(fe, RF_CAL_DC_OVER_DT, &freq, &dc_over_dt); tda18271c2_rf_tracking_filters_correction()
300 ret = tda18271_write_regs(fe, R_EB14, 1); tda18271c2_rf_tracking_filters_correction()
305 static int tda18271_por(struct dvb_frontend *fe) tda18271_por() argument
307 struct tda18271_priv *priv = fe->tuner_priv; tda18271_por()
313 ret = tda18271_write_regs(fe, R_EB12, 1); tda18271_por()
319 ret = tda18271_write_regs(fe, R_EB18, 1); tda18271_por()
326 ret = tda18271_set_standby_mode(fe, 1, 0, 0); tda18271_por()
333 ret = tda18271_write_regs(fe, R_EB21, 3); tda18271_por()
338 static int tda18271_calibrate_rf(struct dvb_frontend *fe, u32 freq) tda18271_calibrate_rf() argument
340 struct tda18271_priv *priv = fe->tuner_priv; tda18271_calibrate_rf()
346 tda18271_write_regs(fe, R_EP4, 1); tda18271_calibrate_rf()
352 tda18271_write_regs(fe, R_EB18, 1); tda18271_calibrate_rf()
356 tda18271_calc_bp_filter(fe, &freq); tda18271_calibrate_rf()
357 tda18271_calc_gain_taper(fe, &freq); tda18271_calibrate_rf()
358 tda18271_calc_rf_band(fe, &freq); tda18271_calibrate_rf()
359 tda18271_calc_km(fe, &freq); tda18271_calibrate_rf()
361 tda18271_write_regs(fe, R_EP1, 3); tda18271_calibrate_rf()
362 tda18271_write_regs(fe, R_EB13, 1); tda18271_calibrate_rf()
365 tda18271_charge_pump_source(fe, TDA18271_MAIN_PLL, 1); tda18271_calibrate_rf()
368 tda18271_charge_pump_source(fe, TDA18271_CAL_PLL, 1); tda18271_calibrate_rf()
372 tda18271_write_regs(fe, R_EB14, 1); tda18271_calibrate_rf()
376 tda18271_write_regs(fe, R_EB20, 1); tda18271_calibrate_rf()
380 tda18271_write_regs(fe, R_EP4, 2); tda18271_calibrate_rf()
387 tda18271_calc_cal_pll(fe, N); tda18271_calibrate_rf()
388 tda18271_write_regs(fe, R_CPD, 4); tda18271_calibrate_rf()
393 tda18271_calc_main_pll(fe, N); tda18271_calibrate_rf()
394 tda18271_write_regs(fe, R_MPD, 4); tda18271_calibrate_rf()
398 tda18271_write_regs(fe, R_EP2, 1); tda18271_calibrate_rf()
399 tda18271_write_regs(fe, R_EP1, 1); tda18271_calibrate_rf()
400 tda18271_write_regs(fe, R_EP2, 1); tda18271_calibrate_rf()
401 tda18271_write_regs(fe, R_EP1, 1); tda18271_calibrate_rf()
406 tda18271_charge_pump_source(fe, TDA18271_MAIN_PLL, 0); tda18271_calibrate_rf()
409 tda18271_charge_pump_source(fe, TDA18271_CAL_PLL, 0); tda18271_calibrate_rf()
415 tda18271_write_regs(fe, R_EB20, 1); tda18271_calibrate_rf()
428 tda18271_write_regs(fe, R_EB18, 1); tda18271_calibrate_rf()
430 tda18271_write_regs(fe, R_EP3, 2); tda18271_calibrate_rf()
433 tda18271_write_regs(fe, R_EP1, 1); tda18271_calibrate_rf()
436 tda18271_read_extended(fe); tda18271_calibrate_rf()
441 static int tda18271_powerscan(struct dvb_frontend *fe, tda18271_powerscan() argument
444 struct tda18271_priv *priv = fe->tuner_priv; tda18271_powerscan()
453 tda18271_calc_rf_band(fe, &freq); tda18271_powerscan()
454 tda18271_calc_rf_cal(fe, &freq); tda18271_powerscan()
455 tda18271_calc_gain_taper(fe, &freq); tda18271_powerscan()
456 tda18271_lookup_cid_target(fe, &freq, &cid_target, &count_limit); tda18271_powerscan()
458 tda18271_write_regs(fe, R_EP2, 1); tda18271_powerscan()
459 tda18271_write_regs(fe, R_EB14, 1); tda18271_powerscan()
464 tda18271_calc_main_pll(fe, freq); tda18271_powerscan()
465 tda18271_write_regs(fe, R_MPD, 4); tda18271_powerscan()
472 tda18271_write_regs(fe, R_EP4, 1); tda18271_powerscan()
475 tda18271_write_regs(fe, R_EP2, 1); tda18271_powerscan()
478 ret = tda18271_read_extended(fe); tda18271_powerscan()
493 tda18271_calc_main_pll(fe, freq); tda18271_powerscan()
494 tda18271_write_regs(fe, R_MPD, 4); tda18271_powerscan()
503 tda18271_write_regs(fe, R_EP2, 1); tda18271_powerscan()
506 ret = tda18271_read_extended(fe); tda18271_powerscan()
535 static int tda18271_powerscan_init(struct dvb_frontend *fe) tda18271_powerscan_init() argument
537 struct tda18271_priv *priv = fe->tuner_priv; tda18271_powerscan_init()
551 ret = tda18271_write_regs(fe, R_EP3, 2); tda18271_powerscan_init()
556 ret = tda18271_write_regs(fe, R_EB18, 1); tda18271_powerscan_init()
566 ret = tda18271_write_regs(fe, R_EB21, 3); tda18271_powerscan_init()
571 static int tda18271_rf_tracking_filters_init(struct dvb_frontend *fe, u32 freq) tda18271_rf_tracking_filters_init() argument
573 struct tda18271_priv *priv = fe->tuner_priv; tda18271_rf_tracking_filters_init()
586 i = tda18271_lookup_rf_band(fe, &freq, NULL); tda18271_rf_tracking_filters_init()
601 bcal = tda18271_powerscan(fe, &rf_default[rf], &rf_freq[rf]); tda18271_rf_tracking_filters_init()
605 tda18271_calc_rf_cal(fe, &rf_freq[rf]); tda18271_rf_tracking_filters_init()
610 (s32)tda18271_calibrate_rf(fe, rf_freq[rf]); tda18271_rf_tracking_filters_init()
643 static int tda18271_calc_rf_filter_curve(struct dvb_frontend *fe) tda18271_calc_rf_filter_curve() argument
645 struct tda18271_priv *priv = fe->tuner_priv; tda18271_calc_rf_filter_curve()
654 ret = tda18271_powerscan_init(fe); tda18271_calc_rf_filter_curve()
661 tda18271_rf_tracking_filters_init(fe, 1000 * tda18271_calc_rf_filter_curve()
667 priv->tm_rfcal = tda18271_read_thermometer(fe); tda18271_calc_rf_filter_curve()
674 static int tda18271c2_rf_cal_init(struct dvb_frontend *fe) tda18271c2_rf_cal_init() argument
676 struct tda18271_priv *priv = fe->tuner_priv; tda18271c2_rf_cal_init()
687 ret = tda18271_calc_rf_filter_curve(fe); tda18271c2_rf_cal_init()
691 ret = tda18271_por(fe); tda18271c2_rf_cal_init()
705 static int tda18271c1_rf_tracking_filter_calibration(struct dvb_frontend *fe, tda18271c1_rf_tracking_filter_calibration() argument
708 struct tda18271_priv *priv = fe->tuner_priv; tda18271c1_rf_tracking_filter_calibration()
714 tda18271_calc_bp_filter(fe, &freq); tda18271c1_rf_tracking_filter_calibration()
715 tda18271_write_regs(fe, R_EP1, 1); tda18271c1_rf_tracking_filter_calibration()
719 tda18271_write_regs(fe, R_EB4, 1); tda18271c1_rf_tracking_filter_calibration()
722 tda18271_write_regs(fe, R_EB7, 1); tda18271c1_rf_tracking_filter_calibration()
725 tda18271_write_regs(fe, R_EB14, 1); tda18271c1_rf_tracking_filter_calibration()
728 tda18271_write_regs(fe, R_EB20, 1); tda18271c1_rf_tracking_filter_calibration()
744 tda18271_calc_cal_pll(fe, N); tda18271c1_rf_tracking_filter_calibration()
757 tda18271_calc_main_pll(fe, N); tda18271c1_rf_tracking_filter_calibration()
759 ret = tda18271_write_regs(fe, R_EP3, 11); tda18271c1_rf_tracking_filter_calibration()
766 tda18271_calc_km(fe, &freq); tda18271c1_rf_tracking_filter_calibration()
767 tda18271_write_regs(fe, R_EB13, 1); tda18271c1_rf_tracking_filter_calibration()
770 tda18271_calc_rf_band(fe, &freq); tda18271c1_rf_tracking_filter_calibration()
773 tda18271_calc_gain_taper(fe, &freq); tda18271c1_rf_tracking_filter_calibration()
775 tda18271_write_regs(fe, R_EP2, 1); tda18271c1_rf_tracking_filter_calibration()
776 tda18271_write_regs(fe, R_EP1, 1); tda18271c1_rf_tracking_filter_calibration()
777 tda18271_write_regs(fe, R_EP2, 1); tda18271c1_rf_tracking_filter_calibration()
778 tda18271_write_regs(fe, R_EP1, 1); tda18271c1_rf_tracking_filter_calibration()
782 tda18271_write_regs(fe, R_EB4, 1); tda18271c1_rf_tracking_filter_calibration()
785 tda18271_write_regs(fe, R_EB7, 1); tda18271c1_rf_tracking_filter_calibration()
789 tda18271_write_regs(fe, R_EB20, 1); tda18271c1_rf_tracking_filter_calibration()
793 tda18271_write_regs(fe, R_EP4, 1); tda18271c1_rf_tracking_filter_calibration()
795 tda18271_write_regs(fe, R_EP1, 1); tda18271c1_rf_tracking_filter_calibration()
798 if (0 == tda18271_calc_rf_cal(fe, &freq)) tda18271c1_rf_tracking_filter_calibration()
799 tda18271_write_regs(fe, R_EB14, 1); tda18271c1_rf_tracking_filter_calibration()
806 static int tda18271_ir_cal_init(struct dvb_frontend *fe) tda18271_ir_cal_init() argument
808 struct tda18271_priv *priv = fe->tuner_priv; tda18271_ir_cal_init()
812 ret = tda18271_read_regs(fe); tda18271_ir_cal_init()
818 ret = tda18271_init_regs(fe); tda18271_ir_cal_init()
823 static int tda18271_init(struct dvb_frontend *fe) tda18271_init() argument
825 struct tda18271_priv *priv = fe->tuner_priv; tda18271_init()
831 ret = tda18271_set_standby_mode(fe, 0, 0, 0); tda18271_init()
836 ret = tda18271_ir_cal_init(fe); tda18271_init()
841 tda18271c2_rf_cal_init(fe); tda18271_init()
848 static int tda18271_sleep(struct dvb_frontend *fe) tda18271_sleep() argument
850 struct tda18271_priv *priv = fe->tuner_priv; tda18271_sleep()
856 ret = tda18271_toggle_output(fe, 1); tda18271_sleep()
865 static int tda18271_agc(struct dvb_frontend *fe) tda18271_agc() argument
867 struct tda18271_priv *priv = fe->tuner_priv; tda18271_agc()
879 if (fe->callback) tda18271_agc()
880 ret = fe->callback(priv->i2c_props.adap->algo_data, tda18271_agc()
896 static int tda18271_tune(struct dvb_frontend *fe, tda18271_tune() argument
899 struct tda18271_priv *priv = fe->tuner_priv; tda18271_tune()
905 ret = tda18271_agc(fe); tda18271_tune()
909 ret = tda18271_init(fe); tda18271_tune()
917 tda18271c1_rf_tracking_filter_calibration(fe, freq, bw); tda18271_tune()
920 tda18271c2_rf_tracking_filters_correction(fe, freq); tda18271_tune()
923 ret = tda18271_channel_configuration(fe, map, freq, bw); tda18271_tune()
932 static int tda18271_set_params(struct dvb_frontend *fe) tda18271_set_params() argument
934 struct dtv_frontend_properties *c = &fe->dtv_property_cache; tda18271_set_params()
938 struct tda18271_priv *priv = fe->tuner_priv; tda18271_set_params()
980 if (fe->ops.analog_ops.standby) tda18271_set_params()
981 fe->ops.analog_ops.standby(fe); tda18271_set_params()
983 ret = tda18271_tune(fe, map, freq, bw); tda18271_set_params()
995 static int tda18271_set_analog_params(struct dvb_frontend *fe, tda18271_set_analog_params() argument
998 struct tda18271_priv *priv = fe->tuner_priv; tda18271_set_analog_params()
1039 ret = tda18271_tune(fe, map, freq, 0); tda18271_set_analog_params()
1051 static int tda18271_release(struct dvb_frontend *fe) tda18271_release() argument
1053 struct tda18271_priv *priv = fe->tuner_priv; tda18271_release()
1062 fe->tuner_priv = NULL; tda18271_release()
1067 static int tda18271_get_frequency(struct dvb_frontend *fe, u32 *frequency) tda18271_get_frequency() argument
1069 struct tda18271_priv *priv = fe->tuner_priv; tda18271_get_frequency()
1074 static int tda18271_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth) tda18271_get_bandwidth() argument
1076 struct tda18271_priv *priv = fe->tuner_priv; tda18271_get_bandwidth()
1081 static int tda18271_get_if_frequency(struct dvb_frontend *fe, u32 *frequency) tda18271_get_if_frequency() argument
1083 struct tda18271_priv *priv = fe->tuner_priv; tda18271_get_if_frequency()
1107 static int tda18271_dump_std_map(struct dvb_frontend *fe) tda18271_dump_std_map() argument
1109 struct tda18271_priv *priv = fe->tuner_priv; tda18271_dump_std_map()
1132 static int tda18271_update_std_map(struct dvb_frontend *fe, tda18271_update_std_map() argument
1135 struct tda18271_priv *priv = fe->tuner_priv; tda18271_update_std_map()
1160 static int tda18271_get_id(struct dvb_frontend *fe) tda18271_get_id() argument
1162 struct tda18271_priv *priv = fe->tuner_priv; tda18271_get_id()
1168 ret = tda18271_read_regs(fe); tda18271_get_id()
1200 static int tda18271_setup_configuration(struct dvb_frontend *fe, tda18271_setup_configuration() argument
1203 struct tda18271_priv *priv = fe->tuner_priv; tda18271_setup_configuration()
1226 static int tda18271_set_config(struct dvb_frontend *fe, void *priv_cfg) tda18271_set_config() argument
1230 tda18271_setup_configuration(fe, cfg); tda18271_set_config()
1233 tda18271_init(fe); tda18271_set_config()
1237 tda18271_update_std_map(fe, cfg->std_map); tda18271_set_config()
1260 struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr, tda18271_attach() argument
1277 fe->tuner_priv = priv; tda18271_attach()
1279 tda18271_setup_configuration(fe, cfg); tda18271_attach()
1284 ret = tda18271_get_id(fe); tda18271_attach()
1288 ret = tda18271_assign_map_layout(fe); tda18271_attach()
1298 tda18271_init_regs(fe); tda18271_attach()
1302 tda18271c2_rf_cal_init(fe); tda18271_attach()
1305 ret = tda18271_toggle_output(fe, 1); tda18271_attach()
1312 fe->tuner_priv = priv; tda18271_attach()
1327 tda18271_update_std_map(fe, cfg->std_map); tda18271_attach()
1330 tda18271_init(fe); tda18271_attach()
1336 tda18271_update_std_map(fe, cfg->std_map); tda18271_attach()
1340 memcpy(&fe->ops.tuner_ops, &tda18271_tuner_ops, tda18271_attach()
1344 tda18271_dump_std_map(fe); tda18271_attach()
1346 return fe; tda18271_attach()
1350 tda18271_release(fe); tda18271_attach()
H A Dtda8290.c62 static int tda8290_i2c_bridge(struct dvb_frontend *fe, int close) tda8290_i2c_bridge() argument
64 struct tda8290_priv *priv = fe->analog_demod_priv; tda8290_i2c_bridge()
83 static int tda8295_i2c_bridge(struct dvb_frontend *fe, int close) tda8295_i2c_bridge() argument
85 struct tda8290_priv *priv = fe->analog_demod_priv; tda8295_i2c_bridge()
115 static void set_audio(struct dvb_frontend *fe, set_audio() argument
118 struct tda8290_priv *priv = fe->analog_demod_priv; set_audio()
176 static void tda8290_set_params(struct dvb_frontend *fe, tda8290_set_params() argument
179 struct tda8290_priv *priv = fe->analog_demod_priv; tda8290_set_params()
203 set_audio(fe, params); tda8290_set_params()
237 if (fe->ops.analog_ops.i2c_gate_ctrl) tda8290_set_params()
238 fe->ops.analog_ops.i2c_gate_ctrl(fe, 1); tda8290_set_params()
240 if (fe->ops.tuner_ops.set_analog_params) tda8290_set_params()
241 fe->ops.tuner_ops.set_analog_params(fe, params); tda8290_set_params()
274 priv->cfg.agcf(fe); tda8290_set_params()
307 if (fe->ops.analog_ops.i2c_gate_ctrl) tda8290_set_params()
308 fe->ops.analog_ops.i2c_gate_ctrl(fe, 0); tda8290_set_params()
314 static void tda8295_power(struct dvb_frontend *fe, int enable) tda8295_power() argument
316 struct tda8290_priv *priv = fe->analog_demod_priv; tda8295_power()
329 static void tda8295_set_easy_mode(struct dvb_frontend *fe, int enable) tda8295_set_easy_mode() argument
331 struct tda8290_priv *priv = fe->analog_demod_priv; tda8295_set_easy_mode()
344 static void tda8295_set_video_std(struct dvb_frontend *fe) tda8295_set_video_std() argument
346 struct tda8290_priv *priv = fe->analog_demod_priv; tda8295_set_video_std()
351 tda8295_set_easy_mode(fe, 1); tda8295_set_video_std()
353 tda8295_set_easy_mode(fe, 0); tda8295_set_video_std()
358 static void tda8295_agc1_out(struct dvb_frontend *fe, int enable) tda8295_agc1_out() argument
360 struct tda8290_priv *priv = fe->analog_demod_priv; tda8295_agc1_out()
373 static void tda8295_agc2_out(struct dvb_frontend *fe, int enable) tda8295_agc2_out() argument
375 struct tda8290_priv *priv = fe->analog_demod_priv; tda8295_agc2_out()
394 static int tda8295_has_signal(struct dvb_frontend *fe, u16 *signal) tda8295_has_signal() argument
396 struct tda8290_priv *priv = fe->analog_demod_priv; tda8295_has_signal()
408 static void tda8295_set_params(struct dvb_frontend *fe, tda8295_set_params() argument
411 struct tda8290_priv *priv = fe->analog_demod_priv; tda8295_set_params()
415 set_audio(fe, params); tda8295_set_params()
419 tda8295_power(fe, 1); tda8295_set_params()
420 tda8295_agc1_out(fe, 1); tda8295_set_params()
425 tda8295_set_video_std(fe); tda8295_set_params()
431 if (fe->ops.analog_ops.i2c_gate_ctrl) tda8295_set_params()
432 fe->ops.analog_ops.i2c_gate_ctrl(fe, 1); tda8295_set_params()
434 if (fe->ops.tuner_ops.set_analog_params) tda8295_set_params()
435 fe->ops.tuner_ops.set_analog_params(fe, params); tda8295_set_params()
438 priv->cfg.agcf(fe); tda8295_set_params()
440 tda8295_has_signal(fe, &signal); tda8295_set_params()
446 if (fe->ops.analog_ops.i2c_gate_ctrl) tda8295_set_params()
447 fe->ops.analog_ops.i2c_gate_ctrl(fe, 0); tda8295_set_params()
452 static int tda8290_has_signal(struct dvb_frontend *fe, u16 *signal) tda8290_has_signal() argument
454 struct tda8290_priv *priv = fe->analog_demod_priv; tda8290_has_signal()
467 static void tda8290_standby(struct dvb_frontend *fe) tda8290_standby() argument
469 struct tda8290_priv *priv = fe->analog_demod_priv; tda8290_standby()
476 if (fe->ops.analog_ops.i2c_gate_ctrl) tda8290_standby()
477 fe->ops.analog_ops.i2c_gate_ctrl(fe, 1); tda8290_standby()
481 if (fe->ops.analog_ops.i2c_gate_ctrl) tda8290_standby()
482 fe->ops.analog_ops.i2c_gate_ctrl(fe, 0); tda8290_standby()
487 static void tda8295_standby(struct dvb_frontend *fe) tda8295_standby() argument
489 tda8295_agc1_out(fe, 0); /* Put AGC in tri-state */ tda8295_standby()
491 tda8295_power(fe, 0); tda8295_standby()
494 static void tda8290_init_if(struct dvb_frontend *fe) tda8290_init_if() argument
496 struct tda8290_priv *priv = fe->analog_demod_priv; tda8290_init_if()
510 static void tda8295_init_if(struct dvb_frontend *fe) tda8295_init_if() argument
512 struct tda8290_priv *priv = fe->analog_demod_priv; tda8295_init_if()
522 tda8295_power(fe, 1); tda8295_init_if()
524 tda8295_set_easy_mode(fe, 0); tda8295_init_if()
525 tda8295_set_video_std(fe); tda8295_init_if()
535 tda8295_agc1_out(fe, 0); tda8295_init_if()
536 tda8295_agc2_out(fe, 0); tda8295_init_if()
539 static void tda8290_init_tuner(struct dvb_frontend *fe) tda8290_init_tuner() argument
541 struct tda8290_priv *priv = fe->analog_demod_priv; tda8290_init_tuner()
551 if (fe->ops.analog_ops.i2c_gate_ctrl) tda8290_init_tuner()
552 fe->ops.analog_ops.i2c_gate_ctrl(fe, 1); tda8290_init_tuner()
554 if (fe->ops.analog_ops.i2c_gate_ctrl) tda8290_init_tuner()
555 fe->ops.analog_ops.i2c_gate_ctrl(fe, 0); tda8290_init_tuner()
560 static void tda829x_release(struct dvb_frontend *fe) tda829x_release() argument
562 struct tda8290_priv *priv = fe->analog_demod_priv; tda829x_release()
567 if (fe->ops.tuner_ops.release) tda829x_release()
568 fe->ops.tuner_ops.release(fe); tda829x_release()
570 kfree(fe->analog_demod_priv); tda829x_release()
571 fe->analog_demod_priv = NULL; tda829x_release()
578 static int tda829x_find_tuner(struct dvb_frontend *fe) tda829x_find_tuner() argument
580 struct tda8290_priv *priv = fe->analog_demod_priv; tda829x_find_tuner()
586 if (fe->ops.analog_ops.i2c_gate_ctrl) tda829x_find_tuner()
587 fe->ops.analog_ops.i2c_gate_ctrl(fe, 1); tda829x_find_tuner()
605 if (fe->ops.analog_ops.i2c_gate_ctrl) tda829x_find_tuner()
606 fe->ops.analog_ops.i2c_gate_ctrl(fe, 0); tda829x_find_tuner()
629 if (fe->ops.analog_ops.i2c_gate_ctrl) tda829x_find_tuner()
630 fe->ops.analog_ops.i2c_gate_ctrl(fe, 1); tda829x_find_tuner()
635 if (fe->ops.analog_ops.i2c_gate_ctrl) tda829x_find_tuner()
636 fe->ops.analog_ops.i2c_gate_ctrl(fe, 0); tda829x_find_tuner()
644 dvb_attach(tda18271_attach, fe, priv->tda827x_addr, tda829x_find_tuner()
652 dvb_attach(tda827x_attach, fe, priv->tda827x_addr, tda829x_find_tuner()
656 if (fe->ops.tuner_ops.init) tda829x_find_tuner()
657 fe->ops.tuner_ops.init(fe); tda829x_find_tuner()
659 if (fe->ops.tuner_ops.sleep) tda829x_find_tuner()
660 fe->ops.tuner_ops.sleep(fe); tda829x_find_tuner()
662 if (fe->ops.analog_ops.i2c_gate_ctrl) tda829x_find_tuner()
663 fe->ops.analog_ops.i2c_gate_ctrl(fe, 0); tda829x_find_tuner()
740 struct dvb_frontend *tda829x_attach(struct dvb_frontend *fe, tda829x_attach() argument
750 fe->analog_demod_priv = priv; tda829x_attach()
762 memcpy(&fe->ops.analog_ops, &tda8290_ops, tda829x_attach()
768 memcpy(&fe->ops.analog_ops, &tda8295_ops, tda829x_attach()
773 fe->ops.analog_ops.i2c_gate_ctrl = NULL; tda829x_attach()
776 tda8295_power(fe, 1); tda829x_attach()
777 if (tda829x_find_tuner(fe) < 0) tda829x_attach()
811 fe->ops.analog_ops.info.name = name; tda829x_attach()
815 tda8290_init_tuner(fe); tda829x_attach()
816 tda8290_init_if(fe); tda829x_attach()
818 tda8295_init_if(fe); tda829x_attach()
820 return fe; tda829x_attach()
823 memset(&fe->ops.analog_ops, 0, sizeof(struct analog_demod_ops)); tda829x_attach()
825 tda829x_release(fe); tda829x_attach()
H A Dtua9001.c19 static int tua9001_init(struct dvb_frontend *fe) tua9001_init() argument
21 struct tua9001_dev *dev = fe->tuner_priv; tua9001_init()
44 if (fe->callback) { tua9001_init()
45 ret = fe->callback(client->adapter, tua9001_init()
63 static int tua9001_sleep(struct dvb_frontend *fe) tua9001_sleep() argument
65 struct tua9001_dev *dev = fe->tuner_priv; tua9001_sleep()
71 if (fe->callback) { tua9001_sleep()
72 ret = fe->callback(client->adapter, tua9001_sleep()
84 static int tua9001_set_params(struct dvb_frontend *fe) tua9001_set_params() argument
86 struct tua9001_dev *dev = fe->tuner_priv; tua9001_set_params()
88 struct dtv_frontend_properties *c = &fe->dtv_property_cache; tua9001_set_params()
127 if (fe->callback) { tua9001_set_params()
128 ret = fe->callback(client->adapter, tua9001_set_params()
141 if (fe->callback) { tua9001_set_params()
142 ret = fe->callback(client->adapter, tua9001_set_params()
154 static int tua9001_get_if_frequency(struct dvb_frontend *fe, u32 *frequency) tua9001_get_if_frequency() argument
156 struct tua9001_dev *dev = fe->tuner_priv; tua9001_get_if_frequency()
184 struct dvb_frontend *fe = pdata->dvb_frontend; tua9001_probe() local
197 dev->fe = pdata->dvb_frontend; tua9001_probe()
205 if (fe->callback) { tua9001_probe()
206 ret = fe->callback(client->adapter, tua9001_probe()
212 ret = fe->callback(client->adapter, tua9001_probe()
218 ret = fe->callback(client->adapter, tua9001_probe()
225 fe->tuner_priv = dev; tua9001_probe()
226 memcpy(&fe->ops.tuner_ops, &tua9001_tuner_ops, tua9001_probe()
242 struct dvb_frontend *fe = dev->fe; tua9001_remove() local
247 if (fe->callback) { tua9001_remove()
248 ret = fe->callback(client->adapter, tua9001_remove()
H A Dmc44s803.c83 static int mc44s803_release(struct dvb_frontend *fe) mc44s803_release() argument
85 struct mc44s803_priv *priv = fe->tuner_priv; mc44s803_release()
87 fe->tuner_priv = NULL; mc44s803_release()
93 static int mc44s803_init(struct dvb_frontend *fe) mc44s803_init() argument
95 struct mc44s803_priv *priv = fe->tuner_priv; mc44s803_init()
99 if (fe->ops.i2c_gate_ctrl) mc44s803_init()
100 fe->ops.i2c_gate_ctrl(fe, 1); mc44s803_init()
205 if (fe->ops.i2c_gate_ctrl) mc44s803_init()
206 fe->ops.i2c_gate_ctrl(fe, 0); mc44s803_init()
210 if (fe->ops.i2c_gate_ctrl) mc44s803_init()
211 fe->ops.i2c_gate_ctrl(fe, 0); mc44s803_init()
217 static int mc44s803_set_params(struct dvb_frontend *fe) mc44s803_set_params() argument
219 struct mc44s803_priv *priv = fe->tuner_priv; mc44s803_set_params()
220 struct dtv_frontend_properties *c = &fe->dtv_property_cache; mc44s803_set_params()
237 if (fe->ops.i2c_gate_ctrl) mc44s803_set_params()
238 fe->ops.i2c_gate_ctrl(fe, 1); mc44s803_set_params()
281 if (fe->ops.i2c_gate_ctrl) mc44s803_set_params()
282 fe->ops.i2c_gate_ctrl(fe, 0); mc44s803_set_params()
287 if (fe->ops.i2c_gate_ctrl) mc44s803_set_params()
288 fe->ops.i2c_gate_ctrl(fe, 0); mc44s803_set_params()
294 static int mc44s803_get_frequency(struct dvb_frontend *fe, u32 *frequency) mc44s803_get_frequency() argument
296 struct mc44s803_priv *priv = fe->tuner_priv; mc44s803_get_frequency()
301 static int mc44s803_get_if_frequency(struct dvb_frontend *fe, u32 *frequency) mc44s803_get_if_frequency() argument
324 struct dvb_frontend *mc44s803_attach(struct dvb_frontend *fe, mc44s803_attach() argument
340 priv->fe = fe; mc44s803_attach()
342 if (fe->ops.i2c_gate_ctrl) mc44s803_attach()
343 fe->ops.i2c_gate_ctrl(fe, 1); /* open i2c_gate */ mc44s803_attach()
358 memcpy(&fe->ops.tuner_ops, &mc44s803_tuner_ops, mc44s803_attach()
361 fe->tuner_priv = priv; mc44s803_attach()
363 if (fe->ops.i2c_gate_ctrl) mc44s803_attach()
364 fe->ops.i2c_gate_ctrl(fe, 0); /* close i2c_gate */ mc44s803_attach()
366 return fe; mc44s803_attach()
369 if (fe->ops.i2c_gate_ctrl) mc44s803_attach()
370 fe->ops.i2c_gate_ctrl(fe, 0); /* close i2c_gate */ mc44s803_attach()
H A Dtda827x.c50 static void tda827x_set_std(struct dvb_frontend *fe, tda827x_set_std() argument
53 struct tda827x_priv *priv = fe->tuner_priv; tda827x_set_std()
136 static int tuner_transfer(struct dvb_frontend *fe, tuner_transfer() argument
141 struct tda827x_priv *priv = fe->tuner_priv; tuner_transfer()
143 if (fe->ops.i2c_gate_ctrl) tuner_transfer()
144 fe->ops.i2c_gate_ctrl(fe, 1); tuner_transfer()
146 if (fe->ops.i2c_gate_ctrl) tuner_transfer()
147 fe->ops.i2c_gate_ctrl(fe, 0); tuner_transfer()
155 static int tda827xo_set_params(struct dvb_frontend *fe) tda827xo_set_params() argument
157 struct dtv_frontend_properties *c = &fe->dtv_property_cache; tda827xo_set_params()
158 struct tda827x_priv *priv = fe->tuner_priv; tda827xo_set_params()
207 rc = tuner_transfer(fe, &msg, 1); tda827xo_set_params()
217 rc = tuner_transfer(fe, &msg, 1); tda827xo_set_params()
232 static int tda827xo_sleep(struct dvb_frontend *fe) tda827xo_sleep() argument
234 struct tda827x_priv *priv = fe->tuner_priv; tda827xo_sleep()
240 tuner_transfer(fe, &msg, 1); tda827xo_sleep()
243 priv->cfg->sleep(fe); tda827xo_sleep()
250 static int tda827xo_set_analog_params(struct dvb_frontend *fe, tda827xo_set_analog_params() argument
257 struct tda827x_priv *priv = fe->tuner_priv; tda827xo_set_analog_params()
261 tda827x_set_std(fe, params); tda827xo_set_analog_params()
290 tuner_transfer(fe, &msg, 1); tda827xo_set_analog_params()
296 tuner_transfer(fe, &msg, 1); tda827xo_set_analog_params()
300 tuner_transfer(fe, &msg, 1); tda827xo_set_analog_params()
304 tuner_transfer(fe, &msg, 1); tda827xo_set_analog_params()
309 tuner_transfer(fe, &msg, 1); tda827xo_set_analog_params()
314 tuner_transfer(fe, &msg, 1); tda827xo_set_analog_params()
319 tuner_transfer(fe, &msg, 1); tda827xo_set_analog_params()
323 tuner_transfer(fe, &msg, 1); tda827xo_set_analog_params()
327 tuner_transfer(fe, &msg, 1); tda827xo_set_analog_params()
334 static void tda827xo_agcf(struct dvb_frontend *fe) tda827xo_agcf() argument
336 struct tda827x_priv *priv = fe->tuner_priv; tda827xo_agcf()
341 tuner_transfer(fe, &msg, 1); tda827xo_agcf()
444 static int tda827xa_sleep(struct dvb_frontend *fe) tda827xa_sleep() argument
446 struct tda827x_priv *priv = fe->tuner_priv; tda827xa_sleep()
453 tuner_transfer(fe, &msg, 1); tda827xa_sleep()
456 priv->cfg->sleep(fe); tda827xa_sleep()
461 static void tda827xa_lna_gain(struct dvb_frontend *fe, int high, tda827xa_lna_gain() argument
464 struct tda827x_priv *priv = fe->tuner_priv; tda827xa_lna_gain()
497 if (fe->callback) tda827xa_lna_gain()
498 fe->callback(priv->i2c_adap->algo_data, tda827xa_lna_gain()
504 tuner_transfer(fe, &msg, 1); tda827xa_lna_gain()
507 if (fe->callback) tda827xa_lna_gain()
508 fe->callback(priv->i2c_adap->algo_data, tda827xa_lna_gain()
514 static int tda827xa_set_params(struct dvb_frontend *fe) tda827xa_set_params() argument
516 struct dtv_frontend_properties *c = &fe->dtv_property_cache; tda827xa_set_params()
517 struct tda827x_priv *priv = fe->tuner_priv; tda827xa_set_params()
529 tda827xa_lna_gain(fe, 1, NULL); tda827xa_set_params()
576 rc = tuner_transfer(fe, &msg, 1); tda827xa_set_params()
586 rc = tuner_transfer(fe, &msg, 1); tda827xa_set_params()
593 rc = tuner_transfer(fe, &msg, 1); tda827xa_set_params()
599 rc = tuner_transfer(fe, &msg, 1); tda827xa_set_params()
607 tda827xa_lna_gain(fe, 0, NULL); tda827xa_set_params()
610 rc = tuner_transfer(fe, &msg, 1); tda827xa_set_params()
617 rc = tuner_transfer(fe, &msg, 1); tda827xa_set_params()
623 rc = tuner_transfer(fe, &msg, 1); tda827xa_set_params()
630 rc = tuner_transfer(fe, &msg, 1); tda827xa_set_params()
637 rc = tuner_transfer(fe, &msg, 1); tda827xa_set_params()
645 rc = tuner_transfer(fe, &msg, 1); tda827xa_set_params()
661 static int tda827xa_set_analog_params(struct dvb_frontend *fe, tda827xa_set_analog_params() argument
667 struct tda827x_priv *priv = fe->tuner_priv; tda827xa_set_analog_params()
672 tda827x_set_std(fe, params); tda827xa_set_analog_params()
674 tda827xa_lna_gain(fe, 1, params); tda827xa_set_analog_params()
705 tuner_transfer(fe, &msg, 1); tda827xa_set_analog_params()
713 tuner_transfer(fe, &msg, 1); tda827xa_set_analog_params()
718 tuner_transfer(fe, &msg, 1); tda827xa_set_analog_params()
722 tuner_transfer(fe, &msg, 1); tda827xa_set_analog_params()
725 tuner_transfer(fe, &msg, 1); tda827xa_set_analog_params()
730 tda827xa_lna_gain(fe, 0, params); tda827xa_set_analog_params()
735 tuner_transfer(fe, &msg, 1); tda827xa_set_analog_params()
740 tuner_transfer(fe, &msg, 1); tda827xa_set_analog_params()
744 tuner_transfer(fe, &msg, 1); tda827xa_set_analog_params()
748 tuner_transfer(fe, &msg, 1); tda827xa_set_analog_params()
752 tuner_transfer(fe, &msg, 1); tda827xa_set_analog_params()
759 static void tda827xa_agcf(struct dvb_frontend *fe) tda827xa_agcf() argument
761 struct tda827x_priv *priv = fe->tuner_priv; tda827xa_agcf()
765 tuner_transfer(fe, &msg, 1); tda827xa_agcf()
770 static int tda827x_release(struct dvb_frontend *fe) tda827x_release() argument
772 kfree(fe->tuner_priv); tda827x_release()
773 fe->tuner_priv = NULL; tda827x_release()
777 static int tda827x_get_frequency(struct dvb_frontend *fe, u32 *frequency) tda827x_get_frequency() argument
779 struct tda827x_priv *priv = fe->tuner_priv; tda827x_get_frequency()
784 static int tda827x_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth) tda827x_get_bandwidth() argument
786 struct tda827x_priv *priv = fe->tuner_priv; tda827x_get_bandwidth()
791 static int tda827x_init(struct dvb_frontend *fe) tda827x_init() argument
793 struct tda827x_priv *priv = fe->tuner_priv; tda827x_init()
796 priv->cfg->init(fe); tda827x_init()
801 static int tda827x_probe_version(struct dvb_frontend *fe);
803 static int tda827x_initial_init(struct dvb_frontend *fe) tda827x_initial_init() argument
806 ret = tda827x_probe_version(fe); tda827x_initial_init()
809 return fe->ops.tuner_ops.init(fe); tda827x_initial_init()
812 static int tda827x_initial_sleep(struct dvb_frontend *fe) tda827x_initial_sleep() argument
815 ret = tda827x_probe_version(fe); tda827x_initial_sleep()
818 return fe->ops.tuner_ops.sleep(fe); tda827x_initial_sleep()
853 static int tda827x_probe_version(struct dvb_frontend *fe) tda827x_probe_version() argument
857 struct tda827x_priv *priv = fe->tuner_priv; tda827x_probe_version()
861 rc = tuner_transfer(fe, &msg, 1); tda827x_probe_version()
870 fe->ops.tuner_ops.init = tda827x_init; tda827x_probe_version()
871 fe->ops.tuner_ops.sleep = tda827xo_sleep; tda827x_probe_version()
876 memcpy(&fe->ops.tuner_ops, &tda827xa_tuner_ops, sizeof(struct dvb_tuner_ops)); tda827x_probe_version()
883 struct dvb_frontend *tda827x_attach(struct dvb_frontend *fe, int addr, tda827x_attach() argument
897 memcpy(&fe->ops.tuner_ops, &tda827xo_tuner_ops, sizeof(struct dvb_tuner_ops)); tda827x_attach()
898 fe->tuner_priv = priv; tda827x_attach()
900 dprintk("type set to %s\n", fe->ops.tuner_ops.info.name); tda827x_attach()
902 return fe; tda827x_attach()
H A Dtda18218.c124 static int tda18218_set_params(struct dvb_frontend *fe) tda18218_set_params() argument
126 struct tda18218_priv *priv = fe->tuner_priv; tda18218_set_params()
127 struct dtv_frontend_properties *c = &fe->dtv_property_cache; tda18218_set_params()
150 if (fe->ops.i2c_gate_ctrl) tda18218_set_params()
151 fe->ops.i2c_gate_ctrl(fe, 1); /* open I2C-gate */ tda18218_set_params()
210 if (fe->ops.i2c_gate_ctrl) tda18218_set_params()
211 fe->ops.i2c_gate_ctrl(fe, 0); /* close I2C-gate */ tda18218_set_params()
219 static int tda18218_get_if_frequency(struct dvb_frontend *fe, u32 *frequency) tda18218_get_if_frequency() argument
221 struct tda18218_priv *priv = fe->tuner_priv; tda18218_get_if_frequency()
227 static int tda18218_sleep(struct dvb_frontend *fe) tda18218_sleep() argument
229 struct tda18218_priv *priv = fe->tuner_priv; tda18218_sleep()
232 if (fe->ops.i2c_gate_ctrl) tda18218_sleep()
233 fe->ops.i2c_gate_ctrl(fe, 1); /* open I2C-gate */ tda18218_sleep()
238 if (fe->ops.i2c_gate_ctrl) tda18218_sleep()
239 fe->ops.i2c_gate_ctrl(fe, 0); /* close I2C-gate */ tda18218_sleep()
247 static int tda18218_init(struct dvb_frontend *fe) tda18218_init() argument
249 struct tda18218_priv *priv = fe->tuner_priv; tda18218_init()
254 if (fe->ops.i2c_gate_ctrl) tda18218_init()
255 fe->ops.i2c_gate_ctrl(fe, 1); /* open I2C-gate */ tda18218_init()
259 if (fe->ops.i2c_gate_ctrl) tda18218_init()
260 fe->ops.i2c_gate_ctrl(fe, 0); /* close I2C-gate */ tda18218_init()
268 static int tda18218_release(struct dvb_frontend *fe) tda18218_release() argument
270 kfree(fe->tuner_priv); tda18218_release()
271 fe->tuner_priv = NULL; tda18218_release()
293 struct dvb_frontend *tda18218_attach(struct dvb_frontend *fe, tda18218_attach() argument
315 fe->tuner_priv = priv; tda18218_attach()
317 if (fe->ops.i2c_gate_ctrl) tda18218_attach()
318 fe->ops.i2c_gate_ctrl(fe, 1); /* open I2C-gate */ tda18218_attach()
333 memcpy(&fe->ops.tuner_ops, &tda18218_tuner_ops, tda18218_attach()
348 if (fe->ops.i2c_gate_ctrl) tda18218_attach()
349 fe->ops.i2c_gate_ctrl(fe, 0); /* close I2C-gate */ tda18218_attach()
351 return fe; tda18218_attach()
H A Dmax2165.c263 static int max2165_set_params(struct dvb_frontend *fe) max2165_set_params() argument
265 struct max2165_priv *priv = fe->tuner_priv; max2165_set_params()
266 struct dtv_frontend_properties *c = &fe->dtv_property_cache; max2165_set_params()
282 if (fe->ops.i2c_gate_ctrl) max2165_set_params()
283 fe->ops.i2c_gate_ctrl(fe, 1); max2165_set_params()
288 if (fe->ops.i2c_gate_ctrl) max2165_set_params()
289 fe->ops.i2c_gate_ctrl(fe, 0); max2165_set_params()
297 static int max2165_get_frequency(struct dvb_frontend *fe, u32 *freq) max2165_get_frequency() argument
299 struct max2165_priv *priv = fe->tuner_priv; max2165_get_frequency()
305 static int max2165_get_bandwidth(struct dvb_frontend *fe, u32 *bw) max2165_get_bandwidth() argument
307 struct max2165_priv *priv = fe->tuner_priv; max2165_get_bandwidth()
314 static int max2165_get_status(struct dvb_frontend *fe, u32 *status) max2165_get_status() argument
316 struct max2165_priv *priv = fe->tuner_priv; max2165_get_status()
321 if (fe->ops.i2c_gate_ctrl) max2165_get_status()
322 fe->ops.i2c_gate_ctrl(fe, 1); max2165_get_status()
327 if (fe->ops.i2c_gate_ctrl) max2165_get_status()
328 fe->ops.i2c_gate_ctrl(fe, 0); max2165_get_status()
333 static int max2165_sleep(struct dvb_frontend *fe) max2165_sleep() argument
339 static int max2165_init(struct dvb_frontend *fe) max2165_init() argument
341 struct max2165_priv *priv = fe->tuner_priv; max2165_init()
344 if (fe->ops.i2c_gate_ctrl) max2165_init()
345 fe->ops.i2c_gate_ctrl(fe, 1); max2165_init()
367 if (fe->ops.i2c_gate_ctrl) max2165_init()
368 fe->ops.i2c_gate_ctrl(fe, 0); max2165_init()
373 static int max2165_release(struct dvb_frontend *fe) max2165_release() argument
375 struct max2165_priv *priv = fe->tuner_priv; max2165_release()
379 fe->tuner_priv = NULL; max2165_release()
403 struct dvb_frontend *max2165_attach(struct dvb_frontend *fe, max2165_attach() argument
417 memcpy(&fe->ops.tuner_ops, &max2165_tuner_ops, max2165_attach()
422 fe->tuner_priv = priv; max2165_attach()
424 max2165_init(fe); max2165_attach()
427 return fe; max2165_attach()
H A Dfc0012.c58 static int fc0012_release(struct dvb_frontend *fe) fc0012_release() argument
60 kfree(fe->tuner_priv); fc0012_release()
61 fe->tuner_priv = NULL; fc0012_release()
65 static int fc0012_init(struct dvb_frontend *fe) fc0012_init() argument
67 struct fc0012_priv *priv = fe->tuner_priv; fc0012_init()
113 if (fe->ops.i2c_gate_ctrl) fc0012_init()
114 fe->ops.i2c_gate_ctrl(fe, 1); /* open I2C-gate */ fc0012_init()
122 if (fe->ops.i2c_gate_ctrl) fc0012_init()
123 fe->ops.i2c_gate_ctrl(fe, 0); /* close I2C-gate */ fc0012_init()
132 static int fc0012_set_params(struct dvb_frontend *fe) fc0012_set_params() argument
134 struct fc0012_priv *priv = fe->tuner_priv; fc0012_set_params()
136 struct dtv_frontend_properties *p = &fe->dtv_property_cache; fc0012_set_params()
144 if (fe->callback) { fc0012_set_params()
145 ret = fe->callback(priv->i2c, DVB_FRONTEND_COMPONENT_TUNER, fc0012_set_params()
271 if (fe->ops.i2c_gate_ctrl) fc0012_set_params()
272 fe->ops.i2c_gate_ctrl(fe, 1); /* open I2C-gate */ fc0012_set_params()
323 if (fe->ops.i2c_gate_ctrl) fc0012_set_params()
324 fe->ops.i2c_gate_ctrl(fe, 0); /* close I2C-gate */ fc0012_set_params()
331 static int fc0012_get_frequency(struct dvb_frontend *fe, u32 *frequency) fc0012_get_frequency() argument
333 struct fc0012_priv *priv = fe->tuner_priv; fc0012_get_frequency()
338 static int fc0012_get_if_frequency(struct dvb_frontend *fe, u32 *frequency) fc0012_get_if_frequency() argument
344 static int fc0012_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth) fc0012_get_bandwidth() argument
346 struct fc0012_priv *priv = fe->tuner_priv; fc0012_get_bandwidth()
353 static int fc0012_get_rf_strength(struct dvb_frontend *fe, u16 *strength) fc0012_get_rf_strength() argument
355 struct fc0012_priv *priv = fe->tuner_priv; fc0012_get_rf_strength()
371 if (fe->ops.i2c_gate_ctrl) fc0012_get_rf_strength()
372 fe->ops.i2c_gate_ctrl(fe, 1); /* open I2C-gate */ fc0012_get_rf_strength()
388 if (fe->ops.i2c_gate_ctrl) fc0012_get_rf_strength()
389 fe->ops.i2c_gate_ctrl(fe, 0); /* close I2C-gate */ fc0012_get_rf_strength()
412 if (fe->ops.i2c_gate_ctrl) fc0012_get_rf_strength()
413 fe->ops.i2c_gate_ctrl(fe, 0); /* close I2C-gate */ fc0012_get_rf_strength()
443 struct dvb_frontend *fc0012_attach(struct dvb_frontend *fe, fc0012_attach() argument
450 if (fe->ops.i2c_gate_ctrl) fc0012_attach()
451 fe->ops.i2c_gate_ctrl(fe, 1); fc0012_attach()
497 fe->tuner_priv = priv; fc0012_attach()
498 memcpy(&fe->ops.tuner_ops, &fc0012_tuner_ops, fc0012_attach()
502 if (fe->ops.i2c_gate_ctrl) fc0012_attach()
503 fe->ops.i2c_gate_ctrl(fe, 0); fc0012_attach()
511 return fe; fc0012_attach()
H A Dtda18271-common.c23 static int tda18271_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) tda18271_i2c_gate_ctrl() argument
25 struct tda18271_priv *priv = fe->tuner_priv; tda18271_i2c_gate_ctrl()
49 if (fe->ops.analog_ops.i2c_gate_ctrl) tda18271_i2c_gate_ctrl()
50 ret = fe->ops.analog_ops.i2c_gate_ctrl(fe, enable); tda18271_i2c_gate_ctrl()
53 if (fe->ops.i2c_gate_ctrl) tda18271_i2c_gate_ctrl()
54 ret = fe->ops.i2c_gate_ctrl(fe, enable); tda18271_i2c_gate_ctrl()
66 static void tda18271_dump_regs(struct dvb_frontend *fe, int extended) tda18271_dump_regs() argument
68 struct tda18271_priv *priv = fe->tuner_priv; tda18271_dump_regs()
121 int tda18271_read_regs(struct dvb_frontend *fe) tda18271_read_regs() argument
123 struct tda18271_priv *priv = fe->tuner_priv; tda18271_read_regs()
134 tda18271_i2c_gate_ctrl(fe, 1); tda18271_read_regs()
139 tda18271_i2c_gate_ctrl(fe, 0); tda18271_read_regs()
145 tda18271_dump_regs(fe, 0); tda18271_read_regs()
150 int tda18271_read_extended(struct dvb_frontend *fe) tda18271_read_extended() argument
152 struct tda18271_priv *priv = fe->tuner_priv; tda18271_read_extended()
164 tda18271_i2c_gate_ctrl(fe, 1); tda18271_read_extended()
169 tda18271_i2c_gate_ctrl(fe, 0); tda18271_read_extended()
185 tda18271_dump_regs(fe, 1); tda18271_read_extended()
190 static int __tda18271_write_regs(struct dvb_frontend *fe, int idx, int len, __tda18271_write_regs() argument
193 struct tda18271_priv *priv = fe->tuner_priv; __tda18271_write_regs()
227 tda18271_i2c_gate_ctrl(fe, 1); __tda18271_write_regs()
250 tda18271_i2c_gate_ctrl(fe, 0); __tda18271_write_regs()
260 int tda18271_write_regs(struct dvb_frontend *fe, int idx, int len) tda18271_write_regs() argument
262 return __tda18271_write_regs(fe, idx, len, true); tda18271_write_regs()
267 static int __tda18271_charge_pump_source(struct dvb_frontend *fe, __tda18271_charge_pump_source() argument
271 struct tda18271_priv *priv = fe->tuner_priv; __tda18271_charge_pump_source()
279 return __tda18271_write_regs(fe, r_cp, 1, lock_i2c); __tda18271_charge_pump_source()
282 int tda18271_charge_pump_source(struct dvb_frontend *fe, tda18271_charge_pump_source() argument
285 return __tda18271_charge_pump_source(fe, pll, force, true); tda18271_charge_pump_source()
289 int tda18271_init_regs(struct dvb_frontend *fe) tda18271_init_regs() argument
291 struct tda18271_priv *priv = fe->tuner_priv; tda18271_init_regs()
302 tda18271_i2c_gate_ctrl(fe, 1); tda18271_init_regs()
390 __tda18271_write_regs(fe, 0x00, TDA18271_NUM_REGS, false); tda18271_init_regs()
394 __tda18271_write_regs(fe, R_EB17, 1, false); tda18271_init_regs()
396 __tda18271_write_regs(fe, R_EB17, 1, false); tda18271_init_regs()
398 __tda18271_write_regs(fe, R_EB17, 1, false); tda18271_init_regs()
400 __tda18271_write_regs(fe, R_EB17, 1, false); tda18271_init_regs()
405 __tda18271_write_regs(fe, R_EB20, 1, false); tda18271_init_regs()
407 __tda18271_write_regs(fe, R_EB20, 1, false); tda18271_init_regs()
409 __tda18271_write_regs(fe, R_EB20, 1, false); tda18271_init_regs()
411 __tda18271_write_regs(fe, R_EB20, 1, false); tda18271_init_regs()
429 __tda18271_write_regs(fe, R_EP3, 11, false); tda18271_init_regs()
433 __tda18271_charge_pump_source(fe, TDA18271_MAIN_PLL, 1, false); tda18271_init_regs()
437 __tda18271_charge_pump_source(fe, TDA18271_MAIN_PLL, 0, false); tda18271_init_regs()
443 __tda18271_write_regs(fe, R_EP1, 1, false); tda18271_init_regs()
451 __tda18271_write_regs(fe, R_EP3, 7, false); tda18271_init_regs()
455 __tda18271_write_regs(fe, R_EP2, 1, false); tda18271_init_regs()
466 __tda18271_write_regs(fe, R_EP3, 11, false); tda18271_init_regs()
470 __tda18271_write_regs(fe, R_EP1, 1, false); tda18271_init_regs()
478 __tda18271_write_regs(fe, R_EP3, 7, false); tda18271_init_regs()
482 __tda18271_write_regs(fe, R_EP2, 1, false); tda18271_init_regs()
494 __tda18271_write_regs(fe, R_EP3, 11, false); tda18271_init_regs()
498 __tda18271_write_regs(fe, R_EP1, 1, false); tda18271_init_regs()
505 __tda18271_write_regs(fe, R_EP3, 7, false); tda18271_init_regs()
509 __tda18271_write_regs(fe, R_EP2, 1, false); tda18271_init_regs()
514 __tda18271_write_regs(fe, R_EP4, 1, false); tda18271_init_regs()
517 __tda18271_write_regs(fe, R_EP1, 1, false); tda18271_init_regs()
520 tda18271_i2c_gate_ctrl(fe, 0); tda18271_init_regs()
543 int tda18271_set_standby_mode(struct dvb_frontend *fe, tda18271_set_standby_mode() argument
546 struct tda18271_priv *priv = fe->tuner_priv; tda18271_set_standby_mode()
557 return tda18271_write_regs(fe, R_EP3, 1); tda18271_set_standby_mode()
562 int tda18271_calc_main_pll(struct dvb_frontend *fe, u32 freq) tda18271_calc_main_pll() argument
565 struct tda18271_priv *priv = fe->tuner_priv; tda18271_calc_main_pll()
570 int ret = tda18271_lookup_pll_map(fe, MAIN_PLL, &freq, &pd, &d); tda18271_calc_main_pll()
585 int tda18271_calc_cal_pll(struct dvb_frontend *fe, u32 freq) tda18271_calc_cal_pll() argument
588 struct tda18271_priv *priv = fe->tuner_priv; tda18271_calc_cal_pll()
593 int ret = tda18271_lookup_pll_map(fe, CAL_PLL, &freq, &pd, &d); tda18271_calc_cal_pll()
610 int tda18271_calc_bp_filter(struct dvb_frontend *fe, u32 *freq) tda18271_calc_bp_filter() argument
613 struct tda18271_priv *priv = fe->tuner_priv; tda18271_calc_bp_filter()
617 int ret = tda18271_lookup_map(fe, BP_FILTER, freq, &val); tda18271_calc_bp_filter()
627 int tda18271_calc_km(struct dvb_frontend *fe, u32 *freq) tda18271_calc_km() argument
630 struct tda18271_priv *priv = fe->tuner_priv; tda18271_calc_km()
634 int ret = tda18271_lookup_map(fe, RF_CAL_KMCO, freq, &val); tda18271_calc_km()
644 int tda18271_calc_rf_band(struct dvb_frontend *fe, u32 *freq) tda18271_calc_rf_band() argument
647 struct tda18271_priv *priv = fe->tuner_priv; tda18271_calc_rf_band()
651 int ret = tda18271_lookup_map(fe, RF_BAND, freq, &val); tda18271_calc_rf_band()
661 int tda18271_calc_gain_taper(struct dvb_frontend *fe, u32 *freq) tda18271_calc_gain_taper() argument
664 struct tda18271_priv *priv = fe->tuner_priv; tda18271_calc_gain_taper()
668 int ret = tda18271_lookup_map(fe, GAIN_TAPER, freq, &val); tda18271_calc_gain_taper()
678 int tda18271_calc_ir_measure(struct dvb_frontend *fe, u32 *freq) tda18271_calc_ir_measure() argument
681 struct tda18271_priv *priv = fe->tuner_priv; tda18271_calc_ir_measure()
685 int ret = tda18271_lookup_map(fe, IR_MEASURE, freq, &val); tda18271_calc_ir_measure()
695 int tda18271_calc_rf_cal(struct dvb_frontend *fe, u32 *freq) tda18271_calc_rf_cal() argument
698 struct tda18271_priv *priv = fe->tuner_priv; tda18271_calc_rf_cal()
702 int ret = tda18271_lookup_map(fe, RF_CAL, freq, &val); tda18271_calc_rf_cal()
H A Dfc0013.c55 static int fc0013_release(struct dvb_frontend *fe) fc0013_release() argument
57 kfree(fe->tuner_priv); fc0013_release()
58 fe->tuner_priv = NULL; fc0013_release()
62 static int fc0013_init(struct dvb_frontend *fe) fc0013_init() argument
64 struct fc0013_priv *priv = fe->tuner_priv; fc0013_init()
106 if (fe->ops.i2c_gate_ctrl) fc0013_init()
107 fe->ops.i2c_gate_ctrl(fe, 1); /* open I2C-gate */ fc0013_init()
115 if (fe->ops.i2c_gate_ctrl) fc0013_init()
116 fe->ops.i2c_gate_ctrl(fe, 0); /* close I2C-gate */ fc0013_init()
124 static int fc0013_sleep(struct dvb_frontend *fe) fc0013_sleep() argument
130 int fc0013_rc_cal_add(struct dvb_frontend *fe, int rc_val) fc0013_rc_cal_add() argument
132 struct fc0013_priv *priv = fe->tuner_priv; fc0013_rc_cal_add()
137 if (fe->ops.i2c_gate_ctrl) fc0013_rc_cal_add()
138 fe->ops.i2c_gate_ctrl(fe, 1); /* open I2C-gate */ fc0013_rc_cal_add()
168 if (fe->ops.i2c_gate_ctrl) fc0013_rc_cal_add()
169 fe->ops.i2c_gate_ctrl(fe, 0); /* close I2C-gate */ fc0013_rc_cal_add()
175 int fc0013_rc_cal_reset(struct dvb_frontend *fe) fc0013_rc_cal_reset() argument
177 struct fc0013_priv *priv = fe->tuner_priv; fc0013_rc_cal_reset()
180 if (fe->ops.i2c_gate_ctrl) fc0013_rc_cal_reset()
181 fe->ops.i2c_gate_ctrl(fe, 1); /* open I2C-gate */ fc0013_rc_cal_reset()
187 if (fe->ops.i2c_gate_ctrl) fc0013_rc_cal_reset()
188 fe->ops.i2c_gate_ctrl(fe, 0); /* close I2C-gate */ fc0013_rc_cal_reset()
224 static int fc0013_set_params(struct dvb_frontend *fe) fc0013_set_params() argument
226 struct fc0013_priv *priv = fe->tuner_priv; fc0013_set_params()
228 struct dtv_frontend_properties *p = &fe->dtv_property_cache; fc0013_set_params()
236 if (fe->callback) { fc0013_set_params()
237 ret = fe->callback(priv->i2c, DVB_FRONTEND_COMPONENT_TUNER, fc0013_set_params()
256 if (fe->ops.i2c_gate_ctrl) fc0013_set_params()
257 fe->ops.i2c_gate_ctrl(fe, 1); /* open I2C-gate */ fc0013_set_params()
483 if (fe->ops.i2c_gate_ctrl) fc0013_set_params()
484 fe->ops.i2c_gate_ctrl(fe, 0); /* close I2C-gate */ fc0013_set_params()
490 static int fc0013_get_frequency(struct dvb_frontend *fe, u32 *frequency) fc0013_get_frequency() argument
492 struct fc0013_priv *priv = fe->tuner_priv; fc0013_get_frequency()
497 static int fc0013_get_if_frequency(struct dvb_frontend *fe, u32 *frequency) fc0013_get_if_frequency() argument
504 static int fc0013_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth) fc0013_get_bandwidth() argument
506 struct fc0013_priv *priv = fe->tuner_priv; fc0013_get_bandwidth()
513 static int fc0013_get_rf_strength(struct dvb_frontend *fe, u16 *strength) fc0013_get_rf_strength() argument
515 struct fc0013_priv *priv = fe->tuner_priv; fc0013_get_rf_strength()
531 if (fe->ops.i2c_gate_ctrl) fc0013_get_rf_strength()
532 fe->ops.i2c_gate_ctrl(fe, 1); /* open I2C-gate */ fc0013_get_rf_strength()
548 if (fe->ops.i2c_gate_ctrl) fc0013_get_rf_strength()
549 fe->ops.i2c_gate_ctrl(fe, 0); /* close I2C-gate */ fc0013_get_rf_strength()
572 if (fe->ops.i2c_gate_ctrl) fc0013_get_rf_strength()
573 fe->ops.i2c_gate_ctrl(fe, 0); /* close I2C-gate */ fc0013_get_rf_strength()
603 struct dvb_frontend *fc0013_attach(struct dvb_frontend *fe, fc0013_attach() argument
620 fe->tuner_priv = priv; fc0013_attach()
622 memcpy(&fe->ops.tuner_ops, &fc0013_tuner_ops, fc0013_attach()
625 return fe; fc0013_attach()
H A Dmt20xx.c52 static int microtune_release(struct dvb_frontend *fe) microtune_release() argument
54 kfree(fe->tuner_priv); microtune_release()
55 fe->tuner_priv = NULL; microtune_release()
60 static int microtune_get_frequency(struct dvb_frontend *fe, u32 *frequency) microtune_get_frequency() argument
62 struct microtune_priv *priv = fe->tuner_priv; microtune_get_frequency()
68 static int mt2032_spurcheck(struct dvb_frontend *fe, mt2032_spurcheck() argument
71 struct microtune_priv *priv = fe->tuner_priv; mt2032_spurcheck()
99 static int mt2032_compute_freq(struct dvb_frontend *fe, mt2032_compute_freq() argument
108 struct microtune_priv *priv = fe->tuner_priv; mt2032_compute_freq()
159 mt2032_spurcheck(fe, lo1freq, desired_lo2, spectrum_from, spectrum_to); mt2032_compute_freq()
183 static int mt2032_check_lo_lock(struct dvb_frontend *fe) mt2032_check_lo_lock() argument
185 struct microtune_priv *priv = fe->tuner_priv; mt2032_check_lo_lock()
205 static int mt2032_optimize_vco(struct dvb_frontend *fe,int sel,int lock) mt2032_optimize_vco() argument
207 struct microtune_priv *priv = fe->tuner_priv; mt2032_optimize_vco()
237 lock=mt2032_check_lo_lock(fe); mt2032_optimize_vco()
242 static void mt2032_set_if_freq(struct dvb_frontend *fe, unsigned int rfin, mt2032_set_if_freq() argument
248 struct microtune_priv *priv = fe->tuner_priv; mt2032_set_if_freq()
258 ret=mt2032_compute_freq(fe,rfin,if1,if2,from,to,&buf[1],&sel,priv->xogc); mt2032_set_if_freq()
274 lock=mt2032_check_lo_lock(fe); mt2032_set_if_freq()
277 lock=mt2032_optimize_vco(fe,sel,lock); mt2032_set_if_freq()
300 static int mt2032_set_tv_freq(struct dvb_frontend *fe, mt2032_set_tv_freq() argument
318 mt2032_set_if_freq(fe, params->frequency*62500, mt2032_set_tv_freq()
324 static int mt2032_set_radio_freq(struct dvb_frontend *fe, mt2032_set_radio_freq() argument
327 struct microtune_priv *priv = fe->tuner_priv; mt2032_set_radio_freq()
339 mt2032_set_if_freq(fe, params->frequency * 125 / 2, mt2032_set_radio_freq()
345 static int mt2032_set_params(struct dvb_frontend *fe, mt2032_set_params() argument
348 struct microtune_priv *priv = fe->tuner_priv; mt2032_set_params()
353 ret = mt2032_set_radio_freq(fe, params); mt2032_set_params()
358 ret = mt2032_set_tv_freq(fe, params); mt2032_set_params()
373 static int mt2032_init(struct dvb_frontend *fe) mt2032_init() argument
375 struct microtune_priv *priv = fe->tuner_priv; mt2032_init()
424 memcpy(&fe->ops.tuner_ops, &mt2032_tuner_ops, sizeof(struct dvb_tuner_ops)); mt2032_init()
429 static void mt2050_set_antenna(struct dvb_frontend *fe, unsigned char antenna) mt2050_set_antenna() argument
431 struct microtune_priv *priv = fe->tuner_priv; mt2050_set_antenna()
440 static void mt2050_set_if_freq(struct dvb_frontend *fe,unsigned int freq, unsigned int if2) mt2050_set_if_freq() argument
442 struct microtune_priv *priv = fe->tuner_priv; mt2050_set_if_freq()
503 static int mt2050_set_tv_freq(struct dvb_frontend *fe, mt2050_set_tv_freq() argument
519 mt2050_set_if_freq(fe, params->frequency*62500, if2); mt2050_set_tv_freq()
520 mt2050_set_antenna(fe, tv_antenna); mt2050_set_tv_freq()
525 static int mt2050_set_radio_freq(struct dvb_frontend *fe, mt2050_set_radio_freq() argument
528 struct microtune_priv *priv = fe->tuner_priv; mt2050_set_radio_freq()
539 mt2050_set_if_freq(fe, params->frequency * 125 / 2, if2); mt2050_set_radio_freq()
540 mt2050_set_antenna(fe, radio_antenna); mt2050_set_radio_freq()
545 static int mt2050_set_params(struct dvb_frontend *fe, mt2050_set_params() argument
548 struct microtune_priv *priv = fe->tuner_priv; mt2050_set_params()
553 ret = mt2050_set_radio_freq(fe, params); mt2050_set_params()
558 ret = mt2050_set_tv_freq(fe, params); mt2050_set_params()
572 static int mt2050_init(struct dvb_frontend *fe) mt2050_init() argument
574 struct microtune_priv *priv = fe->tuner_priv; mt2050_init()
591 memcpy(&fe->ops.tuner_ops, &mt2050_tuner_ops, sizeof(struct dvb_tuner_ops)); mt2050_init()
596 struct dvb_frontend *microtune_attach(struct dvb_frontend *fe, microtune_attach() argument
608 fe->tuner_priv = priv; microtune_attach()
641 mt2032_init(fe); microtune_attach()
644 mt2050_init(fe); microtune_attach()
652 strlcpy(fe->ops.tuner_ops.info.name, name, microtune_attach()
653 sizeof(fe->ops.tuner_ops.info.name)); microtune_attach()
655 return fe; microtune_attach()
H A Dmt2063.h12 struct dvb_frontend *mt2063_attach(struct dvb_frontend *fe,
18 static inline struct dvb_frontend *mt2063_attach(struct dvb_frontend *fe, mt2063_attach() argument
H A Dmt2060.c156 static int mt2060_set_params(struct dvb_frontend *fe) mt2060_set_params() argument
158 struct dtv_frontend_properties *c = &fe->dtv_property_cache; mt2060_set_params()
168 priv = fe->tuner_priv; mt2060_set_params()
174 if (fe->ops.i2c_gate_ctrl) mt2060_set_params()
175 fe->ops.i2c_gate_ctrl(fe, 1); /* open i2c_gate */ mt2060_set_params()
239 if (fe->ops.i2c_gate_ctrl) mt2060_set_params()
240 fe->ops.i2c_gate_ctrl(fe, 0); /* close i2c_gate */ mt2060_set_params()
288 static int mt2060_get_frequency(struct dvb_frontend *fe, u32 *frequency) mt2060_get_frequency() argument
290 struct mt2060_priv *priv = fe->tuner_priv; mt2060_get_frequency()
295 static int mt2060_get_if_frequency(struct dvb_frontend *fe, u32 *frequency) mt2060_get_if_frequency() argument
301 static int mt2060_init(struct dvb_frontend *fe) mt2060_init() argument
303 struct mt2060_priv *priv = fe->tuner_priv; mt2060_init()
306 if (fe->ops.i2c_gate_ctrl) mt2060_init()
307 fe->ops.i2c_gate_ctrl(fe, 1); /* open i2c_gate */ mt2060_init()
312 if (fe->ops.i2c_gate_ctrl) mt2060_init()
313 fe->ops.i2c_gate_ctrl(fe, 0); /* close i2c_gate */ mt2060_init()
318 static int mt2060_sleep(struct dvb_frontend *fe) mt2060_sleep() argument
320 struct mt2060_priv *priv = fe->tuner_priv; mt2060_sleep()
323 if (fe->ops.i2c_gate_ctrl) mt2060_sleep()
324 fe->ops.i2c_gate_ctrl(fe, 1); /* open i2c_gate */ mt2060_sleep()
329 if (fe->ops.i2c_gate_ctrl) mt2060_sleep()
330 fe->ops.i2c_gate_ctrl(fe, 0); /* close i2c_gate */ mt2060_sleep()
335 static int mt2060_release(struct dvb_frontend *fe) mt2060_release() argument
337 kfree(fe->tuner_priv); mt2060_release()
338 fe->tuner_priv = NULL; mt2060_release()
361 struct dvb_frontend * mt2060_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct mt2060_config *cfg, u16 if1) mt2060_attach() argument
374 if (fe->ops.i2c_gate_ctrl) mt2060_attach()
375 fe->ops.i2c_gate_ctrl(fe, 1); /* open i2c_gate */ mt2060_attach()
387 memcpy(&fe->ops.tuner_ops, &mt2060_tuner_ops, sizeof(struct dvb_tuner_ops)); mt2060_attach()
389 fe->tuner_priv = priv; mt2060_attach()
393 if (fe->ops.i2c_gate_ctrl) mt2060_attach()
394 fe->ops.i2c_gate_ctrl(fe, 0); /* close i2c_gate */ mt2060_attach()
396 return fe; mt2060_attach()
H A Dtea5761.c139 static int __set_radio_freq(struct dvb_frontend *fe, __set_radio_freq() argument
143 struct tea5761_priv *priv = fe->tuner_priv; __set_radio_freq()
181 static int set_radio_freq(struct dvb_frontend *fe, set_radio_freq() argument
184 struct tea5761_priv *priv = fe->analog_demod_priv; set_radio_freq()
188 return __set_radio_freq(fe, params->frequency, set_radio_freq()
192 static int set_radio_sleep(struct dvb_frontend *fe) set_radio_sleep() argument
194 struct tea5761_priv *priv = fe->analog_demod_priv; set_radio_sleep()
198 return __set_radio_freq(fe, priv->frequency, false); set_radio_sleep()
201 static int tea5761_read_status(struct dvb_frontend *fe, char *buffer) tea5761_read_status() argument
203 struct tea5761_priv *priv = fe->tuner_priv; tea5761_read_status()
215 static inline int tea5761_signal(struct dvb_frontend *fe, const char *buffer) tea5761_signal() argument
217 struct tea5761_priv *priv = fe->tuner_priv; tea5761_signal()
226 static inline int tea5761_stereo(struct dvb_frontend *fe, const char *buffer) tea5761_stereo() argument
228 struct tea5761_priv *priv = fe->tuner_priv; tea5761_stereo()
237 static int tea5761_get_status(struct dvb_frontend *fe, u32 *status) tea5761_get_status() argument
243 if (0 == tea5761_read_status(fe, buffer)) { tea5761_get_status()
244 if (tea5761_signal(fe, buffer)) tea5761_get_status()
246 if (tea5761_stereo(fe, buffer)) tea5761_get_status()
253 static int tea5761_get_rf_strength(struct dvb_frontend *fe, u16 *strength) tea5761_get_rf_strength() argument
259 if (0 == tea5761_read_status(fe, buffer)) tea5761_get_rf_strength()
260 *strength = tea5761_signal(fe, buffer); tea5761_get_rf_strength()
289 static int tea5761_release(struct dvb_frontend *fe) tea5761_release() argument
291 kfree(fe->tuner_priv); tea5761_release()
292 fe->tuner_priv = NULL; tea5761_release()
297 static int tea5761_get_frequency(struct dvb_frontend *fe, u32 *frequency) tea5761_get_frequency() argument
299 struct tea5761_priv *priv = fe->tuner_priv; tea5761_get_frequency()
316 struct dvb_frontend *tea5761_attach(struct dvb_frontend *fe, tea5761_attach() argument
328 fe->tuner_priv = priv; tea5761_attach()
334 memcpy(&fe->ops.tuner_ops, &tea5761_tuner_ops, tea5761_attach()
339 return fe; tea5761_attach()
H A Dmxl5007t.c587 static int mxl5007t_get_status(struct dvb_frontend *fe, u32 *status) mxl5007t_get_status() argument
589 struct mxl5007t_state *state = fe->tuner_priv; mxl5007t_get_status()
594 if (fe->ops.i2c_gate_ctrl) mxl5007t_get_status()
595 fe->ops.i2c_gate_ctrl(fe, 1); mxl5007t_get_status()
606 if (fe->ops.i2c_gate_ctrl) mxl5007t_get_status()
607 fe->ops.i2c_gate_ctrl(fe, 0); mxl5007t_get_status()
614 static int mxl5007t_set_params(struct dvb_frontend *fe) mxl5007t_set_params() argument
616 struct dtv_frontend_properties *c = &fe->dtv_property_cache; mxl5007t_set_params()
618 struct mxl5007t_state *state = fe->tuner_priv; mxl5007t_set_params()
655 if (fe->ops.i2c_gate_ctrl) mxl5007t_set_params()
656 fe->ops.i2c_gate_ctrl(fe, 1); mxl5007t_set_params()
673 if (fe->ops.i2c_gate_ctrl) mxl5007t_set_params()
674 fe->ops.i2c_gate_ctrl(fe, 0); mxl5007t_set_params()
681 static int mxl5007t_init(struct dvb_frontend *fe) mxl5007t_init() argument
683 struct mxl5007t_state *state = fe->tuner_priv; mxl5007t_init()
686 if (fe->ops.i2c_gate_ctrl) mxl5007t_init()
687 fe->ops.i2c_gate_ctrl(fe, 1); mxl5007t_init()
693 if (fe->ops.i2c_gate_ctrl) mxl5007t_init()
694 fe->ops.i2c_gate_ctrl(fe, 0); mxl5007t_init()
699 static int mxl5007t_sleep(struct dvb_frontend *fe) mxl5007t_sleep() argument
701 struct mxl5007t_state *state = fe->tuner_priv; mxl5007t_sleep()
704 if (fe->ops.i2c_gate_ctrl) mxl5007t_sleep()
705 fe->ops.i2c_gate_ctrl(fe, 1); mxl5007t_sleep()
713 if (fe->ops.i2c_gate_ctrl) mxl5007t_sleep()
714 fe->ops.i2c_gate_ctrl(fe, 0); mxl5007t_sleep()
721 static int mxl5007t_get_frequency(struct dvb_frontend *fe, u32 *frequency) mxl5007t_get_frequency() argument
723 struct mxl5007t_state *state = fe->tuner_priv; mxl5007t_get_frequency()
728 static int mxl5007t_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth) mxl5007t_get_bandwidth() argument
730 struct mxl5007t_state *state = fe->tuner_priv; mxl5007t_get_bandwidth()
735 static int mxl5007t_get_if_frequency(struct dvb_frontend *fe, u32 *frequency) mxl5007t_get_if_frequency() argument
737 struct mxl5007t_state *state = fe->tuner_priv; mxl5007t_get_if_frequency()
779 static int mxl5007t_release(struct dvb_frontend *fe) mxl5007t_release() argument
781 struct mxl5007t_state *state = fe->tuner_priv; mxl5007t_release()
790 fe->tuner_priv = NULL; mxl5007t_release()
862 struct dvb_frontend *mxl5007t_attach(struct dvb_frontend *fe, mxl5007t_attach() argument
882 if (fe->ops.i2c_gate_ctrl) mxl5007t_attach()
883 fe->ops.i2c_gate_ctrl(fe, 1); mxl5007t_attach()
887 if (fe->ops.i2c_gate_ctrl) mxl5007t_attach()
888 fe->ops.i2c_gate_ctrl(fe, 0); mxl5007t_attach()
899 if (fe->ops.i2c_gate_ctrl) mxl5007t_attach()
900 fe->ops.i2c_gate_ctrl(fe, 1); mxl5007t_attach()
904 if (fe->ops.i2c_gate_ctrl) mxl5007t_attach()
905 fe->ops.i2c_gate_ctrl(fe, 0); mxl5007t_attach()
910 if (fe->ops.i2c_gate_ctrl) mxl5007t_attach()
911 fe->ops.i2c_gate_ctrl(fe, 1); mxl5007t_attach()
916 if (fe->ops.i2c_gate_ctrl) mxl5007t_attach()
917 fe->ops.i2c_gate_ctrl(fe, 0); mxl5007t_attach()
922 fe->tuner_priv = state; mxl5007t_attach()
926 memcpy(&fe->ops.tuner_ops, &mxl5007t_tuner_ops, mxl5007t_attach()
929 return fe; mxl5007t_attach()
933 mxl5007t_release(fe); mxl5007t_attach()
H A Dmxl301rf.c77 static int mxl301rf_get_rf_strength(struct dvb_frontend *fe, u16 *out) mxl301rf_get_rf_strength() argument
86 rssi = &fe->dtv_property_cache.strength; mxl301rf_get_rf_strength()
91 state = fe->tuner_priv; mxl301rf_get_rf_strength()
162 static int mxl301rf_set_params(struct dvb_frontend *fe) mxl301rf_set_params() argument
186 state = fe->tuner_priv; mxl301rf_set_params()
187 freq = fe->dtv_property_cache.frequency; mxl301rf_set_params()
233 dev_warn(&state->i2c->dev, "(%s) failed. [adap%d-fe%d]\n", mxl301rf_set_params()
234 __func__, fe->dvb->num, fe->id); mxl301rf_set_params()
243 static int mxl301rf_sleep(struct dvb_frontend *fe) mxl301rf_sleep() argument
248 state = fe->tuner_priv; mxl301rf_sleep()
251 dev_warn(&state->i2c->dev, "(%s) failed. [adap%d-fe%d]\n", mxl301rf_sleep()
252 __func__, fe->dvb->num, fe->id); mxl301rf_sleep()
261 static int mxl301rf_init(struct dvb_frontend *fe) mxl301rf_init() argument
266 state = fe->tuner_priv; mxl301rf_init()
270 dev_warn(&state->i2c->dev, "(%s) failed. [adap%d-fe%d]\n", mxl301rf_init()
271 __func__, fe->dvb->num, fe->id); mxl301rf_init()
300 struct dvb_frontend *fe; mxl301rf_probe() local
310 fe = cfg->fe; mxl301rf_probe()
311 fe->tuner_priv = state; mxl301rf_probe()
312 memcpy(&fe->ops.tuner_ops, &mxl301rf_ops, sizeof(mxl301rf_ops)); mxl301rf_probe()
324 state->cfg.fe->tuner_priv = NULL; mxl301rf_remove()
H A Dtda18212.c32 static int tda18212_set_params(struct dvb_frontend *fe) tda18212_set_params() argument
34 struct tda18212_dev *dev = fe->tuner_priv; tda18212_set_params()
35 struct dtv_frontend_properties *c = &fe->dtv_property_cache; tda18212_set_params()
68 if (fe->ops.i2c_gate_ctrl) tda18212_set_params()
69 fe->ops.i2c_gate_ctrl(fe, 1); /* open I2C-gate */ tda18212_set_params()
157 if (fe->ops.i2c_gate_ctrl) tda18212_set_params()
158 fe->ops.i2c_gate_ctrl(fe, 0); /* close I2C-gate */ tda18212_set_params()
167 static int tda18212_get_if_frequency(struct dvb_frontend *fe, u32 *frequency) tda18212_get_if_frequency() argument
169 struct tda18212_dev *dev = fe->tuner_priv; tda18212_get_if_frequency()
193 struct dvb_frontend *fe = cfg->fe; tda18212_probe() local
219 if (fe->ops.i2c_gate_ctrl) tda18212_probe()
220 fe->ops.i2c_gate_ctrl(fe, 1); /* open I2C-gate */ tda18212_probe()
225 if (fe->ops.i2c_gate_ctrl) tda18212_probe()
226 fe->ops.i2c_gate_ctrl(fe, 0); /* close I2C-gate */ tda18212_probe()
246 fe->tuner_priv = dev; tda18212_probe()
247 memcpy(&fe->ops.tuner_ops, &tda18212_tuner_ops, tda18212_probe()
261 struct dvb_frontend *fe = dev->cfg.fe; tda18212_remove() local
265 memset(&fe->ops.tuner_ops, 0, sizeof(struct dvb_tuner_ops)); tda18212_remove()
266 fe->tuner_priv = NULL; tda18212_remove()
H A Dfc0013.h30 extern struct dvb_frontend *fc0013_attach(struct dvb_frontend *fe,
34 extern int fc0013_rc_cal_add(struct dvb_frontend *fe, int rc_val);
35 extern int fc0013_rc_cal_reset(struct dvb_frontend *fe);
37 static inline struct dvb_frontend *fc0013_attach(struct dvb_frontend *fe, fc0013_attach() argument
46 static inline int fc0013_rc_cal_add(struct dvb_frontend *fe, int rc_val) fc0013_rc_cal_add() argument
51 static inline int fc0013_rc_cal_reset(struct dvb_frontend *fe) fc0013_rc_cal_reset() argument
H A Dtda827x.h34 int (*init) (struct dvb_frontend *fe);
35 int (*sleep) (struct dvb_frontend *fe);
41 void (*agcf)(struct dvb_frontend *fe);
48 * @param fe Frontend to attach to.
55 extern struct dvb_frontend* tda827x_attach(struct dvb_frontend *fe, int addr,
59 static inline struct dvb_frontend* tda827x_attach(struct dvb_frontend *fe, tda827x_attach() argument
H A Dxc5000.c72 struct dvb_frontend *fe; member in struct:xc5000_priv
226 #define XC5000A_FIRMWARE "dvb-fe-xc5000-1.6.114.fw"
233 #define XC5000C_FIRMWARE "dvb-fe-xc5000c-4.1.30.7.fw"
253 static int xc_load_fw_and_init_tuner(struct dvb_frontend *fe, int force);
254 static int xc5000_is_firmware_loaded(struct dvb_frontend *fe);
256 static int xc5000_tuner_reset(struct dvb_frontend *fe);
307 static int xc5000_tuner_reset(struct dvb_frontend *fe) xc5000_tuner_reset() argument
309 struct xc5000_priv *priv = fe->tuner_priv; xc5000_tuner_reset()
314 if (fe->callback) { xc5000_tuner_reset()
315 ret = fe->callback(((fe->dvb) && (fe->dvb->priv)) ? xc5000_tuner_reset()
316 fe->dvb->priv : xc5000_tuner_reset()
363 static int xc_load_i2c_sequence(struct dvb_frontend *fe, const u8 *i2c_sequence) xc_load_i2c_sequence() argument
365 struct xc5000_priv *priv = fe->tuner_priv; xc_load_i2c_sequence()
377 result = xc5000_tuner_reset(fe); xc_load_i2c_sequence()
606 static int xc_set_xtal(struct dvb_frontend *fe) xc_set_xtal() argument
608 struct xc5000_priv *priv = fe->tuner_priv; xc_set_xtal()
632 static int xc5000_fwupload(struct dvb_frontend *fe, xc5000_fwupload() argument
636 struct xc5000_priv *priv = fe->tuner_priv; xc5000_fwupload()
649 ret = xc_load_i2c_sequence(fe, fw->data); xc5000_fwupload()
651 ret = xc_set_xtal(fe); xc5000_fwupload()
719 static int xc5000_tune_digital(struct dvb_frontend *fe) xc5000_tune_digital() argument
721 struct xc5000_priv *priv = fe->tuner_priv; xc5000_tune_digital()
723 u32 bw = fe->dtv_property_cache.bandwidth_hz; xc5000_tune_digital()
762 static int xc5000_set_digital_params(struct dvb_frontend *fe) xc5000_set_digital_params() argument
765 struct xc5000_priv *priv = fe->tuner_priv; xc5000_set_digital_params()
766 u32 bw = fe->dtv_property_cache.bandwidth_hz; xc5000_set_digital_params()
767 u32 freq = fe->dtv_property_cache.frequency; xc5000_set_digital_params()
768 u32 delsys = fe->dtv_property_cache.delivery_system; xc5000_set_digital_params()
770 if (xc_load_fw_and_init_tuner(fe, 0) != 0) { xc5000_set_digital_params()
849 return xc5000_tune_digital(fe); xc5000_set_digital_params()
852 static int xc5000_is_firmware_loaded(struct dvb_frontend *fe) xc5000_is_firmware_loaded() argument
854 struct xc5000_priv *priv = fe->tuner_priv; xc5000_is_firmware_loaded()
871 static void xc5000_config_tv(struct dvb_frontend *fe, xc5000_config_tv() argument
874 struct xc5000_priv *priv = fe->tuner_priv; xc5000_config_tv()
931 static int xc5000_set_tv_freq(struct dvb_frontend *fe) xc5000_set_tv_freq() argument
933 struct xc5000_priv *priv = fe->tuner_priv; xc5000_set_tv_freq()
968 if (xc_load_fw_and_init_tuner(fe, 1) != 0) { xc5000_set_tv_freq()
979 static int xc5000_config_radio(struct dvb_frontend *fe, xc5000_config_radio() argument
983 struct xc5000_priv *priv = fe->tuner_priv; xc5000_config_radio()
999 static int xc5000_set_radio_freq(struct dvb_frontend *fe) xc5000_set_radio_freq() argument
1001 struct xc5000_priv *priv = fe->tuner_priv; xc5000_set_radio_freq()
1044 static int xc5000_set_params(struct dvb_frontend *fe) xc5000_set_params() argument
1046 struct xc5000_priv *priv = fe->tuner_priv; xc5000_set_params()
1048 if (xc_load_fw_and_init_tuner(fe, 0) != 0) { xc5000_set_params()
1055 return xc5000_set_radio_freq(fe); xc5000_set_params()
1057 return xc5000_set_tv_freq(fe); xc5000_set_params()
1059 return xc5000_tune_digital(fe); xc5000_set_params()
1065 static int xc5000_set_analog_params(struct dvb_frontend *fe, xc5000_set_analog_params() argument
1068 struct xc5000_priv *priv = fe->tuner_priv; xc5000_set_analog_params()
1076 ret = xc5000_config_radio(fe, params); xc5000_set_analog_params()
1081 xc5000_config_tv(fe, params); xc5000_set_analog_params()
1088 return xc5000_set_params(fe); xc5000_set_analog_params()
1091 static int xc5000_get_frequency(struct dvb_frontend *fe, u32 *freq) xc5000_get_frequency() argument
1093 struct xc5000_priv *priv = fe->tuner_priv; xc5000_get_frequency()
1099 static int xc5000_get_if_frequency(struct dvb_frontend *fe, u32 *freq) xc5000_get_if_frequency() argument
1101 struct xc5000_priv *priv = fe->tuner_priv; xc5000_get_if_frequency()
1107 static int xc5000_get_bandwidth(struct dvb_frontend *fe, u32 *bw) xc5000_get_bandwidth() argument
1109 struct xc5000_priv *priv = fe->tuner_priv; xc5000_get_bandwidth()
1116 static int xc5000_get_status(struct dvb_frontend *fe, u32 *status) xc5000_get_status() argument
1118 struct xc5000_priv *priv = fe->tuner_priv; xc5000_get_status()
1130 static int xc_load_fw_and_init_tuner(struct dvb_frontend *fe, int force) xc_load_fw_and_init_tuner() argument
1132 struct xc5000_priv *priv = fe->tuner_priv; xc_load_fw_and_init_tuner()
1141 if (!force && xc5000_is_firmware_loaded(fe) == 0) xc_load_fw_and_init_tuner()
1167 ret = xc5000_fwupload(fe, desired_fw, fw); xc_load_fw_and_init_tuner()
1250 struct dvb_frontend *fe = priv->fe; xc5000_do_timer_sleep() local
1258 ret = xc5000_tuner_reset(fe); xc5000_do_timer_sleep()
1265 static int xc5000_sleep(struct dvb_frontend *fe) xc5000_sleep() argument
1267 struct xc5000_priv *priv = fe->tuner_priv; xc5000_sleep()
1281 static int xc5000_suspend(struct dvb_frontend *fe) xc5000_suspend() argument
1283 struct xc5000_priv *priv = fe->tuner_priv; xc5000_suspend()
1290 ret = xc5000_tuner_reset(fe); xc5000_suspend()
1299 static int xc5000_resume(struct dvb_frontend *fe) xc5000_resume() argument
1301 struct xc5000_priv *priv = fe->tuner_priv; xc5000_resume()
1310 return xc5000_set_params(fe); xc5000_resume()
1313 static int xc5000_init(struct dvb_frontend *fe) xc5000_init() argument
1315 struct xc5000_priv *priv = fe->tuner_priv; xc5000_init()
1318 if (xc_load_fw_and_init_tuner(fe, 0) != 0) { xc5000_init()
1329 static int xc5000_release(struct dvb_frontend *fe) xc5000_release() argument
1331 struct xc5000_priv *priv = fe->tuner_priv; xc5000_release()
1348 fe->tuner_priv = NULL; xc5000_release()
1353 static int xc5000_set_config(struct dvb_frontend *fe, void *priv_cfg) xc5000_set_config() argument
1355 struct xc5000_priv *priv = fe->tuner_priv; xc5000_set_config()
1396 struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe, xc5000_attach() argument
1419 fe->tuner_priv = priv; xc5000_attach()
1420 priv->fe = fe; xc5000_attach()
1425 fe->tuner_priv = priv; xc5000_attach()
1485 memcpy(&fe->ops.tuner_ops, &xc5000_tuner_ops, xc5000_attach()
1488 return fe; xc5000_attach()
1492 xc5000_release(fe); xc5000_attach()
H A Dtda9887.c270 static void dump_read_message(struct dvb_frontend *fe, unsigned char *buf) dump_read_message() argument
272 struct tda9887_priv *priv = fe->analog_demod_priv; dump_read_message()
300 static void dump_write_message(struct dvb_frontend *fe, unsigned char *buf) dump_write_message() argument
302 struct tda9887_priv *priv = fe->analog_demod_priv; dump_write_message()
400 static int tda9887_set_tvnorm(struct dvb_frontend *fe) tda9887_set_tvnorm() argument
402 struct tda9887_priv *priv = fe->analog_demod_priv; tda9887_set_tvnorm()
442 static int tda9887_set_insmod(struct dvb_frontend *fe) tda9887_set_insmod() argument
444 struct tda9887_priv *priv = fe->analog_demod_priv; tda9887_set_insmod()
474 static int tda9887_do_config(struct dvb_frontend *fe) tda9887_do_config() argument
476 struct tda9887_priv *priv = fe->analog_demod_priv; tda9887_do_config()
533 static int tda9887_status(struct dvb_frontend *fe) tda9887_status() argument
535 struct tda9887_priv *priv = fe->analog_demod_priv; tda9887_status()
542 dump_read_message(fe, buf); tda9887_status()
546 static void tda9887_configure(struct dvb_frontend *fe) tda9887_configure() argument
548 struct tda9887_priv *priv = fe->analog_demod_priv; tda9887_configure()
552 tda9887_set_tvnorm(fe); tda9887_configure()
570 tda9887_do_config(fe); tda9887_configure()
571 tda9887_set_insmod(fe); tda9887_configure()
579 dump_write_message(fe, priv->data); tda9887_configure()
586 tda9887_status(fe); tda9887_configure()
592 static void tda9887_tuner_status(struct dvb_frontend *fe) tda9887_tuner_status() argument
594 struct tda9887_priv *priv = fe->analog_demod_priv; tda9887_tuner_status()
599 static int tda9887_get_afc(struct dvb_frontend *fe, s32 *afc) tda9887_get_afc() argument
601 struct tda9887_priv *priv = fe->analog_demod_priv; tda9887_get_afc()
617 static void tda9887_standby(struct dvb_frontend *fe) tda9887_standby() argument
619 struct tda9887_priv *priv = fe->analog_demod_priv; tda9887_standby()
623 tda9887_configure(fe); tda9887_standby()
626 static void tda9887_set_params(struct dvb_frontend *fe, tda9887_set_params() argument
629 struct tda9887_priv *priv = fe->analog_demod_priv; tda9887_set_params()
635 tda9887_configure(fe); tda9887_set_params()
638 static int tda9887_set_config(struct dvb_frontend *fe, void *priv_cfg) tda9887_set_config() argument
640 struct tda9887_priv *priv = fe->analog_demod_priv; tda9887_set_config()
643 tda9887_configure(fe); tda9887_set_config()
648 static void tda9887_release(struct dvb_frontend *fe) tda9887_release() argument
650 struct tda9887_priv *priv = fe->analog_demod_priv; tda9887_release()
659 fe->analog_demod_priv = NULL; tda9887_release()
674 struct dvb_frontend *tda9887_attach(struct dvb_frontend *fe, tda9887_attach() argument
691 fe->analog_demod_priv = priv; tda9887_attach()
696 fe->analog_demod_priv = priv; tda9887_attach()
702 memcpy(&fe->ops.analog_ops, &tda9887_ops, tda9887_attach()
705 return fe; tda9887_attach()
H A Dtuner-simple.c123 static int tuner_read_status(struct dvb_frontend *fe) tuner_read_status() argument
125 struct tuner_simple_priv *priv = fe->tuner_priv; tuner_read_status()
166 static int simple_get_status(struct dvb_frontend *fe, u32 *status) simple_get_status() argument
168 struct tuner_simple_priv *priv = fe->tuner_priv; simple_get_status()
174 tuner_status = tuner_read_status(fe); simple_get_status()
188 static int simple_get_rf_strength(struct dvb_frontend *fe, u16 *strength) simple_get_rf_strength() argument
190 struct tuner_simple_priv *priv = fe->tuner_priv; simple_get_rf_strength()
196 signal = tuner_signal(tuner_read_status(fe)); simple_get_rf_strength()
234 static struct tuner_params *simple_tuner_params(struct dvb_frontend *fe, simple_tuner_params() argument
237 struct tuner_simple_priv *priv = fe->tuner_priv; simple_tuner_params()
258 static int simple_config_lookup(struct dvb_frontend *fe, simple_config_lookup() argument
262 struct tuner_simple_priv *priv = fe->tuner_priv; simple_config_lookup()
288 static void simple_set_rf_input(struct dvb_frontend *fe, simple_set_rf_input() argument
291 struct tuner_simple_priv *priv = fe->tuner_priv; simple_set_rf_input()
319 static int simple_std_setup(struct dvb_frontend *fe, simple_std_setup() argument
323 struct tuner_simple_priv *priv = fe->tuner_priv; simple_std_setup()
417 simple_set_rf_input(fe, config, cb, atv_input[priv->nr]); simple_std_setup()
422 static int simple_set_aux_byte(struct dvb_frontend *fe, u8 config, u8 aux) simple_set_aux_byte() argument
424 struct tuner_simple_priv *priv = fe->tuner_priv; simple_set_aux_byte()
440 static int simple_post_tune(struct dvb_frontend *fe, u8 *buffer, simple_post_tune() argument
443 struct tuner_simple_priv *priv = fe->tuner_priv; simple_post_tune()
448 simple_set_aux_byte(fe, config, 0x20); simple_post_tune()
451 simple_set_aux_byte(fe, config, 0x60); /* External AGC */ simple_post_tune()
495 static int simple_radio_bandswitch(struct dvb_frontend *fe, u8 *buffer) simple_radio_bandswitch() argument
497 struct tuner_simple_priv *priv = fe->tuner_priv; simple_radio_bandswitch()
544 static int simple_set_tv_freq(struct dvb_frontend *fe, simple_set_tv_freq() argument
547 struct tuner_simple_priv *priv = fe->tuner_priv; simple_set_tv_freq()
582 t_params = simple_tuner_params(fe, desired_type); simple_set_tv_freq()
584 i = simple_config_lookup(fe, t_params, &params->frequency, simple_set_tv_freq()
596 simple_std_setup(fe, params, &config, &cb); simple_set_tv_freq()
661 simple_post_tune(fe, &buffer[0], div, config, cb); simple_set_tv_freq()
666 static int simple_set_radio_freq(struct dvb_frontend *fe, simple_set_radio_freq() argument
670 struct tuner_simple_priv *priv = fe->tuner_priv; simple_set_radio_freq()
706 simple_radio_bandswitch(fe, &buffer[0]); simple_set_radio_freq()
769 static int simple_set_params(struct dvb_frontend *fe, simple_set_params() argument
772 struct tuner_simple_priv *priv = fe->tuner_priv; simple_set_params()
781 ret = simple_set_radio_freq(fe, params); simple_set_params()
787 ret = simple_set_tv_freq(fe, params); simple_set_params()
796 static void simple_set_dvb(struct dvb_frontend *fe, u8 *buf, simple_set_dvb() argument
801 struct tuner_simple_priv *priv = fe->tuner_priv; simple_set_dvb()
836 simple_set_rf_input(fe, &buf[2], &buf[3], new_rf); simple_set_dvb()
844 static u32 simple_dvb_configure(struct dvb_frontend *fe, u8 *buf, simple_dvb_configure() argument
850 struct tuner_simple_priv *priv = fe->tuner_priv; simple_dvb_configure()
867 t_params = simple_tuner_params(fe, TUNER_PARAM_TYPE_DIGITAL); simple_dvb_configure()
868 ret = simple_config_lookup(fe, t_params, &frequency, &config, &cb); simple_dvb_configure()
880 simple_set_dvb(fe, buf, delsys, freq, bw); simple_dvb_configure()
889 static int simple_dvb_calc_regs(struct dvb_frontend *fe, simple_dvb_calc_regs() argument
892 struct dtv_frontend_properties *c = &fe->dtv_property_cache; simple_dvb_calc_regs()
895 struct tuner_simple_priv *priv = fe->tuner_priv; simple_dvb_calc_regs()
901 frequency = simple_dvb_configure(fe, buf+1, delsys, c->frequency, bw); simple_dvb_calc_regs()
913 static int simple_dvb_set_params(struct dvb_frontend *fe) simple_dvb_set_params() argument
915 struct dtv_frontend_properties *c = &fe->dtv_property_cache; simple_dvb_set_params()
919 struct tuner_simple_priv *priv = fe->tuner_priv; simple_dvb_set_params()
931 frequency = simple_dvb_configure(fe, buf+1, delsys, freq, bw); simple_dvb_set_params()
941 if (fe->ops.analog_ops.standby) simple_dvb_set_params()
942 fe->ops.analog_ops.standby(fe); simple_dvb_set_params()
944 if (fe->ops.i2c_gate_ctrl) simple_dvb_set_params()
945 fe->ops.i2c_gate_ctrl(fe, 1); simple_dvb_set_params()
962 static int simple_init(struct dvb_frontend *fe) simple_init() argument
964 struct tuner_simple_priv *priv = fe->tuner_priv; simple_init()
972 if (fe->ops.i2c_gate_ctrl) simple_init()
973 fe->ops.i2c_gate_ctrl(fe, 1); simple_init()
985 static int simple_sleep(struct dvb_frontend *fe) simple_sleep() argument
987 struct tuner_simple_priv *priv = fe->tuner_priv; simple_sleep()
995 if (fe->ops.i2c_gate_ctrl) simple_sleep()
996 fe->ops.i2c_gate_ctrl(fe, 1); simple_sleep()
1008 static int simple_release(struct dvb_frontend *fe) simple_release() argument
1010 struct tuner_simple_priv *priv = fe->tuner_priv; simple_release()
1019 fe->tuner_priv = NULL; simple_release()
1024 static int simple_get_frequency(struct dvb_frontend *fe, u32 *frequency) simple_get_frequency() argument
1026 struct tuner_simple_priv *priv = fe->tuner_priv; simple_get_frequency()
1031 static int simple_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth) simple_get_bandwidth() argument
1033 struct tuner_simple_priv *priv = fe->tuner_priv; simple_get_bandwidth()
1051 struct dvb_frontend *simple_tuner_attach(struct dvb_frontend *fe, simple_tuner_attach() argument
1076 if (fe->ops.i2c_gate_ctrl) simple_tuner_attach()
1077 fe->ops.i2c_gate_ctrl(fe, 1); simple_tuner_attach()
1085 if (fe->ops.i2c_gate_ctrl) simple_tuner_attach()
1086 fe->ops.i2c_gate_ctrl(fe, 0); simple_tuner_attach()
1100 fe->tuner_priv = priv; simple_tuner_attach()
1107 fe->tuner_priv = priv; simple_tuner_attach()
1113 memcpy(&fe->ops.tuner_ops, &simple_tuner_ops, simple_tuner_attach()
1141 strlcpy(fe->ops.tuner_ops.info.name, priv->tun->name, simple_tuner_attach()
1142 sizeof(fe->ops.tuner_ops.info.name)); simple_tuner_attach()
1144 return fe; simple_tuner_attach()
H A Dqm1d1c0042.c121 dev_warn(&state->i2c->dev, "(%s) failed. [adap%d-fe%d]\n", qm1d1c0042_wakeup()
122 __func__, state->cfg.fe->dvb->num, state->cfg.fe->id); qm1d1c0042_wakeup()
128 static int qm1d1c0042_set_config(struct dvb_frontend *fe, void *priv_cfg) qm1d1c0042_set_config() argument
133 state = fe->tuner_priv; qm1d1c0042_set_config()
136 if (cfg->fe) qm1d1c0042_set_config()
137 state->cfg.fe = cfg->fe; qm1d1c0042_set_config()
178 static int qm1d1c0042_set_params(struct dvb_frontend *fe) qm1d1c0042_set_params() argument
187 state = fe->tuner_priv; qm1d1c0042_set_params()
188 freq = fe->dtv_property_cache.frequency; qm1d1c0042_set_params()
298 static int qm1d1c0042_sleep(struct dvb_frontend *fe) qm1d1c0042_sleep() argument
303 state = fe->tuner_priv; qm1d1c0042_sleep()
311 dev_warn(&state->i2c->dev, "(%s) failed. [adap%d-fe%d]\n", qm1d1c0042_sleep()
312 __func__, fe->dvb->num, fe->id); qm1d1c0042_sleep()
316 static int qm1d1c0042_init(struct dvb_frontend *fe) qm1d1c0042_init() argument
322 state = fe->tuner_priv; qm1d1c0042_init()
373 dev_warn(&state->i2c->dev, "(%s) failed. [adap%d-fe%d]\n", qm1d1c0042_init()
374 __func__, fe->dvb->num, fe->id); qm1d1c0042_init()
400 struct dvb_frontend *fe; qm1d1c0042_probe() local
408 fe = cfg->fe; qm1d1c0042_probe()
409 fe->tuner_priv = state; qm1d1c0042_probe()
410 qm1d1c0042_set_config(fe, cfg); qm1d1c0042_probe()
411 memcpy(&fe->ops.tuner_ops, &qm1d1c0042_ops, sizeof(qm1d1c0042_ops)); qm1d1c0042_probe()
423 state->cfg.fe->tuner_priv = NULL; qm1d1c0042_remove()
H A Dtea5767.c188 static int set_radio_freq(struct dvb_frontend *fe, set_radio_freq() argument
191 struct tea5767_priv *priv = fe->tuner_priv; set_radio_freq()
285 static int tea5767_read_status(struct dvb_frontend *fe, char *buffer) tea5767_read_status() argument
287 struct tea5767_priv *priv = fe->tuner_priv; tea5767_read_status()
299 static inline int tea5767_signal(struct dvb_frontend *fe, const char *buffer) tea5767_signal() argument
301 struct tea5767_priv *priv = fe->tuner_priv; tea5767_signal()
310 static inline int tea5767_stereo(struct dvb_frontend *fe, const char *buffer) tea5767_stereo() argument
312 struct tea5767_priv *priv = fe->tuner_priv; tea5767_stereo()
321 static int tea5767_get_status(struct dvb_frontend *fe, u32 *status) tea5767_get_status() argument
327 if (0 == tea5767_read_status(fe, buffer)) { tea5767_get_status()
328 if (tea5767_signal(fe, buffer)) tea5767_get_status()
330 if (tea5767_stereo(fe, buffer)) tea5767_get_status()
337 static int tea5767_get_rf_strength(struct dvb_frontend *fe, u16 *strength) tea5767_get_rf_strength() argument
343 if (0 == tea5767_read_status(fe, buffer)) tea5767_get_rf_strength()
344 *strength = tea5767_signal(fe, buffer); tea5767_get_rf_strength()
349 static int tea5767_standby(struct dvb_frontend *fe) tea5767_standby() argument
352 struct tea5767_priv *priv = fe->tuner_priv; tea5767_standby()
401 static int tea5767_release(struct dvb_frontend *fe) tea5767_release() argument
403 kfree(fe->tuner_priv); tea5767_release()
404 fe->tuner_priv = NULL; tea5767_release()
409 static int tea5767_get_frequency(struct dvb_frontend *fe, u32 *frequency) tea5767_get_frequency() argument
411 struct tea5767_priv *priv = fe->tuner_priv; tea5767_get_frequency()
417 static int tea5767_set_config (struct dvb_frontend *fe, void *priv_cfg) tea5767_set_config() argument
419 struct tea5767_priv *priv = fe->tuner_priv; tea5767_set_config()
440 struct dvb_frontend *tea5767_attach(struct dvb_frontend *fe, tea5767_attach() argument
449 fe->tuner_priv = priv; tea5767_attach()
462 memcpy(&fe->ops.tuner_ops, &tea5767_tuner_ops, tea5767_attach()
467 return fe; tea5767_attach()
H A Dtda18271-priv.h188 extern int tda18271_lookup_pll_map(struct dvb_frontend *fe,
191 extern int tda18271_lookup_map(struct dvb_frontend *fe,
195 extern int tda18271_lookup_thermometer(struct dvb_frontend *fe);
197 extern int tda18271_lookup_rf_band(struct dvb_frontend *fe,
200 extern int tda18271_lookup_cid_target(struct dvb_frontend *fe,
204 extern int tda18271_assign_map_layout(struct dvb_frontend *fe);
208 extern int tda18271_read_regs(struct dvb_frontend *fe);
209 extern int tda18271_read_extended(struct dvb_frontend *fe);
210 extern int tda18271_write_regs(struct dvb_frontend *fe, int idx, int len);
211 extern int tda18271_init_regs(struct dvb_frontend *fe);
213 extern int tda18271_charge_pump_source(struct dvb_frontend *fe,
215 extern int tda18271_set_standby_mode(struct dvb_frontend *fe,
218 extern int tda18271_calc_main_pll(struct dvb_frontend *fe, u32 freq);
219 extern int tda18271_calc_cal_pll(struct dvb_frontend *fe, u32 freq);
221 extern int tda18271_calc_bp_filter(struct dvb_frontend *fe, u32 *freq);
222 extern int tda18271_calc_km(struct dvb_frontend *fe, u32 *freq);
223 extern int tda18271_calc_rf_band(struct dvb_frontend *fe, u32 *freq);
224 extern int tda18271_calc_gain_taper(struct dvb_frontend *fe, u32 *freq);
225 extern int tda18271_calc_ir_measure(struct dvb_frontend *fe, u32 *freq);
226 extern int tda18271_calc_rf_cal(struct dvb_frontend *fe, u32 *freq);
H A Dsi2157.c78 static int si2157_init(struct dvb_frontend *fe) si2157_init() argument
80 struct i2c_client *client = fe->tuner_priv; si2157_init()
82 struct dtv_frontend_properties *c = &fe->dtv_property_cache; si2157_init()
225 static int si2157_sleep(struct dvb_frontend *fe) si2157_sleep() argument
227 struct i2c_client *client = fe->tuner_priv; si2157_sleep()
253 static int si2157_set_params(struct dvb_frontend *fe) si2157_set_params() argument
255 struct i2c_client *client = fe->tuner_priv; si2157_set_params()
257 struct dtv_frontend_properties *c = &fe->dtv_property_cache; si2157_set_params()
355 static int si2157_get_if_frequency(struct dvb_frontend *fe, u32 *frequency) si2157_get_if_frequency() argument
357 struct i2c_client *client = fe->tuner_priv; si2157_get_if_frequency()
380 struct dvb_frontend *fe = dev->fe; si2157_stat_work() local
381 struct i2c_client *client = fe->tuner_priv; si2157_stat_work()
382 struct dtv_frontend_properties *c = &fe->dtv_property_cache; si2157_stat_work()
409 struct dvb_frontend *fe = cfg->fe; si2157_probe() local
422 dev->fe = cfg->fe; si2157_probe()
438 memcpy(&fe->ops.tuner_ops, &si2157_ops, sizeof(struct dvb_tuner_ops)); si2157_probe()
439 fe->tuner_priv = client; si2157_probe()
457 struct dvb_frontend *fe = dev->fe; si2157_remove() local
461 memset(&fe->ops.tuner_ops, 0, sizeof(struct dvb_tuner_ops)); si2157_remove()
462 fe->tuner_priv = NULL; si2157_remove()
H A Dfc0011.h27 struct dvb_frontend *fc0011_attach(struct dvb_frontend *fe,
32 struct dvb_frontend *fc0011_attach(struct dvb_frontend *fe, fc0011_attach() argument
H A Dmt2266.c125 static int mt2266_set_params(struct dvb_frontend *fe) mt2266_set_params() argument
127 struct dtv_frontend_properties *c = &fe->dtv_property_cache; mt2266_set_params()
137 priv = fe->tuner_priv; mt2266_set_params()
264 static int mt2266_get_frequency(struct dvb_frontend *fe, u32 *frequency) mt2266_get_frequency() argument
266 struct mt2266_priv *priv = fe->tuner_priv; mt2266_get_frequency()
271 static int mt2266_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth) mt2266_get_bandwidth() argument
273 struct mt2266_priv *priv = fe->tuner_priv; mt2266_get_bandwidth()
278 static int mt2266_init(struct dvb_frontend *fe) mt2266_init() argument
281 struct mt2266_priv *priv = fe->tuner_priv; mt2266_init()
291 static int mt2266_sleep(struct dvb_frontend *fe) mt2266_sleep() argument
293 struct mt2266_priv *priv = fe->tuner_priv; mt2266_sleep()
299 static int mt2266_release(struct dvb_frontend *fe) mt2266_release() argument
301 kfree(fe->tuner_priv); mt2266_release()
302 fe->tuner_priv = NULL; mt2266_release()
321 struct dvb_frontend * mt2266_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct mt2266_config *cfg) mt2266_attach() argument
343 memcpy(&fe->ops.tuner_ops, &mt2266_tuner_ops, sizeof(struct dvb_tuner_ops)); mt2266_attach()
345 fe->tuner_priv = priv; mt2266_attach()
347 return fe; mt2266_attach()
H A Dqt1010.c57 static int qt1010_set_params(struct dvb_frontend *fe) qt1010_set_params() argument
59 struct dtv_frontend_properties *c = &fe->dtv_property_cache; qt1010_set_params()
118 priv = fe->tuner_priv; qt1010_set_params()
126 if (fe->ops.i2c_gate_ctrl) qt1010_set_params()
127 fe->ops.i2c_gate_ctrl(fe, 1); /* open i2c_gate */ qt1010_set_params()
222 if (fe->ops.i2c_gate_ctrl) qt1010_set_params()
223 fe->ops.i2c_gate_ctrl(fe, 0); /* close i2c_gate */ qt1010_set_params()
290 static int qt1010_init(struct dvb_frontend *fe) qt1010_init() argument
292 struct qt1010_priv *priv = fe->tuner_priv; qt1010_init()
293 struct dtv_frontend_properties *c = &fe->dtv_property_cache; qt1010_init()
334 if (fe->ops.i2c_gate_ctrl) qt1010_init()
335 fe->ops.i2c_gate_ctrl(fe, 1); /* open i2c_gate */ qt1010_init()
377 return qt1010_set_params(fe); qt1010_init()
380 static int qt1010_release(struct dvb_frontend *fe) qt1010_release() argument
382 kfree(fe->tuner_priv); qt1010_release()
383 fe->tuner_priv = NULL; qt1010_release()
387 static int qt1010_get_frequency(struct dvb_frontend *fe, u32 *frequency) qt1010_get_frequency() argument
389 struct qt1010_priv *priv = fe->tuner_priv; qt1010_get_frequency()
394 static int qt1010_get_if_frequency(struct dvb_frontend *fe, u32 *frequency) qt1010_get_if_frequency() argument
417 struct dvb_frontend * qt1010_attach(struct dvb_frontend *fe, qt1010_attach() argument
431 if (fe->ops.i2c_gate_ctrl) qt1010_attach()
432 fe->ops.i2c_gate_ctrl(fe, 1); /* open i2c_gate */ qt1010_attach()
441 if (fe->ops.i2c_gate_ctrl) qt1010_attach()
442 fe->ops.i2c_gate_ctrl(fe, 0); /* close i2c_gate */ qt1010_attach()
448 memcpy(&fe->ops.tuner_ops, &qt1010_tuner_ops, qt1010_attach()
451 fe->tuner_priv = priv; qt1010_attach()
452 return fe; qt1010_attach()
H A Dtuner-xc2028.c299 static int load_all_firmwares(struct dvb_frontend *fe, load_all_firmwares() argument
302 struct xc2028_data *priv = fe->tuner_priv; load_all_firmwares()
432 static int seek_firmware(struct dvb_frontend *fe, unsigned int type, seek_firmware() argument
435 struct xc2028_data *priv = fe->tuner_priv; seek_firmware()
523 static inline int do_tuner_callback(struct dvb_frontend *fe, int cmd, int arg) do_tuner_callback() argument
525 struct xc2028_data *priv = fe->tuner_priv; do_tuner_callback()
530 * digital side will always have fe->dvb defined. do_tuner_callback()
531 * analog side (tuner-core) doesn't (yet) define fe->dvb. do_tuner_callback()
534 return (!fe->callback) ? -EINVAL : do_tuner_callback()
535 fe->callback(((fe->dvb) && (fe->dvb->priv)) ? do_tuner_callback()
536 fe->dvb->priv : priv->i2c_props.adap->algo_data, do_tuner_callback()
540 static int load_firmware(struct dvb_frontend *fe, unsigned int type, load_firmware() argument
543 struct xc2028_data *priv = fe->tuner_priv; load_firmware()
552 pos = seek_firmware(fe, type, id); load_firmware()
581 rc = do_tuner_callback(fe, XC2028_TUNER_RESET, 0); load_firmware()
592 rc = do_tuner_callback(fe, XC2028_RESET_CLK, 0); load_firmware()
642 rc = do_tuner_callback(fe, XC2028_I2C_FLUSH, 0); load_firmware()
651 static int load_scode(struct dvb_frontend *fe, unsigned int type, load_scode() argument
654 struct xc2028_data *priv = fe->tuner_priv; load_scode()
661 pos = seek_firmware(fe, type, id); load_scode()
713 static int xc2028_sleep(struct dvb_frontend *fe);
715 static int check_firmware(struct dvb_frontend *fe, unsigned int type, check_firmware() argument
718 struct xc2028_data *priv = fe->tuner_priv; check_firmware()
770 rc = do_tuner_callback(fe, XC2028_TUNER_RESET, 0); check_firmware()
776 rc = load_firmware(fe, BASE | new_fw.type, &std0); check_firmware()
786 rc = load_firmware(fe, BASE | INIT1 | new_fw.type, &std0); check_firmware()
788 rc = load_firmware(fe, (BASE | INIT1 | new_fw.type) & ~F8MHZ, check_firmware()
810 rc = load_firmware(fe, new_fw.type, &new_fw.id); check_firmware()
812 rc = load_firmware(fe, new_fw.type & ~F8MHZ, &new_fw.id); check_firmware()
830 rc = load_scode(fe, new_fw.type | new_fw.scode_table, &new_fw.id, check_firmware()
898 xc2028_sleep(fe); check_firmware()
905 static int xc2028_signal(struct dvb_frontend *fe, u16 *strength) xc2028_signal() argument
907 struct xc2028_data *priv = fe->tuner_priv; xc2028_signal()
959 static int xc2028_get_afc(struct dvb_frontend *fe, s32 *afc) xc2028_get_afc() argument
961 struct xc2028_data *priv = fe->tuner_priv; xc2028_get_afc()
1010 static int generic_set_freq(struct dvb_frontend *fe, u32 freq /* in HZ */, generic_set_freq() argument
1016 struct xc2028_data *priv = fe->tuner_priv; generic_set_freq()
1027 if (check_firmware(fe, type, std, int_freq) < 0) generic_set_freq()
1132 do_tuner_callback(fe, XC2028_RESET_CLK, 1); generic_set_freq()
1159 static int xc2028_set_analog_freq(struct dvb_frontend *fe, xc2028_set_analog_freq() argument
1162 struct xc2028_data *priv = fe->tuner_priv; xc2028_set_analog_freq()
1171 return generic_set_freq(fe, (625l * p->frequency) / 10, xc2028_set_analog_freq()
1186 return generic_set_freq(fe, 62500l * p->frequency, xc2028_set_analog_freq()
1190 static int xc2028_set_params(struct dvb_frontend *fe) xc2028_set_params() argument
1192 struct dtv_frontend_properties *c = &fe->dtv_property_cache; xc2028_set_params()
1195 struct xc2028_data *priv = fe->tuner_priv; xc2028_set_params()
1284 return generic_set_freq(fe, c->frequency, xc2028_set_params()
1288 static int xc2028_sleep(struct dvb_frontend *fe) xc2028_sleep() argument
1290 struct xc2028_data *priv = fe->tuner_priv; xc2028_sleep()
1326 static int xc2028_dvb_release(struct dvb_frontend *fe) xc2028_dvb_release() argument
1328 struct xc2028_data *priv = fe->tuner_priv; xc2028_dvb_release()
1346 fe->tuner_priv = NULL; xc2028_dvb_release()
1351 static int xc2028_get_frequency(struct dvb_frontend *fe, u32 *frequency) xc2028_get_frequency() argument
1353 struct xc2028_data *priv = fe->tuner_priv; xc2028_get_frequency()
1370 struct dvb_frontend *fe = context; load_firmware_cb() local
1371 struct xc2028_data *priv = fe->tuner_priv; load_firmware_cb()
1381 rc = load_all_firmwares(fe, fw); load_firmware_cb()
1390 static int xc2028_set_config(struct dvb_frontend *fe, void *priv_cfg) xc2028_set_config() argument
1392 struct xc2028_data *priv = fe->tuner_priv; xc2028_set_config()
1434 fe, load_firmware_cb); xc2028_set_config()
1465 struct dvb_frontend *xc2028_attach(struct dvb_frontend *fe, xc2028_attach() argument
1477 if (!fe) { xc2028_attach()
1498 fe->tuner_priv = priv; xc2028_attach()
1502 fe->tuner_priv = priv; xc2028_attach()
1506 memcpy(&fe->ops.tuner_ops, &xc2028_dvb_tuner_ops, xc2028_attach()
1512 xc2028_set_config(fe, cfg->ctrl); xc2028_attach()
1516 return fe; xc2028_attach()
1520 xc2028_dvb_release(fe); xc2028_attach()
H A Dfc0011.c115 static int fc0011_release(struct dvb_frontend *fe) fc0011_release() argument
117 kfree(fe->tuner_priv); fc0011_release()
118 fe->tuner_priv = NULL; fc0011_release()
123 static int fc0011_init(struct dvb_frontend *fe) fc0011_init() argument
125 struct fc0011_priv *priv = fe->tuner_priv; fc0011_init()
128 if (WARN_ON(!fe->callback)) fc0011_init()
131 err = fe->callback(priv->i2c, DVB_FRONTEND_COMPONENT_TUNER, fc0011_init()
137 err = fe->callback(priv->i2c, DVB_FRONTEND_COMPONENT_TUNER, fc0011_init()
178 static int fc0011_set_params(struct dvb_frontend *fe) fc0011_set_params() argument
180 struct dtv_frontend_properties *p = &fe->dtv_property_cache; fc0011_set_params()
181 struct fc0011_priv *priv = fe->tuner_priv; fc0011_set_params()
315 err = fe->callback(priv->i2c, DVB_FRONTEND_COMPONENT_TUNER, fc0011_set_params()
456 static int fc0011_get_frequency(struct dvb_frontend *fe, u32 *frequency) fc0011_get_frequency() argument
458 struct fc0011_priv *priv = fe->tuner_priv; fc0011_get_frequency()
465 static int fc0011_get_if_frequency(struct dvb_frontend *fe, u32 *frequency) fc0011_get_if_frequency() argument
472 static int fc0011_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth) fc0011_get_bandwidth() argument
474 struct fc0011_priv *priv = fe->tuner_priv; fc0011_get_bandwidth()
499 struct dvb_frontend *fc0011_attach(struct dvb_frontend *fe, fc0011_attach() argument
512 fe->tuner_priv = priv; fc0011_attach()
513 fe->ops.tuner_ops = fc0011_tuner_ops; fc0011_attach()
517 return fe; fc0011_attach()
H A Dmt2131.c95 static int mt2131_set_params(struct dvb_frontend *fe) mt2131_set_params() argument
97 struct dtv_frontend_properties *c = &fe->dtv_property_cache; mt2131_set_params()
107 priv = fe->tuner_priv; mt2131_set_params()
184 static int mt2131_get_frequency(struct dvb_frontend *fe, u32 *frequency) mt2131_get_frequency() argument
186 struct mt2131_priv *priv = fe->tuner_priv; mt2131_get_frequency()
192 static int mt2131_get_status(struct dvb_frontend *fe, u32 *status) mt2131_get_status() argument
194 struct mt2131_priv *priv = fe->tuner_priv; mt2131_get_status()
211 static int mt2131_init(struct dvb_frontend *fe) mt2131_init() argument
213 struct mt2131_priv *priv = fe->tuner_priv; mt2131_init()
233 static int mt2131_release(struct dvb_frontend *fe) mt2131_release() argument
236 kfree(fe->tuner_priv); mt2131_release()
237 fe->tuner_priv = NULL; mt2131_release()
257 struct dvb_frontend * mt2131_attach(struct dvb_frontend *fe, mt2131_attach() argument
286 memcpy(&fe->ops.tuner_ops, &mt2131_tuner_ops, mt2131_attach()
289 fe->tuner_priv = priv; mt2131_attach()
290 return fe; mt2131_attach()
H A Dqt1010.h34 * @param fe frontend to attach to
37 * @return fe pointer on success, NULL on failure
40 extern struct dvb_frontend *qt1010_attach(struct dvb_frontend *fe,
44 static inline struct dvb_frontend *qt1010_attach(struct dvb_frontend *fe, qt1010_attach() argument
H A Dit913x.c29 struct dvb_frontend *fe; member in struct:it913x_dev
39 static int it913x_init(struct dvb_frontend *fe) it913x_init() argument
41 struct it913x_dev *dev = fe->tuner_priv; it913x_init()
159 static int it913x_sleep(struct dvb_frontend *fe) it913x_sleep() argument
161 struct it913x_dev *dev = fe->tuner_priv; it913x_sleep()
217 static int it913x_set_params(struct dvb_frontend *fe) it913x_set_params() argument
219 struct it913x_dev *dev = fe->tuner_priv; it913x_set_params()
220 struct dtv_frontend_properties *c = &fe->dtv_property_cache; it913x_set_params()
392 struct dvb_frontend *fe = cfg->fe; it913x_probe() local
409 dev->fe = cfg->fe; it913x_probe()
418 fe->tuner_priv = dev; it913x_probe()
419 memcpy(&fe->ops.tuner_ops, &it913x_tuner_ops, it913x_probe()
446 struct dvb_frontend *fe = dev->fe; it913x_remove() local
450 memset(&fe->ops.tuner_ops, 0, sizeof(struct dvb_tuner_ops)); it913x_remove()
451 fe->tuner_priv = NULL; it913x_remove()
H A Dmt20xx.h24 extern struct dvb_frontend *microtune_attach(struct dvb_frontend *fe,
28 static inline struct dvb_frontend *microtune_attach(struct dvb_frontend *fe, microtune_attach() argument
H A Dmt2266.h28 extern struct dvb_frontend * mt2266_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct mt2266_config *cfg);
30 static inline struct dvb_frontend * mt2266_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct mt2266_config *cfg) mt2266_attach() argument
H A Dtda9887.h25 extern struct dvb_frontend *tda9887_attach(struct dvb_frontend *fe,
29 static inline struct dvb_frontend *tda9887_attach(struct dvb_frontend *fe, tda9887_attach() argument
H A Dtuner-simple.h24 extern struct dvb_frontend *simple_tuner_attach(struct dvb_frontend *fe,
29 static inline struct dvb_frontend *simple_tuner_attach(struct dvb_frontend *fe, simple_tuner_attach() argument
/linux-4.4.14/drivers/media/common/b2c2/
H A Dflexcop-fe-tuner.c3 * flexcop-fe-tuner.c - methods for frontend attachment and DiSEqC controlling
27 #define FE_SUPPORTED(fe) (defined(CONFIG_DVB_##fe) || \
28 (defined(CONFIG_DVB_##fe##_MODULE) && defined(MODULE)))
31 static int flexcop_fe_request_firmware(struct dvb_frontend *fe, flexcop_fe_request_firmware() argument
34 struct flexcop_device *fc = fe->dvb->priv; flexcop_fe_request_firmware()
42 static int flexcop_set_voltage(struct dvb_frontend *fe, flexcop_set_voltage() argument
45 struct flexcop_device *fc = fe->dvb->priv; flexcop_set_voltage()
71 static int flexcop_sleep(struct dvb_frontend* fe) flexcop_sleep() argument
73 struct flexcop_device *fc = fe->dvb->priv; flexcop_sleep()
75 return fc->fe_sleep(fe); flexcop_sleep()
82 static int flexcop_set_tone(struct dvb_frontend *fe, enum fe_sec_tone_mode tone) flexcop_set_tone() argument
85 struct flexcop_device *fc = fe->dvb->priv; flexcop_set_tone()
109 static void flexcop_diseqc_send_bit(struct dvb_frontend* fe, int data) flexcop_diseqc_send_bit() argument
111 flexcop_set_tone(fe, SEC_TONE_ON); flexcop_diseqc_send_bit()
113 flexcop_set_tone(fe, SEC_TONE_OFF); flexcop_diseqc_send_bit()
117 static void flexcop_diseqc_send_byte(struct dvb_frontend* fe, int data) flexcop_diseqc_send_byte() argument
123 flexcop_diseqc_send_bit(fe, d); flexcop_diseqc_send_byte()
125 flexcop_diseqc_send_bit(fe, par); flexcop_diseqc_send_byte()
128 static int flexcop_send_diseqc_msg(struct dvb_frontend *fe, flexcop_send_diseqc_msg() argument
133 flexcop_set_tone(fe, SEC_TONE_OFF); flexcop_send_diseqc_msg()
137 flexcop_diseqc_send_byte(fe,msg[i]); flexcop_send_diseqc_msg()
142 flexcop_diseqc_send_byte(fe, 0xff); flexcop_send_diseqc_msg()
144 flexcop_set_tone(fe, SEC_TONE_ON); flexcop_send_diseqc_msg()
147 flexcop_set_tone(fe, SEC_TONE_OFF); flexcop_send_diseqc_msg()
154 static int flexcop_diseqc_send_master_cmd(struct dvb_frontend *fe, flexcop_diseqc_send_master_cmd() argument
157 return flexcop_send_diseqc_msg(fe, cmd->msg_len, cmd->msg, 0); flexcop_diseqc_send_master_cmd()
160 static int flexcop_diseqc_send_burst(struct dvb_frontend *fe, flexcop_diseqc_send_burst() argument
163 return flexcop_send_diseqc_msg(fe, 0, NULL, minicmd); flexcop_diseqc_send_burst()
175 fc->fe = dvb_attach(mt312_attach, &skystar23_samsung_tbdu18132_config, i2c); skystar2_rev23_attach()
176 if (!fc->fe) skystar2_rev23_attach()
179 if (!dvb_attach(dvb_pll_attach, fc->fe, 0x61, i2c, skystar2_rev23_attach()
183 ops = &fc->fe->ops; skystar2_rev23_attach()
198 static int samsung_tbmu24112_set_symbol_rate(struct dvb_frontend *fe, samsung_tbmu24112_set_symbol_rate() argument
218 stv0299_writereg(fe, 0x13, aclk); samsung_tbmu24112_set_symbol_rate()
219 stv0299_writereg(fe, 0x14, bclk); samsung_tbmu24112_set_symbol_rate()
220 stv0299_writereg(fe, 0x1f, (ratio >> 16) & 0xff); samsung_tbmu24112_set_symbol_rate()
221 stv0299_writereg(fe, 0x20, (ratio >> 8) & 0xff); samsung_tbmu24112_set_symbol_rate()
222 stv0299_writereg(fe, 0x21, ratio & 0xf0); samsung_tbmu24112_set_symbol_rate()
286 fc->fe = dvb_attach(stv0299_attach, &samsung_tbmu24112_config, i2c); skystar2_rev26_attach()
287 if (!fc->fe) skystar2_rev26_attach()
290 if (!dvb_attach(dvb_pll_attach, fc->fe, 0x61, i2c, skystar2_rev26_attach()
294 fc->fe->ops.set_voltage = flexcop_set_voltage; skystar2_rev26_attach()
295 fc->fe_sleep = fc->fe->ops.sleep; skystar2_rev26_attach()
296 fc->fe->ops.sleep = flexcop_sleep; skystar2_rev26_attach()
325 fc->fe = dvb_attach(s5h1420_attach, &skystar2_rev2_7_s5h1420_config, skystar2_rev27_attach()
327 if (!fc->fe) skystar2_rev27_attach()
330 i2c_tuner = s5h1420_get_tuner_i2c_adapter(fc->fe); skystar2_rev27_attach()
334 fc->fe_sleep = fc->fe->ops.sleep; skystar2_rev27_attach()
335 fc->fe->ops.sleep = flexcop_sleep; skystar2_rev27_attach()
339 if (!dvb_attach(isl6421_attach, fc->fe, &fc->fc_i2c_adap[2].i2c_adap, skystar2_rev27_attach()
349 if (!dvb_attach(itd1000_attach, fc->fe, i2c_tuner, skystar2_rev27_attach()
388 fc->fe = dvb_attach(cx24123_attach, &skystar2_rev2_8_cx24123_config, skystar2_rev28_attach()
390 if (!fc->fe) skystar2_rev28_attach()
393 i2c_tuner = cx24123_get_tuner_i2c_adapter(fc->fe); skystar2_rev28_attach()
397 if (!dvb_attach(cx24113_attach, fc->fe, &skystar2_rev2_8_cx24113_config, skystar2_rev28_attach()
405 if (!dvb_attach(isl6421_attach, fc->fe, &fc->fc_i2c_adap[2].i2c_adap, skystar2_rev28_attach()
422 static int samsung_tdtc9251dh0_demod_init(struct dvb_frontend *fe) samsung_tdtc9251dh0_demod_init() argument
430 mt352_write(fe, mt352_clock_config, sizeof(mt352_clock_config)); samsung_tdtc9251dh0_demod_init()
432 mt352_write(fe, mt352_reset, sizeof(mt352_reset)); samsung_tdtc9251dh0_demod_init()
433 mt352_write(fe, mt352_adc_ctl_1_cfg, sizeof(mt352_adc_ctl_1_cfg)); samsung_tdtc9251dh0_demod_init()
434 mt352_write(fe, mt352_agc_cfg, sizeof(mt352_agc_cfg)); samsung_tdtc9251dh0_demod_init()
435 mt352_write(fe, mt352_capt_range_cfg, sizeof(mt352_capt_range_cfg)); samsung_tdtc9251dh0_demod_init()
447 fc->fe = dvb_attach(mt352_attach, &samsung_tdtc9251dh0_config, i2c); airstar_dvbt_attach()
448 if (!fc->fe) airstar_dvbt_attach()
451 return !!dvb_attach(dvb_pll_attach, fc->fe, 0x61, NULL, airstar_dvbt_attach()
468 fc->fe = dvb_attach(bcm3510_attach, &air2pc_atsc_first_gen_config, i2c); airstar_atsc1_attach()
469 return fc->fe != NULL; airstar_atsc1_attach()
484 fc->fe = dvb_attach(nxt200x_attach, &samsung_tbmv_config, i2c); airstar_atsc2_attach()
485 if (!fc->fe) airstar_atsc2_attach()
488 return !!dvb_attach(dvb_pll_attach, fc->fe, 0x61, NULL, airstar_atsc2_attach()
507 fc->fe = dvb_attach(lgdt330x_attach, &air2pc_atsc_hd5000_config, i2c); airstar_atsc3_attach()
508 if (!fc->fe) airstar_atsc3_attach()
511 return !!dvb_attach(simple_tuner_attach, fc->fe, i2c, 0x61, airstar_atsc3_attach()
602 fc->fe = dvb_attach(stv0297_attach, &alps_tdee4_stv0297_config, i2c); cablestar2_attach()
603 if (!fc->fe) cablestar2_attach()
608 if (fc->fe->ops.i2c_gate_ctrl) cablestar2_attach()
609 fc->fe->ops.i2c_gate_ctrl(fc->fe, 0); cablestar2_attach()
610 fc->fe->ops.i2c_gate_ctrl = NULL; cablestar2_attach()
612 if (!dvb_attach(dvb_pll_attach, fc->fe, 0x61, cablestar2_attach()
640 fc->fe = dvb_attach(cx24120_attach, skystarS2_rev33_attach()
642 if (!fc->fe) skystarS2_rev33_attach()
647 if (!dvb_attach(isl6421_attach, fc->fe, &fc->fc_i2c_adap[2].i2c_adap, skystarS2_rev33_attach()
693 if (fc->fe) { flexcop_frontend_init()
694 dvb_frontend_detach(fc->fe); flexcop_frontend_init()
695 fc->fe = NULL; flexcop_frontend_init()
703 info("found '%s' .", fc->fe->ops.info.name); flexcop_frontend_init()
704 if (dvb_register_frontend(&fc->dvb_adapter, fc->fe)) { flexcop_frontend_init()
706 dvb_frontend_detach(fc->fe); flexcop_frontend_init()
707 fc->fe = NULL; flexcop_frontend_init()
717 dvb_unregister_frontend(fc->fe); flexcop_frontend_exit()
718 dvb_frontend_detach(fc->fe); flexcop_frontend_exit()
/linux-4.4.14/drivers/media/usb/dvb-usb/
H A Dvp7045-fe.c25 struct dvb_frontend fe; member in struct:vp7045_fe_state
29 static int vp7045_fe_read_status(struct dvb_frontend *fe, vp7045_fe_read_status() argument
32 struct vp7045_fe_state *state = fe->demodulator_priv; vp7045_fe_read_status()
56 static int vp7045_fe_read_ber(struct dvb_frontend* fe, u32 *ber) vp7045_fe_read_ber() argument
58 struct vp7045_fe_state *state = fe->demodulator_priv; vp7045_fe_read_ber()
65 static int vp7045_fe_read_unc_blocks(struct dvb_frontend* fe, u32 *unc) vp7045_fe_read_unc_blocks() argument
67 struct vp7045_fe_state *state = fe->demodulator_priv; vp7045_fe_read_unc_blocks()
73 static int vp7045_fe_read_signal_strength(struct dvb_frontend* fe, u16 *strength) vp7045_fe_read_signal_strength() argument
75 struct vp7045_fe_state *state = fe->demodulator_priv; vp7045_fe_read_signal_strength()
83 static int vp7045_fe_read_snr(struct dvb_frontend* fe, u16 *snr) vp7045_fe_read_snr() argument
85 struct vp7045_fe_state *state = fe->demodulator_priv; vp7045_fe_read_snr()
91 static int vp7045_fe_init(struct dvb_frontend* fe) vp7045_fe_init() argument
96 static int vp7045_fe_sleep(struct dvb_frontend* fe) vp7045_fe_sleep() argument
101 static int vp7045_fe_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings *tune) vp7045_fe_get_tune_settings() argument
107 static int vp7045_fe_set_frontend(struct dvb_frontend *fe) vp7045_fe_set_frontend() argument
109 struct dtv_frontend_properties *fep = &fe->dtv_property_cache; vp7045_fe_set_frontend()
110 struct vp7045_fe_state *state = fe->demodulator_priv; vp7045_fe_set_frontend()
137 static void vp7045_fe_release(struct dvb_frontend* fe) vp7045_fe_release() argument
139 struct vp7045_fe_state *state = fe->demodulator_priv; vp7045_fe_release()
152 memcpy(&s->fe.ops, &vp7045_fe_ops, sizeof(struct dvb_frontend_ops)); vp7045_fe_attach()
153 s->fe.demodulator_priv = s; vp7045_fe_attach()
155 return &s->fe; vp7045_fe_attach()
H A Ddvb-usb-dvb.c32 if (adap->props.fe[adap->active_fe].streaming_ctrl != NULL) { dvb_usb_ctrl_feed()
33 ret = adap->props.fe[adap->active_fe].streaming_ctrl(adap, 0); dvb_usb_ctrl_feed()
48 if (adap->props.fe[adap->active_fe].caps & DVB_USB_ADAP_HAS_PID_FILTER && dvb_usb_ctrl_feed()
50 adap->props.fe[adap->active_fe].pid_filter != NULL) dvb_usb_ctrl_feed()
51 adap->props.fe[adap->active_fe].pid_filter(adap, dvbdmxfeed->index, dvbdmxfeed->pid, onoff); dvb_usb_ctrl_feed()
61 if (adap->props.fe[adap->active_fe].caps & DVB_USB_ADAP_HAS_PID_FILTER && dvb_usb_ctrl_feed()
62 adap->props.fe[adap->active_fe].caps & dvb_usb_ctrl_feed()
64 adap->props.fe[adap->active_fe].pid_filter_ctrl != NULL) { dvb_usb_ctrl_feed()
65 ret = adap->props.fe[adap->active_fe].pid_filter_ctrl(adap, dvb_usb_ctrl_feed()
73 if (adap->props.fe[adap->active_fe].streaming_ctrl != NULL) { dvb_usb_ctrl_feed()
74 ret = adap->props.fe[adap->active_fe].streaming_ctrl(adap, 1); dvb_usb_ctrl_feed()
227 static int dvb_usb_set_active_fe(struct dvb_frontend *fe, int onoff) dvb_usb_set_active_fe() argument
229 struct dvb_usb_adapter *adap = fe->dvb->priv; dvb_usb_set_active_fe()
232 adap->props.frontend_ctrl(fe, onoff) : 0; dvb_usb_set_active_fe()
239 adap->active_fe = fe->id; dvb_usb_set_active_fe()
244 static int dvb_usb_fe_wakeup(struct dvb_frontend *fe) dvb_usb_fe_wakeup() argument
246 struct dvb_usb_adapter *adap = fe->dvb->priv; dvb_usb_fe_wakeup()
250 dvb_usb_set_active_fe(fe, 1); dvb_usb_fe_wakeup()
252 if (adap->fe_adap[fe->id].fe_init) dvb_usb_fe_wakeup()
253 adap->fe_adap[fe->id].fe_init(fe); dvb_usb_fe_wakeup()
258 static int dvb_usb_fe_sleep(struct dvb_frontend *fe) dvb_usb_fe_sleep() argument
260 struct dvb_usb_adapter *adap = fe->dvb->priv; dvb_usb_fe_sleep()
262 if (adap->fe_adap[fe->id].fe_sleep) dvb_usb_fe_sleep()
263 adap->fe_adap[fe->id].fe_sleep(fe); dvb_usb_fe_sleep()
265 dvb_usb_set_active_fe(fe, 0); dvb_usb_fe_sleep()
277 if (adap->props.fe[i].frontend_attach == NULL) { dvb_usb_adapter_frontend_init()
285 ret = adap->props.fe[i].frontend_attach(adap); dvb_usb_adapter_frontend_init()
286 if (ret || adap->fe_adap[i].fe == NULL) { dvb_usb_adapter_frontend_init()
295 adap->fe_adap[i].fe->id = i; dvb_usb_adapter_frontend_init()
298 adap->fe_adap[i].fe_init = adap->fe_adap[i].fe->ops.init; dvb_usb_adapter_frontend_init()
299 adap->fe_adap[i].fe->ops.init = dvb_usb_fe_wakeup; dvb_usb_adapter_frontend_init()
300 adap->fe_adap[i].fe_sleep = adap->fe_adap[i].fe->ops.sleep; dvb_usb_adapter_frontend_init()
301 adap->fe_adap[i].fe->ops.sleep = dvb_usb_fe_sleep; dvb_usb_adapter_frontend_init()
303 if (dvb_register_frontend(&adap->dvb_adap, adap->fe_adap[i].fe)) { dvb_usb_adapter_frontend_init()
305 dvb_frontend_detach(adap->fe_adap[i].fe); dvb_usb_adapter_frontend_init()
306 adap->fe_adap[i].fe = NULL; dvb_usb_adapter_frontend_init()
316 if (adap->props.fe[i].tuner_attach != NULL) dvb_usb_adapter_frontend_init()
317 adap->props.fe[i].tuner_attach(adap); dvb_usb_adapter_frontend_init()
333 if (adap->fe_adap[i].fe != NULL) { dvb_usb_adapter_frontend_exit()
334 dvb_unregister_frontend(adap->fe_adap[i].fe); dvb_usb_adapter_frontend_exit()
335 dvb_frontend_detach(adap->fe_adap[i].fe); dvb_usb_adapter_frontend_exit()
H A Dgp8psk-fe.c20 struct dvb_frontend fe; member in struct:gp8psk_fe_state
28 static int gp8psk_tuned_to_DCII(struct dvb_frontend *fe) gp8psk_tuned_to_DCII() argument
30 struct gp8psk_fe_state *st = fe->demodulator_priv; gp8psk_tuned_to_DCII()
36 static int gp8psk_set_tuner_mode(struct dvb_frontend *fe, int mode) gp8psk_set_tuner_mode() argument
38 struct gp8psk_fe_state *state = fe->demodulator_priv; gp8psk_set_tuner_mode()
54 static int gp8psk_fe_read_status(struct dvb_frontend *fe, gp8psk_fe_read_status() argument
57 struct gp8psk_fe_state *st = fe->demodulator_priv; gp8psk_fe_read_status()
73 static int gp8psk_fe_read_ber(struct dvb_frontend* fe, u32 *ber) gp8psk_fe_read_ber() argument
75 (void) fe; gp8psk_fe_read_ber()
81 static int gp8psk_fe_read_unc_blocks(struct dvb_frontend* fe, u32 *unc) gp8psk_fe_read_unc_blocks() argument
83 (void) fe; gp8psk_fe_read_unc_blocks()
88 static int gp8psk_fe_read_snr(struct dvb_frontend* fe, u16 *snr) gp8psk_fe_read_snr() argument
90 struct gp8psk_fe_state *st = fe->demodulator_priv; gp8psk_fe_read_snr()
97 static int gp8psk_fe_read_signal_strength(struct dvb_frontend* fe, u16 *strength) gp8psk_fe_read_signal_strength() argument
99 struct gp8psk_fe_state *st = fe->demodulator_priv; gp8psk_fe_read_signal_strength()
111 static int gp8psk_fe_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings *tune) gp8psk_fe_get_tune_settings() argument
117 static int gp8psk_fe_set_frontend(struct dvb_frontend *fe) gp8psk_fe_set_frontend() argument
119 struct gp8psk_fe_state *state = fe->demodulator_priv; gp8psk_fe_set_frontend()
120 struct dtv_frontend_properties *c = &fe->dtv_property_cache; gp8psk_fe_set_frontend()
165 if (gp8psk_tuned_to_DCII(fe)) gp8psk_fe_set_frontend()
216 gp8psk_set_tuner_mode(fe, 0); gp8psk_fe_set_frontend()
226 static int gp8psk_fe_send_diseqc_msg (struct dvb_frontend* fe, gp8psk_fe_send_diseqc_msg() argument
229 struct gp8psk_fe_state *st = fe->demodulator_priv; gp8psk_fe_send_diseqc_msg()
240 static int gp8psk_fe_send_diseqc_burst(struct dvb_frontend *fe, gp8psk_fe_send_diseqc_burst() argument
243 struct gp8psk_fe_state *st = fe->demodulator_priv; gp8psk_fe_send_diseqc_burst()
258 static int gp8psk_fe_set_tone(struct dvb_frontend *fe, gp8psk_fe_set_tone() argument
261 struct gp8psk_fe_state* state = fe->demodulator_priv; gp8psk_fe_set_tone()
270 static int gp8psk_fe_set_voltage(struct dvb_frontend *fe, gp8psk_fe_set_voltage() argument
273 struct gp8psk_fe_state* state = fe->demodulator_priv; gp8psk_fe_set_voltage()
282 static int gp8psk_fe_enable_high_lnb_voltage(struct dvb_frontend* fe, long onoff) gp8psk_fe_enable_high_lnb_voltage() argument
284 struct gp8psk_fe_state* state = fe->demodulator_priv; gp8psk_fe_enable_high_lnb_voltage()
288 static int gp8psk_fe_send_legacy_dish_cmd (struct dvb_frontend* fe, unsigned long sw_cmd) gp8psk_fe_send_legacy_dish_cmd() argument
290 struct gp8psk_fe_state* state = fe->demodulator_priv; gp8psk_fe_send_legacy_dish_cmd()
305 static void gp8psk_fe_release(struct dvb_frontend* fe) gp8psk_fe_release() argument
307 struct gp8psk_fe_state *state = fe->demodulator_priv; gp8psk_fe_release()
320 memcpy(&s->fe.ops, &gp8psk_fe_ops, sizeof(struct dvb_frontend_ops)); gp8psk_fe_attach()
321 s->fe.demodulator_priv = s; gp8psk_fe_attach()
327 return &s->fe; gp8psk_fe_attach()
H A Ddtt200u-fe.c23 static int dtt200u_fe_read_status(struct dvb_frontend *fe, dtt200u_fe_read_status() argument
26 struct dtt200u_fe_state *state = fe->demodulator_priv; dtt200u_fe_read_status()
47 static int dtt200u_fe_read_ber(struct dvb_frontend* fe, u32 *ber) dtt200u_fe_read_ber() argument
49 struct dtt200u_fe_state *state = fe->demodulator_priv; dtt200u_fe_read_ber()
56 static int dtt200u_fe_read_unc_blocks(struct dvb_frontend* fe, u32 *unc) dtt200u_fe_read_unc_blocks() argument
58 struct dtt200u_fe_state *state = fe->demodulator_priv; dtt200u_fe_read_unc_blocks()
66 static int dtt200u_fe_read_signal_strength(struct dvb_frontend* fe, u16 *strength) dtt200u_fe_read_signal_strength() argument
68 struct dtt200u_fe_state *state = fe->demodulator_priv; dtt200u_fe_read_signal_strength()
75 static int dtt200u_fe_read_snr(struct dvb_frontend* fe, u16 *snr) dtt200u_fe_read_snr() argument
77 struct dtt200u_fe_state *state = fe->demodulator_priv; dtt200u_fe_read_snr()
84 static int dtt200u_fe_init(struct dvb_frontend* fe) dtt200u_fe_init() argument
86 struct dtt200u_fe_state *state = fe->demodulator_priv; dtt200u_fe_init()
91 static int dtt200u_fe_sleep(struct dvb_frontend* fe) dtt200u_fe_sleep() argument
93 return dtt200u_fe_init(fe); dtt200u_fe_sleep()
96 static int dtt200u_fe_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings *tune) dtt200u_fe_get_tune_settings() argument
104 static int dtt200u_fe_set_frontend(struct dvb_frontend *fe) dtt200u_fe_set_frontend() argument
106 struct dtv_frontend_properties *fep = &fe->dtv_property_cache; dtt200u_fe_set_frontend()
107 struct dtt200u_fe_state *state = fe->demodulator_priv; dtt200u_fe_set_frontend()
135 dtt200u_fe_read_status(fe, &st); dtt200u_fe_set_frontend()
143 static int dtt200u_fe_get_frontend(struct dvb_frontend* fe) dtt200u_fe_get_frontend() argument
145 struct dtv_frontend_properties *fep = &fe->dtv_property_cache; dtt200u_fe_get_frontend()
146 struct dtt200u_fe_state *state = fe->demodulator_priv; dtt200u_fe_get_frontend()
151 static void dtt200u_fe_release(struct dvb_frontend* fe) dtt200u_fe_release() argument
153 struct dtt200u_fe_state *state = (struct dtt200u_fe_state*) fe->demodulator_priv; dtt200u_fe_release()
H A Dumt-010.c18 static int umt_mt352_demod_init(struct dvb_frontend *fe) umt_mt352_demod_init() argument
35 mt352_write(fe, mt352_clock_config, sizeof(mt352_clock_config)); umt_mt352_demod_init()
37 mt352_write(fe, mt352_reset, sizeof(mt352_reset)); umt_mt352_demod_init()
38 mt352_write(fe, mt352_mclk_ratio, sizeof(mt352_mclk_ratio)); umt_mt352_demod_init()
40 mt352_write(fe, mt352_adc_ctl_1_cfg, sizeof(mt352_adc_ctl_1_cfg)); umt_mt352_demod_init()
41 mt352_write(fe, mt352_agc_cfg, sizeof(mt352_agc_cfg)); umt_mt352_demod_init()
43 mt352_write(fe, mt352_sec_agc_cfg1, sizeof(mt352_sec_agc_cfg1)); umt_mt352_demod_init()
44 mt352_write(fe, mt352_sec_agc_cfg2, sizeof(mt352_sec_agc_cfg2)); umt_mt352_demod_init()
45 mt352_write(fe, mt352_sec_agc_cfg3, sizeof(mt352_sec_agc_cfg3)); umt_mt352_demod_init()
46 mt352_write(fe, mt352_sec_agc_cfg4, sizeof(mt352_sec_agc_cfg4)); umt_mt352_demod_init()
47 mt352_write(fe, mt352_sec_agc_cfg5, sizeof(mt352_sec_agc_cfg5)); umt_mt352_demod_init()
49 mt352_write(fe, mt352_acq_ctl, sizeof(mt352_acq_ctl)); umt_mt352_demod_init()
50 mt352_write(fe, mt352_input_freq_1, sizeof(mt352_input_freq_1)); umt_mt352_demod_init()
63 adap->fe_adap[0].fe = dvb_attach(mt352_attach, &umt_config, &adap->dev->i2c_adap); umt_mt352_frontend_attach()
70 dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x61, NULL, DVB_PLL_TUA6034); umt_tuner_attach()
104 .fe = {{
H A Ddib0700_devices.c106 return (adap->fe_adap[0].fe = dvb_attach(dib3000mc_attach, &adap->dev->i2c_adap, bristol_frontend_attach()
123 struct i2c_adapter *tun_i2c = dib3000mc_get_tuner_i2c_master(adap->fe_adap[0].fe, 1); bristol_tuner_attach()
130 return dvb_attach(mt2060_attach, adap->fe_adap[0].fe, tun_i2c, bristol_tuner_attach()
300 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, stk7700P2_frontend_attach()
304 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; stk7700P2_frontend_attach()
334 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, stk7700d_frontend_attach()
338 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; stk7700d_frontend_attach()
346 tun_i2c = state->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, stk7700d_tuner_attach()
348 return dvb_attach(mt2266_attach, adap->fe_adap[0].fe, tun_i2c, stk7700d_tuner_attach()
429 state->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 0); stk7700ph_xc3028_callback()
431 state->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); stk7700ph_xc3028_callback()
486 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, stk7700ph_frontend_attach()
489 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; stk7700ph_frontend_attach()
497 tun_i2c = state->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, stk7700ph_tuner_attach()
503 adap->fe_adap[0].fe->callback = stk7700ph_xc3028_callback; stk7700ph_tuner_attach()
505 return dvb_attach(xc2028_attach, adap->fe_adap[0].fe, &stk7700ph_xc3028_config) stk7700ph_tuner_attach()
725 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 18, &stk7700p_dib7000p_config); stk7700p_frontend_attach()
729 adap->fe_adap[0].fe = dvb_attach(dib7000m_attach, &adap->dev->i2c_adap, 18, &stk7700p_dib7000m_config); stk7700p_frontend_attach()
732 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; stk7700p_frontend_attach()
753 tun_i2c = state->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_TUNER, 1); stk7700p_tuner_attach()
755 tun_i2c = dib7000m_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_TUNER, 1); stk7700p_tuner_attach()
757 return dvb_attach(mt2060_attach, adap->fe_adap[0].fe, tun_i2c, &stk7700p_mt2060_config, stk7700p_tuner_attach()
795 static int dib7070_tuner_reset(struct dvb_frontend *fe, int onoff) dib7070_tuner_reset() argument
797 struct dvb_usb_adapter *adap = fe->dvb->priv; dib7070_tuner_reset()
801 return state->dib7000p_ops.set_gpio(fe, 8, 0, !onoff); dib7070_tuner_reset()
804 static int dib7070_tuner_sleep(struct dvb_frontend *fe, int onoff) dib7070_tuner_sleep() argument
806 struct dvb_usb_adapter *adap = fe->dvb->priv; dib7070_tuner_sleep()
810 return state->dib7000p_ops.set_gpio(fe, 9, 0, onoff); dib7070_tuner_sleep()
840 static int dib7070_set_param_override(struct dvb_frontend *fe) dib7070_set_param_override() argument
842 struct dtv_frontend_properties *p = &fe->dtv_property_cache; dib7070_set_param_override()
843 struct dvb_usb_adapter *adap = fe->dvb->priv; dib7070_set_param_override()
853 deb_info("WBD for DiB7000P: %d\n", offset + dib0070_wbd_offset(fe)); dib7070_set_param_override()
854 state->dib7000p_ops.set_wbd_ref(fe, offset + dib0070_wbd_offset(fe)); dib7070_set_param_override()
855 return state->set_param_save(fe); dib7070_set_param_override()
858 static int dib7770_set_param_override(struct dvb_frontend *fe) dib7770_set_param_override() argument
860 struct dtv_frontend_properties *p = &fe->dtv_property_cache; dib7770_set_param_override()
861 struct dvb_usb_adapter *adap = fe->dvb->priv; dib7770_set_param_override()
868 state->dib7000p_ops.set_gpio(fe, 0, 0, 1); dib7770_set_param_override()
873 state->dib7000p_ops.set_gpio(fe, 0, 0, 0); dib7770_set_param_override()
877 deb_info("WBD for DiB7000P: %d\n", offset + dib0070_wbd_offset(fe)); dib7770_set_param_override()
878 state->dib7000p_ops.set_wbd_ref(fe, offset + dib0070_wbd_offset(fe)); dib7770_set_param_override()
879 return state->set_param_save(fe); dib7770_set_param_override()
885 struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, dib7770p_tuner_attach()
888 if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, dib7770p_tuner_attach()
892 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; dib7770p_tuner_attach()
893 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7770_set_param_override; dib7770p_tuner_attach()
900 struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_TUNER, 1); dib7070p_tuner_attach()
903 if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, &dib7070p_dib0070_config[0]) == NULL) dib7070p_tuner_attach()
906 if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, &dib7070p_dib0070_config[1]) == NULL) dib7070p_tuner_attach()
910 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; dib7070p_tuner_attach()
911 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7070_set_param_override; dib7070p_tuner_attach()
922 return state->dib7000p_ops.pid_filter(adapter->fe_adap[0].fe, index, pid, onoff); stk7700p_pid_filter()
923 return dib7000m_pid_filter(adapter->fe_adap[0].fe, index, pid, onoff); stk7700p_pid_filter()
931 return state->dib7000p_ops.pid_filter_ctrl(adapter->fe_adap[0].fe, onoff); stk7700p_pid_filter_ctrl()
932 return dib7000m_pid_filter_ctrl(adapter->fe_adap[0].fe, onoff); stk7700p_pid_filter_ctrl()
938 return state->dib7000p_ops.pid_filter(adapter->fe_adap[0].fe, index, pid, onoff); stk70x0p_pid_filter()
944 return state->dib7000p_ops.pid_filter_ctrl(adapter->fe_adap[0].fe, onoff); stk70x0p_pid_filter_ctrl()
1017 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, stk7070p_frontend_attach()
1019 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; stk7070p_frontend_attach()
1075 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, stk7770p_frontend_attach()
1077 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; stk7770p_frontend_attach()
1229 static int dib80xx_tuner_reset(struct dvb_frontend *fe, int onoff) dib80xx_tuner_reset() argument
1231 struct dvb_usb_adapter *adap = fe->dvb->priv; dib80xx_tuner_reset()
1234 return state->dib8000_ops.set_gpio(fe, 5, 0, !onoff); dib80xx_tuner_reset()
1237 static int dib80xx_tuner_sleep(struct dvb_frontend *fe, int onoff) dib80xx_tuner_sleep() argument
1239 struct dvb_usb_adapter *adap = fe->dvb->priv; dib80xx_tuner_sleep()
1242 return state->dib8000_ops.set_gpio(fe, 0, 0, onoff); dib80xx_tuner_sleep()
1282 static int dib807x_set_param_override(struct dvb_frontend *fe) dib807x_set_param_override() argument
1284 struct dtv_frontend_properties *p = &fe->dtv_property_cache; dib807x_set_param_override()
1285 struct dvb_usb_adapter *adap = fe->dvb->priv; dib807x_set_param_override()
1288 u16 offset = dib0070_wbd_offset(fe); dib807x_set_param_override()
1299 state->dib8000_ops.set_wbd_ref(fe, offset); dib807x_set_param_override()
1301 return state->set_param_save(fe); dib807x_set_param_override()
1307 struct i2c_adapter *tun_i2c = st->dib8000_ops.get_i2c_master(adap->fe_adap[0].fe, dib807x_tuner_attach()
1311 if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, dib807x_tuner_attach()
1315 if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, dib807x_tuner_attach()
1320 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; dib807x_tuner_attach()
1321 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib807x_set_param_override; dib807x_tuner_attach()
1330 return state->dib8000_ops.pid_filter(adapter->fe_adap[0].fe, index, pid, onoff); stk80xx_pid_filter()
1338 return state->dib8000_ops.pid_filter_ctrl(adapter->fe_adap[0].fe, onoff); stk80xx_pid_filter_ctrl()
1367 adap->fe_adap[0].fe = state->dib8000_ops.init(&adap->dev->i2c_adap, 0x80, stk807x_frontend_attach()
1370 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; stk807x_frontend_attach()
1401 adap->fe_adap[0].fe = state->dib8000_ops.init(&adap->dev->i2c_adap, 0x80, stk807xpvr_frontend_attach0()
1404 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; stk807xpvr_frontend_attach0()
1417 adap->fe_adap[0].fe = state->dib8000_ops.init(&adap->dev->i2c_adap, 0x82, stk807xpvr_frontend_attach1()
1420 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; stk807xpvr_frontend_attach1()
1535 static int dib8090_get_adc_power(struct dvb_frontend *fe) dib8090_get_adc_power() argument
1537 struct dvb_usb_adapter *adap = fe->dvb->priv; dib8090_get_adc_power()
1540 return state->dib8000_ops.get_adc_power(fe, 1); dib8090_get_adc_power()
1543 static void dib8090_agc_control(struct dvb_frontend *fe, u8 restart) dib8090_agc_control() argument
1546 dib0090_dcc_freq(fe, restart); dib8090_agc_control()
1549 dib0090_set_dc_servo(fe, 1); dib8090_agc_control()
1625 static u8 dib8090_compute_pll_parameters(struct dvb_frontend *fe) dib8090_compute_pll_parameters() argument
1633 ratio = ((fe->dtv_property_cache.frequency / 1000) * (1 << 8) / 1000) / freq_adc; dib8090_compute_pll_parameters()
1634 rest = ((fe->dtv_property_cache.frequency / 1000) * (1 << 8) / 1000) - ratio * freq_adc; dib8090_compute_pll_parameters()
1649 static int dib8096_set_param_override(struct dvb_frontend *fe) dib8096_set_param_override() argument
1651 struct dvb_usb_adapter *adap = fe->dvb->priv; dib8096_set_param_override()
1653 u8 pll_ratio, band = BAND_OF_FREQUENCY(fe->dtv_property_cache.frequency / 1000); dib8096_set_param_override()
1661 deb_info("Warning : Rf frequency (%iHz) is not in the supported range, using VHF switch ", fe->dtv_property_cache.frequency); dib8096_set_param_override()
1663 state->dib8000_ops.set_gpio(fe, 3, 0, 1); dib8096_set_param_override()
1666 state->dib8000_ops.set_gpio(fe, 3, 0, 0); dib8096_set_param_override()
1670 ret = state->set_param_save(fe); dib8096_set_param_override()
1674 if (fe->dtv_property_cache.bandwidth_hz != 6000000) { dib8096_set_param_override()
1680 state->dib8000_ops.update_pll(fe, &dib8090_pll_config_12mhz, fe->dtv_property_cache.bandwidth_hz / 1000, 0); dib8096_set_param_override()
1683 pll_ratio = dib8090_compute_pll_parameters(fe); dib8096_set_param_override()
1694 state->dib8000_ops.update_pll(fe, &dib8090_pll_config_12mhz, fe->dtv_property_cache.bandwidth_hz / 1000, pll_ratio); dib8096_set_param_override()
1696 state->dib8000_ops.ctrl_timf(fe, DEMOD_TIMF_SET, timf); dib8096_set_param_override()
1700 target = (dib0090_get_wbd_target(fe) * 8 * 18 / 33 + 1) / 2; dib8096_set_param_override()
1701 state->dib8000_ops.set_wbd_ref(fe, target); dib8096_set_param_override()
1706 dib0090_set_tune_state(fe, CT_AGC_START); dib8096_set_param_override()
1709 ret = dib0090_gain_control(fe); dib8096_set_param_override()
1711 tune_state = dib0090_get_tune_state(fe); dib8096_set_param_override()
1713 state->dib8000_ops.set_gpio(fe, 6, 0, 1); dib8096_set_param_override()
1715 dib0090_get_current_gain(fe, NULL, NULL, &rf_gain_limit, &ltgain); dib8096_set_param_override()
1717 state->dib8000_ops.set_gpio(fe, 6, 0, 0); dib8096_set_param_override()
1722 dib0090_pwm_gain_reset(fe); dib8096_set_param_override()
1723 state->dib8000_ops.pwm_agc_reset(fe); dib8096_set_param_override()
1724 state->dib8000_ops.set_tune_state(fe, CT_DEMOD_START); dib8096_set_param_override()
1728 dib0090_pwm_gain_reset(fe); dib8096_set_param_override()
1737 struct i2c_adapter *tun_i2c = st->dib8000_ops.get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_TUNER, 1); dib809x_tuner_attach()
1739 if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &dib809x_dib0090_config) == NULL) dib809x_tuner_attach()
1742 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; dib809x_tuner_attach()
1743 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib8096_set_param_override; dib809x_tuner_attach()
1771 adap->fe_adap[0].fe = state->dib8000_ops.init(&adap->dev->i2c_adap, 0x80, &dib809x_dib8000_config[0]); stk809x_frontend_attach()
1773 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; stk809x_frontend_attach()
1780 struct dvb_frontend *fe_slave = st->dib8000_ops.get_slave_frontend(adap->fe_adap[0].fe, 1); nim8096md_tuner_attach()
1786 fe_slave->dvb = adap->fe_adap[0].fe->dvb; nim8096md_tuner_attach()
1789 tun_i2c = st->dib8000_ops.get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_TUNER, 1); nim8096md_tuner_attach()
1790 if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &dib809x_dib0090_config) == NULL) nim8096md_tuner_attach()
1793 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; nim8096md_tuner_attach()
1794 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib8096_set_param_override; nim8096md_tuner_attach()
1826 adap->fe_adap[0].fe = state->dib8000_ops.init(&adap->dev->i2c_adap, 0x80, &dib809x_dib8000_config[0]); nim8096md_frontend_attach()
1827 if (adap->fe_adap[0].fe == NULL) nim8096md_frontend_attach()
1835 state->dib8000_ops.set_slave_frontend(adap->fe_adap[0].fe, fe_slave); nim8096md_frontend_attach()
2023 static int dib8096p_get_best_sampling(struct dvb_frontend *fe, struct dibx090p_best_adc *adc) dib8096p_get_best_sampling() argument
2038 deb_info("bandwidth = %d", fe->dtv_property_cache.bandwidth_hz); dib8096p_get_best_sampling()
2064 if ((fdem >= fdem_min) && (fmem <= fmem_max) && (fs >= fe->dtv_property_cache.bandwidth_hz / 1000)) { dib8096p_get_best_sampling()
2067 for (harmonic_id = (fe->dtv_property_cache.frequency / (1000 * fs)); harmonic_id <= ((fe->dtv_property_cache.frequency / (1000 * fs)) + 1); harmonic_id++) { dib8096p_get_best_sampling()
2068 if (((fs * harmonic_id) >= (fe->dtv_property_cache.frequency / 1000 - (fe->dtv_property_cache.bandwidth_hz / 2000))) && ((fs * harmonic_id) <= (fe->dtv_property_cache.frequency / 1000 + (fe->dtv_property_cache.bandwidth_hz / 2000)))) { dib8096p_get_best_sampling()
2080 deb_info("RF %6d; BW %6d; Xtal %6d; Fmem %6d; Fdem %6d; Fs %6d; Prediv %2d; Loopdiv %2d; Timf %8d;", fe->dtv_property_cache.frequency, fe->dtv_property_cache.bandwidth_hz, xtal, fmem, fdem, fs, prediv, loopdiv, adc->timf); dib8096p_get_best_sampling()
2095 static int dib8096p_agc_startup(struct dvb_frontend *fe) dib8096p_agc_startup() argument
2097 struct dvb_usb_adapter *adap = fe->dvb->priv; dib8096p_agc_startup()
2104 ret = state->set_param_save(fe); dib8096p_agc_startup()
2109 dib0090_pwm_gain_reset(fe); dib8096p_agc_startup()
2112 target = (dib0090_get_wbd_target(fe) * 8 + 1) / 2; dib8096p_agc_startup()
2113 state->dib8000_ops.set_wbd_ref(fe, target); dib8096p_agc_startup()
2115 if (dib8096p_get_best_sampling(fe, &adc) == 0) { dib8096p_agc_startup()
2120 state->dib8000_ops.update_pll(fe, &pll, fe->dtv_property_cache.bandwidth_hz / 1000, 0); dib8096p_agc_startup()
2121 state->dib8000_ops.ctrl_timf(fe, DEMOD_TIMF_SET, adc.timf); dib8096p_agc_startup()
2157 adap->fe_adap[0].fe = state->dib8000_ops.init(&adap->dev->i2c_adap, tfe8096p_frontend_attach()
2160 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; tfe8096p_frontend_attach()
2166 struct i2c_adapter *tun_i2c = st->dib8000_ops.get_i2c_tuner(adap->fe_adap[0].fe); tfe8096p_tuner_attach()
2172 if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, tfe8096p_tuner_attach()
2176 st->dib8000_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); tfe8096p_tuner_attach()
2178 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; tfe8096p_tuner_attach()
2179 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib8096p_agc_startup; tfe8096p_tuner_attach()
2186 return dib9000_fw_pid_filter(adapter->fe_adap[0].fe, index, pid, onoff); dib90x0_pid_filter()
2191 return dib9000_fw_pid_filter_ctrl(adapter->fe_adap[0].fe, onoff); dib90x0_pid_filter_ctrl()
2194 static int dib90x0_tuner_reset(struct dvb_frontend *fe, int onoff) dib90x0_tuner_reset() argument
2196 return dib9000_set_gpio(fe, 5, 0, !onoff); dib90x0_tuner_reset()
2199 static int dib90x0_tuner_sleep(struct dvb_frontend *fe, int onoff) dib90x0_tuner_sleep() argument
2201 return dib9000_set_gpio(fe, 0, 0, onoff); dib90x0_tuner_sleep()
2403 adap->fe_adap[0].fe = dvb_attach(dib9000_attach, &adap->dev->i2c_adap, 0x80, &stk9090m_config); stk9090m_frontend_attach()
2405 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; stk9090m_frontend_attach()
2411 struct i2c_adapter *i2c = dib9000_get_tuner_interface(adap->fe_adap[0].fe); dib9090_tuner_attach()
2420 if (dvb_attach(dib0090_fw_register, adap->fe_adap[0].fe, i2c, &dib9090_dib0090_config) == NULL) dib9090_tuner_attach()
2422 i2c = dib9000_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_1_2, 0); dib9090_tuner_attach()
2426 if (dib9000_firmware_post_pll_init(adap->fe_adap[0].fe) < 0) dib9090_tuner_attach()
2472 adap->fe_adap[0].fe = dvb_attach(dib9000_attach, &adap->dev->i2c_adap, 0x80, &nim9090md_config[0]); nim9090md_frontend_attach()
2474 if (adap->fe_adap[0].fe == NULL) nim9090md_frontend_attach()
2477 i2c = dib9000_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_3_4, 0); nim9090md_frontend_attach()
2481 dib9000_set_slave_frontend(adap->fe_adap[0].fe, fe_slave); nim9090md_frontend_attach()
2498 i2c = dib9000_get_tuner_interface(adap->fe_adap[0].fe); nim9090md_tuner_attach()
2499 if (dvb_attach(dib0090_fw_register, adap->fe_adap[0].fe, i2c, &nim9090md_dib0090_config[0]) == NULL) nim9090md_tuner_attach()
2501 i2c = dib9000_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_1_2, 0); nim9090md_tuner_attach()
2506 if (dib9000_firmware_post_pll_init(adap->fe_adap[0].fe) < 0) nim9090md_tuner_attach()
2509 fe_slave = dib9000_get_slave_frontend(adap->fe_adap[0].fe, 1); nim9090md_tuner_attach()
2511 i2c = dib9000_get_component_bus_interface(adap->fe_adap[0].fe); nim9090md_tuner_attach()
2517 fe_slave->dvb = adap->fe_adap[0].fe->dvb; nim9090md_tuner_attach()
2518 dib9000_fw_set_component_bus_speed(adap->fe_adap[0].fe, 1500); nim9090md_tuner_attach()
2528 static int dib7090p_get_best_sampling(struct dvb_frontend *fe , struct dibx090p_best_adc *adc) dib7090p_get_best_sampling()
2544 deb_info("bandwidth = %d fdem_min =%d", fe->dtv_property_cache.bandwidth_hz, fdem_min); dib7090p_get_best_sampling()
2569 if ((fdem >= fdem_min) && (fdem <= fdem_max) && (fs >= fe->dtv_property_cache.bandwidth_hz/1000)) { dib7090p_get_best_sampling()
2572 for (harmonic_id = (fe->dtv_property_cache.frequency / (1000*fs)) ; harmonic_id <= ((fe->dtv_property_cache.frequency / (1000*fs))+1) ; harmonic_id++) { dib7090p_get_best_sampling()
2573 if (((fs*harmonic_id) >= ((fe->dtv_property_cache.frequency/1000) - (fe->dtv_property_cache.bandwidth_hz/2000))) && ((fs*harmonic_id) <= ((fe->dtv_property_cache.frequency/1000) + (fe->dtv_property_cache.bandwidth_hz/2000)))) { dib7090p_get_best_sampling()
2601 static int dib7090_agc_startup(struct dvb_frontend *fe) dib7090_agc_startup() argument
2603 struct dvb_usb_adapter *adap = fe->dvb->priv; dib7090_agc_startup()
2610 ret = state->set_param_save(fe); dib7090_agc_startup()
2615 dib0090_pwm_gain_reset(fe); dib7090_agc_startup()
2616 target = (dib0090_get_wbd_target(fe) * 8 + 1) / 2; dib7090_agc_startup()
2617 state->dib7000p_ops.set_wbd_ref(fe, target); dib7090_agc_startup()
2619 if (dib7090p_get_best_sampling(fe, &adc) == 0) { dib7090_agc_startup()
2623 state->dib7000p_ops.update_pll(fe, &pll); dib7090_agc_startup()
2624 state->dib7000p_ops.ctrl_timf(fe, DEMOD_TIMF_SET, adc.timf); dib7090_agc_startup()
2629 static int dib7090_agc_restart(struct dvb_frontend *fe, u8 restart) dib7090_agc_restart() argument
2633 dib0090_set_dc_servo(fe, 1); dib7090_agc_restart()
2637 static int tfe7790p_update_lna(struct dvb_frontend *fe, u16 agc_global) tfe7790p_update_lna() argument
2639 struct dvb_usb_adapter *adap = fe->dvb->priv; tfe7790p_update_lna()
2645 state->dib7000p_ops.set_gpio(fe, 8, 0, 0); tfe7790p_update_lna()
2646 state->dib7000p_ops.set_agc1_min(fe, 0); tfe7790p_update_lna()
2648 state->dib7000p_ops.set_gpio(fe, 8, 0, 1); tfe7790p_update_lna()
2649 state->dib7000p_ops.set_agc1_min(fe, 32768); tfe7790p_update_lna()
2792 static int tfe7090p_pvr_update_lna(struct dvb_frontend *fe, u16 agc_global) tfe7090p_pvr_update_lna() argument
2794 struct dvb_usb_adapter *adap = fe->dvb->priv; tfe7090p_pvr_update_lna()
2799 state->dib7000p_ops.set_gpio(fe, 5, 0, 0); tfe7090p_pvr_update_lna()
2800 state->dib7000p_ops.set_agc1_min(fe, 0); tfe7090p_pvr_update_lna()
2802 state->dib7000p_ops.set_gpio(fe, 5, 0, 1); tfe7090p_pvr_update_lna()
2803 state->dib7000p_ops.set_agc1_min(fe, 32768); tfe7090p_pvr_update_lna()
3042 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, &nim7090_dib7000p_config); nim7090_frontend_attach()
3044 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; nim7090_frontend_attach()
3050 struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_tuner(adap->fe_adap[0].fe); nim7090_tuner_attach()
3056 if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &nim7090_dib0090_config) == NULL) nim7090_tuner_attach()
3059 st->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); nim7090_tuner_attach()
3061 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; nim7090_tuner_attach()
3062 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7090_agc_startup; nim7090_tuner_attach()
3097 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x90, &tfe7090pvr_dib7000p_config[0]); tfe7090pvr_frontend0_attach()
3098 if (adap->fe_adap[0].fe == NULL) tfe7090pvr_frontend0_attach()
3101 state->dib7000p_ops.slave_reset(adap->fe_adap[0].fe); tfe7090pvr_frontend0_attach()
3111 if (adap->dev->adapter[0].fe_adap[0].fe == NULL) { tfe7090pvr_frontend1_attach()
3119 i2c = state->dib7000p_ops.get_i2c_master(adap->dev->adapter[0].fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_6_7, 1); tfe7090pvr_frontend1_attach()
3126 adap->fe_adap[0].fe = state->dib7000p_ops.init(i2c, 0x92, &tfe7090pvr_dib7000p_config[1]); tfe7090pvr_frontend1_attach()
3129 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; tfe7090pvr_frontend1_attach()
3135 struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_tuner(adap->fe_adap[0].fe); tfe7090pvr_tuner0_attach()
3141 if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &tfe7090pvr_dib0090_config[0]) == NULL) tfe7090pvr_tuner0_attach()
3144 st->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); tfe7090pvr_tuner0_attach()
3146 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; tfe7090pvr_tuner0_attach()
3147 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7090_agc_startup; tfe7090pvr_tuner0_attach()
3154 struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_tuner(adap->fe_adap[0].fe); tfe7090pvr_tuner1_attach()
3160 if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &tfe7090pvr_dib0090_config[1]) == NULL) tfe7090pvr_tuner1_attach()
3163 st->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); tfe7090pvr_tuner1_attach()
3165 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; tfe7090pvr_tuner1_attach()
3166 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7090_agc_startup; tfe7090pvr_tuner1_attach()
3200 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, tfe7790p_frontend_attach()
3203 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; tfe7790p_frontend_attach()
3210 st->dib7000p_ops.get_i2c_tuner(adap->fe_adap[0].fe); tfe7790p_tuner_attach()
3217 if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, tfe7790p_tuner_attach()
3221 st->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); tfe7790p_tuner_attach()
3223 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; tfe7790p_tuner_attach()
3224 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7090_agc_startup; tfe7790p_tuner_attach()
3296 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, &stk7070pd_dib7000p_config[0]); stk7070pd_frontend_attach0()
3297 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; stk7070pd_frontend_attach0()
3307 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x82, &stk7070pd_dib7000p_config[1]); stk7070pd_frontend_attach1()
3308 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; stk7070pd_frontend_attach1()
3311 static int novatd_read_status_override(struct dvb_frontend *fe, novatd_read_status_override() argument
3314 struct dvb_usb_adapter *adap = fe->dvb->priv; novatd_read_status_override()
3319 ret = state->read_status(fe, stat); novatd_read_status_override()
3328 static int novatd_sleep_override(struct dvb_frontend* fe) novatd_sleep_override() argument
3330 struct dvb_usb_adapter *adap = fe->dvb->priv; novatd_sleep_override()
3337 return state->sleep(fe); novatd_sleep_override()
3372 adap->fe_adap[0].fe = state->dib7000p_ops.init(&dev->i2c_adap, novatd_frontend_attach()
3376 if (adap->fe_adap[0].fe == NULL) novatd_frontend_attach()
3379 st->read_status = adap->fe_adap[0].fe->ops.read_status; novatd_frontend_attach()
3380 adap->fe_adap[0].fe->ops.read_status = novatd_read_status_override; novatd_frontend_attach()
3381 st->sleep = adap->fe_adap[0].fe->ops.sleep; novatd_frontend_attach()
3382 adap->fe_adap[0].fe->ops.sleep = novatd_sleep_override; novatd_frontend_attach()
3439 adap->fe_adap[0].fe = dvb_attach(s5h1411_attach, &pinnacle_801e_config, s5h1411_frontend_attach()
3441 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; s5h1411_frontend_attach()
3471 adap->fe_adap[0].fe->callback = dib0700_xc5000_tuner_callback; xc5000_tuner_attach()
3473 return dvb_attach(xc5000_attach, adap->fe_adap[0].fe, &adap->dev->i2c_adap, xc5000_tuner_attach()
3486 state->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 0); dib0700_xc4000_tuner_callback()
3488 state->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); dib0700_xc4000_tuner_callback()
3607 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x12, pctv340e_frontend_attach()
3611 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; pctv340e_frontend_attach()
3628 tun_i2c = state->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, xc4000_tuner_attach()
3636 adap->fe_adap[0].fe->callback = dib0700_xc4000_tuner_callback; xc4000_tuner_attach()
3638 return dvb_attach(xc4000_attach, adap->fe_adap[0].fe, tun_i2c, xc4000_tuner_attach()
3680 /* fe power enable */ lgdt3305_frontend_attach()
3694 adap->fe_adap[0].fe = dvb_attach(lgdt3305_attach, lgdt3305_frontend_attach()
3698 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; lgdt3305_frontend_attach()
3703 return dvb_attach(mxl5007t_attach, adap->fe_adap[0].fe, mxl5007t_tuner_attach()
3836 .fe = {{
3900 .fe = {{
3908 .fe = {{
3940 .fe = {{
3952 .fe = {{
4005 .fe = {{
4050 .fe = {{
4131 .fe = {{
4176 .fe = {{
4188 .fe = {{
4233 .fe = {{
4245 .fe = {{
4299 .fe = {{
4311 .fe = {{
4348 .fe = {{
4416 .fe = {{
4452 .fe = {{
4478 .fe = {{
4528 .fe = {{
4572 .fe = {{
4585 .fe = {{
4621 .fe = {{
4658 .fe = {{
4695 .fe = {{
4732 .fe = {{
4769 .fe = {{
4806 .fe = {{
4820 .fe = {{
4857 .fe = {{
4892 .fe = {{
4929 .fe = {{
H A Dvp702x-fe.c24 struct dvb_frontend fe; member in struct:vp702x_fe_state
75 static int vp702x_fe_read_status(struct dvb_frontend *fe, vp702x_fe_read_status() argument
78 struct vp702x_fe_state *st = fe->demodulator_priv; vp702x_fe_read_status()
95 static int vp702x_fe_read_ber(struct dvb_frontend* fe, u32 *ber) vp702x_fe_read_ber() argument
97 struct vp702x_fe_state *st = fe->demodulator_priv; vp702x_fe_read_ber()
104 static int vp702x_fe_read_unc_blocks(struct dvb_frontend* fe, u32 *unc) vp702x_fe_read_unc_blocks() argument
106 struct vp702x_fe_state *st = fe->demodulator_priv; vp702x_fe_read_unc_blocks()
112 static int vp702x_fe_read_signal_strength(struct dvb_frontend* fe, u16 *strength) vp702x_fe_read_signal_strength() argument
114 struct vp702x_fe_state *st = fe->demodulator_priv; vp702x_fe_read_signal_strength()
121 static int vp702x_fe_read_snr(struct dvb_frontend* fe, u16 *snr) vp702x_fe_read_snr() argument
124 struct vp702x_fe_state *st = fe->demodulator_priv; vp702x_fe_read_snr()
132 static int vp702x_fe_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings *tune) vp702x_fe_get_tune_settings() argument
139 static int vp702x_fe_set_frontend(struct dvb_frontend *fe) vp702x_fe_set_frontend() argument
141 struct dtv_frontend_properties *fep = &fe->dtv_property_cache; vp702x_fe_set_frontend()
142 struct vp702x_fe_state *st = fe->demodulator_priv; vp702x_fe_set_frontend()
201 static int vp702x_fe_init(struct dvb_frontend *fe) vp702x_fe_init() argument
203 struct vp702x_fe_state *st = fe->demodulator_priv; vp702x_fe_init()
209 static int vp702x_fe_sleep(struct dvb_frontend *fe) vp702x_fe_sleep() argument
215 static int vp702x_fe_send_diseqc_msg (struct dvb_frontend* fe, vp702x_fe_send_diseqc_msg() argument
219 struct vp702x_fe_state *st = fe->demodulator_priv; vp702x_fe_send_diseqc_msg()
247 static int vp702x_fe_send_diseqc_burst(struct dvb_frontend *fe, vp702x_fe_send_diseqc_burst() argument
254 static int vp702x_fe_set_tone(struct dvb_frontend *fe, vp702x_fe_set_tone() argument
257 struct vp702x_fe_state *st = fe->demodulator_priv; vp702x_fe_set_tone()
288 static int vp702x_fe_set_voltage(struct dvb_frontend *fe, vp702x_fe_set_voltage() argument
291 struct vp702x_fe_state *st = fe->demodulator_priv; vp702x_fe_set_voltage()
320 static void vp702x_fe_release(struct dvb_frontend* fe) vp702x_fe_release() argument
322 struct vp702x_fe_state *st = fe->demodulator_priv; vp702x_fe_release()
336 memcpy(&s->fe.ops,&vp702x_fe_ops,sizeof(struct dvb_frontend_ops)); vp702x_fe_attach()
337 s->fe.demodulator_priv = s; vp702x_fe_attach()
342 return &s->fe; vp702x_fe_attach()
H A DcinergyT2-fe.c140 struct dvb_frontend fe; member in struct:cinergyt2_fe_state
144 static int cinergyt2_fe_read_status(struct dvb_frontend *fe, cinergyt2_fe_read_status() argument
147 struct cinergyt2_fe_state *state = fe->demodulator_priv; cinergyt2_fe_read_status()
177 static int cinergyt2_fe_read_ber(struct dvb_frontend *fe, u32 *ber) cinergyt2_fe_read_ber() argument
179 struct cinergyt2_fe_state *state = fe->demodulator_priv; cinergyt2_fe_read_ber()
193 static int cinergyt2_fe_read_unc_blocks(struct dvb_frontend *fe, u32 *unc) cinergyt2_fe_read_unc_blocks() argument
195 struct cinergyt2_fe_state *state = fe->demodulator_priv; cinergyt2_fe_read_unc_blocks()
211 static int cinergyt2_fe_read_signal_strength(struct dvb_frontend *fe, cinergyt2_fe_read_signal_strength() argument
214 struct cinergyt2_fe_state *state = fe->demodulator_priv; cinergyt2_fe_read_signal_strength()
230 static int cinergyt2_fe_read_snr(struct dvb_frontend *fe, u16 *snr) cinergyt2_fe_read_snr() argument
232 struct cinergyt2_fe_state *state = fe->demodulator_priv; cinergyt2_fe_read_snr()
247 static int cinergyt2_fe_init(struct dvb_frontend *fe) cinergyt2_fe_init() argument
252 static int cinergyt2_fe_sleep(struct dvb_frontend *fe) cinergyt2_fe_sleep() argument
258 static int cinergyt2_fe_get_tune_settings(struct dvb_frontend *fe, cinergyt2_fe_get_tune_settings() argument
265 static int cinergyt2_fe_set_frontend(struct dvb_frontend *fe) cinergyt2_fe_set_frontend() argument
267 struct dtv_frontend_properties *fep = &fe->dtv_property_cache; cinergyt2_fe_set_frontend()
268 struct cinergyt2_fe_state *state = fe->demodulator_priv; cinergyt2_fe_set_frontend()
300 static void cinergyt2_fe_release(struct dvb_frontend *fe) cinergyt2_fe_release() argument
302 struct cinergyt2_fe_state *state = fe->demodulator_priv; cinergyt2_fe_release()
316 memcpy(&s->fe.ops, &cinergyt2_fe_ops, sizeof(struct dvb_frontend_ops)); cinergyt2_fe_attach()
317 s->fe.demodulator_priv = s; cinergyt2_fe_attach()
318 return &s->fe; cinergyt2_fe_attach()
H A Dcxusb.c396 struct usb_data_stream_properties *p = &d->props.adapter[0].fe[0].stream; cxusb_d680_dmb_drain_video()
635 static int cxusb_dee1601_demod_init(struct dvb_frontend* fe) cxusb_dee1601_demod_init() argument
644 mt352_write(fe, clock_config, sizeof(clock_config)); cxusb_dee1601_demod_init()
646 mt352_write(fe, reset, sizeof(reset)); cxusb_dee1601_demod_init()
647 mt352_write(fe, adc_ctl_1_cfg, sizeof(adc_ctl_1_cfg)); cxusb_dee1601_demod_init()
649 mt352_write(fe, agc_cfg, sizeof(agc_cfg)); cxusb_dee1601_demod_init()
650 mt352_write(fe, gpp_ctl_cfg, sizeof(gpp_ctl_cfg)); cxusb_dee1601_demod_init()
651 mt352_write(fe, capt_range_cfg, sizeof(capt_range_cfg)); cxusb_dee1601_demod_init()
656 static int cxusb_mt352_demod_init(struct dvb_frontend* fe) cxusb_mt352_demod_init() argument
665 mt352_write(fe, clock_config, sizeof(clock_config)); cxusb_mt352_demod_init()
667 mt352_write(fe, reset, sizeof(reset)); cxusb_mt352_demod_init()
668 mt352_write(fe, adc_ctl_1_cfg, sizeof(adc_ctl_1_cfg)); cxusb_mt352_demod_init()
670 mt352_write(fe, agc_cfg, sizeof(agc_cfg)); cxusb_mt352_demod_init()
671 mt352_write(fe, gpp_ctl_cfg, sizeof(gpp_ctl_cfg)); cxusb_mt352_demod_init()
672 mt352_write(fe, capt_range_cfg, sizeof(capt_range_cfg)); cxusb_mt352_demod_init()
774 dvb_attach(simple_tuner_attach, adap->fe_adap[0].fe, cxusb_fmd1216me_tuner_attach()
782 dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x61, cxusb_dee1601_tuner_attach()
789 dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x61, NULL, DVB_PLL_LG_Z201); cxusb_lgz201_tuner_attach()
795 dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x60, cxusb_dtt7579_tuner_attach()
802 dvb_attach(simple_tuner_attach, adap->fe_adap[0].fe, cxusb_lgh064f_tuner_attach()
832 struct dvb_frontend *fe; cxusb_dvico_xc3028_tuner_attach() local
844 adap->fe_adap[0].fe->callback = dvico_bluebird_xc2028_callback; cxusb_dvico_xc3028_tuner_attach()
846 fe = dvb_attach(xc2028_attach, adap->fe_adap[0].fe, &cfg); cxusb_dvico_xc3028_tuner_attach()
847 if (fe == NULL || fe->ops.tuner_ops.set_config == NULL) cxusb_dvico_xc3028_tuner_attach()
850 fe->ops.tuner_ops.set_config(fe, &ctl); cxusb_dvico_xc3028_tuner_attach()
857 dvb_attach(mxl5005s_attach, adap->fe_adap[0].fe, cxusb_mxl5003s_tuner_attach()
864 struct dvb_frontend *fe; cxusb_d680_dmb_tuner_attach() local
865 fe = dvb_attach(mxl5005s_attach, adap->fe_adap[0].fe, cxusb_d680_dmb_tuner_attach()
867 return (fe == NULL) ? -EIO : 0; cxusb_d680_dmb_tuner_attach()
872 struct dvb_frontend *fe; cxusb_mygica_d689_tuner_attach() local
873 fe = dvb_attach(max2165_attach, adap->fe_adap[0].fe, cxusb_mygica_d689_tuner_attach()
875 return (fe == NULL) ? -EIO : 0; cxusb_mygica_d689_tuner_attach()
886 adap->fe_adap[0].fe = dvb_attach(cx22702_attach, &cxusb_cx22702_config, cxusb_cx22702_frontend_attach()
888 if ((adap->fe_adap[0].fe) != NULL) cxusb_cx22702_frontend_attach()
901 adap->fe_adap[0].fe = dvb_attach(lgdt330x_attach, cxusb_lgdt3303_frontend_attach()
904 if ((adap->fe_adap[0].fe) != NULL) cxusb_lgdt3303_frontend_attach()
912 adap->fe_adap[0].fe = dvb_attach(lgdt330x_attach, &cxusb_aver_lgdt3303_config, cxusb_aver_lgdt3303_frontend_attach()
914 if (adap->fe_adap[0].fe != NULL) cxusb_aver_lgdt3303_frontend_attach()
928 adap->fe_adap[0].fe = dvb_attach(mt352_attach, &cxusb_mt352_config, cxusb_mt352_frontend_attach()
930 if ((adap->fe_adap[0].fe) != NULL) cxusb_mt352_frontend_attach()
943 adap->fe_adap[0].fe = dvb_attach(mt352_attach, &cxusb_dee1601_config, cxusb_dee1601_frontend_attach()
945 if ((adap->fe_adap[0].fe) != NULL) cxusb_dee1601_frontend_attach()
948 adap->fe_adap[0].fe = dvb_attach(zl10353_attach, cxusb_dee1601_frontend_attach()
951 if ((adap->fe_adap[0].fe) != NULL) cxusb_dee1601_frontend_attach()
974 adap->fe_adap[0].fe = cxusb_dualdig4_frontend_attach()
978 if ((adap->fe_adap[0].fe) == NULL) cxusb_dualdig4_frontend_attach()
1100 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, cxusb_dualdig4_rev2_frontend_attach()
1102 if (adap->fe_adap[0].fe == NULL) cxusb_dualdig4_rev2_frontend_attach()
1108 static int dib7070_tuner_reset(struct dvb_frontend *fe, int onoff) dib7070_tuner_reset() argument
1110 struct dvb_usb_adapter *adap = fe->dvb->priv; dib7070_tuner_reset()
1113 return state->dib7000p_ops.set_gpio(fe, 8, 0, !onoff); dib7070_tuner_reset()
1116 static int dib7070_tuner_sleep(struct dvb_frontend *fe, int onoff) dib7070_tuner_sleep() argument
1128 static int dib7070_set_param_override(struct dvb_frontend *fe) dib7070_set_param_override() argument
1130 struct dtv_frontend_properties *p = &fe->dtv_property_cache; dib7070_set_param_override()
1131 struct dvb_usb_adapter *adap = fe->dvb->priv; dib7070_set_param_override()
1142 state->dib7000p_ops.set_wbd_ref(fe, offset + dib0070_wbd_offset(fe)); dib7070_set_param_override()
1144 return state->set_param_save(fe); dib7070_set_param_override()
1157 tun_i2c = st->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, cxusb_dualdig4_rev2_tuner_attach()
1160 if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, cxusb_dualdig4_rev2_tuner_attach()
1164 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; cxusb_dualdig4_rev2_tuner_attach()
1165 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7070_set_param_override; cxusb_dualdig4_rev2_tuner_attach()
1181 adap->fe_adap[0].fe = dvb_attach(zl10353_attach, cxusb_nano2_frontend_attach()
1184 if ((adap->fe_adap[0].fe) != NULL) cxusb_nano2_frontend_attach()
1187 adap->fe_adap[0].fe = dvb_attach(mt352_attach, cxusb_nano2_frontend_attach()
1190 if ((adap->fe_adap[0].fe) != NULL) cxusb_nano2_frontend_attach()
1225 usb_rcvbulkpipe(d->udev, d->props.adapter[0].fe[0].stream.endpoint)); cxusb_d680_dmb_frontend_attach()
1247 adap->fe_adap[0].fe = dvb_attach(lgs8gxx_attach, &d680_lgs8gl5_cfg, &d->i2c_adap); cxusb_d680_dmb_frontend_attach()
1248 if (adap->fe_adap[0].fe == NULL) cxusb_d680_dmb_frontend_attach()
1282 usb_rcvbulkpipe(d->udev, d->props.adapter[0].fe[0].stream.endpoint)); cxusb_mygica_d689_frontend_attach()
1298 adap->fe_adap[0].fe = dvb_attach(atbm8830_attach, &mygica_d689_atbm8830_cfg, cxusb_mygica_d689_frontend_attach()
1300 if (adap->fe_adap[0].fe == NULL) cxusb_mygica_d689_frontend_attach()
1327 usb_rcvbulkpipe(d->udev, d->props.adapter[0].fe[0].stream.endpoint)); cxusb_mygica_t230_frontend_attach()
1331 si2168_config.fe = &adap->fe_adap[0].fe; cxusb_mygica_t230_frontend_attach()
1352 si2157_config.fe = adap->fe_adap[0].fe; cxusb_mygica_t230_frontend_attach()
1624 .fe = {{
1672 .fe = {{
1729 .fe = {{
1793 .fe = {{
1848 .fe = {{
1900 .fe = {{
1953 .fe = {{
2008 .fe = {{
2060 .fe = {{
2106 .fe = {{
2158 .fe = {{
2212 .fe = {{
2266 .fe = {{
H A Ddw2102.c123 /* fe hook functions*/
125 int (*fe_read_status)(struct dvb_frontend *fe,
952 static int dw210x_set_voltage(struct dvb_frontend *fe, dw210x_set_voltage() argument
966 (struct dvb_usb_adapter *)(fe->dvb->priv); dw210x_set_voltage()
977 static int s660_set_voltage(struct dvb_frontend *fe, s660_set_voltage() argument
981 (struct dvb_usb_adapter *)(fe->dvb->priv); s660_set_voltage()
984 dw210x_set_voltage(fe, voltage); s660_set_voltage()
986 st->old_set_voltage(fe, voltage); s660_set_voltage()
991 static void dw210x_led_ctrl(struct dvb_frontend *fe, int offon) dw210x_led_ctrl() argument
1002 (struct dvb_usb_adapter *)(fe->dvb->priv); dw210x_led_ctrl()
1009 static int tt_s2_4600_read_status(struct dvb_frontend *fe, tt_s2_4600_read_status() argument
1013 (struct dvb_usb_adapter *)(fe->dvb->priv); tt_s2_4600_read_status()
1017 ret = st->fe_read_status(fe, status); tt_s2_4600_read_status()
1188 d->fe_adap[0].fe = dvb_attach(stv0900_attach, &dw2104a_stv0900_config, dw2104_frontend_attach()
1190 if (d->fe_adap[0].fe != NULL) { dw2104_frontend_attach()
1191 if (dvb_attach(stb6100_attach, d->fe_adap[0].fe, dw2104_frontend_attach()
1194 tuner_ops = &d->fe_adap[0].fe->ops.tuner_ops; dw2104_frontend_attach()
1199 d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage; dw2104_frontend_attach()
1207 d->fe_adap[0].fe = dvb_attach(stv0900_attach, &dw2104_stv0900_config, dw2104_frontend_attach()
1209 if (d->fe_adap[0].fe != NULL) { dw2104_frontend_attach()
1210 if (dvb_attach(stv6110_attach, d->fe_adap[0].fe, dw2104_frontend_attach()
1213 d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage; dw2104_frontend_attach()
1221 d->fe_adap[0].fe = dvb_attach(cx24116_attach, &dw2104_config, dw2104_frontend_attach()
1223 if (d->fe_adap[0].fe != NULL) { dw2104_frontend_attach()
1224 d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage; dw2104_frontend_attach()
1230 d->fe_adap[0].fe = dvb_attach(ds3000_attach, &dw2104_ds3000_config, dw2104_frontend_attach()
1232 if (d->fe_adap[0].fe != NULL) { dw2104_frontend_attach()
1233 dvb_attach(ts2020_attach, d->fe_adap[0].fe, dw2104_frontend_attach()
1235 d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage; dw2104_frontend_attach()
1251 d->fe_adap[0].fe = dvb_attach(si21xx_attach, &serit_sp1511lhb_config, dw2102_frontend_attach()
1253 if (d->fe_adap[0].fe != NULL) { dw2102_frontend_attach()
1254 d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage; dw2102_frontend_attach()
1261 d->fe_adap[0].fe = dvb_attach(stv0288_attach, &earda_config, dw2102_frontend_attach()
1263 if (d->fe_adap[0].fe != NULL) { dw2102_frontend_attach()
1264 if (dvb_attach(stb6000_attach, d->fe_adap[0].fe, 0x61, dw2102_frontend_attach()
1266 d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage; dw2102_frontend_attach()
1275 d->fe_adap[0].fe = dvb_attach(stv0299_attach, &sharp_z0194a_config, dw2102_frontend_attach()
1277 if (d->fe_adap[0].fe != NULL) { dw2102_frontend_attach()
1278 d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage; dw2102_frontend_attach()
1288 d->fe_adap[0].fe = dvb_attach(tda10023_attach, &dw3101_tda10023_config, dw3101_frontend_attach()
1290 if (d->fe_adap[0].fe != NULL) { dw3101_frontend_attach()
1299 d->fe_adap[0].fe = dvb_attach(mt312_attach, &zl313_config, zl100313_frontend_attach()
1301 if (d->fe_adap[0].fe != NULL) { zl100313_frontend_attach()
1302 if (dvb_attach(zl10039_attach, d->fe_adap[0].fe, 0x60, zl100313_frontend_attach()
1304 d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage; zl100313_frontend_attach()
1317 d->fe_adap[0].fe = dvb_attach(stv0288_attach, &earda_config, stv0288_frontend_attach()
1320 if (d->fe_adap[0].fe == NULL) stv0288_frontend_attach()
1323 if (NULL == dvb_attach(stb6000_attach, d->fe_adap[0].fe, 0x61, &d->dev->i2c_adap)) stv0288_frontend_attach()
1326 d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage; stv0288_frontend_attach()
1341 d->fe_adap[0].fe = dvb_attach(ds3000_attach, &s660_ds3000_config, ds3000_frontend_attach()
1344 if (d->fe_adap[0].fe == NULL) ds3000_frontend_attach()
1347 dvb_attach(ts2020_attach, d->fe_adap[0].fe, &s660_ts2020_config, ds3000_frontend_attach()
1350 st->old_set_voltage = d->fe_adap[0].fe->ops.set_voltage; ds3000_frontend_attach()
1351 d->fe_adap[0].fe->ops.set_voltage = s660_set_voltage; ds3000_frontend_attach()
1364 d->fe_adap[0].fe = dvb_attach(stv0900_attach, &prof_7500_stv0900_config, prof_7500_frontend_attach()
1366 if (d->fe_adap[0].fe == NULL) prof_7500_frontend_attach()
1369 d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage; prof_7500_frontend_attach()
1413 d->fe_adap[0].fe = dvb_attach(ds3000_attach, &su3000_ds3000_config, su3000_frontend_attach()
1415 if (d->fe_adap[0].fe == NULL) su3000_frontend_attach()
1418 if (dvb_attach(ts2020_attach, d->fe_adap[0].fe, su3000_frontend_attach()
1465 d->fe_adap[0].fe = dvb_attach(cxd2820r_attach, &cxd2820r_config, t220_frontend_attach()
1467 if (d->fe_adap[0].fe != NULL) { t220_frontend_attach()
1468 if (dvb_attach(tda18271_attach, d->fe_adap[0].fe, 0x60, t220_frontend_attach()
1487 d->fe_adap[0].fe = dvb_attach(m88rs2000_attach, &s421_m88rs2000_config, m88rs2000_frontend_attach()
1490 if (d->fe_adap[0].fe == NULL) m88rs2000_frontend_attach()
1493 if (dvb_attach(ts2020_attach, d->fe_adap[0].fe, m88rs2000_frontend_attach()
1547 adap->fe_adap[0].fe = dvb_attach(m88ds3103_attach, tt_s2_4600_frontend_attach()
1551 if (adap->fe_adap[0].fe == NULL) tt_s2_4600_frontend_attach()
1555 ts2020_config.fe = adap->fe_adap[0].fe; tt_s2_4600_frontend_attach()
1563 dvb_frontend_detach(adap->fe_adap[0].fe); tt_s2_4600_frontend_attach()
1569 dvb_frontend_detach(adap->fe_adap[0].fe); tt_s2_4600_frontend_attach()
1574 adap->fe_adap[0].fe->ops.read_signal_strength = tt_s2_4600_frontend_attach()
1575 adap->fe_adap[0].fe->ops.tuner_ops.get_rf_strength; tt_s2_4600_frontend_attach()
1579 /* hook fe: need to resync the slave fifo when signal locks */ tt_s2_4600_frontend_attach()
1580 state->fe_read_status = adap->fe_adap[0].fe->ops.read_status; tt_s2_4600_frontend_attach()
1581 adap->fe_adap[0].fe->ops.read_status = tt_s2_4600_read_status; tt_s2_4600_frontend_attach()
1590 dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x60, dw2102_tuner_attach()
1597 dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x60, dw3101_tuner_attach()
1799 dw2102_properties.adapter->fe[0].tuner_attach = &dw2102_tuner_attach; dw2102_load_firmware()
1857 .fe = {{
1912 .fe = {{
1963 .fe = {{
2011 .fe = {{
2105 .fe = {{
2170 .fe = { {
2219 .fe = {{
2265 p1100->adapter->fe[0].frontend_attach = stv0288_frontend_attach; dw2102_probe()
2278 s660->adapter->fe[0].frontend_attach = ds3000_frontend_attach; dw2102_probe()
2291 p7500->adapter->fe[0].frontend_attach = prof_7500_frontend_attach; dw2102_probe()
2305 s421->adapter->fe[0].frontend_attach = m88rs2000_frontend_attach; dw2102_probe()
H A Ddigitv.c97 static int digitv_mt352_demod_init(struct dvb_frontend *fe) digitv_mt352_demod_init() argument
107 mt352_write(fe, &reset_buf[i], 2); digitv_mt352_demod_init()
112 mt352_write(fe, &init_buf[i], 2); digitv_mt352_demod_init()
121 static int digitv_nxt6000_tuner_set_params(struct dvb_frontend *fe) digitv_nxt6000_tuner_set_params() argument
123 struct dvb_usb_adapter *adap = fe->dvb->priv; digitv_nxt6000_tuner_set_params()
126 fe->ops.tuner_ops.calc_regs(fe, b, sizeof(b)); digitv_nxt6000_tuner_set_params()
127 if (fe->ops.i2c_gate_ctrl) digitv_nxt6000_tuner_set_params()
128 fe->ops.i2c_gate_ctrl(fe, 1); digitv_nxt6000_tuner_set_params()
140 adap->fe_adap[0].fe = dvb_attach(mt352_attach, &digitv_mt352_config, digitv_frontend_attach()
142 if ((adap->fe_adap[0].fe) != NULL) { digitv_frontend_attach()
146 adap->fe_adap[0].fe = dvb_attach(nxt6000_attach, digitv_frontend_attach()
149 if ((adap->fe_adap[0].fe) != NULL) { digitv_frontend_attach()
160 if (!dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x60, NULL, DVB_PLL_TDED4)) digitv_tuner_attach()
164 adap->fe_adap[0].fe->ops.tuner_ops.set_params = digitv_nxt6000_tuner_set_params; digitv_tuner_attach()
301 .fe = {{
H A Daf9005-fe.c104 static int af9005_is_fecmon_available(struct dvb_frontend *fe, int *available) af9005_is_fecmon_available() argument
106 struct af9005_fe_state *state = fe->demodulator_priv; af9005_is_fecmon_available()
132 static int af9005_get_post_vit_err_cw_count(struct dvb_frontend *fe, af9005_get_post_vit_err_cw_count() argument
137 struct af9005_fe_state *state = fe->demodulator_priv; af9005_get_post_vit_err_cw_count()
216 static int af9005_get_post_vit_ber(struct dvb_frontend *fe, af9005_get_post_vit_ber() argument
225 af9005_get_post_vit_err_cw_count(fe, &loc_err_count, &loc_cw_count, af9005_get_post_vit_ber()
236 static int af9005_get_pre_vit_err_bit_count(struct dvb_frontend *fe, af9005_get_pre_vit_err_bit_count() argument
240 struct af9005_fe_state *state = fe->demodulator_priv; af9005_get_pre_vit_err_bit_count()
333 static int af9005_reset_pre_viterbi(struct dvb_frontend *fe) af9005_reset_pre_viterbi() argument
335 struct af9005_fe_state *state = fe->demodulator_priv; af9005_reset_pre_viterbi()
357 static int af9005_reset_post_viterbi(struct dvb_frontend *fe) af9005_reset_post_viterbi() argument
359 struct af9005_fe_state *state = fe->demodulator_priv; af9005_reset_post_viterbi()
382 static int af9005_get_statistic(struct dvb_frontend *fe) af9005_get_statistic() argument
384 struct af9005_fe_state *state = fe->demodulator_priv; af9005_get_statistic()
389 ret = af9005_is_fecmon_available(fe, &fecavailable); af9005_get_statistic()
397 ret = af9005_get_pre_vit_err_bit_count(fe, &state->pre_vit_error_count, af9005_get_statistic()
400 af9005_reset_pre_viterbi(fe); af9005_get_statistic()
414 ret = af9005_get_post_vit_ber(fe, &state->post_vit_error_count, af9005_get_statistic()
418 ret = af9005_reset_post_viterbi(fe); af9005_get_statistic()
426 static int af9005_fe_refresh_state(struct dvb_frontend *fe) af9005_fe_refresh_state() argument
428 struct af9005_fe_state *state = fe->demodulator_priv; af9005_fe_refresh_state()
433 if (af9005_get_statistic(fe)) af9005_fe_refresh_state()
440 static int af9005_fe_read_status(struct dvb_frontend *fe, af9005_fe_read_status() argument
443 struct af9005_fe_state *state = fe->demodulator_priv; af9005_fe_read_status()
447 if (fe->ops.tuner_ops.release == NULL) af9005_fe_read_status()
490 static int af9005_fe_read_ber(struct dvb_frontend *fe, u32 * ber) af9005_fe_read_ber() argument
492 struct af9005_fe_state *state = fe->demodulator_priv; af9005_fe_read_ber()
493 if (fe->ops.tuner_ops.release == NULL) af9005_fe_read_ber()
495 af9005_fe_refresh_state(fe); af9005_fe_read_ber()
500 static int af9005_fe_read_unc_blocks(struct dvb_frontend *fe, u32 * unc) af9005_fe_read_unc_blocks() argument
502 struct af9005_fe_state *state = fe->demodulator_priv; af9005_fe_read_unc_blocks()
503 if (fe->ops.tuner_ops.release == NULL) af9005_fe_read_unc_blocks()
505 af9005_fe_refresh_state(fe); af9005_fe_read_unc_blocks()
510 static int af9005_fe_read_signal_strength(struct dvb_frontend *fe, af9005_fe_read_signal_strength() argument
513 struct af9005_fe_state *state = fe->demodulator_priv; af9005_fe_read_signal_strength()
517 if (fe->ops.tuner_ops.release == NULL) af9005_fe_read_signal_strength()
535 static int af9005_fe_read_snr(struct dvb_frontend *fe, u16 * snr) af9005_fe_read_snr() argument
798 static int af9005_fe_power(struct dvb_frontend *fe, int on) af9005_fe_power() argument
800 struct af9005_fe_state *state = fe->demodulator_priv; af9005_fe_power()
816 static int af9005_fe_init(struct dvb_frontend *fe) af9005_fe_init() argument
818 struct af9005_fe_state *state = fe->demodulator_priv; af9005_fe_init()
819 struct dvb_usb_adapter *adap = fe->dvb->priv; af9005_fe_init()
1040 if (fe->ops.tuner_ops.release == NULL) { af9005_fe_init()
1057 if (dvb_attach(mt2060_attach, fe, &adap->dev->i2c_adap, af9005_fe_init()
1065 if (dvb_attach(qt1010_attach, fe, &adap->dev->i2c_adap, af9005_fe_init()
1075 ret = fe->ops.tuner_ops.init(fe); af9005_fe_init()
1084 static int af9005_fe_sleep(struct dvb_frontend *fe) af9005_fe_sleep() argument
1086 return af9005_fe_power(fe, 0); af9005_fe_sleep()
1089 static int af9005_ts_bus_ctrl(struct dvb_frontend *fe, int acquire) af9005_ts_bus_ctrl() argument
1091 struct af9005_fe_state *state = fe->demodulator_priv; af9005_ts_bus_ctrl()
1104 static int af9005_fe_set_frontend(struct dvb_frontend *fe) af9005_fe_set_frontend() argument
1106 struct dtv_frontend_properties *fep = &fe->dtv_property_cache; af9005_fe_set_frontend()
1107 struct af9005_fe_state *state = fe->demodulator_priv; af9005_fe_set_frontend()
1113 if (fe->ops.tuner_ops.release == NULL) { af9005_fe_set_frontend()
1194 ret = fe->ops.tuner_ops.set_params(fe); af9005_fe_set_frontend()
1215 af9005_reset_pre_viterbi(fe); af9005_fe_set_frontend()
1216 af9005_reset_post_viterbi(fe); af9005_fe_set_frontend()
1230 static int af9005_fe_get_frontend(struct dvb_frontend *fe) af9005_fe_get_frontend() argument
1232 struct dtv_frontend_properties *fep = &fe->dtv_property_cache; af9005_fe_get_frontend()
1233 struct af9005_fe_state *state = fe->demodulator_priv; af9005_fe_get_frontend()
1426 static void af9005_fe_release(struct dvb_frontend *fe) af9005_fe_release() argument
1429 (struct af9005_fe_state *)fe->demodulator_priv; af9005_fe_release()
H A DMakefile5 dvb-usb-vp7045-objs := vp7045.o vp7045-fe.o
8 dvb-usb-vp702x-objs := vp702x.o vp702x-fe.o
11 dvb-usb-gp8psk-objs := gp8psk.o gp8psk-fe.o
14 dvb-usb-dtt200u-objs := dtt200u.o dtt200u-fe.o
52 dvb-usb-af9005-objs := af9005.o af9005-fe.o
67 dvb-usb-cinergyT2-objs := cinergyT2-core.o cinergyT2-fe.o
70 dvb-usb-friio-objs := friio.o friio-fe.o
H A Ddibusb-mb.c19 static int dib3000mb_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) dib3000mb_i2c_gate_ctrl() argument
21 struct dvb_usb_adapter *adap = fe->dvb->priv; dib3000mb_i2c_gate_ctrl()
24 return st->ops.tuner_pass_ctrl(fe, enable, st->tuner_addr); dib3000mb_i2c_gate_ctrl()
34 adap->fe_adap[0].fe = dvb_attach(dib3000mb_attach, &demod_cfg, dibusb_dib3000mb_frontend_attach()
36 if ((adap->fe_adap[0].fe) == NULL) dibusb_dib3000mb_frontend_attach()
39 adap->fe_adap[0].fe->ops.i2c_gate_ctrl = dib3000mb_i2c_gate_ctrl; dibusb_dib3000mb_frontend_attach()
50 dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x61, &adap->dev->i2c_adap, dibusb_thomson_tuner_attach()
61 dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x60, &adap->dev->i2c_adap, dibusb_panasonic_tuner_attach()
82 if (adap->fe_adap[0].fe->ops.i2c_gate_ctrl) dibusb_tuner_probe_and_attach()
83 adap->fe_adap[0].fe->ops.i2c_gate_ctrl(adap->fe_adap[0].fe, 1); dibusb_tuner_probe_and_attach()
90 if (adap->fe_adap[0].fe->ops.i2c_gate_ctrl) dibusb_tuner_probe_and_attach()
91 adap->fe_adap[0].fe->ops.i2c_gate_ctrl(adap->fe_adap[0].fe, 0); dibusb_tuner_probe_and_attach()
190 .fe = {{
280 .fe = {{
349 .fe = {{
412 .fe = {{
H A Dfriio-fe.c78 static int _jdvbt90502_write(struct dvb_frontend *fe, const u8 buf[], int len) _jdvbt90502_write() argument
80 struct jdvbt90502_state *state = fe->demodulator_priv; _jdvbt90502_write()
213 static int jdvbt90502_read_status(struct dvb_frontend *fe, jdvbt90502_read_status() argument
221 ret = jdvbt90502_pll_read(fe->demodulator_priv, &result); jdvbt90502_read_status()
238 static int jdvbt90502_read_signal_strength(struct dvb_frontend *fe, jdvbt90502_read_signal_strength() argument
248 ret = jdvbt90502_reg_read(fe->demodulator_priv, 0x0089, jdvbt90502_read_signal_strength()
266 static int jdvbt90502_set_property(struct dvb_frontend *fe, jdvbt90502_set_property() argument
286 static int jdvbt90502_get_frontend(struct dvb_frontend *fe) jdvbt90502_get_frontend() argument
288 struct dtv_frontend_properties *p = &fe->dtv_property_cache; jdvbt90502_get_frontend()
300 static int jdvbt90502_set_frontend(struct dvb_frontend *fe) jdvbt90502_set_frontend() argument
302 struct dtv_frontend_properties *p = &fe->dtv_property_cache; jdvbt90502_set_frontend()
310 struct jdvbt90502_state *state = fe->demodulator_priv; jdvbt90502_set_frontend()
316 fe->dtv_property_cache.delivery_system = SYS_ISDBT; jdvbt90502_set_frontend()
373 static int jdvbt90502_init(struct dvb_frontend *fe) jdvbt90502_init() argument
379 struct jdvbt90502_state *state = fe->demodulator_priv; jdvbt90502_init()
392 fe->dtv_property_cache.delivery_system = SYS_ISDBT; jdvbt90502_init()
403 static void jdvbt90502_release(struct dvb_frontend *fe) jdvbt90502_release() argument
405 struct jdvbt90502_state *state = fe->demodulator_priv; jdvbt90502_release()
H A Dttusb2.c511 if ((adap->fe_adap[0].fe = dvb_attach(tda10086_attach, &tda10086_config, &adap->dev->i2c_adap)) == NULL) { ttusb2_frontend_tda10086_attach()
519 static int ttusb2_ct3650_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) ttusb2_ct3650_i2c_gate_ctrl() argument
521 struct dvb_usb_adapter *adap = fe->dvb->priv; ttusb2_ct3650_i2c_gate_ctrl()
523 return adap->fe_adap[0].fe->ops.i2c_gate_ctrl(adap->fe_adap[0].fe, enable); ttusb2_ct3650_i2c_gate_ctrl()
531 if (adap->fe_adap[0].fe == NULL) { ttusb2_frontend_tda10023_attach()
533 adap->fe_adap[0].fe = dvb_attach(tda10023_attach, ttusb2_frontend_tda10023_attach()
536 if (adap->fe_adap[0].fe == NULL) { ttusb2_frontend_tda10023_attach()
542 adap->fe_adap[1].fe = dvb_attach(tda10048_attach, ttusb2_frontend_tda10023_attach()
545 if (adap->fe_adap[1].fe == NULL) { ttusb2_frontend_tda10023_attach()
551 adap->fe_adap[1].fe->ops.i2c_gate_ctrl = ttusb2_ct3650_i2c_gate_ctrl; ttusb2_frontend_tda10023_attach()
560 struct dvb_frontend *fe; ttusb2_tuner_tda827x_attach() local
563 if (adap->fe_adap[1].fe == NULL) ttusb2_tuner_tda827x_attach()
564 fe = adap->fe_adap[0].fe; ttusb2_tuner_tda827x_attach()
566 fe = adap->fe_adap[1].fe; ttusb2_tuner_tda827x_attach()
569 if (dvb_attach(tda827x_attach, fe, 0x61, &adap->dev->i2c_adap, &tda827x_config) == NULL) { ttusb2_tuner_tda827x_attach()
578 if (dvb_attach(tda826x_attach, adap->fe_adap[0].fe, 0x60, &adap->dev->i2c_adap, 0) == NULL) { ttusb2_tuner_tda826x_attach()
583 if (dvb_attach(lnbp21_attach, adap->fe_adap[0].fe, &adap->dev->i2c_adap, 0, 0) == NULL) { ttusb2_tuner_tda826x_attach()
641 .fe = {{
696 .fe = {{
757 .fe = {{
/linux-4.4.14/drivers/media/dvb-core/
H A Ddvb_frontend.c141 static void dvb_frontend_wakeup(struct dvb_frontend *fe);
142 static int dtv_get_frontend(struct dvb_frontend *fe,
144 static int dtv_property_legacy_params_sync(struct dvb_frontend *fe,
147 static bool has_get_frontend(struct dvb_frontend *fe) has_get_frontend() argument
149 return fe->ops.get_frontend != NULL; has_get_frontend()
201 static void dvb_frontend_add_event(struct dvb_frontend *fe, dvb_frontend_add_event() argument
204 struct dvb_frontend_private *fepriv = fe->frontend_priv; dvb_frontend_add_event()
209 dev_dbg(fe->dvb->device, "%s:\n", __func__); dvb_frontend_add_event()
211 if ((status & FE_HAS_LOCK) && has_get_frontend(fe)) dvb_frontend_add_event()
212 dtv_get_frontend(fe, &fepriv->parameters_out); dvb_frontend_add_event()
233 static int dvb_frontend_get_event(struct dvb_frontend *fe, dvb_frontend_get_event() argument
236 struct dvb_frontend_private *fepriv = fe->frontend_priv; dvb_frontend_get_event()
239 dev_dbg(fe->dvb->device, "%s:\n", __func__); dvb_frontend_get_event()
272 static void dvb_frontend_clear_events(struct dvb_frontend *fe) dvb_frontend_clear_events() argument
274 struct dvb_frontend_private *fepriv = fe->frontend_priv; dvb_frontend_clear_events()
282 static void dvb_frontend_init(struct dvb_frontend *fe) dvb_frontend_init() argument
284 dev_dbg(fe->dvb->device, dvb_frontend_init()
286 __func__, fe->dvb->num, fe->id, fe->ops.info.name); dvb_frontend_init()
288 if (fe->ops.init) dvb_frontend_init()
289 fe->ops.init(fe); dvb_frontend_init()
290 if (fe->ops.tuner_ops.init) { dvb_frontend_init()
291 if (fe->ops.i2c_gate_ctrl) dvb_frontend_init()
292 fe->ops.i2c_gate_ctrl(fe, 1); dvb_frontend_init()
293 fe->ops.tuner_ops.init(fe); dvb_frontend_init()
294 if (fe->ops.i2c_gate_ctrl) dvb_frontend_init()
295 fe->ops.i2c_gate_ctrl(fe, 0); dvb_frontend_init()
299 void dvb_frontend_reinitialise(struct dvb_frontend *fe) dvb_frontend_reinitialise() argument
301 struct dvb_frontend_private *fepriv = fe->frontend_priv; dvb_frontend_reinitialise()
304 dvb_frontend_wakeup(fe); dvb_frontend_reinitialise()
311 struct dvb_frontend *fe = fepriv->dvbdev->priv; dvb_frontend_swzigzag_update_delay() local
313 dev_dbg(fe->dvb->device, "%s:\n", __func__); dvb_frontend_swzigzag_update_delay()
329 * @param fe The frontend concerned.
333 static int dvb_frontend_swzigzag_autotune(struct dvb_frontend *fe, int check_wrapped) dvb_frontend_swzigzag_autotune() argument
338 struct dvb_frontend_private *fepriv = fe->frontend_priv; dvb_frontend_swzigzag_autotune()
339 struct dtv_frontend_properties *c = &fe->dtv_property_cache, tmp; dvb_frontend_swzigzag_autotune()
344 autoinversion = ((!(fe->ops.info.caps & FE_CAN_INVERSION_AUTO)) && dvb_frontend_swzigzag_autotune()
405 dev_dbg(fe->dvb->device, "%s: drift:%i inversion:%i auto_step:%i " \ dvb_frontend_swzigzag_autotune()
416 if (fe->ops.set_frontend) dvb_frontend_swzigzag_autotune()
417 fe_set_err = fe->ops.set_frontend(fe); dvb_frontend_swzigzag_autotune()
431 static void dvb_frontend_swzigzag(struct dvb_frontend *fe) dvb_frontend_swzigzag() argument
435 struct dvb_frontend_private *fepriv = fe->frontend_priv; dvb_frontend_swzigzag()
436 struct dtv_frontend_properties *c = &fe->dtv_property_cache, tmp; dvb_frontend_swzigzag()
449 if (fe->ops.set_frontend) dvb_frontend_swzigzag()
450 retval = fe->ops.set_frontend(fe); dvb_frontend_swzigzag()
466 if (fe->ops.read_status) dvb_frontend_swzigzag()
467 fe->ops.read_status(fe, &s); dvb_frontend_swzigzag()
469 dvb_frontend_add_event(fe, s); dvb_frontend_swzigzag()
480 if ((!(fe->ops.info.caps & FE_CAN_INVERSION_AUTO)) && dvb_frontend_swzigzag()
504 (fe->ops.info.caps & FE_CAN_RECOVER) && (fepriv->max_drift == 0)) { dvb_frontend_swzigzag()
533 retval = dvb_frontend_swzigzag_autotune(fe, dvb_frontend_swzigzag()
561 dvb_frontend_swzigzag_autotune(fe, 0); dvb_frontend_swzigzag()
565 static int dvb_frontend_is_exiting(struct dvb_frontend *fe) dvb_frontend_is_exiting() argument
567 struct dvb_frontend_private *fepriv = fe->frontend_priv; dvb_frontend_is_exiting()
569 if (fe->exit != DVB_FE_NO_EXIT) dvb_frontend_is_exiting()
580 static int dvb_frontend_should_wakeup(struct dvb_frontend *fe) dvb_frontend_should_wakeup() argument
582 struct dvb_frontend_private *fepriv = fe->frontend_priv; dvb_frontend_should_wakeup()
588 return dvb_frontend_is_exiting(fe); dvb_frontend_should_wakeup()
591 static void dvb_frontend_wakeup(struct dvb_frontend *fe) dvb_frontend_wakeup() argument
593 struct dvb_frontend_private *fepriv = fe->frontend_priv; dvb_frontend_wakeup()
602 * @fe: struct dvb_frontend pointer
607 * it just enables the existing tuner->fe link
618 static int dvb_enable_media_tuner(struct dvb_frontend *fe) dvb_enable_media_tuner() argument
620 struct dvb_frontend_private *fepriv = fe->frontend_priv; dvb_enable_media_tuner()
621 struct dvb_adapter *adapter = fe->dvb; dvb_enable_media_tuner()
654 dev_err(fe->dvb->device, dvb_enable_media_tuner()
674 dev_err(fe->dvb->device, dvb_enable_media_tuner()
681 dev_dbg(fe->dvb->device, dvb_enable_media_tuner()
692 struct dvb_frontend *fe = data; dvb_frontend_thread() local
693 struct dvb_frontend_private *fepriv = fe->frontend_priv; dvb_frontend_thread()
703 dev_dbg(fe->dvb->device, "%s:\n", __func__); dvb_frontend_thread()
713 ret = dvb_enable_media_tuner(fe); dvb_frontend_thread()
716 dev_info(fe->dvb->device, dvb_frontend_thread()
726 dvb_frontend_init(fe); dvb_frontend_thread()
733 dvb_frontend_should_wakeup(fe) || kthread_should_stop() dvb_frontend_thread()
737 if (kthread_should_stop() || dvb_frontend_is_exiting(fe)) { dvb_frontend_thread()
741 fe->exit = DVB_FE_NORMAL_EXIT; dvb_frontend_thread()
752 dvb_frontend_init(fe); dvb_frontend_thread()
753 if (fe->ops.set_tone && fepriv->tone != -1) dvb_frontend_thread()
754 fe->ops.set_tone(fe, fepriv->tone); dvb_frontend_thread()
755 if (fe->ops.set_voltage && fepriv->voltage != -1) dvb_frontend_thread()
756 fe->ops.set_voltage(fe, fepriv->voltage); dvb_frontend_thread()
761 if (fe->ops.get_frontend_algo) { dvb_frontend_thread()
762 algo = fe->ops.get_frontend_algo(fe); dvb_frontend_thread()
765 dev_dbg(fe->dvb->device, "%s: Frontend ALGO = DVBFE_ALGO_HW\n", __func__); dvb_frontend_thread()
768 dev_dbg(fe->dvb->device, "%s: Retune requested, FESTATE_RETUNE\n", __func__); dvb_frontend_thread()
775 if (fe->ops.tune) dvb_frontend_thread()
776 fe->ops.tune(fe, re_tune, fepriv->tune_mode_flags, &fepriv->delay, &s); dvb_frontend_thread()
779 dev_dbg(fe->dvb->device, "%s: state changed, adding current state\n", __func__); dvb_frontend_thread()
780 dvb_frontend_add_event(fe, s); dvb_frontend_thread()
785 dev_dbg(fe->dvb->device, "%s: Frontend ALGO = DVBFE_ALGO_SW\n", __func__); dvb_frontend_thread()
786 dvb_frontend_swzigzag(fe); dvb_frontend_thread()
789 dev_dbg(fe->dvb->device, "%s: Frontend ALGO = DVBFE_ALGO_CUSTOM, state=%d\n", __func__, fepriv->state); dvb_frontend_thread()
791 dev_dbg(fe->dvb->device, "%s: Retune requested, FESTAT_RETUNE\n", __func__); dvb_frontend_thread()
799 if (fe->ops.search) { dvb_frontend_thread()
800 fepriv->algo_status = fe->ops.search(fe); dvb_frontend_thread()
813 dtv_property_legacy_params_sync(fe, &fepriv->parameters_out); dvb_frontend_thread()
814 fe->ops.read_status(fe, &s); dvb_frontend_thread()
816 dvb_frontend_add_event(fe, s); /* update event list */ dvb_frontend_thread()
827 dev_dbg(fe->dvb->device, "%s: UNDEFINED ALGO !\n", __func__); dvb_frontend_thread()
831 dvb_frontend_swzigzag(fe); dvb_frontend_thread()
842 if (fe->ops.set_voltage) dvb_frontend_thread()
843 fe->ops.set_voltage(fe, SEC_VOLTAGE_OFF); dvb_frontend_thread()
844 if (fe->ops.tuner_ops.sleep) { dvb_frontend_thread()
845 if (fe->ops.i2c_gate_ctrl) dvb_frontend_thread()
846 fe->ops.i2c_gate_ctrl(fe, 1); dvb_frontend_thread()
847 fe->ops.tuner_ops.sleep(fe); dvb_frontend_thread()
848 if (fe->ops.i2c_gate_ctrl) dvb_frontend_thread()
849 fe->ops.i2c_gate_ctrl(fe, 0); dvb_frontend_thread()
851 if (fe->ops.sleep) dvb_frontend_thread()
852 fe->ops.sleep(fe); dvb_frontend_thread()
857 fe->exit = DVB_FE_DEVICE_REMOVED; dvb_frontend_thread()
859 fe->exit = DVB_FE_NO_EXIT; dvb_frontend_thread()
864 dvb_frontend_wakeup(fe); dvb_frontend_thread()
868 static void dvb_frontend_stop(struct dvb_frontend *fe) dvb_frontend_stop() argument
870 struct dvb_frontend_private *fepriv = fe->frontend_priv; dvb_frontend_stop()
872 dev_dbg(fe->dvb->device, "%s:\n", __func__); dvb_frontend_stop()
874 if (fe->exit != DVB_FE_DEVICE_REMOVED) dvb_frontend_stop()
875 fe->exit = DVB_FE_NORMAL_EXIT; dvb_frontend_stop()
888 dev_warn(fe->dvb->device, dvb_frontend_stop()
915 static int dvb_frontend_start(struct dvb_frontend *fe) dvb_frontend_start() argument
918 struct dvb_frontend_private *fepriv = fe->frontend_priv; dvb_frontend_start()
921 dev_dbg(fe->dvb->device, "%s:\n", __func__); dvb_frontend_start()
924 if (fe->exit == DVB_FE_NO_EXIT) dvb_frontend_start()
927 dvb_frontend_stop (fe); dvb_frontend_start()
936 fe->exit = DVB_FE_NO_EXIT; dvb_frontend_start()
940 fe_thread = kthread_run(dvb_frontend_thread, fe, dvb_frontend_start()
941 "kdvb-ad-%i-fe-%i", fe->dvb->num,fe->id); dvb_frontend_start()
944 dev_warn(fe->dvb->device, dvb_frontend_start()
954 static void dvb_frontend_get_frequency_limits(struct dvb_frontend *fe, dvb_frontend_get_frequency_limits() argument
957 *freq_min = max(fe->ops.info.frequency_min, fe->ops.tuner_ops.info.frequency_min); dvb_frontend_get_frequency_limits()
959 if (fe->ops.info.frequency_max == 0) dvb_frontend_get_frequency_limits()
960 *freq_max = fe->ops.tuner_ops.info.frequency_max; dvb_frontend_get_frequency_limits()
961 else if (fe->ops.tuner_ops.info.frequency_max == 0) dvb_frontend_get_frequency_limits()
962 *freq_max = fe->ops.info.frequency_max; dvb_frontend_get_frequency_limits()
964 *freq_max = min(fe->ops.info.frequency_max, fe->ops.tuner_ops.info.frequency_max); dvb_frontend_get_frequency_limits()
967 dev_warn(fe->dvb->device, "DVB: adapter %i frontend %u frequency limits undefined - fix the driver\n", dvb_frontend_get_frequency_limits()
968 fe->dvb->num, fe->id); dvb_frontend_get_frequency_limits()
971 static int dvb_frontend_check_parameters(struct dvb_frontend *fe) dvb_frontend_check_parameters() argument
973 struct dtv_frontend_properties *c = &fe->dtv_property_cache; dvb_frontend_check_parameters()
978 dvb_frontend_get_frequency_limits(fe, &freq_min, &freq_max); dvb_frontend_check_parameters()
981 dev_warn(fe->dvb->device, "DVB: adapter %i frontend %i frequency %u out of range (%u..%u)\n", dvb_frontend_check_parameters()
982 fe->dvb->num, fe->id, c->frequency, dvb_frontend_check_parameters()
994 if ((fe->ops.info.symbol_rate_min && dvb_frontend_check_parameters()
995 c->symbol_rate < fe->ops.info.symbol_rate_min) || dvb_frontend_check_parameters()
996 (fe->ops.info.symbol_rate_max && dvb_frontend_check_parameters()
997 c->symbol_rate > fe->ops.info.symbol_rate_max)) { dvb_frontend_check_parameters()
998 dev_warn(fe->dvb->device, "DVB: adapter %i frontend %i symbol rate %u out of range (%u..%u)\n", dvb_frontend_check_parameters()
999 fe->dvb->num, fe->id, c->symbol_rate, dvb_frontend_check_parameters()
1000 fe->ops.info.symbol_rate_min, dvb_frontend_check_parameters()
1001 fe->ops.info.symbol_rate_max); dvb_frontend_check_parameters()
1011 static int dvb_frontend_clear_cache(struct dvb_frontend *fe) dvb_frontend_clear_cache() argument
1013 struct dtv_frontend_properties *c = &fe->dtv_property_cache; dvb_frontend_clear_cache()
1023 dev_dbg(fe->dvb->device, "%s: Clearing cache for delivery system %d\n", dvb_frontend_clear_cache()
1168 static void dtv_property_dump(struct dvb_frontend *fe, struct dtv_property *tvp) dtv_property_dump() argument
1173 dev_warn(fe->dvb->device, "%s: tvp.cmd = 0x%08x undefined\n", dtv_property_dump()
1178 dev_dbg(fe->dvb->device, "%s: tvp.cmd = 0x%08x (%s)\n", __func__, dtv_property_dump()
1182 dev_dbg(fe->dvb->device, "%s: tvp.u.buffer.len = 0x%02x\n", dtv_property_dump()
1186 dev_dbg(fe->dvb->device, dtv_property_dump()
1190 dev_dbg(fe->dvb->device, "%s: tvp.u.data = 0x%08x\n", __func__, dtv_property_dump()
1199 static int dtv_property_cache_sync(struct dvb_frontend *fe, dtv_property_cache_sync() argument
1208 dev_dbg(fe->dvb->device, "%s: Preparing QPSK req\n", __func__); dtv_property_cache_sync()
1213 dev_dbg(fe->dvb->device, "%s: Preparing QAM req\n", __func__); dtv_property_cache_sync()
1219 dev_dbg(fe->dvb->device, "%s: Preparing OFDM req\n", __func__); dtv_property_cache_sync()
1252 dev_dbg(fe->dvb->device, "%s: Preparing ATSC req\n", __func__); dtv_property_cache_sync()
1262 dev_err(fe->dvb->device, dtv_property_cache_sync()
1274 static int dtv_property_legacy_params_sync(struct dvb_frontend *fe, dtv_property_legacy_params_sync() argument
1277 const struct dtv_frontend_properties *c = &fe->dtv_property_cache; dtv_property_legacy_params_sync()
1284 dev_err(fe->dvb->device, dtv_property_legacy_params_sync()
1289 dev_dbg(fe->dvb->device, "%s: Preparing QPSK req\n", __func__); dtv_property_legacy_params_sync()
1294 dev_dbg(fe->dvb->device, "%s: Preparing QAM req\n", __func__); dtv_property_legacy_params_sync()
1300 dev_dbg(fe->dvb->device, "%s: Preparing OFDM req\n", __func__); dtv_property_legacy_params_sync()
1332 dev_dbg(fe->dvb->device, "%s: Preparing VSB req\n", __func__); dtv_property_legacy_params_sync()
1341 * @fe: struct dvb_frontend pointer
1349 static int dtv_get_frontend(struct dvb_frontend *fe, dtv_get_frontend() argument
1354 if (fe->ops.get_frontend) { dtv_get_frontend()
1355 r = fe->ops.get_frontend(fe); dtv_get_frontend()
1359 dtv_property_legacy_params_sync(fe, p_out); dtv_get_frontend()
1372 static int dtv_property_process_get(struct dvb_frontend *fe, dtv_property_process_get() argument
1382 while (ncaps < MAX_DELSYS && fe->ops.delsys[ncaps]) { dtv_property_process_get()
1383 tvp->u.buffer.data[ncaps] = fe->ops.delsys[ncaps]; dtv_property_process_get()
1507 tvp->u.data = fe->dtv_property_cache.atscmh_fic_ver; dtv_property_process_get()
1510 tvp->u.data = fe->dtv_property_cache.atscmh_parade_id; dtv_property_process_get()
1513 tvp->u.data = fe->dtv_property_cache.atscmh_nog; dtv_property_process_get()
1516 tvp->u.data = fe->dtv_property_cache.atscmh_tnog; dtv_property_process_get()
1519 tvp->u.data = fe->dtv_property_cache.atscmh_sgn; dtv_property_process_get()
1522 tvp->u.data = fe->dtv_property_cache.atscmh_prc; dtv_property_process_get()
1525 tvp->u.data = fe->dtv_property_cache.atscmh_rs_frame_mode; dtv_property_process_get()
1528 tvp->u.data = fe->dtv_property_cache.atscmh_rs_frame_ensemble; dtv_property_process_get()
1531 tvp->u.data = fe->dtv_property_cache.atscmh_rs_code_mode_pri; dtv_property_process_get()
1534 tvp->u.data = fe->dtv_property_cache.atscmh_rs_code_mode_sec; dtv_property_process_get()
1537 tvp->u.data = fe->dtv_property_cache.atscmh_sccc_block_mode; dtv_property_process_get()
1540 tvp->u.data = fe->dtv_property_cache.atscmh_sccc_code_mode_a; dtv_property_process_get()
1543 tvp->u.data = fe->dtv_property_cache.atscmh_sccc_code_mode_b; dtv_property_process_get()
1546 tvp->u.data = fe->dtv_property_cache.atscmh_sccc_code_mode_c; dtv_property_process_get()
1549 tvp->u.data = fe->dtv_property_cache.atscmh_sccc_code_mode_d; dtv_property_process_get()
1582 dev_dbg(fe->dvb->device, dtv_property_process_get()
1589 if (fe->ops.get_property) { dtv_property_process_get()
1590 r = fe->ops.get_property(fe, tvp); dtv_property_process_get()
1595 dtv_property_dump(fe, tvp); dtv_property_process_get()
1600 static int dtv_set_frontend(struct dvb_frontend *fe);
1614 * @fe: struct frontend;
1622 static int emulate_delivery_system(struct dvb_frontend *fe, u32 delsys) emulate_delivery_system() argument
1625 struct dtv_frontend_properties *c = &fe->dtv_property_cache; emulate_delivery_system()
1633 dev_dbg(fe->dvb->device, emulate_delivery_system()
1653 dev_dbg(fe->dvb->device, "%s: change delivery system on cache to %d\n", emulate_delivery_system()
1661 * @fe: frontend struct
1676 static int dvbv5_set_delivery_system(struct dvb_frontend *fe, dvbv5_set_delivery_system() argument
1681 struct dtv_frontend_properties *c = &fe->dtv_property_cache; dvbv5_set_delivery_system()
1691 desired_system = fe->ops.delsys[0]; dvbv5_set_delivery_system()
1699 while (ncaps < MAX_DELSYS && fe->ops.delsys[ncaps]) { dvbv5_set_delivery_system()
1700 if (fe->ops.delsys[ncaps] == desired_system) { dvbv5_set_delivery_system()
1702 dev_dbg(fe->dvb->device, dvbv5_set_delivery_system()
1718 dev_dbg(fe->dvb->device, dvbv5_set_delivery_system()
1731 while (ncaps < MAX_DELSYS && fe->ops.delsys[ncaps]) { dvbv5_set_delivery_system()
1732 if (dvbv3_type(fe->ops.delsys[ncaps]) == type) dvbv5_set_delivery_system()
1733 delsys = fe->ops.delsys[ncaps]; dvbv5_set_delivery_system()
1739 dev_dbg(fe->dvb->device, dvbv5_set_delivery_system()
1745 dev_dbg(fe->dvb->device, dvbv5_set_delivery_system()
1749 return emulate_delivery_system(fe, desired_system); dvbv5_set_delivery_system()
1754 * @fe: frontend struct
1780 static int dvbv3_set_delivery_system(struct dvb_frontend *fe) dvbv3_set_delivery_system() argument
1784 struct dtv_frontend_properties *c = &fe->dtv_property_cache; dvbv3_set_delivery_system()
1788 c->delivery_system = fe->ops.delsys[0]; dvbv3_set_delivery_system()
1795 dev_dbg(fe->dvb->device, dvbv3_set_delivery_system()
1806 while (ncaps < MAX_DELSYS && fe->ops.delsys[ncaps]) { dvbv3_set_delivery_system()
1807 if (dvbv3_type(fe->ops.delsys[ncaps]) != DVBV3_UNKNOWN) { dvbv3_set_delivery_system()
1808 delsys = fe->ops.delsys[ncaps]; dvbv3_set_delivery_system()
1814 dev_dbg(fe->dvb->device, dvbv3_set_delivery_system()
1819 return emulate_delivery_system(fe, delsys); dvbv3_set_delivery_system()
1822 static int dtv_property_process_set(struct dvb_frontend *fe, dtv_property_process_set() argument
1827 struct dtv_frontend_properties *c = &fe->dtv_property_cache; dtv_property_process_set()
1830 if (fe->ops.set_property) { dtv_property_process_set()
1831 r = fe->ops.set_property(fe, tvp); dtv_property_process_set()
1842 dvb_frontend_clear_cache(fe); dtv_property_process_set()
1850 dev_dbg(fe->dvb->device, "%s: Finalised property cache\n", dtv_property_process_set()
1853 r = dtv_set_frontend(fe); dtv_property_process_set()
1880 r = dvbv5_set_delivery_system(fe, tvp->u.data); dtv_property_process_set()
1975 fe->dtv_property_cache.atscmh_parade_id = tvp->u.data; dtv_property_process_set()
1978 fe->dtv_property_cache.atscmh_rs_frame_ensemble = tvp->u.data; dtv_property_process_set()
1983 if (fe->ops.set_lna) dtv_property_process_set()
1984 r = fe->ops.set_lna(fe); dtv_property_process_set()
2000 struct dvb_frontend *fe = dvbdev->priv; dvb_frontend_ioctl() local
2001 struct dtv_frontend_properties *c = &fe->dtv_property_cache; dvb_frontend_ioctl()
2002 struct dvb_frontend_private *fepriv = fe->frontend_priv; dvb_frontend_ioctl()
2005 dev_dbg(fe->dvb->device, "%s: (%d)\n", __func__, _IOC_NR(cmd)); dvb_frontend_ioctl()
2009 if (fe->exit != DVB_FE_NO_EXIT) { dvb_frontend_ioctl()
2036 struct dvb_frontend *fe = dvbdev->priv; dvb_frontend_ioctl_properties() local
2037 struct dvb_frontend_private *fepriv = fe->frontend_priv; dvb_frontend_ioctl_properties()
2038 struct dtv_frontend_properties *c = &fe->dtv_property_cache; dvb_frontend_ioctl_properties()
2045 dev_dbg(fe->dvb->device, "%s:\n", __func__); dvb_frontend_ioctl_properties()
2048 dev_dbg(fe->dvb->device, "%s: properties.num = %d\n", __func__, tvps->num); dvb_frontend_ioctl_properties()
2049 dev_dbg(fe->dvb->device, "%s: properties.props = %p\n", __func__, tvps->props); dvb_frontend_ioctl_properties()
2069 err = dtv_property_process_set(fe, tvp + i, file); dvb_frontend_ioctl_properties()
2076 dev_dbg(fe->dvb->device, "%s: Property cache is full, tuning\n", __func__); dvb_frontend_ioctl_properties()
2079 dev_dbg(fe->dvb->device, "%s: properties.num = %d\n", __func__, tvps->num); dvb_frontend_ioctl_properties()
2080 dev_dbg(fe->dvb->device, "%s: properties.props = %p\n", __func__, tvps->props); dvb_frontend_ioctl_properties()
2105 err = dtv_get_frontend(fe, NULL); dvb_frontend_ioctl_properties()
2110 err = dtv_property_process_get(fe, c, tvp + i, file); dvb_frontend_ioctl_properties()
2130 static int dtv_set_frontend(struct dvb_frontend *fe) dtv_set_frontend() argument
2132 struct dvb_frontend_private *fepriv = fe->frontend_priv; dtv_set_frontend()
2133 struct dtv_frontend_properties *c = &fe->dtv_property_cache; dtv_set_frontend()
2137 if (dvb_frontend_check_parameters(fe) < 0) dtv_set_frontend()
2145 dtv_property_legacy_params_sync(fe, &fepriv->parameters_out); dtv_set_frontend()
2214 if (fe->ops.get_tune_settings && (fe->ops.get_tune_settings(fe, &fetunesettings) == 0)) { dtv_set_frontend()
2236 fepriv->step_size = fe->ops.info.frequency_stepsize * 2; dtv_set_frontend()
2237 fepriv->max_drift = (fe->ops.info.frequency_stepsize * 2) + 1; dtv_set_frontend()
2258 dvb_frontend_clear_events(fe); dtv_set_frontend()
2259 dvb_frontend_add_event(fe, 0); dtv_set_frontend()
2260 dvb_frontend_wakeup(fe); dtv_set_frontend()
2271 struct dvb_frontend *fe = dvbdev->priv; dvb_frontend_ioctl_legacy() local
2272 struct dvb_frontend_private *fepriv = fe->frontend_priv; dvb_frontend_ioctl_legacy()
2273 struct dtv_frontend_properties *c = &fe->dtv_property_cache; dvb_frontend_ioctl_legacy()
2280 memcpy(info, &fe->ops.info, sizeof(struct dvb_frontend_info)); dvb_frontend_ioctl_legacy()
2281 dvb_frontend_get_frequency_limits(fe, &info->frequency_min, &info->frequency_max); dvb_frontend_ioctl_legacy()
2308 dev_err(fe->dvb->device, dvb_frontend_ioctl_legacy()
2311 fe->ops.info.type = FE_OFDM; dvb_frontend_ioctl_legacy()
2313 dev_dbg(fe->dvb->device, "%s: current delivery system on cache: %d, V3 type: %d\n", dvb_frontend_ioctl_legacy()
2314 __func__, c->delivery_system, fe->ops.info.type); dvb_frontend_ioctl_legacy()
2335 if (fe->ops.read_status) dvb_frontend_ioctl_legacy()
2336 err = fe->ops.read_status(fe, status); dvb_frontend_ioctl_legacy()
2341 if (fe->ops.read_ber) { dvb_frontend_ioctl_legacy()
2343 err = fe->ops.read_ber(fe, (__u32 *) parg); dvb_frontend_ioctl_legacy()
2350 if (fe->ops.read_signal_strength) { dvb_frontend_ioctl_legacy()
2352 err = fe->ops.read_signal_strength(fe, (__u16 *) parg); dvb_frontend_ioctl_legacy()
2359 if (fe->ops.read_snr) { dvb_frontend_ioctl_legacy()
2361 err = fe->ops.read_snr(fe, (__u16 *) parg); dvb_frontend_ioctl_legacy()
2368 if (fe->ops.read_ucblocks) { dvb_frontend_ioctl_legacy()
2370 err = fe->ops.read_ucblocks(fe, (__u32 *) parg); dvb_frontend_ioctl_legacy()
2377 if (fe->ops.diseqc_reset_overload) { dvb_frontend_ioctl_legacy()
2378 err = fe->ops.diseqc_reset_overload(fe); dvb_frontend_ioctl_legacy()
2385 if (fe->ops.diseqc_send_master_cmd) { dvb_frontend_ioctl_legacy()
2392 err = fe->ops.diseqc_send_master_cmd(fe, cmd); dvb_frontend_ioctl_legacy()
2399 if (fe->ops.diseqc_send_burst) { dvb_frontend_ioctl_legacy()
2400 err = fe->ops.diseqc_send_burst(fe, dvb_frontend_ioctl_legacy()
2408 if (fe->ops.set_tone) { dvb_frontend_ioctl_legacy()
2409 err = fe->ops.set_tone(fe, dvb_frontend_ioctl_legacy()
2418 if (fe->ops.set_voltage) { dvb_frontend_ioctl_legacy()
2419 err = fe->ops.set_voltage(fe, dvb_frontend_ioctl_legacy()
2428 if (fe->ops.dishnetwork_send_legacy_command) { dvb_frontend_ioctl_legacy()
2429 err = fe->ops.dishnetwork_send_legacy_command(fe, dvb_frontend_ioctl_legacy()
2433 } else if (fe->ops.set_voltage) { dvb_frontend_ioctl_legacy()
2463 fe->ops.set_voltage(fe, SEC_VOLTAGE_18); dvb_frontend_ioctl_legacy()
2471 fe->ops.set_voltage(fe, (last) ? SEC_VOLTAGE_13 : SEC_VOLTAGE_18); dvb_frontend_ioctl_legacy()
2480 __func__, fe->dvb->num); dvb_frontend_ioctl_legacy()
2492 if (fe->ops.diseqc_recv_slave_reply) dvb_frontend_ioctl_legacy()
2493 err = fe->ops.diseqc_recv_slave_reply(fe, (struct dvb_diseqc_slave_reply*) parg); dvb_frontend_ioctl_legacy()
2497 if (fe->ops.enable_high_lnb_voltage) dvb_frontend_ioctl_legacy()
2498 err = fe->ops.enable_high_lnb_voltage(fe, (long) parg); dvb_frontend_ioctl_legacy()
2502 err = dvbv3_set_delivery_system(fe); dvb_frontend_ioctl_legacy()
2506 err = dtv_property_cache_sync(fe, c, parg); dvb_frontend_ioctl_legacy()
2509 err = dtv_set_frontend(fe); dvb_frontend_ioctl_legacy()
2512 err = dvb_frontend_get_event (fe, parg, file->f_flags); dvb_frontend_ioctl_legacy()
2516 err = dtv_get_frontend(fe, parg); dvb_frontend_ioctl_legacy()
2532 struct dvb_frontend *fe = dvbdev->priv; dvb_frontend_poll() local
2533 struct dvb_frontend_private *fepriv = fe->frontend_priv; dvb_frontend_poll()
2535 dev_dbg_ratelimited(fe->dvb->device, "%s:\n", __func__); dvb_frontend_poll()
2548 struct dvb_frontend *fe = dvbdev->priv; dvb_frontend_open() local
2549 struct dvb_frontend_private *fepriv = fe->frontend_priv; dvb_frontend_open()
2550 struct dvb_adapter *adapter = fe->dvb; dvb_frontend_open()
2553 dev_dbg(fe->dvb->device, "%s:\n", __func__); dvb_frontend_open()
2554 if (fe->exit == DVB_FE_DEVICE_REMOVED) dvb_frontend_open()
2596 if (dvbdev->users == -1 && fe->ops.ts_bus_ctrl) { dvb_frontend_open()
2597 if ((ret = fe->ops.ts_bus_ctrl(fe, 1)) < 0) dvb_frontend_open()
2618 ret = dvb_frontend_start (fe); dvb_frontend_open()
2633 if (dvbdev->users == -1 && fe->ops.ts_bus_ctrl) dvb_frontend_open()
2634 fe->ops.ts_bus_ctrl(fe, 0); dvb_frontend_open()
2644 struct dvb_frontend *fe = dvbdev->priv; dvb_frontend_release() local
2645 struct dvb_frontend_private *fepriv = fe->frontend_priv; dvb_frontend_release()
2648 dev_dbg(fe->dvb->device, "%s:\n", __func__); dvb_frontend_release()
2659 if (fe->exit != DVB_FE_NO_EXIT) dvb_frontend_release()
2661 if (fe->ops.ts_bus_ctrl) dvb_frontend_release()
2662 fe->ops.ts_bus_ctrl(fe, 0); dvb_frontend_release()
2677 int dvb_frontend_suspend(struct dvb_frontend *fe) dvb_frontend_suspend() argument
2681 dev_dbg(fe->dvb->device, "%s: adap=%d fe=%d\n", __func__, fe->dvb->num, dvb_frontend_suspend()
2682 fe->id); dvb_frontend_suspend()
2684 if (fe->ops.tuner_ops.suspend) dvb_frontend_suspend()
2685 ret = fe->ops.tuner_ops.suspend(fe); dvb_frontend_suspend()
2686 else if (fe->ops.tuner_ops.sleep) dvb_frontend_suspend()
2687 ret = fe->ops.tuner_ops.sleep(fe); dvb_frontend_suspend()
2689 if (fe->ops.sleep) dvb_frontend_suspend()
2690 ret = fe->ops.sleep(fe); dvb_frontend_suspend()
2696 int dvb_frontend_resume(struct dvb_frontend *fe) dvb_frontend_resume() argument
2698 struct dvb_frontend_private *fepriv = fe->frontend_priv; dvb_frontend_resume()
2701 dev_dbg(fe->dvb->device, "%s: adap=%d fe=%d\n", __func__, fe->dvb->num, dvb_frontend_resume()
2702 fe->id); dvb_frontend_resume()
2704 fe->exit = DVB_FE_DEVICE_RESUME; dvb_frontend_resume()
2705 if (fe->ops.init) dvb_frontend_resume()
2706 ret = fe->ops.init(fe); dvb_frontend_resume()
2708 if (fe->ops.tuner_ops.resume) dvb_frontend_resume()
2709 ret = fe->ops.tuner_ops.resume(fe); dvb_frontend_resume()
2710 else if (fe->ops.tuner_ops.init) dvb_frontend_resume()
2711 ret = fe->ops.tuner_ops.init(fe); dvb_frontend_resume()
2713 fe->exit = DVB_FE_NO_EXIT; dvb_frontend_resume()
2715 dvb_frontend_wakeup(fe); dvb_frontend_resume()
2722 struct dvb_frontend* fe) dvb_register_frontend()
2731 .name = fe->ops.info.name, dvb_register_frontend()
2741 fe->frontend_priv = kzalloc(sizeof(struct dvb_frontend_private), GFP_KERNEL); dvb_register_frontend()
2742 if (fe->frontend_priv == NULL) { dvb_register_frontend()
2746 fepriv = fe->frontend_priv; dvb_register_frontend()
2752 fe->dvb = dvb; dvb_register_frontend()
2755 dev_info(fe->dvb->device, dvb_register_frontend()
2757 fe->dvb->num, fe->id, fe->ops.info.name); dvb_register_frontend()
2759 dvb_register_device (fe->dvb, &fepriv->dvbdev, &dvbdev_template, dvb_register_frontend()
2760 fe, DVB_DEVICE_FRONTEND); dvb_register_frontend()
2767 fe->dtv_property_cache.delivery_system = fe->ops.delsys[0]; dvb_register_frontend()
2768 dvb_frontend_clear_cache(fe); dvb_register_frontend()
2775 int dvb_unregister_frontend(struct dvb_frontend* fe) dvb_unregister_frontend() argument
2777 struct dvb_frontend_private *fepriv = fe->frontend_priv; dvb_unregister_frontend()
2778 dev_dbg(fe->dvb->device, "%s:\n", __func__); dvb_unregister_frontend()
2781 dvb_frontend_stop (fe); dvb_unregister_frontend()
2791 /* fe is invalid now */ dvb_unregister_frontend()
2799 void dvb_frontend_detach(struct dvb_frontend* fe) dvb_frontend_detach() argument
2803 if (fe->ops.release_sec) { dvb_frontend_detach()
2804 fe->ops.release_sec(fe); dvb_frontend_detach()
2805 dvb_detach(fe->ops.release_sec); dvb_frontend_detach()
2807 if (fe->ops.tuner_ops.release) { dvb_frontend_detach()
2808 fe->ops.tuner_ops.release(fe); dvb_frontend_detach()
2809 dvb_detach(fe->ops.tuner_ops.release); dvb_frontend_detach()
2811 if (fe->ops.analog_ops.release) { dvb_frontend_detach()
2812 fe->ops.analog_ops.release(fe); dvb_frontend_detach()
2813 dvb_detach(fe->ops.analog_ops.release); dvb_frontend_detach()
2815 ptr = (void*)fe->ops.release; dvb_frontend_detach()
2817 fe->ops.release(fe); dvb_frontend_detach()
2822 void dvb_frontend_detach(struct dvb_frontend* fe) dvb_frontend_detach() argument
2824 if (fe->ops.release_sec) dvb_frontend_detach()
2825 fe->ops.release_sec(fe); dvb_frontend_detach()
2826 if (fe->ops.tuner_ops.release) dvb_frontend_detach()
2827 fe->ops.tuner_ops.release(fe); dvb_frontend_detach()
2828 if (fe->ops.analog_ops.release) dvb_frontend_detach()
2829 fe->ops.analog_ops.release(fe); dvb_frontend_detach()
2830 if (fe->ops.release) dvb_frontend_detach()
2831 fe->ops.release(fe); dvb_frontend_detach()
2721 dvb_register_frontend(struct dvb_adapter* dvb, struct dvb_frontend* fe) dvb_register_frontend() argument
H A Ddvb_frontend.h249 int (*release)(struct dvb_frontend *fe);
250 int (*init)(struct dvb_frontend *fe);
251 int (*sleep)(struct dvb_frontend *fe);
252 int (*suspend)(struct dvb_frontend *fe);
253 int (*resume)(struct dvb_frontend *fe);
256 int (*set_params)(struct dvb_frontend *fe);
257 int (*set_analog_params)(struct dvb_frontend *fe, struct analog_parameters *p);
260 int (*calc_regs)(struct dvb_frontend *fe, u8 *buf, int buf_len);
263 int (*set_config)(struct dvb_frontend *fe, void *priv_cfg);
265 int (*get_frequency)(struct dvb_frontend *fe, u32 *frequency);
266 int (*get_bandwidth)(struct dvb_frontend *fe, u32 *bandwidth);
267 int (*get_if_frequency)(struct dvb_frontend *fe, u32 *frequency);
271 int (*get_status)(struct dvb_frontend *fe, u32 *status);
272 int (*get_rf_strength)(struct dvb_frontend *fe, u16 *strength);
273 int (*get_afc)(struct dvb_frontend *fe, s32 *afc);
277 int (*set_frequency)(struct dvb_frontend *fe, u32 frequency);
278 int (*set_bandwidth)(struct dvb_frontend *fe, u32 bandwidth);
284 int (*set_state)(struct dvb_frontend *fe, enum tuner_param param, struct tuner_state *state);
285 int (*get_state)(struct dvb_frontend *fe, enum tuner_param param, struct tuner_state *state);
323 void (*set_params)(struct dvb_frontend *fe,
325 int (*has_signal)(struct dvb_frontend *fe, u16 *signal);
326 int (*get_afc)(struct dvb_frontend *fe, s32 *afc);
327 void (*tuner_status)(struct dvb_frontend *fe);
328 void (*standby)(struct dvb_frontend *fe);
329 void (*release)(struct dvb_frontend *fe);
330 int (*i2c_gate_ctrl)(struct dvb_frontend *fe, int enable);
333 int (*set_config)(struct dvb_frontend *fe, void *priv_cfg);
425 void (*release)(struct dvb_frontend* fe);
426 void (*release_sec)(struct dvb_frontend* fe);
428 int (*init)(struct dvb_frontend* fe);
429 int (*sleep)(struct dvb_frontend* fe);
431 int (*write)(struct dvb_frontend* fe, const u8 buf[], int len);
434 int (*tune)(struct dvb_frontend* fe,
441 enum dvbfe_algo (*get_frontend_algo)(struct dvb_frontend *fe);
444 int (*set_frontend)(struct dvb_frontend *fe);
445 int (*get_tune_settings)(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* settings);
447 int (*get_frontend)(struct dvb_frontend *fe);
449 int (*read_status)(struct dvb_frontend *fe, enum fe_status *status);
450 int (*read_ber)(struct dvb_frontend* fe, u32* ber);
451 int (*read_signal_strength)(struct dvb_frontend* fe, u16* strength);
452 int (*read_snr)(struct dvb_frontend* fe, u16* snr);
453 int (*read_ucblocks)(struct dvb_frontend* fe, u32* ucblocks);
455 int (*diseqc_reset_overload)(struct dvb_frontend* fe);
456 int (*diseqc_send_master_cmd)(struct dvb_frontend* fe, struct dvb_diseqc_master_cmd* cmd);
457 int (*diseqc_recv_slave_reply)(struct dvb_frontend* fe, struct dvb_diseqc_slave_reply* reply);
458 int (*diseqc_send_burst)(struct dvb_frontend *fe,
460 int (*set_tone)(struct dvb_frontend *fe, enum fe_sec_tone_mode tone);
461 int (*set_voltage)(struct dvb_frontend *fe,
463 int (*enable_high_lnb_voltage)(struct dvb_frontend* fe, long arg);
464 int (*dishnetwork_send_legacy_command)(struct dvb_frontend* fe, unsigned long cmd);
465 int (*i2c_gate_ctrl)(struct dvb_frontend* fe, int enable);
466 int (*ts_bus_ctrl)(struct dvb_frontend* fe, int acquire);
472 enum dvbfe_search (*search)(struct dvb_frontend *fe);
477 int (*set_property)(struct dvb_frontend* fe, struct dtv_property* tvp);
478 int (*get_property)(struct dvb_frontend* fe, struct dtv_property* tvp);
686 struct dvb_frontend *fe);
688 extern int dvb_unregister_frontend(struct dvb_frontend *fe);
690 extern void dvb_frontend_detach(struct dvb_frontend *fe);
692 extern void dvb_frontend_reinitialise(struct dvb_frontend *fe);
693 extern int dvb_frontend_suspend(struct dvb_frontend *fe);
694 extern int dvb_frontend_resume(struct dvb_frontend *fe);
/linux-4.4.14/drivers/media/v4l2-core/
H A Dvideobuf2-dvb.c76 static int vb2_dvb_register_adapter(struct vb2_dvb_frontends *fe, vb2_dvb_register_adapter() argument
86 mutex_init(&fe->lock); vb2_dvb_register_adapter()
89 result = dvb_register_adapter(&fe->adapter, adapter_name, module, vb2_dvb_register_adapter()
95 fe->adapter.priv = adapter_priv; vb2_dvb_register_adapter()
96 fe->adapter.mfe_shared = mfe_shared; vb2_dvb_register_adapter()
200 struct vb2_dvb_frontend *fe; vb2_dvb_register_bus() local
203 fe = vb2_dvb_get_frontend(f, 1); vb2_dvb_register_bus()
204 if (!fe) { vb2_dvb_register_bus()
211 fe->dvb.name, adapter_nr, mfe_shared); vb2_dvb_register_bus()
220 fe = list_entry(list, struct vb2_dvb_frontend, felist); vb2_dvb_register_bus()
221 res = vb2_dvb_register_frontend(&f->adapter, &fe->dvb); vb2_dvb_register_bus()
224 fe->dvb.name, res); vb2_dvb_register_bus()
250 struct vb2_dvb_frontend *fe, *ret = NULL; vb2_dvb_get_frontend() local
255 fe = list_entry(list, struct vb2_dvb_frontend, felist); vb2_dvb_get_frontend()
256 if (fe->id == id) { vb2_dvb_get_frontend()
257 ret = fe; vb2_dvb_get_frontend()
272 struct vb2_dvb_frontend *fe = NULL; vb2_dvb_find_frontend() local
278 fe = list_entry(list, struct vb2_dvb_frontend, felist); vb2_dvb_find_frontend()
279 if (fe->dvb.frontend == p) { vb2_dvb_find_frontend()
280 ret = fe->id; vb2_dvb_find_frontend()
294 struct vb2_dvb_frontend *fe; vb2_dvb_alloc_frontend() local
296 fe = kzalloc(sizeof(struct vb2_dvb_frontend), GFP_KERNEL); vb2_dvb_alloc_frontend()
297 if (fe == NULL) vb2_dvb_alloc_frontend()
300 fe->id = id; vb2_dvb_alloc_frontend()
301 mutex_init(&fe->dvb.lock); vb2_dvb_alloc_frontend()
304 list_add_tail(&fe->felist, &f->felist); vb2_dvb_alloc_frontend()
306 return fe; vb2_dvb_alloc_frontend()
313 struct vb2_dvb_frontend *fe; vb2_dvb_dealloc_frontends() local
317 fe = list_entry(list, struct vb2_dvb_frontend, felist); vb2_dvb_dealloc_frontends()
318 if (fe->dvb.net.dvbdev) { vb2_dvb_dealloc_frontends()
319 dvb_net_release(&fe->dvb.net); vb2_dvb_dealloc_frontends()
320 fe->dvb.demux.dmx.remove_frontend(&fe->dvb.demux.dmx, vb2_dvb_dealloc_frontends()
321 &fe->dvb.fe_mem); vb2_dvb_dealloc_frontends()
322 fe->dvb.demux.dmx.remove_frontend(&fe->dvb.demux.dmx, vb2_dvb_dealloc_frontends()
323 &fe->dvb.fe_hw); vb2_dvb_dealloc_frontends()
324 dvb_dmxdev_release(&fe->dvb.dmxdev); vb2_dvb_dealloc_frontends()
325 dvb_dmx_release(&fe->dvb.demux); vb2_dvb_dealloc_frontends()
326 dvb_unregister_frontend(fe->dvb.frontend); vb2_dvb_dealloc_frontends()
328 if (fe->dvb.frontend) vb2_dvb_dealloc_frontends()
330 dvb_frontend_detach(fe->dvb.frontend); vb2_dvb_dealloc_frontends()
332 kfree(fe); /* free frontend allocation */ vb2_dvb_dealloc_frontends()
H A Dvideobuf-dvb.c136 static int videobuf_dvb_register_adapter(struct videobuf_dvb_frontends *fe, videobuf_dvb_register_adapter() argument
146 mutex_init(&fe->lock); videobuf_dvb_register_adapter()
149 result = dvb_register_adapter(&fe->adapter, adapter_name, module, videobuf_dvb_register_adapter()
155 fe->adapter.priv = adapter_priv; videobuf_dvb_register_adapter()
156 fe->adapter.mfe_shared = mfe_shared; videobuf_dvb_register_adapter()
260 struct videobuf_dvb_frontend *fe; videobuf_dvb_register_bus() local
263 fe = videobuf_dvb_get_frontend(f, 1); videobuf_dvb_register_bus()
264 if (!fe) { videobuf_dvb_register_bus()
271 fe->dvb.name, adapter_nr, mfe_shared); videobuf_dvb_register_bus()
280 fe = list_entry(list, struct videobuf_dvb_frontend, felist); videobuf_dvb_register_bus()
281 res = videobuf_dvb_register_frontend(&f->adapter, &fe->dvb); videobuf_dvb_register_bus()
284 fe->dvb.name, res); videobuf_dvb_register_bus()
310 struct videobuf_dvb_frontend *fe, *ret = NULL; videobuf_dvb_get_frontend() local
315 fe = list_entry(list, struct videobuf_dvb_frontend, felist); videobuf_dvb_get_frontend()
316 if (fe->id == id) { videobuf_dvb_get_frontend()
317 ret = fe; videobuf_dvb_get_frontend()
332 struct videobuf_dvb_frontend *fe = NULL; videobuf_dvb_find_frontend() local
338 fe = list_entry(list, struct videobuf_dvb_frontend, felist); videobuf_dvb_find_frontend()
339 if (fe->dvb.frontend == p) { videobuf_dvb_find_frontend()
340 ret = fe->id; videobuf_dvb_find_frontend()
354 struct videobuf_dvb_frontend *fe; videobuf_dvb_alloc_frontend() local
356 fe = kzalloc(sizeof(struct videobuf_dvb_frontend), GFP_KERNEL); videobuf_dvb_alloc_frontend()
357 if (fe == NULL) videobuf_dvb_alloc_frontend()
360 fe->id = id; videobuf_dvb_alloc_frontend()
361 mutex_init(&fe->dvb.lock); videobuf_dvb_alloc_frontend()
364 list_add_tail(&fe->felist, &f->felist); videobuf_dvb_alloc_frontend()
368 return fe; videobuf_dvb_alloc_frontend()
375 struct videobuf_dvb_frontend *fe; videobuf_dvb_dealloc_frontends() local
379 fe = list_entry(list, struct videobuf_dvb_frontend, felist); videobuf_dvb_dealloc_frontends()
380 if (fe->dvb.net.dvbdev) { videobuf_dvb_dealloc_frontends()
381 dvb_net_release(&fe->dvb.net); videobuf_dvb_dealloc_frontends()
382 fe->dvb.demux.dmx.remove_frontend(&fe->dvb.demux.dmx, videobuf_dvb_dealloc_frontends()
383 &fe->dvb.fe_mem); videobuf_dvb_dealloc_frontends()
384 fe->dvb.demux.dmx.remove_frontend(&fe->dvb.demux.dmx, videobuf_dvb_dealloc_frontends()
385 &fe->dvb.fe_hw); videobuf_dvb_dealloc_frontends()
386 dvb_dmxdev_release(&fe->dvb.dmxdev); videobuf_dvb_dealloc_frontends()
387 dvb_dmx_release(&fe->dvb.demux); videobuf_dvb_dealloc_frontends()
388 dvb_unregister_frontend(fe->dvb.frontend); videobuf_dvb_dealloc_frontends()
390 if (fe->dvb.frontend) videobuf_dvb_dealloc_frontends()
392 dvb_frontend_detach(fe->dvb.frontend); videobuf_dvb_dealloc_frontends()
394 kfree(fe); /* free frontend allocation */ videobuf_dvb_dealloc_frontends()
H A Dtuner-core.c118 struct dvb_frontend fe; member in struct:tuner
168 static void tuner_detach(struct dvb_frontend *fe) tuner_detach() argument
170 if (fe->ops.tuner_ops.release) { tuner_detach()
171 fe->ops.tuner_ops.release(fe); tuner_detach()
172 symbol_put_addr(fe->ops.tuner_ops.release); tuner_detach()
174 if (fe->ops.analog_ops.release) { tuner_detach()
175 fe->ops.analog_ops.release(fe); tuner_detach()
176 symbol_put_addr(fe->ops.analog_ops.release); tuner_detach()
184 static void tuner_detach(struct dvb_frontend *fe) tuner_detach() argument
186 if (fe->ops.tuner_ops.release) tuner_detach()
187 fe->ops.tuner_ops.release(fe); tuner_detach()
188 if (fe->ops.analog_ops.release) tuner_detach()
189 fe->ops.analog_ops.release(fe); tuner_detach()
203 static void fe_set_params(struct dvb_frontend *fe, fe_set_params() argument
206 struct dvb_tuner_ops *fe_tuner_ops = &fe->ops.tuner_ops; fe_set_params()
207 struct tuner *t = fe->analog_demod_priv; fe_set_params()
213 fe_tuner_ops->set_analog_params(fe, params); fe_set_params()
216 static void fe_standby(struct dvb_frontend *fe) fe_standby() argument
218 struct dvb_tuner_ops *fe_tuner_ops = &fe->ops.tuner_ops; fe_standby()
221 fe_tuner_ops->sleep(fe); fe_standby()
224 static int fe_set_config(struct dvb_frontend *fe, void *priv_cfg) fe_set_config() argument
226 struct dvb_tuner_ops *fe_tuner_ops = &fe->ops.tuner_ops; fe_set_config()
227 struct tuner *t = fe->analog_demod_priv; fe_set_config()
230 return fe_tuner_ops->set_config(fe, priv_cfg); fe_set_config()
237 static void tuner_status(struct dvb_frontend *fe);
269 struct dvb_tuner_ops *fe_tuner_ops = &t->fe.ops.tuner_ops; set_type()
270 struct analog_demod_ops *analog_ops = &t->fe.ops.analog_ops; set_type()
283 t->fe.callback = tuner_callback; set_type()
287 tuner_detach(&t->fe); set_type()
288 t->fe.analog_demod_priv = NULL; set_type()
293 &t->fe, t->i2c->adapter, t->i2c->addr)) set_type()
298 if (!dvb_attach(tda829x_attach, &t->fe, t->i2c->adapter, set_type()
304 if (!dvb_attach(tea5767_attach, &t->fe, set_type()
310 if (!dvb_attach(tea5761_attach, &t->fe, set_type()
326 if (!dvb_attach(simple_tuner_attach, &t->fe, set_type()
336 if (!dvb_attach(simple_tuner_attach, &t->fe, set_type()
346 if (!dvb_attach(xc2028_attach, &t->fe, &cfg)) set_type()
353 &t->fe, t->i2c->adapter, t->i2c->addr)) set_type()
365 &t->fe, t->i2c->adapter, &xc5000_cfg)) set_type()
380 &t->fe, t->i2c->adapter, &xc5000c_cfg)) set_type()
391 if (!dvb_attach(tda18271_attach, &t->fe, t->i2c->addr, set_type()
409 &t->fe, t->i2c->adapter, &xc4000_cfg)) set_type()
415 if (!dvb_attach(simple_tuner_attach, &t->fe, set_type()
427 t->fe.analog_demod_priv = t; set_type()
526 struct analog_demod_ops *analog_ops = &t->fe.ops.analog_ops; tuner_s_config()
532 analog_ops->set_config(&t->fe, cfg->priv); tuner_s_config()
714 set_type(client, t->type, t->mode_mask, t->config, t->fe.callback); tuner_probe()
735 tuner_detach(&t->fe); tuner_remove()
736 t->fe.analog_demod_priv = NULL; tuner_remove()
790 struct analog_demod_ops *analog_ops = &t->fe.ops.analog_ops; set_mode()
798 analog_ops->standby(&t->fe); set_mode()
840 struct analog_demod_ops *analog_ops = &t->fe.ops.analog_ops; set_tv_freq()
873 analog_ops->set_params(&t->fe, &params); set_tv_freq()
981 struct analog_demod_ops *analog_ops = &t->fe.ops.analog_ops; set_radio_freq()
1014 analog_ops->set_params(&t->fe, &params); set_radio_freq()
1028 * @fe: pointer to struct dvb_frontend
1033 static void tuner_status(struct dvb_frontend *fe) tuner_status() argument
1035 struct tuner *t = fe->analog_demod_priv; tuner_status()
1037 struct dvb_tuner_ops *fe_tuner_ops = &fe->ops.tuner_ops; tuner_status()
1038 struct analog_demod_ops *analog_ops = &fe->ops.analog_ops; tuner_status()
1069 fe_tuner_ops->get_status(&t->fe, &tuner_status); tuner_status()
1078 if (!analog_ops->has_signal(fe, &signal)) tuner_status()
1108 struct analog_demod_ops *analog_ops = &t->fe.ops.analog_ops; tuner_s_power()
1121 analog_ops->standby(&t->fe); tuner_s_power()
1161 struct dvb_tuner_ops *fe_tuner_ops = &t->fe.ops.tuner_ops; tuner_g_frequency()
1168 fe_tuner_ops->get_frequency(&t->fe, &abs_freq); tuner_g_frequency()
1192 struct analog_demod_ops *analog_ops = &t->fe.ops.analog_ops; tuner_g_tuner()
1193 struct dvb_tuner_ops *fe_tuner_ops = &t->fe.ops.tuner_ops; tuner_g_tuner()
1198 analog_ops->get_afc(&t->fe, &vt->afc); tuner_g_tuner()
1202 if (!analog_ops->has_signal(&t->fe, &signal)) tuner_g_tuner()
1218 fe_tuner_ops->get_status(&t->fe, &tuner_status); tuner_g_tuner()
1269 struct analog_demod_ops *analog_ops = &t->fe.ops.analog_ops; tuner_log_status()
1272 analog_ops->tuner_status(&t->fe); tuner_log_status()
1281 struct analog_demod_ops *analog_ops = &t->fe.ops.analog_ops; tuner_suspend()
1285 if (t->fe.ops.tuner_ops.suspend) tuner_suspend()
1286 t->fe.ops.tuner_ops.suspend(&t->fe); tuner_suspend()
1288 analog_ops->standby(&t->fe); tuner_suspend()
1300 if (t->fe.ops.tuner_ops.resume) tuner_resume()
1301 t->fe.ops.tuner_ops.resume(&t->fe); tuner_resume()
/linux-4.4.14/drivers/media/firewire/
H A Dfiredtv-fe.c23 static int fdtv_dvb_init(struct dvb_frontend *fe) fdtv_dvb_init() argument
25 struct firedtv *fdtv = fe->sec_priv; fdtv_dvb_init()
42 static int fdtv_sleep(struct dvb_frontend *fe) fdtv_sleep() argument
44 struct firedtv *fdtv = fe->sec_priv; fdtv_sleep()
54 static int fdtv_diseqc_send_master_cmd(struct dvb_frontend *fe, fdtv_diseqc_send_master_cmd() argument
57 struct firedtv *fdtv = fe->sec_priv; fdtv_diseqc_send_master_cmd()
63 static int fdtv_diseqc_send_burst(struct dvb_frontend *fe, fdtv_diseqc_send_burst() argument
69 static int fdtv_set_tone(struct dvb_frontend *fe, enum fe_sec_tone_mode tone) fdtv_set_tone() argument
71 struct firedtv *fdtv = fe->sec_priv; fdtv_set_tone()
77 static int fdtv_set_voltage(struct dvb_frontend *fe, fdtv_set_voltage() argument
80 struct firedtv *fdtv = fe->sec_priv; fdtv_set_voltage()
86 static int fdtv_read_status(struct dvb_frontend *fe, enum fe_status *status) fdtv_read_status() argument
88 struct firedtv *fdtv = fe->sec_priv; fdtv_read_status()
102 static int fdtv_read_ber(struct dvb_frontend *fe, u32 *ber) fdtv_read_ber() argument
104 struct firedtv *fdtv = fe->sec_priv; fdtv_read_ber()
114 static int fdtv_read_signal_strength(struct dvb_frontend *fe, u16 *strength) fdtv_read_signal_strength() argument
116 struct firedtv *fdtv = fe->sec_priv; fdtv_read_signal_strength()
126 static int fdtv_read_snr(struct dvb_frontend *fe, u16 *snr) fdtv_read_snr() argument
128 struct firedtv *fdtv = fe->sec_priv; fdtv_read_snr()
139 static int fdtv_read_uncorrected_blocks(struct dvb_frontend *fe, u32 *ucblocks) fdtv_read_uncorrected_blocks() argument
144 static int fdtv_set_frontend(struct dvb_frontend *fe) fdtv_set_frontend() argument
146 struct dtv_frontend_properties *p = &fe->dtv_property_cache; fdtv_set_frontend()
147 struct firedtv *fdtv = fe->sec_priv; fdtv_set_frontend()
154 struct dvb_frontend_ops *ops = &fdtv->fe.ops; fdtv_frontend_init()
252 fdtv->fe.dvb = &fdtv->adapter; fdtv_frontend_init()
253 fdtv->fe.sec_priv = fdtv; fdtv_frontend_init()
/linux-4.4.14/drivers/media/pci/mantis/
H A Dmantis_vp2033.c68 static int tda1002x_cu1216_tuner_set(struct dvb_frontend *fe) tda1002x_cu1216_tuner_set() argument
70 struct dtv_frontend_properties *p = &fe->dtv_property_cache; tda1002x_cu1216_tuner_set()
71 struct mantis_pci *mantis = fe->dvb->priv; tda1002x_cu1216_tuner_set()
91 if (fe->ops.i2c_gate_ctrl) tda1002x_cu1216_tuner_set()
92 fe->ops.i2c_gate_ctrl(fe, 1); tda1002x_cu1216_tuner_set()
101 if (fe->ops.i2c_gate_ctrl) tda1002x_cu1216_tuner_set()
102 fe->ops.i2c_gate_ctrl(fe, 1); tda1002x_cu1216_tuner_set()
115 if (fe->ops.i2c_gate_ctrl) tda1002x_cu1216_tuner_set()
116 fe->ops.i2c_gate_ctrl(fe, 1); tda1002x_cu1216_tuner_set()
124 static int vp2033_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *fe) vp2033_frontend_init() argument
136 fe = dvb_attach(tda10021_attach, &vp2033_tda1002x_cu1216_config, vp2033_frontend_init()
140 if (fe) { vp2033_frontend_init()
145 fe = dvb_attach(tda10023_attach, &vp2033_tda10023_cu1216_config, vp2033_frontend_init()
149 if (fe) { vp2033_frontend_init()
156 if (fe) { vp2033_frontend_init()
157 fe->ops.tuner_ops.set_params = tda1002x_cu1216_tuner_set; vp2033_frontend_init()
170 mantis->fe = fe; vp2033_frontend_init()
H A Dmantis_vp2040.c50 static int tda1002x_cu1216_tuner_set(struct dvb_frontend *fe) tda1002x_cu1216_tuner_set() argument
52 struct dtv_frontend_properties *p = &fe->dtv_property_cache; tda1002x_cu1216_tuner_set()
53 struct mantis_pci *mantis = fe->dvb->priv; tda1002x_cu1216_tuner_set()
73 if (fe->ops.i2c_gate_ctrl) tda1002x_cu1216_tuner_set()
74 fe->ops.i2c_gate_ctrl(fe, 1); tda1002x_cu1216_tuner_set()
83 if (fe->ops.i2c_gate_ctrl) tda1002x_cu1216_tuner_set()
84 fe->ops.i2c_gate_ctrl(fe, 1); tda1002x_cu1216_tuner_set()
97 if (fe->ops.i2c_gate_ctrl) tda1002x_cu1216_tuner_set()
98 fe->ops.i2c_gate_ctrl(fe, 1); tda1002x_cu1216_tuner_set()
124 static int vp2040_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *fe) vp2040_frontend_init() argument
136 fe = dvb_attach(tda10021_attach, &vp2040_tda1002x_cu1216_config, vp2040_frontend_init()
140 if (fe) { vp2040_frontend_init()
145 fe = dvb_attach(tda10023_attach, &vp2040_tda10023_cu1216_config, vp2040_frontend_init()
149 if (fe) { vp2040_frontend_init()
156 if (fe) { vp2040_frontend_init()
157 fe->ops.tuner_ops.set_params = tda1002x_cu1216_tuner_set; vp2040_frontend_init()
169 mantis->fe = fe; vp2040_frontend_init()
H A Dmantis_vp1033.c86 static int lgtdqcs001f_tuner_set(struct dvb_frontend *fe) lgtdqcs001f_tuner_set() argument
88 struct dtv_frontend_properties *p = &fe->dtv_property_cache; lgtdqcs001f_tuner_set()
89 struct mantis_pci *mantis = fe->dvb->priv; lgtdqcs001f_tuner_set()
118 static int lgtdqcs001f_set_symbol_rate(struct dvb_frontend *fe, lgtdqcs001f_set_symbol_rate() argument
143 stv0299_writereg(fe, 0x13, aclk); lgtdqcs001f_set_symbol_rate()
144 stv0299_writereg(fe, 0x14, bclk); lgtdqcs001f_set_symbol_rate()
146 stv0299_writereg(fe, 0x1f, (ratio >> 16) & 0xff); lgtdqcs001f_set_symbol_rate()
147 stv0299_writereg(fe, 0x20, (ratio >> 8) & 0xff); lgtdqcs001f_set_symbol_rate()
148 stv0299_writereg(fe, 0x21, ratio & 0xf0); lgtdqcs001f_set_symbol_rate()
164 static int vp1033_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *fe) vp1033_frontend_init() argument
176 fe = dvb_attach(stv0299_attach, &lgtdqcs001f_config, adapter); vp1033_frontend_init()
178 if (fe) { vp1033_frontend_init()
179 fe->ops.tuner_ops.set_params = lgtdqcs001f_tuner_set; vp1033_frontend_init()
194 mantis->fe = fe; vp1033_frontend_init()
H A Dmantis_vp1034.c47 int vp1034_set_voltage(struct dvb_frontend *fe, enum fe_sec_voltage voltage) vp1034_set_voltage() argument
49 struct mantis_pci *mantis = fe->dvb->priv; vp1034_set_voltage()
74 static int vp1034_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *fe) vp1034_frontend_init() argument
86 fe = dvb_attach(mb86a16_attach, &vp1034_mb86a16_config, adapter); vp1034_frontend_init()
87 if (fe) { vp1034_frontend_init()
102 mantis->fe = fe; vp1034_frontend_init()
H A Dmantis_vp3030.c56 static int vp3030_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *fe) vp3030_frontend_init() argument
71 fe = dvb_attach(zl10353_attach, &mantis_vp3030_config, adapter); vp3030_frontend_init()
73 if (!fe) vp3030_frontend_init()
76 dvb_attach(tda665x_attach, fe, &env57h12d5_config, adapter); vp3030_frontend_init()
85 mantis->fe = fe; vp3030_frontend_init()
H A Dmantis_dvb.c223 result = config->frontend_init(mantis, mantis->fe); mantis_dvb_init()
228 if (mantis->fe == NULL) { mantis_dvb_init()
233 if (dvb_register_frontend(&mantis->dvb_adapter, mantis->fe)) { mantis_dvb_init()
236 if (mantis->fe->ops.release) mantis_dvb_init()
237 mantis->fe->ops.release(mantis->fe); mantis_dvb_init()
239 mantis->fe = NULL; mantis_dvb_init()
251 if (mantis->fe) { mantis_dvb_init()
252 dvb_unregister_frontend(mantis->fe); mantis_dvb_init()
253 dvb_frontend_detach(mantis->fe); mantis_dvb_init()
278 if (mantis->fe) { mantis_dvb_exit()
283 dvb_unregister_frontend(mantis->fe); mantis_dvb_exit()
284 dvb_frontend_detach(mantis->fe); mantis_dvb_exit()
/linux-4.4.14/drivers/media/usb/em28xx/
H A Dem28xx-dvb.c78 struct dvb_frontend *fe[2]; member in struct:em28xx_dvb
283 static int em28xx_dvb_bus_ctrl(struct dvb_frontend *fe, int acquire) em28xx_dvb_bus_ctrl() argument
285 struct em28xx_i2c_bus *i2c_bus = fe->dvb->priv; em28xx_dvb_bus_ctrl()
445 static int drxk_gate_ctrl(struct dvb_frontend *fe, int enable) drxk_gate_ctrl() argument
447 struct em28xx_dvb *dvb = fe->sec_priv; drxk_gate_ctrl()
455 status = dvb->gate_ctrl(fe, 1); drxk_gate_ctrl()
457 status = dvb->gate_ctrl(fe, 0); drxk_gate_ctrl()
717 static int em28xx_pctv_290e_set_lna(struct dvb_frontend *fe) em28xx_pctv_290e_set_lna() argument
719 struct dtv_frontend_properties *c = &fe->dtv_property_cache; em28xx_pctv_290e_set_lna()
720 struct em28xx_i2c_bus *i2c_bus = fe->dvb->priv; em28xx_pctv_290e_set_lna()
746 static int em28xx_pctv_292e_set_lna(struct dvb_frontend *fe) em28xx_pctv_292e_set_lna() argument
748 struct dtv_frontend_properties *c = &fe->dtv_property_cache; em28xx_pctv_292e_set_lna()
749 struct em28xx_i2c_bus *i2c_bus = fe->dvb->priv; em28xx_pctv_292e_set_lna()
761 static int em28xx_mt352_terratec_xs_init(struct dvb_frontend *fe) em28xx_mt352_terratec_xs_init() argument
775 mt352_write(fe, clock_config, sizeof(clock_config)); em28xx_mt352_terratec_xs_init()
777 mt352_write(fe, reset, sizeof(reset)); em28xx_mt352_terratec_xs_init()
778 mt352_write(fe, adc_ctl_1_cfg, sizeof(adc_ctl_1_cfg)); em28xx_mt352_terratec_xs_init()
779 mt352_write(fe, agc_cfg, sizeof(agc_cfg)); em28xx_mt352_terratec_xs_init()
780 mt352_write(fe, input_freq_cfg, sizeof(input_freq_cfg)); em28xx_mt352_terratec_xs_init()
781 mt352_write(fe, rs_err_cfg, sizeof(rs_err_cfg)); em28xx_mt352_terratec_xs_init()
782 mt352_write(fe, capt_range_cfg, sizeof(capt_range_cfg)); em28xx_mt352_terratec_xs_init()
783 mt352_write(fe, trl_nom_cfg, sizeof(trl_nom_cfg)); em28xx_mt352_terratec_xs_init()
784 mt352_write(fe, tps_given_cfg, sizeof(tps_given_cfg)); em28xx_mt352_terratec_xs_init()
785 mt352_write(fe, tuner_go, sizeof(tuner_go)); em28xx_mt352_terratec_xs_init()
866 struct dvb_frontend *fe; em28xx_attach_xc3028() local
878 if (!dev->dvb->fe[0]) { em28xx_attach_xc3028()
884 fe = dvb_attach(xc2028_attach, dev->dvb->fe[0], &cfg); em28xx_attach_xc3028()
885 if (!fe) { em28xx_attach_xc3028()
887 dvb_frontend_detach(dev->dvb->fe[0]); em28xx_attach_xc3028()
888 dev->dvb->fe[0] = NULL; em28xx_attach_xc3028()
916 dvb->fe[0]->ops.ts_bus_ctrl = em28xx_dvb_bus_ctrl; em28xx_register_dvb()
917 if (dvb->fe[1]) em28xx_register_dvb()
918 dvb->fe[1]->ops.ts_bus_ctrl = em28xx_dvb_bus_ctrl; em28xx_register_dvb()
923 result = dvb_register_frontend(&dvb->adapter, dvb->fe[0]); em28xx_register_dvb()
931 if (dvb->fe[1]) { em28xx_register_dvb()
932 result = dvb_register_frontend(&dvb->adapter, dvb->fe[1]); em28xx_register_dvb()
1003 if (dvb->fe[1]) em28xx_register_dvb()
1004 dvb_unregister_frontend(dvb->fe[1]); em28xx_register_dvb()
1005 dvb_unregister_frontend(dvb->fe[0]); em28xx_register_dvb()
1007 if (dvb->fe[1]) em28xx_register_dvb()
1008 dvb_frontend_detach(dvb->fe[1]); em28xx_register_dvb()
1010 dvb_frontend_detach(dvb->fe[0]); em28xx_register_dvb()
1023 if (dvb->fe[1]) em28xx_unregister_dvb()
1024 dvb_unregister_frontend(dvb->fe[1]); em28xx_unregister_dvb()
1025 dvb_unregister_frontend(dvb->fe[0]); em28xx_unregister_dvb()
1026 if (dvb->fe[1] && !dvb->dont_attach_fe1) em28xx_unregister_dvb()
1027 dvb_frontend_detach(dvb->fe[1]); em28xx_unregister_dvb()
1028 dvb_frontend_detach(dvb->fe[0]); em28xx_unregister_dvb()
1055 dvb->fe[0] = dvb->fe[1] = NULL; em28xx_dvb_init()
1083 dvb->fe[0] = dvb_attach(s921_attach, em28xx_dvb_init()
1086 if (!dvb->fe[0]) { em28xx_dvb_init()
1096 dvb->fe[0] = dvb_attach(lgdt330x_attach, em28xx_dvb_init()
1105 dvb->fe[0] = dvb_attach(zl10353_attach, em28xx_dvb_init()
1116 dvb->fe[0] = dvb_attach(zl10353_attach, em28xx_dvb_init()
1129 dvb->fe[0] = dvb_attach(zl10353_attach, em28xx_dvb_init()
1132 if (dvb->fe[0] == NULL) { em28xx_dvb_init()
1135 dvb->fe[0] = dvb_attach(mt352_attach, em28xx_dvb_init()
1146 dvb->fe[0] = dvb_attach(zl10353_attach, em28xx_dvb_init()
1149 if (dvb->fe[0] != NULL) em28xx_dvb_init()
1150 dvb_attach(qt1010_attach, dvb->fe[0], em28xx_dvb_init()
1155 dvb->fe[0] = dvb_attach(s5h1409_attach, em28xx_dvb_init()
1164 dvb->fe[0] = dvb_attach(lgdt330x_attach, em28xx_dvb_init()
1167 if (dvb->fe[0] != NULL) { em28xx_dvb_init()
1168 if (!dvb_attach(simple_tuner_attach, dvb->fe[0], em28xx_dvb_init()
1178 dvb->fe[0] = dvb_attach(drxd_attach, &em28xx_drxd, NULL, em28xx_dvb_init()
1187 dvb->fe[0] = dvb_attach(tda10023_attach, em28xx_dvb_init()
1190 if (dvb->fe[0]) { em28xx_dvb_init()
1191 if (!dvb_attach(simple_tuner_attach, dvb->fe[0], em28xx_dvb_init()
1200 dvb->fe[0] = dvb_attach(lgdt3305_attach, em28xx_dvb_init()
1203 if (!dvb->fe[0]) { em28xx_dvb_init()
1207 if (!dvb_attach(tda18271_attach, dvb->fe[0], 0x60, em28xx_dvb_init()
1210 dvb_frontend_detach(dvb->fe[0]); em28xx_dvb_init()
1219 dvb->fe[0] = dvb_attach(cxd2820r_attach, em28xx_dvb_init()
1223 if (dvb->fe[0]) { em28xx_dvb_init()
1226 dvb->fe[0], em28xx_dvb_init()
1231 dvb_frontend_detach(dvb->fe[0]); em28xx_dvb_init()
1248 dvb->fe[0]->ops.set_lna = em28xx_pctv_290e_set_lna; em28xx_dvb_init()
1258 dvb->fe[0] = dvb_attach(drxk_attach, em28xx_dvb_init()
1260 if (!dvb->fe[0]) { em28xx_dvb_init()
1265 dvb->fe[0]->sec_priv = dvb; em28xx_dvb_init()
1267 dvb->gate_ctrl = dvb->fe[0]->ops.i2c_gate_ctrl; em28xx_dvb_init()
1268 dvb->fe[0]->ops.i2c_gate_ctrl = drxk_gate_ctrl; em28xx_dvb_init()
1275 if (dvb->fe[0]->ops.i2c_gate_ctrl) em28xx_dvb_init()
1276 dvb->fe[0]->ops.i2c_gate_ctrl(dvb->fe[0], 1); em28xx_dvb_init()
1277 if (!dvb_attach(xc5000_attach, dvb->fe[0], &dev->i2c_adap[dev->def_i2c_bus], em28xx_dvb_init()
1282 if (dvb->fe[0]->ops.i2c_gate_ctrl) em28xx_dvb_init()
1283 dvb->fe[0]->ops.i2c_gate_ctrl(dvb->fe[0], 0); em28xx_dvb_init()
1290 dvb->fe[0] = dvb_attach(drxk_attach, &terratec_h5_drxk, &dev->i2c_adap[dev->def_i2c_bus]); em28xx_dvb_init()
1291 if (!dvb->fe[0]) { em28xx_dvb_init()
1296 dvb->fe[0]->sec_priv = dvb; em28xx_dvb_init()
1298 dvb->gate_ctrl = dvb->fe[0]->ops.i2c_gate_ctrl; em28xx_dvb_init()
1299 dvb->fe[0]->ops.i2c_gate_ctrl = drxk_gate_ctrl; em28xx_dvb_init()
1302 if (dvb->fe[0]->ops.i2c_gate_ctrl) em28xx_dvb_init()
1303 dvb->fe[0]->ops.i2c_gate_ctrl(dvb->fe[0], 1); em28xx_dvb_init()
1304 if (!dvb_attach(tda18271c2dd_attach, dvb->fe[0], &dev->i2c_adap[dev->def_i2c_bus], 0x60)) { em28xx_dvb_init()
1308 if (dvb->fe[0]->ops.i2c_gate_ctrl) em28xx_dvb_init()
1309 dvb->fe[0]->ops.i2c_gate_ctrl(dvb->fe[0], 0); em28xx_dvb_init()
1313 dvb->fe[0] = dvb_attach(mb86a20s_attach, em28xx_dvb_init()
1316 if (dvb->fe[0] != NULL) em28xx_dvb_init()
1317 dvb_attach(tda18271_attach, dvb->fe[0], 0x60, em28xx_dvb_init()
1348 dvb->fe[0] = tda10071_pdata.get_dvb_frontend(client); em28xx_dvb_init()
1352 a8293_pdata.dvb_frontend = dvb->fe[0]; em28xx_dvb_init()
1378 dvb->fe[0] = dvb_attach(drxk_attach, &maxmedia_ub425_tc_drxk, em28xx_dvb_init()
1381 if (dvb->fe[0]) { em28xx_dvb_init()
1383 dvb->fe[0]->ops.i2c_gate_ctrl = NULL; em28xx_dvb_init()
1386 if (!dvb_attach(tda18271_attach, dvb->fe[0], 0x60, em28xx_dvb_init()
1389 dvb_frontend_detach(dvb->fe[0]); em28xx_dvb_init()
1400 dvb->fe[0] = dvb_attach(drxk_attach, &pctv_520e_drxk, em28xx_dvb_init()
1403 if (dvb->fe[0]) { em28xx_dvb_init()
1405 if (!dvb_attach(tda18271_attach, dvb->fe[0], 0x60, em28xx_dvb_init()
1408 dvb_frontend_detach(dvb->fe[0]); em28xx_dvb_init()
1419 dvb->fe[0] = dvb_attach(drxk_attach, &terratec_htc_stick_drxk, em28xx_dvb_init()
1421 if (!dvb->fe[0]) { em28xx_dvb_init()
1427 if (!dvb_attach(tda18271_attach, dvb->fe[0], 0x60, em28xx_dvb_init()
1438 dvb->fe[0] = dvb_attach(drxk_attach, &terratec_htc_stick_drxk, em28xx_dvb_init()
1440 if (!dvb->fe[0]) { em28xx_dvb_init()
1446 if (!dvb_attach(tda18271_attach, dvb->fe[0], 0x60, em28xx_dvb_init()
1454 dvb->fe[0] = dvb_attach(lgdt3305_attach, em28xx_dvb_init()
1457 if (!dvb->fe[0]) { em28xx_dvb_init()
1463 if (!dvb_attach(tda18271_attach, dvb->fe[0], 0x60, em28xx_dvb_init()
1480 dvb->fe[0] = dvb_attach(lgdt3305_attach, em28xx_dvb_init()
1483 if (!dvb->fe[0]) { em28xx_dvb_init()
1489 kworld_ub435q_v3_config.fe = dvb->fe[0]; em28xx_dvb_init()
1493 dvb_frontend_detach(dvb->fe[0]); em28xx_dvb_init()
1500 dvb_frontend_detach(dvb->fe[0]); em28xx_dvb_init()
1509 dvb->fe[0] = dvb_attach(drx39xxj_attach, &dev->i2c_adap[dev->def_i2c_bus]); em28xx_dvb_init()
1510 if (dvb->fe[0] != NULL) { em28xx_dvb_init()
1511 dvb->fe[0] = dvb_attach(tda18271_attach, dvb->fe[0], 0x60, em28xx_dvb_init()
1514 if (!dvb->fe[0]) { em28xx_dvb_init()
1550 dvb->fe[0] = m88ds3103_pdata.get_dvb_frontend(client); em28xx_dvb_init()
1555 ts2020_config.fe = dvb->fe[0]; em28xx_dvb_init()
1577 dvb->fe[0]->ops.read_signal_strength = em28xx_dvb_init()
1578 dvb->fe[0]->ops.tuner_ops.get_rf_strength; em28xx_dvb_init()
1581 a8293_pdata.dvb_frontend = dvb->fe[0]; em28xx_dvb_init()
1619 si2168_config.fe = &dvb->fe[0]; em28xx_dvb_init()
1642 si2157_config.fe = dvb->fe[0]; em28xx_dvb_init()
1666 dvb->fe[0]->ops.set_lna = em28xx_pctv_292e_set_lna; em28xx_dvb_init()
1680 si2168_config.fe = &dvb->fe[0]; em28xx_dvb_init()
1703 si2157_config.fe = dvb->fe[0]; em28xx_dvb_init()
1734 if (NULL == dvb->fe[0]) { em28xx_dvb_init()
1740 dvb->fe[0]->callback = em28xx_tuner_callback; em28xx_dvb_init()
1741 if (dvb->fe[1]) em28xx_dvb_init()
1742 dvb->fe[1]->callback = em28xx_tuner_callback; em28xx_dvb_init()
1799 if (dvb->fe[0]) { em28xx_dvb_fini()
1800 prevent_sleep(&dvb->fe[0]->ops); em28xx_dvb_fini()
1801 dvb->fe[0]->exit = DVB_FE_DEVICE_REMOVED; em28xx_dvb_fini()
1803 if (dvb->fe[1]) { em28xx_dvb_fini()
1804 prevent_sleep(&dvb->fe[1]->ops); em28xx_dvb_fini()
1805 dvb->fe[1]->exit = DVB_FE_DEVICE_REMOVED; em28xx_dvb_fini()
1852 if (dvb->fe[0]) { em28xx_dvb_suspend()
1853 ret = dvb_frontend_suspend(dvb->fe[0]); em28xx_dvb_suspend()
1856 if (dvb->fe[1]) { em28xx_dvb_suspend()
1857 dvb_frontend_suspend(dvb->fe[1]); em28xx_dvb_suspend()
1879 if (dvb->fe[0]) { em28xx_dvb_resume()
1880 ret = dvb_frontend_resume(dvb->fe[0]); em28xx_dvb_resume()
1884 if (dvb->fe[1]) { em28xx_dvb_resume()
1885 ret = dvb_frontend_resume(dvb->fe[1]); em28xx_dvb_resume()
/linux-4.4.14/sound/soc/
H A Dsoc-pcm.c172 int dpcm_dapm_stream_event(struct snd_soc_pcm_runtime *fe, int dir, dpcm_dapm_stream_event() argument
177 list_for_each_entry(dpcm, &fe->dpcm[dir].be_clients, list_be) { dpcm_dapm_stream_event()
187 snd_soc_dapm_stream_event(fe, dir, event); dpcm_dapm_stream_event()
1120 static int dpcm_be_connect(struct snd_soc_pcm_runtime *fe, dpcm_be_connect() argument
1126 list_for_each_entry(dpcm, &fe->dpcm[stream].be_clients, list_be) { dpcm_be_connect()
1127 if (dpcm->be == be && dpcm->fe == fe) dpcm_be_connect()
1136 dpcm->fe = fe; dpcm_be_connect()
1137 be->dpcm[stream].runtime = fe->dpcm[stream].runtime; dpcm_be_connect()
1139 list_add(&dpcm->list_be, &fe->dpcm[stream].be_clients); dpcm_be_connect()
1142 dev_dbg(fe->dev, "connected new DPCM %s path %s %s %s\n", dpcm_be_connect()
1143 stream ? "capture" : "playback", fe->dai_link->name, dpcm_be_connect()
1147 if (fe->debugfs_dpcm_root) dpcm_be_connect()
1149 fe->debugfs_dpcm_root, &dpcm->state); dpcm_be_connect()
1155 static void dpcm_be_reparent(struct snd_soc_pcm_runtime *fe, dpcm_be_reparent() argument
1168 if (dpcm->fe == fe) dpcm_be_reparent()
1171 dev_dbg(fe->dev, "reparent %s path %s %s %s\n", dpcm_be_reparent()
1173 dpcm->fe->dai_link->name, dpcm_be_reparent()
1176 fe_substream = snd_soc_dpcm_get_substream(dpcm->fe, stream); dpcm_be_reparent()
1183 void dpcm_be_disconnect(struct snd_soc_pcm_runtime *fe, int stream) dpcm_be_disconnect() argument
1187 list_for_each_entry_safe(dpcm, d, &fe->dpcm[stream].be_clients, list_be) { dpcm_be_disconnect()
1188 dev_dbg(fe->dev, "ASoC: BE %s disconnect check for %s\n", dpcm_be_disconnect()
1195 dev_dbg(fe->dev, "freed DSP %s path %s %s %s\n", dpcm_be_disconnect()
1196 stream ? "capture" : "playback", fe->dai_link->name, dpcm_be_disconnect()
1200 dpcm_be_reparent(fe, dpcm->be, stream); dpcm_be_disconnect()
1280 int dpcm_path_get(struct snd_soc_pcm_runtime *fe, dpcm_path_get() argument
1283 struct snd_soc_dai *cpu_dai = fe->cpu_dai; dpcm_path_get()
1289 dev_dbg(fe->dev, "ASoC: found %d audio %s paths\n", paths, dpcm_path_get()
1295 static int dpcm_prune_paths(struct snd_soc_pcm_runtime *fe, int stream, dpcm_prune_paths() argument
1304 list_for_each_entry(dpcm, &fe->dpcm[stream].be_clients, list_be) { dpcm_prune_paths()
1324 dev_dbg(fe->dev, "ASoC: pruning %s BE %s for %s\n", dpcm_prune_paths()
1326 dpcm->be->dai_link->name, fe->dai_link->name); dpcm_prune_paths()
1332 dev_dbg(fe->dev, "ASoC: found %d old BE paths for pruning\n", prune); dpcm_prune_paths()
1336 static int dpcm_add_paths(struct snd_soc_pcm_runtime *fe, int stream, dpcm_add_paths() argument
1339 struct snd_soc_card *card = fe->card; dpcm_add_paths()
1363 dev_err(fe->dev, "ASoC: no BE found for %s\n", dpcm_add_paths()
1373 if (!fe->dpcm[stream].runtime && !fe->fe_compr) dpcm_add_paths()
1377 err = dpcm_be_connect(fe, be, stream); dpcm_add_paths()
1379 dev_err(fe->dev, "ASoC: can't connect %s\n", dpcm_add_paths()
1390 dev_dbg(fe->dev, "ASoC: found %d new BE paths\n", new); dpcm_add_paths()
1398 int dpcm_process_paths(struct snd_soc_pcm_runtime *fe, dpcm_process_paths() argument
1402 return dpcm_add_paths(fe, stream, list); dpcm_process_paths()
1404 return dpcm_prune_paths(fe, stream, list); dpcm_process_paths()
1407 void dpcm_clear_pending_state(struct snd_soc_pcm_runtime *fe, int stream) dpcm_clear_pending_state() argument
1411 list_for_each_entry(dpcm, &fe->dpcm[stream].be_clients, list_be) dpcm_clear_pending_state()
1416 static void dpcm_be_dai_startup_unwind(struct snd_soc_pcm_runtime *fe, dpcm_be_dai_startup_unwind() argument
1422 list_for_each_entry(dpcm, &fe->dpcm[stream].be_clients, list_be) { dpcm_be_dai_startup_unwind()
1445 int dpcm_be_dai_startup(struct snd_soc_pcm_runtime *fe, int stream) dpcm_be_dai_startup() argument
1451 list_for_each_entry(dpcm, &fe->dpcm[stream].be_clients, list_be) { dpcm_be_dai_startup()
1464 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) dpcm_be_dai_startup()
1505 list_for_each_entry_continue_reverse(dpcm, &fe->dpcm[stream].be_clients, list_be) { dpcm_be_dai_startup()
1510 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) dpcm_be_dai_startup()
1549 struct snd_soc_pcm_runtime *fe = substream->private_data; dpcm_runtime_base_format() local
1554 if (!fe->dai_link->dpcm_merged_format) dpcm_runtime_base_format()
1562 list_for_each_entry(dpcm, &fe->dpcm[stream].be_clients, list_be) { dpcm_runtime_base_format()
1603 static void dpcm_set_fe_update_state(struct snd_soc_pcm_runtime *fe, dpcm_set_fe_update_state() argument
1607 snd_soc_dpcm_get_substream(fe, stream); dpcm_set_fe_update_state()
1610 if (state == SND_SOC_DPCM_UPDATE_NO && fe->dpcm[stream].trigger_pending) { dpcm_set_fe_update_state()
1612 fe->dpcm[stream].trigger_pending - 1); dpcm_set_fe_update_state()
1613 fe->dpcm[stream].trigger_pending = 0; dpcm_set_fe_update_state()
1615 fe->dpcm[stream].runtime_update = state; dpcm_set_fe_update_state()
1621 struct snd_soc_pcm_runtime *fe = fe_substream->private_data; dpcm_fe_dai_startup() local
1625 dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_FE); dpcm_fe_dai_startup()
1627 ret = dpcm_be_dai_startup(fe, fe_substream->stream); dpcm_fe_dai_startup()
1629 dev_err(fe->dev,"ASoC: failed to start some BEs %d\n", ret); dpcm_fe_dai_startup()
1633 dev_dbg(fe->dev, "ASoC: open FE %s\n", fe->dai_link->name); dpcm_fe_dai_startup()
1638 dev_err(fe->dev,"ASoC: failed to start FE %d\n", ret); dpcm_fe_dai_startup()
1642 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_OPEN; dpcm_fe_dai_startup()
1647 dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO); dpcm_fe_dai_startup()
1651 dpcm_be_dai_startup_unwind(fe, fe_substream->stream); dpcm_fe_dai_startup()
1653 dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO); dpcm_fe_dai_startup()
1657 int dpcm_be_dai_shutdown(struct snd_soc_pcm_runtime *fe, int stream) dpcm_be_dai_shutdown() argument
1662 list_for_each_entry(dpcm, &fe->dpcm[stream].be_clients, list_be) { dpcm_be_dai_shutdown()
1669 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) dpcm_be_dai_shutdown()
1685 dpcm->fe->dai_link->name); dpcm_be_dai_shutdown()
1697 struct snd_soc_pcm_runtime *fe = substream->private_data; dpcm_fe_dai_shutdown() local
1700 dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_FE); dpcm_fe_dai_shutdown()
1703 dpcm_be_dai_shutdown(fe, substream->stream); dpcm_fe_dai_shutdown()
1705 dev_dbg(fe->dev, "ASoC: close FE %s\n", fe->dai_link->name); dpcm_fe_dai_shutdown()
1711 dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_STOP); dpcm_fe_dai_shutdown()
1713 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE; dpcm_fe_dai_shutdown()
1714 dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO); dpcm_fe_dai_shutdown()
1718 int dpcm_be_dai_hw_free(struct snd_soc_pcm_runtime *fe, int stream) dpcm_be_dai_hw_free() argument
1724 list_for_each_entry(dpcm, &fe->dpcm[stream].be_clients, list_be) { dpcm_be_dai_hw_free()
1731 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) dpcm_be_dai_hw_free()
1735 if (!snd_soc_dpcm_can_be_free_stop(fe, be, stream)) dpcm_be_dai_hw_free()
1751 dpcm->fe->dai_link->name); dpcm_be_dai_hw_free()
1763 struct snd_soc_pcm_runtime *fe = substream->private_data; dpcm_fe_dai_hw_free() local
1766 mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); dpcm_fe_dai_hw_free()
1767 dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_FE); dpcm_fe_dai_hw_free()
1769 dev_dbg(fe->dev, "ASoC: hw_free FE %s\n", fe->dai_link->name); dpcm_fe_dai_hw_free()
1774 dev_err(fe->dev,"ASoC: hw_free FE %s failed\n", dpcm_fe_dai_hw_free()
1775 fe->dai_link->name); dpcm_fe_dai_hw_free()
1779 err = dpcm_be_dai_hw_free(fe, stream); dpcm_fe_dai_hw_free()
1781 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE; dpcm_fe_dai_hw_free()
1782 dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO); dpcm_fe_dai_hw_free()
1784 mutex_unlock(&fe->card->mutex); dpcm_fe_dai_hw_free()
1788 int dpcm_be_dai_hw_params(struct snd_soc_pcm_runtime *fe, int stream) dpcm_be_dai_hw_params() argument
1793 list_for_each_entry(dpcm, &fe->dpcm[stream].be_clients, list_be) { dpcm_be_dai_hw_params()
1800 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) dpcm_be_dai_hw_params()
1804 if (!snd_soc_dpcm_can_be_params(fe, be, stream)) dpcm_be_dai_hw_params()
1813 dpcm->fe->dai_link->name); dpcm_be_dai_hw_params()
1816 memcpy(&dpcm->hw_params, &fe->dpcm[stream].hw_params, dpcm_be_dai_hw_params()
1844 list_for_each_entry_continue_reverse(dpcm, &fe->dpcm[stream].be_clients, list_be) { dpcm_be_dai_hw_params()
1849 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) dpcm_be_dai_hw_params()
1853 if (!snd_soc_dpcm_can_be_free_stop(fe, be, stream)) dpcm_be_dai_hw_params()
1871 struct snd_soc_pcm_runtime *fe = substream->private_data; dpcm_fe_dai_hw_params() local
1874 mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); dpcm_fe_dai_hw_params()
1875 dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_FE); dpcm_fe_dai_hw_params()
1877 memcpy(&fe->dpcm[substream->stream].hw_params, params, dpcm_fe_dai_hw_params()
1879 ret = dpcm_be_dai_hw_params(fe, substream->stream); dpcm_fe_dai_hw_params()
1881 dev_err(fe->dev,"ASoC: hw_params BE failed %d\n", ret); dpcm_fe_dai_hw_params()
1885 dev_dbg(fe->dev, "ASoC: hw_params FE %s rate %d chan %x fmt %d\n", dpcm_fe_dai_hw_params()
1886 fe->dai_link->name, params_rate(params), dpcm_fe_dai_hw_params()
1892 dev_err(fe->dev,"ASoC: hw_params FE failed %d\n", ret); dpcm_fe_dai_hw_params()
1893 dpcm_be_dai_hw_free(fe, stream); dpcm_fe_dai_hw_params()
1895 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_PARAMS; dpcm_fe_dai_hw_params()
1898 dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO); dpcm_fe_dai_hw_params()
1899 mutex_unlock(&fe->card->mutex); dpcm_fe_dai_hw_params()
1909 dpcm->fe->dai_link->name, cmd); dpcm_do_trigger()
1918 int dpcm_be_dai_trigger(struct snd_soc_pcm_runtime *fe, int stream, dpcm_be_dai_trigger() argument
1924 list_for_each_entry(dpcm, &fe->dpcm[stream].be_clients, list_be) { dpcm_be_dai_trigger()
1931 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) dpcm_be_dai_trigger()
1970 if (!snd_soc_dpcm_can_be_free_stop(fe, be, stream)) dpcm_be_dai_trigger()
1983 if (!snd_soc_dpcm_can_be_free_stop(fe, be, stream)) dpcm_be_dai_trigger()
1996 if (!snd_soc_dpcm_can_be_free_stop(fe, be, stream)) dpcm_be_dai_trigger()
2014 struct snd_soc_pcm_runtime *fe = substream->private_data; dpcm_fe_dai_do_trigger() local
2016 enum snd_soc_dpcm_trigger trigger = fe->dai_link->trigger[stream]; dpcm_fe_dai_do_trigger()
2018 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; dpcm_fe_dai_do_trigger()
2024 dev_dbg(fe->dev, "ASoC: pre trigger FE %s cmd %d\n", dpcm_fe_dai_do_trigger()
2025 fe->dai_link->name, cmd); dpcm_fe_dai_do_trigger()
2029 dev_err(fe->dev,"ASoC: trigger FE failed %d\n", ret); dpcm_fe_dai_do_trigger()
2033 ret = dpcm_be_dai_trigger(fe, substream->stream, cmd); dpcm_fe_dai_do_trigger()
2038 ret = dpcm_be_dai_trigger(fe, substream->stream, cmd); dpcm_fe_dai_do_trigger()
2040 dev_err(fe->dev,"ASoC: trigger FE failed %d\n", ret); dpcm_fe_dai_do_trigger()
2044 dev_dbg(fe->dev, "ASoC: post trigger FE %s cmd %d\n", dpcm_fe_dai_do_trigger()
2045 fe->dai_link->name, cmd); dpcm_fe_dai_do_trigger()
2052 dev_dbg(fe->dev, "ASoC: bespoke trigger FE %s cmd %d\n", dpcm_fe_dai_do_trigger()
2053 fe->dai_link->name, cmd); dpcm_fe_dai_do_trigger()
2057 dev_err(fe->dev,"ASoC: trigger FE failed %d\n", ret); dpcm_fe_dai_do_trigger()
2062 dev_err(fe->dev, "ASoC: invalid trigger cmd %d for %s\n", cmd, dpcm_fe_dai_do_trigger()
2063 fe->dai_link->name); dpcm_fe_dai_do_trigger()
2072 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_START; dpcm_fe_dai_do_trigger()
2077 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_STOP; dpcm_fe_dai_do_trigger()
2082 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; dpcm_fe_dai_do_trigger()
2088 struct snd_soc_pcm_runtime *fe = substream->private_data; dpcm_fe_dai_trigger() local
2094 if (fe->dpcm[stream].runtime_update != SND_SOC_DPCM_UPDATE_NO) { dpcm_fe_dai_trigger()
2095 fe->dpcm[stream].trigger_pending = cmd + 1; dpcm_fe_dai_trigger()
2103 int dpcm_be_dai_prepare(struct snd_soc_pcm_runtime *fe, int stream) dpcm_be_dai_prepare() argument
2108 list_for_each_entry(dpcm, &fe->dpcm[stream].be_clients, list_be) { dpcm_be_dai_prepare()
2115 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) dpcm_be_dai_prepare()
2123 dpcm->fe->dai_link->name); dpcm_be_dai_prepare()
2139 struct snd_soc_pcm_runtime *fe = substream->private_data; dpcm_fe_dai_prepare() local
2142 mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); dpcm_fe_dai_prepare()
2144 dev_dbg(fe->dev, "ASoC: prepare FE %s\n", fe->dai_link->name); dpcm_fe_dai_prepare()
2146 dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_FE); dpcm_fe_dai_prepare()
2149 if (list_empty(&fe->dpcm[stream].be_clients)) { dpcm_fe_dai_prepare()
2150 dev_err(fe->dev, "ASoC: no backend DAIs enabled for %s\n", dpcm_fe_dai_prepare()
2151 fe->dai_link->name); dpcm_fe_dai_prepare()
2156 ret = dpcm_be_dai_prepare(fe, substream->stream); dpcm_fe_dai_prepare()
2163 dev_err(fe->dev,"ASoC: prepare FE %s failed\n", dpcm_fe_dai_prepare()
2164 fe->dai_link->name); dpcm_fe_dai_prepare()
2169 dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_START); dpcm_fe_dai_prepare()
2170 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PREPARE; dpcm_fe_dai_prepare()
2173 dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO); dpcm_fe_dai_prepare()
2174 mutex_unlock(&fe->card->mutex); dpcm_fe_dai_prepare()
2190 static int dpcm_run_update_shutdown(struct snd_soc_pcm_runtime *fe, int stream) dpcm_run_update_shutdown() argument
2193 snd_soc_dpcm_get_substream(fe, stream); dpcm_run_update_shutdown()
2194 enum snd_soc_dpcm_trigger trigger = fe->dai_link->trigger[stream]; dpcm_run_update_shutdown()
2197 dev_dbg(fe->dev, "ASoC: runtime %s close on FE %s\n", dpcm_run_update_shutdown()
2198 stream ? "capture" : "playback", fe->dai_link->name); dpcm_run_update_shutdown()
2202 dev_dbg(fe->dev, "ASoC: bespoke trigger FE %s cmd stop\n", dpcm_run_update_shutdown()
2203 fe->dai_link->name); dpcm_run_update_shutdown()
2207 dev_err(fe->dev,"ASoC: trigger FE failed %d\n", err); dpcm_run_update_shutdown()
2209 dev_dbg(fe->dev, "ASoC: trigger FE %s cmd stop\n", dpcm_run_update_shutdown()
2210 fe->dai_link->name); dpcm_run_update_shutdown()
2212 err = dpcm_be_dai_trigger(fe, stream, SNDRV_PCM_TRIGGER_STOP); dpcm_run_update_shutdown()
2214 dev_err(fe->dev,"ASoC: trigger FE failed %d\n", err); dpcm_run_update_shutdown()
2217 err = dpcm_be_dai_hw_free(fe, stream); dpcm_run_update_shutdown()
2219 dev_err(fe->dev,"ASoC: hw_free FE failed %d\n", err); dpcm_run_update_shutdown()
2221 err = dpcm_be_dai_shutdown(fe, stream); dpcm_run_update_shutdown()
2223 dev_err(fe->dev,"ASoC: shutdown FE failed %d\n", err); dpcm_run_update_shutdown()
2226 dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_NOP); dpcm_run_update_shutdown()
2231 static int dpcm_run_update_startup(struct snd_soc_pcm_runtime *fe, int stream) dpcm_run_update_startup() argument
2234 snd_soc_dpcm_get_substream(fe, stream); dpcm_run_update_startup()
2236 enum snd_soc_dpcm_trigger trigger = fe->dai_link->trigger[stream]; dpcm_run_update_startup()
2239 dev_dbg(fe->dev, "ASoC: runtime %s open on FE %s\n", dpcm_run_update_startup()
2240 stream ? "capture" : "playback", fe->dai_link->name); dpcm_run_update_startup()
2243 if (fe->dpcm[stream].state == SND_SOC_DPCM_STATE_HW_FREE || dpcm_run_update_startup()
2244 fe->dpcm[stream].state == SND_SOC_DPCM_STATE_CLOSE) dpcm_run_update_startup()
2248 ret = dpcm_be_dai_startup(fe, stream); dpcm_run_update_startup()
2253 if (fe->dpcm[stream].state == SND_SOC_DPCM_STATE_OPEN) dpcm_run_update_startup()
2256 ret = dpcm_be_dai_hw_params(fe, stream); dpcm_run_update_startup()
2261 if (fe->dpcm[stream].state == SND_SOC_DPCM_STATE_HW_PARAMS) dpcm_run_update_startup()
2265 ret = dpcm_be_dai_prepare(fe, stream); dpcm_run_update_startup()
2270 dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_NOP); dpcm_run_update_startup()
2273 if (fe->dpcm[stream].state == SND_SOC_DPCM_STATE_PREPARE || dpcm_run_update_startup()
2274 fe->dpcm[stream].state == SND_SOC_DPCM_STATE_STOP) dpcm_run_update_startup()
2279 dev_dbg(fe->dev, "ASoC: bespoke trigger FE %s cmd start\n", dpcm_run_update_startup()
2280 fe->dai_link->name); dpcm_run_update_startup()
2284 dev_err(fe->dev,"ASoC: bespoke trigger FE failed %d\n", ret); dpcm_run_update_startup()
2288 dev_dbg(fe->dev, "ASoC: trigger FE %s cmd start\n", dpcm_run_update_startup()
2289 fe->dai_link->name); dpcm_run_update_startup()
2291 ret = dpcm_be_dai_trigger(fe, stream, dpcm_run_update_startup()
2294 dev_err(fe->dev,"ASoC: trigger FE failed %d\n", ret); dpcm_run_update_startup()
2302 dpcm_be_dai_hw_free(fe, stream); dpcm_run_update_startup()
2304 dpcm_be_dai_shutdown(fe, stream); dpcm_run_update_startup()
2307 list_for_each_entry(dpcm, &fe->dpcm[stream].be_clients, list_be) { dpcm_run_update_startup()
2316 static int dpcm_run_new_update(struct snd_soc_pcm_runtime *fe, int stream) dpcm_run_new_update() argument
2320 dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_BE); dpcm_run_new_update()
2321 ret = dpcm_run_update_startup(fe, stream); dpcm_run_new_update()
2323 dev_err(fe->dev, "ASoC: failed to startup some BEs\n"); dpcm_run_new_update()
2324 dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO); dpcm_run_new_update()
2329 static int dpcm_run_old_update(struct snd_soc_pcm_runtime *fe, int stream) dpcm_run_old_update() argument
2333 dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_BE); dpcm_run_old_update()
2334 ret = dpcm_run_update_shutdown(fe, stream); dpcm_run_old_update()
2336 dev_err(fe->dev, "ASoC: failed to shutdown some BEs\n"); dpcm_run_old_update()
2337 dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO); dpcm_run_old_update()
2352 struct snd_soc_pcm_runtime *fe = &card->rtd[i]; soc_dpcm_runtime_update() local
2355 if (!fe->dai_link->dynamic) soc_dpcm_runtime_update()
2359 if (!fe->cpu_dai->active) soc_dpcm_runtime_update()
2363 dev_dbg(fe->dev, "ASoC: DPCM runtime update for FE %s\n", soc_dpcm_runtime_update()
2364 fe->dai_link->name); soc_dpcm_runtime_update()
2367 if (!fe->cpu_dai->driver->playback.channels_min soc_dpcm_runtime_update()
2368 || !fe->codec_dai->driver->playback.channels_min) soc_dpcm_runtime_update()
2372 if (!fe->cpu_dai->playback_active soc_dpcm_runtime_update()
2373 || !fe->codec_dai->playback_active) soc_dpcm_runtime_update()
2376 paths = dpcm_path_get(fe, SNDRV_PCM_STREAM_PLAYBACK, &list); soc_dpcm_runtime_update()
2378 dev_warn(fe->dev, "ASoC: %s no valid %s path\n", soc_dpcm_runtime_update()
2379 fe->dai_link->name, "playback"); soc_dpcm_runtime_update()
2385 new = dpcm_process_paths(fe, SNDRV_PCM_STREAM_PLAYBACK, &list, 1); soc_dpcm_runtime_update()
2387 dpcm_run_new_update(fe, SNDRV_PCM_STREAM_PLAYBACK); soc_dpcm_runtime_update()
2388 dpcm_clear_pending_state(fe, SNDRV_PCM_STREAM_PLAYBACK); soc_dpcm_runtime_update()
2389 dpcm_be_disconnect(fe, SNDRV_PCM_STREAM_PLAYBACK); soc_dpcm_runtime_update()
2393 old = dpcm_process_paths(fe, SNDRV_PCM_STREAM_PLAYBACK, &list, 0); soc_dpcm_runtime_update()
2395 dpcm_run_old_update(fe, SNDRV_PCM_STREAM_PLAYBACK); soc_dpcm_runtime_update()
2396 dpcm_clear_pending_state(fe, SNDRV_PCM_STREAM_PLAYBACK); soc_dpcm_runtime_update()
2397 dpcm_be_disconnect(fe, SNDRV_PCM_STREAM_PLAYBACK); soc_dpcm_runtime_update()
2403 if (!fe->cpu_dai->driver->capture.channels_min soc_dpcm_runtime_update()
2404 || !fe->codec_dai->driver->capture.channels_min) soc_dpcm_runtime_update()
2408 if (!fe->cpu_dai->capture_active soc_dpcm_runtime_update()
2409 || !fe->codec_dai->capture_active) soc_dpcm_runtime_update()
2412 paths = dpcm_path_get(fe, SNDRV_PCM_STREAM_CAPTURE, &list); soc_dpcm_runtime_update()
2414 dev_warn(fe->dev, "ASoC: %s no valid %s path\n", soc_dpcm_runtime_update()
2415 fe->dai_link->name, "capture"); soc_dpcm_runtime_update()
2421 new = dpcm_process_paths(fe, SNDRV_PCM_STREAM_CAPTURE, &list, 1); soc_dpcm_runtime_update()
2423 dpcm_run_new_update(fe, SNDRV_PCM_STREAM_CAPTURE); soc_dpcm_runtime_update()
2424 dpcm_clear_pending_state(fe, SNDRV_PCM_STREAM_CAPTURE); soc_dpcm_runtime_update()
2425 dpcm_be_disconnect(fe, SNDRV_PCM_STREAM_CAPTURE); soc_dpcm_runtime_update()
2429 old = dpcm_process_paths(fe, SNDRV_PCM_STREAM_CAPTURE, &list, 0); soc_dpcm_runtime_update()
2431 dpcm_run_old_update(fe, SNDRV_PCM_STREAM_CAPTURE); soc_dpcm_runtime_update()
2432 dpcm_clear_pending_state(fe, SNDRV_PCM_STREAM_CAPTURE); soc_dpcm_runtime_update()
2433 dpcm_be_disconnect(fe, SNDRV_PCM_STREAM_CAPTURE); soc_dpcm_runtime_update()
2442 int soc_dpcm_be_digital_mute(struct snd_soc_pcm_runtime *fe, int mute) soc_dpcm_be_digital_mute() argument
2446 &fe->dpcm[SNDRV_PCM_STREAM_PLAYBACK].be_clients; soc_dpcm_be_digital_mute()
2474 struct snd_soc_pcm_runtime *fe = fe_substream->private_data; dpcm_fe_dai_open() local
2480 mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); dpcm_fe_dai_open()
2481 fe->dpcm[stream].runtime = fe_substream->runtime; dpcm_fe_dai_open()
2483 ret = dpcm_path_get(fe, stream, &list); dpcm_fe_dai_open()
2485 mutex_unlock(&fe->card->mutex); dpcm_fe_dai_open()
2488 dev_dbg(fe->dev, "ASoC: %s no valid %s route\n", dpcm_fe_dai_open()
2489 fe->dai_link->name, stream ? "capture" : "playback"); dpcm_fe_dai_open()
2493 dpcm_process_paths(fe, stream, &list, 1); dpcm_fe_dai_open()
2498 list_for_each_entry(dpcm, &fe->dpcm[stream].be_clients, list_be) dpcm_fe_dai_open()
2501 dpcm_be_disconnect(fe, stream); dpcm_fe_dai_open()
2502 fe->dpcm[stream].runtime = NULL; dpcm_fe_dai_open()
2505 dpcm_clear_pending_state(fe, stream); dpcm_fe_dai_open()
2507 mutex_unlock(&fe->card->mutex); dpcm_fe_dai_open()
2513 struct snd_soc_pcm_runtime *fe = fe_substream->private_data; dpcm_fe_dai_close() local
2517 mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); dpcm_fe_dai_close()
2521 list_for_each_entry(dpcm, &fe->dpcm[stream].be_clients, list_be) dpcm_fe_dai_close()
2524 dpcm_be_disconnect(fe, stream); dpcm_fe_dai_close()
2526 fe->dpcm[stream].runtime = NULL; dpcm_fe_dai_close()
2527 mutex_unlock(&fe->card->mutex); dpcm_fe_dai_close()
2664 int snd_soc_dpcm_fe_can_update(struct snd_soc_pcm_runtime *fe, int stream) snd_soc_dpcm_fe_can_update() argument
2666 if (fe->dpcm[stream].runtime_update == SND_SOC_DPCM_UPDATE_FE) snd_soc_dpcm_fe_can_update()
2673 int snd_soc_dpcm_be_can_update(struct snd_soc_pcm_runtime *fe, snd_soc_dpcm_be_can_update() argument
2676 if ((fe->dpcm[stream].runtime_update == SND_SOC_DPCM_UPDATE_FE) || snd_soc_dpcm_be_can_update()
2677 ((fe->dpcm[stream].runtime_update == SND_SOC_DPCM_UPDATE_BE) && snd_soc_dpcm_be_can_update()
2712 int snd_soc_dpcm_can_be_free_stop(struct snd_soc_pcm_runtime *fe, snd_soc_dpcm_can_be_free_stop() argument
2720 if (dpcm->fe == fe) snd_soc_dpcm_can_be_free_stop()
2723 state = dpcm->fe->dpcm[stream].state; snd_soc_dpcm_can_be_free_stop()
2739 int snd_soc_dpcm_can_be_params(struct snd_soc_pcm_runtime *fe, snd_soc_dpcm_can_be_params() argument
2747 if (dpcm->fe == fe) snd_soc_dpcm_can_be_params()
2750 state = dpcm->fe->dpcm[stream].state; snd_soc_dpcm_can_be_params()
2801 static ssize_t dpcm_show_state(struct snd_soc_pcm_runtime *fe, dpcm_show_state() argument
2804 struct snd_pcm_hw_params *params = &fe->dpcm[stream].hw_params; dpcm_show_state()
2810 "[%s - %s]\n", fe->dai_link->name, dpcm_show_state()
2814 dpcm_state_string(fe->dpcm[stream].state)); dpcm_show_state()
2816 if ((fe->dpcm[stream].state >= SND_SOC_DPCM_STATE_HW_PARAMS) && dpcm_show_state()
2817 (fe->dpcm[stream].state <= SND_SOC_DPCM_STATE_STOP)) dpcm_show_state()
2828 if (list_empty(&fe->dpcm[stream].be_clients)) { dpcm_show_state()
2834 list_for_each_entry(dpcm, &fe->dpcm[stream].be_clients, list_be) { dpcm_show_state()
2862 struct snd_soc_pcm_runtime *fe = file->private_data; dpcm_state_read_file() local
2870 if (fe->cpu_dai->driver->playback.channels_min) dpcm_state_read_file()
2871 offset += dpcm_show_state(fe, SNDRV_PCM_STREAM_PLAYBACK, dpcm_state_read_file()
2874 if (fe->cpu_dai->driver->capture.channels_min) dpcm_state_read_file()
2875 offset += dpcm_show_state(fe, SNDRV_PCM_STREAM_CAPTURE, dpcm_state_read_file()
H A Dsoc-compress.c70 struct snd_soc_pcm_runtime *fe = cstream->private_data; soc_compr_open_fe() local
71 struct snd_pcm_substream *fe_substream = fe->pcm->streams[0].substream; soc_compr_open_fe()
72 struct snd_soc_platform *platform = fe->platform; soc_compr_open_fe()
83 mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); soc_compr_open_fe()
94 if (fe->dai_link->compr_ops && fe->dai_link->compr_ops->startup) { soc_compr_open_fe()
95 ret = fe->dai_link->compr_ops->startup(cstream); soc_compr_open_fe()
97 pr_err("compress asoc: %s startup failed\n", fe->dai_link->name); soc_compr_open_fe()
102 fe->dpcm[stream].runtime = fe_substream->runtime; soc_compr_open_fe()
104 ret = dpcm_path_get(fe, stream, &list); soc_compr_open_fe()
108 dev_dbg(fe->dev, "ASoC: %s no valid %s route\n", soc_compr_open_fe()
109 fe->dai_link->name, stream ? "capture" : "playback"); soc_compr_open_fe()
112 dpcm_process_paths(fe, stream, &list, 1); soc_compr_open_fe()
114 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; soc_compr_open_fe()
116 ret = dpcm_be_dai_startup(fe, stream); soc_compr_open_fe()
119 list_for_each_entry(dpcm, &fe->dpcm[stream].be_clients, list_be) soc_compr_open_fe()
122 dpcm_be_disconnect(fe, stream); soc_compr_open_fe()
123 fe->dpcm[stream].runtime = NULL; soc_compr_open_fe()
127 dpcm_clear_pending_state(fe, stream); soc_compr_open_fe()
130 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_OPEN; soc_compr_open_fe()
131 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; soc_compr_open_fe()
133 snd_soc_runtime_activate(fe, stream); soc_compr_open_fe()
135 mutex_unlock(&fe->card->mutex); soc_compr_open_fe()
140 if (fe->dai_link->compr_ops && fe->dai_link->compr_ops->shutdown) soc_compr_open_fe()
141 fe->dai_link->compr_ops->shutdown(cstream); soc_compr_open_fe()
146 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; soc_compr_open_fe()
147 mutex_unlock(&fe->card->mutex); soc_compr_open_fe()
235 struct snd_soc_pcm_runtime *fe = cstream->private_data; soc_compr_free_fe() local
236 struct snd_soc_platform *platform = fe->platform; soc_compr_free_fe()
240 mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); soc_compr_free_fe()
247 snd_soc_runtime_deactivate(fe, stream); soc_compr_free_fe()
249 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; soc_compr_free_fe()
251 ret = dpcm_be_dai_hw_free(fe, stream); soc_compr_free_fe()
253 dev_err(fe->dev, "compressed hw_free failed %d\n", ret); soc_compr_free_fe()
255 ret = dpcm_be_dai_shutdown(fe, stream); soc_compr_free_fe()
258 list_for_each_entry(dpcm, &fe->dpcm[stream].be_clients, list_be) soc_compr_free_fe()
261 dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_STOP); soc_compr_free_fe()
263 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE; soc_compr_free_fe()
264 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; soc_compr_free_fe()
266 dpcm_be_disconnect(fe, stream); soc_compr_free_fe()
268 fe->dpcm[stream].runtime = NULL; soc_compr_free_fe()
270 if (fe->dai_link->compr_ops && fe->dai_link->compr_ops->shutdown) soc_compr_free_fe()
271 fe->dai_link->compr_ops->shutdown(cstream); soc_compr_free_fe()
276 mutex_unlock(&fe->card->mutex); soc_compr_free_fe()
312 struct snd_soc_pcm_runtime *fe = cstream->private_data; soc_compr_trigger_fe() local
313 struct snd_soc_platform *platform = fe->platform; soc_compr_trigger_fe()
331 mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); soc_compr_trigger_fe()
339 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; soc_compr_trigger_fe()
341 ret = dpcm_be_dai_trigger(fe, stream, cmd); soc_compr_trigger_fe()
347 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_START; soc_compr_trigger_fe()
351 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_STOP; soc_compr_trigger_fe()
354 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PAUSED; soc_compr_trigger_fe()
359 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; soc_compr_trigger_fe()
360 mutex_unlock(&fe->card->mutex); soc_compr_trigger_fe()
414 struct snd_soc_pcm_runtime *fe = cstream->private_data; soc_compr_set_params_fe() local
415 struct snd_pcm_substream *fe_substream = fe->pcm->streams[0].substream; soc_compr_set_params_fe()
416 struct snd_soc_platform *platform = fe->platform; soc_compr_set_params_fe()
424 mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); soc_compr_set_params_fe()
432 if (fe->dai_link->compr_ops && fe->dai_link->compr_ops->set_params) { soc_compr_set_params_fe()
433 ret = fe->dai_link->compr_ops->set_params(cstream); soc_compr_set_params_fe()
443 memset(&fe->dpcm[fe_substream->stream].hw_params, 0, soc_compr_set_params_fe()
446 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; soc_compr_set_params_fe()
448 ret = dpcm_be_dai_hw_params(fe, stream); soc_compr_set_params_fe()
452 ret = dpcm_be_dai_prepare(fe, stream); soc_compr_set_params_fe()
456 dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_START); soc_compr_set_params_fe()
457 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PREPARE; soc_compr_set_params_fe()
460 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; soc_compr_set_params_fe()
461 mutex_unlock(&fe->card->mutex); soc_compr_set_params_fe()
/linux-4.4.14/drivers/media/usb/dvb-usb-v2/
H A Dmxl111sf.c262 static int mxl111sf_adap_fe_init(struct dvb_frontend *fe) mxl111sf_adap_fe_init() argument
264 struct dvb_usb_device *d = fe_to_d(fe); mxl111sf_adap_fe_init()
265 struct mxl111sf_state *state = fe_to_priv(fe); mxl111sf_adap_fe_init()
266 struct mxl111sf_adap_state *adap_state = &state->adap_state[fe->id]; mxl111sf_adap_fe_init()
308 err = fe->ops.init(fe); mxl111sf_adap_fe_init()
314 return (adap_state->fe_init) ? adap_state->fe_init(fe) : 0; mxl111sf_adap_fe_init()
319 static int mxl111sf_adap_fe_sleep(struct dvb_frontend *fe) mxl111sf_adap_fe_sleep() argument
321 struct mxl111sf_state *state = fe_to_priv(fe); mxl111sf_adap_fe_sleep()
322 struct mxl111sf_adap_state *adap_state = &state->adap_state[fe->id]; mxl111sf_adap_fe_sleep()
333 err = (adap_state->fe_sleep) ? adap_state->fe_sleep(fe) : 0; mxl111sf_adap_fe_sleep()
343 static int mxl111sf_ep6_streaming_ctrl(struct dvb_frontend *fe, int onoff) mxl111sf_ep6_streaming_ctrl() argument
345 struct mxl111sf_state *state = fe_to_priv(fe); mxl111sf_ep6_streaming_ctrl()
346 struct mxl111sf_adap_state *adap_state = &state->adap_state[fe->id]; mxl111sf_ep6_streaming_ctrl()
368 static int mxl111sf_ep5_streaming_ctrl(struct dvb_frontend *fe, int onoff) mxl111sf_ep5_streaming_ctrl() argument
370 struct mxl111sf_state *state = fe_to_priv(fe); mxl111sf_ep5_streaming_ctrl()
394 static int mxl111sf_ep4_streaming_ctrl(struct dvb_frontend *fe, int onoff) mxl111sf_ep4_streaming_ctrl() argument
396 struct mxl111sf_state *state = fe_to_priv(fe); mxl111sf_ep4_streaming_ctrl()
469 adap->fe[fe_id] = dvb_attach(lgdt3305_attach, mxl111sf_lgdt3305_frontend_attach()
472 if (adap->fe[fe_id]) { mxl111sf_lgdt3305_frontend_attach()
474 adap_state->fe_init = adap->fe[fe_id]->ops.init; mxl111sf_lgdt3305_frontend_attach()
475 adap->fe[fe_id]->ops.init = mxl111sf_adap_fe_init; mxl111sf_lgdt3305_frontend_attach()
476 adap_state->fe_sleep = adap->fe[fe_id]->ops.sleep; mxl111sf_lgdt3305_frontend_attach()
477 adap->fe[fe_id]->ops.sleep = mxl111sf_adap_fe_sleep; mxl111sf_lgdt3305_frontend_attach()
544 adap->fe[fe_id] = dvb_attach(lg2160_attach, mxl111sf_lg2160_frontend_attach()
547 if (adap->fe[fe_id]) { mxl111sf_lg2160_frontend_attach()
549 adap_state->fe_init = adap->fe[fe_id]->ops.init; mxl111sf_lg2160_frontend_attach()
550 adap->fe[fe_id]->ops.init = mxl111sf_adap_fe_init; mxl111sf_lg2160_frontend_attach()
551 adap_state->fe_sleep = adap->fe[fe_id]->ops.sleep; mxl111sf_lg2160_frontend_attach()
552 adap->fe[fe_id]->ops.sleep = mxl111sf_adap_fe_sleep; mxl111sf_lg2160_frontend_attach()
629 adap->fe[fe_id] = dvb_attach(lg2160_attach, mxl111sf_lg2161_frontend_attach()
634 if (adap->fe[fe_id]) { mxl111sf_lg2161_frontend_attach()
636 adap_state->fe_init = adap->fe[fe_id]->ops.init; mxl111sf_lg2161_frontend_attach()
637 adap->fe[fe_id]->ops.init = mxl111sf_adap_fe_init; mxl111sf_lg2161_frontend_attach()
638 adap_state->fe_sleep = adap->fe[fe_id]->ops.sleep; mxl111sf_lg2161_frontend_attach()
639 adap->fe[fe_id]->ops.sleep = mxl111sf_adap_fe_sleep; mxl111sf_lg2161_frontend_attach()
716 adap->fe[fe_id] = dvb_attach(lg2160_attach, mxl111sf_lg2161_ep6_frontend_attach()
721 if (adap->fe[fe_id]) { mxl111sf_lg2161_ep6_frontend_attach()
723 adap_state->fe_init = adap->fe[fe_id]->ops.init; mxl111sf_lg2161_ep6_frontend_attach()
724 adap->fe[fe_id]->ops.init = mxl111sf_adap_fe_init; mxl111sf_lg2161_ep6_frontend_attach()
725 adap_state->fe_sleep = adap->fe[fe_id]->ops.sleep; mxl111sf_lg2161_ep6_frontend_attach()
726 adap->fe[fe_id]->ops.sleep = mxl111sf_adap_fe_sleep; mxl111sf_lg2161_ep6_frontend_attach()
783 adap->fe[fe_id] = dvb_attach(mxl111sf_demod_attach, state, mxl111sf_attach_demod()
785 if (adap->fe[fe_id]) { mxl111sf_attach_demod()
787 adap_state->fe_init = adap->fe[fe_id]->ops.init; mxl111sf_attach_demod()
788 adap->fe[fe_id]->ops.init = mxl111sf_adap_fe_init; mxl111sf_attach_demod()
789 adap_state->fe_sleep = adap->fe[fe_id]->ops.sleep; mxl111sf_attach_demod()
790 adap->fe[fe_id]->ops.sleep = mxl111sf_adap_fe_sleep; mxl111sf_attach_demod()
815 static int mxl111sf_ant_hunt(struct dvb_frontend *fe) mxl111sf_ant_hunt() argument
817 struct mxl111sf_state *state = fe_to_priv(fe); mxl111sf_ant_hunt()
830 fe->ops.tuner_ops.get_rf_strength(fe, &rxPwrA); mxl111sf_ant_hunt()
834 fe->ops.tuner_ops.get_rf_strength(fe, &rxPwr0); mxl111sf_ant_hunt()
838 fe->ops.tuner_ops.get_rf_strength(fe, &rxPwr1); mxl111sf_ant_hunt()
842 fe->ops.tuner_ops.get_rf_strength(fe, &rxPwr2); mxl111sf_ant_hunt()
876 if (dvb_attach(mxl111sf_tuner_attach, adap->fe[i], state, mxl111sf_attach_tuner()
879 adap->fe[i]->ops.read_signal_strength = adap->fe[i]->ops.tuner_ops.get_rf_strength; mxl111sf_attach_tuner()
1037 static int mxl111sf_get_stream_config_dvbt(struct dvb_frontend *fe, mxl111sf_get_stream_config_dvbt() argument
1040 pr_debug("%s: fe=%d\n", __func__, fe->id); mxl111sf_get_stream_config_dvbt()
1078 static int mxl111sf_get_stream_config_atsc(struct dvb_frontend *fe, mxl111sf_get_stream_config_atsc() argument
1081 pr_debug("%s: fe=%d\n", __func__, fe->id); mxl111sf_get_stream_config_atsc()
1119 static int mxl111sf_get_stream_config_mh(struct dvb_frontend *fe, mxl111sf_get_stream_config_mh() argument
1122 pr_debug("%s: fe=%d\n", __func__, fe->id); mxl111sf_get_stream_config_mh()
1160 static int mxl111sf_get_stream_config_atsc_mh(struct dvb_frontend *fe, mxl111sf_get_stream_config_atsc_mh() argument
1163 pr_debug("%s: fe=%d\n", __func__, fe->id); mxl111sf_get_stream_config_atsc_mh()
1165 if (fe->id == 0) { mxl111sf_get_stream_config_atsc_mh()
1171 } else if (fe->id == 1) { mxl111sf_get_stream_config_atsc_mh()
1177 } else if (fe->id == 2) { mxl111sf_get_stream_config_atsc_mh()
1187 static int mxl111sf_streaming_ctrl_atsc_mh(struct dvb_frontend *fe, int onoff) mxl111sf_streaming_ctrl_atsc_mh() argument
1189 pr_debug("%s: fe=%d onoff=%d\n", __func__, fe->id, onoff); mxl111sf_streaming_ctrl_atsc_mh()
1191 if (fe->id == 0) mxl111sf_streaming_ctrl_atsc_mh()
1192 return mxl111sf_ep6_streaming_ctrl(fe, onoff); mxl111sf_streaming_ctrl_atsc_mh()
1193 else if (fe->id == 1) mxl111sf_streaming_ctrl_atsc_mh()
1194 return mxl111sf_ep4_streaming_ctrl(fe, onoff); mxl111sf_streaming_ctrl_atsc_mh()
1195 else if (fe->id == 2) mxl111sf_streaming_ctrl_atsc_mh()
1196 return mxl111sf_ep5_streaming_ctrl(fe, onoff); mxl111sf_streaming_ctrl_atsc_mh()
1230 static int mxl111sf_get_stream_config_mercury(struct dvb_frontend *fe, mxl111sf_get_stream_config_mercury() argument
1233 pr_debug("%s: fe=%d\n", __func__, fe->id); mxl111sf_get_stream_config_mercury()
1235 if (fe->id == 0) { mxl111sf_get_stream_config_mercury()
1241 } else if (fe->id == 1) { mxl111sf_get_stream_config_mercury()
1247 } else if (fe->id == 2 && dvb_usb_mxl111sf_spi) { mxl111sf_get_stream_config_mercury()
1253 } else if (fe->id == 2 && !dvb_usb_mxl111sf_spi) { mxl111sf_get_stream_config_mercury()
1263 static int mxl111sf_streaming_ctrl_mercury(struct dvb_frontend *fe, int onoff) mxl111sf_streaming_ctrl_mercury() argument
1265 pr_debug("%s: fe=%d onoff=%d\n", __func__, fe->id, onoff); mxl111sf_streaming_ctrl_mercury()
1267 if (fe->id == 0) mxl111sf_streaming_ctrl_mercury()
1268 return mxl111sf_ep6_streaming_ctrl(fe, onoff); mxl111sf_streaming_ctrl_mercury()
1269 else if (fe->id == 1) mxl111sf_streaming_ctrl_mercury()
1270 return mxl111sf_ep4_streaming_ctrl(fe, onoff); mxl111sf_streaming_ctrl_mercury()
1271 else if (fe->id == 2 && dvb_usb_mxl111sf_spi) mxl111sf_streaming_ctrl_mercury()
1272 return mxl111sf_ep5_streaming_ctrl(fe, onoff); mxl111sf_streaming_ctrl_mercury()
1273 else if (fe->id == 2 && !dvb_usb_mxl111sf_spi) mxl111sf_streaming_ctrl_mercury()
1274 return mxl111sf_ep6_streaming_ctrl(fe, onoff); mxl111sf_streaming_ctrl_mercury()
1308 static int mxl111sf_get_stream_config_mercury_mh(struct dvb_frontend *fe, mxl111sf_get_stream_config_mercury_mh() argument
1311 pr_debug("%s: fe=%d\n", __func__, fe->id); mxl111sf_get_stream_config_mercury_mh()
1313 if (fe->id == 0) { mxl111sf_get_stream_config_mercury_mh()
1319 } else if (fe->id == 1 && dvb_usb_mxl111sf_spi) { mxl111sf_get_stream_config_mercury_mh()
1325 } else if (fe->id == 1 && !dvb_usb_mxl111sf_spi) { mxl111sf_get_stream_config_mercury_mh()
1335 static int mxl111sf_streaming_ctrl_mercury_mh(struct dvb_frontend *fe, int onoff) mxl111sf_streaming_ctrl_mercury_mh() argument
1337 pr_debug("%s: fe=%d onoff=%d\n", __func__, fe->id, onoff); mxl111sf_streaming_ctrl_mercury_mh()
1339 if (fe->id == 0) mxl111sf_streaming_ctrl_mercury_mh()
1340 return mxl111sf_ep4_streaming_ctrl(fe, onoff); mxl111sf_streaming_ctrl_mercury_mh()
1341 else if (fe->id == 1 && dvb_usb_mxl111sf_spi) mxl111sf_streaming_ctrl_mercury_mh()
1342 return mxl111sf_ep5_streaming_ctrl(fe, onoff); mxl111sf_streaming_ctrl_mercury_mh()
1343 else if (fe->id == 1 && !dvb_usb_mxl111sf_spi) mxl111sf_streaming_ctrl_mercury_mh()
1344 return mxl111sf_ep6_streaming_ctrl(fe, onoff); mxl111sf_streaming_ctrl_mercury_mh()
H A Dmxl111sf-demod.c40 struct dvb_frontend fe; member in struct:mxl111sf_demod_state
287 static int mxl111sf_demod_set_frontend(struct dvb_frontend *fe) mxl111sf_demod_set_frontend() argument
289 struct mxl111sf_demod_state *state = fe->demodulator_priv; mxl111sf_demod_set_frontend()
304 if (fe->ops.tuner_ops.set_params) { mxl111sf_demod_set_frontend()
305 ret = fe->ops.tuner_ops.set_params(fe); mxl111sf_demod_set_frontend()
339 static int mxl111sf_demod_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) mxl111sf_demod_read_ucblocks() argument
341 struct mxl111sf_demod_state *state = fe->demodulator_priv; mxl111sf_demod_read_ucblocks()
387 static int mxl111sf_demod_read_ber(struct dvb_frontend *fe, u32 *ber) mxl111sf_demod_read_ber() argument
389 struct mxl111sf_demod_state *state = fe->demodulator_priv; mxl111sf_demod_read_ber()
430 static int mxl111sf_demod_read_snr(struct dvb_frontend *fe, u16 *snr) mxl111sf_demod_read_snr() argument
432 struct mxl111sf_demod_state *state = fe->demodulator_priv; mxl111sf_demod_read_snr()
443 static int mxl111sf_demod_read_status(struct dvb_frontend *fe, mxl111sf_demod_read_status() argument
446 struct mxl111sf_demod_state *state = fe->demodulator_priv; mxl111sf_demod_read_status()
479 static int mxl111sf_demod_read_signal_strength(struct dvb_frontend *fe, mxl111sf_demod_read_signal_strength() argument
482 struct mxl111sf_demod_state *state = fe->demodulator_priv; mxl111sf_demod_read_signal_strength()
510 static int mxl111sf_demod_get_frontend(struct dvb_frontend *fe) mxl111sf_demod_get_frontend() argument
512 struct dtv_frontend_properties *p = &fe->dtv_property_cache; mxl111sf_demod_get_frontend()
513 struct mxl111sf_demod_state *state = fe->demodulator_priv; mxl111sf_demod_get_frontend()
519 if (fe->ops.tuner_ops.get_bandwidth) mxl111sf_demod_get_frontend()
520 fe->ops.tuner_ops.get_bandwidth(fe, &p->bandwidth_hz); mxl111sf_demod_get_frontend()
521 if (fe->ops.tuner_ops.get_frequency) mxl111sf_demod_get_frontend()
522 fe->ops.tuner_ops.get_frequency(fe, &p->frequency); mxl111sf_demod_get_frontend()
537 int mxl111sf_demod_get_tune_settings(struct dvb_frontend *fe, mxl111sf_demod_get_tune_settings() argument
544 static void mxl111sf_demod_release(struct dvb_frontend *fe) mxl111sf_demod_release() argument
546 struct mxl111sf_demod_state *state = fe->demodulator_priv; mxl111sf_demod_release()
549 fe->demodulator_priv = NULL; mxl111sf_demod_release()
595 memcpy(&state->fe.ops, &mxl111sf_demod_ops, mxl111sf_demod_attach()
598 state->fe.demodulator_priv = state; mxl111sf_demod_attach()
599 return &state->fe; mxl111sf_demod_attach()
H A Dmxl111sf-tuner.c199 static int mxl1x1sf_tune_rf(struct dvb_frontend *fe, u32 freq, u8 bw) mxl1x1sf_tune_rf() argument
201 struct mxl111sf_tuner_state *state = fe->tuner_priv; mxl1x1sf_tune_rf()
239 state->cfg->ant_hunt(fe); mxl1x1sf_tune_rf()
275 static int mxl111sf_tuner_set_params(struct dvb_frontend *fe) mxl111sf_tuner_set_params() argument
277 struct dtv_frontend_properties *c = &fe->dtv_property_cache; mxl111sf_tuner_set_params()
279 struct mxl111sf_tuner_state *state = fe->tuner_priv; mxl111sf_tuner_set_params()
313 ret = mxl1x1sf_tune_rf(fe, c->frequency, bw); mxl111sf_tuner_set_params()
326 static int mxl111sf_tuner_init(struct dvb_frontend *fe)
328 struct mxl111sf_tuner_state *state = fe->tuner_priv;
336 static int mxl111sf_tuner_sleep(struct dvb_frontend *fe)
338 struct mxl111sf_tuner_state *state = fe->tuner_priv;
349 static int mxl111sf_tuner_get_status(struct dvb_frontend *fe, u32 *status) mxl111sf_tuner_get_status() argument
351 struct mxl111sf_tuner_state *state = fe->tuner_priv; mxl111sf_tuner_get_status()
368 static int mxl111sf_get_rf_strength(struct dvb_frontend *fe, u16 *strength) mxl111sf_get_rf_strength() argument
370 struct mxl111sf_tuner_state *state = fe->tuner_priv; mxl111sf_get_rf_strength()
396 static int mxl111sf_tuner_get_frequency(struct dvb_frontend *fe, u32 *frequency) mxl111sf_tuner_get_frequency() argument
398 struct mxl111sf_tuner_state *state = fe->tuner_priv; mxl111sf_tuner_get_frequency()
403 static int mxl111sf_tuner_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth) mxl111sf_tuner_get_bandwidth() argument
405 struct mxl111sf_tuner_state *state = fe->tuner_priv; mxl111sf_tuner_get_bandwidth()
410 static int mxl111sf_tuner_get_if_frequency(struct dvb_frontend *fe, mxl111sf_tuner_get_if_frequency() argument
413 struct mxl111sf_tuner_state *state = fe->tuner_priv; mxl111sf_tuner_get_if_frequency()
458 static int mxl111sf_tuner_release(struct dvb_frontend *fe) mxl111sf_tuner_release() argument
460 struct mxl111sf_tuner_state *state = fe->tuner_priv; mxl111sf_tuner_release()
463 fe->tuner_priv = NULL; mxl111sf_tuner_release()
491 struct dvb_frontend *mxl111sf_tuner_attach(struct dvb_frontend *fe, mxl111sf_tuner_attach() argument
506 memcpy(&fe->ops.tuner_ops, &mxl111sf_tuner_tuner_ops, mxl111sf_tuner_attach()
509 fe->tuner_priv = state; mxl111sf_tuner_attach()
510 return fe; mxl111sf_tuner_attach()
H A Danysee.c183 static int anysee_streaming_ctrl(struct dvb_frontend *fe, int onoff) anysee_streaming_ctrl() argument
186 dev_dbg(&fe_to_d(fe)->udev->dev, "%s: onoff=%d\n", __func__, onoff); anysee_streaming_ctrl()
187 return anysee_ctrl_msg(fe_to_d(fe), buf, sizeof(buf), NULL, 0); anysee_streaming_ctrl()
265 static int anysee_mt352_demod_init(struct dvb_frontend *fe) anysee_mt352_demod_init() argument
274 mt352_write(fe, clock_config, sizeof(clock_config)); anysee_mt352_demod_init()
276 mt352_write(fe, reset, sizeof(reset)); anysee_mt352_demod_init()
277 mt352_write(fe, adc_ctl_1_cfg, sizeof(adc_ctl_1_cfg)); anysee_mt352_demod_init()
279 mt352_write(fe, agc_cfg, sizeof(agc_cfg)); anysee_mt352_demod_init()
280 mt352_write(fe, gpp_ctl_cfg, sizeof(gpp_ctl_cfg)); anysee_mt352_demod_init()
281 mt352_write(fe, capt_range_cfg, sizeof(capt_range_cfg)); anysee_mt352_demod_init()
403 * OEA=80 OEB=00 OEC=00 OED=ff OEE=fe
412 * OEA=80 OEB=00 OEC=00 OED=ff OEE=fe
419 * OEA=80 OEB=00 OEC=ff OED=ff OEE=fe
532 static int anysee_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) anysee_i2c_gate_ctrl() argument
535 return anysee_wr_reg_mask(fe_to_d(fe), REG_IOE, (enable << 4), 0x10); anysee_i2c_gate_ctrl()
538 static int anysee_frontend_ctrl(struct dvb_frontend *fe, int onoff) anysee_frontend_ctrl() argument
540 struct anysee_state *state = fe_to_priv(fe); anysee_frontend_ctrl()
541 struct dvb_usb_device *d = fe_to_d(fe); anysee_frontend_ctrl()
543 dev_dbg(&d->udev->dev, "%s: fe=%d onoff=%d\n", __func__, fe->id, onoff); anysee_frontend_ctrl()
554 if (fe->id == 0) { anysee_frontend_ctrl()
592 if (fe->id == 0) { anysee_frontend_ctrl()
744 adap->fe[0] = dvb_attach(mt352_attach, &anysee_mt352_config, anysee_frontend_attach()
746 if (adap->fe[0]) anysee_frontend_attach()
750 adap->fe[0] = dvb_attach(zl10353_attach, &anysee_zl10353_config, anysee_frontend_attach()
768 adap->fe[0] = dvb_attach(zl10353_attach, &anysee_zl10353_config, anysee_frontend_attach()
781 adap->fe[0] = dvb_attach(tda10023_attach, anysee_frontend_attach()
794 adap->fe[0] = dvb_attach(cx24116_attach, &anysee_cx24116_config, anysee_frontend_attach()
836 adap->fe[0] = dvb_attach(tda10023_attach, anysee_frontend_attach()
841 if (adap->fe[0]) anysee_frontend_attach()
842 adap->fe[0]->ops.i2c_gate_ctrl = anysee_frontend_attach()
846 adap->fe[0] = dvb_attach(tda10023_attach, anysee_frontend_attach()
852 if (!adap->fe[0]) anysee_frontend_attach()
868 adap->fe[1] = dvb_attach(zl10353_attach, anysee_frontend_attach()
873 if (adap->fe[1]) anysee_frontend_attach()
874 adap->fe[1]->ops.i2c_gate_ctrl = anysee_frontend_attach()
878 adap->fe[1] = dvb_attach(zl10353_attach, anysee_frontend_attach()
900 adap->fe[0] = dvb_attach(tda10023_attach, anysee_frontend_attach()
905 if (adap->fe[0]) anysee_frontend_attach()
906 adap->fe[0]->ops.i2c_gate_ctrl = anysee_i2c_gate_ctrl; anysee_frontend_attach()
909 if (!adap->fe[0]) anysee_frontend_attach()
923 adap->fe[1] = dvb_attach(zl10353_attach, anysee_frontend_attach()
928 if (adap->fe[1]) anysee_frontend_attach()
929 adap->fe[1]->ops.i2c_gate_ctrl = anysee_i2c_gate_ctrl; anysee_frontend_attach()
945 adap->fe[0] = dvb_attach(stv0900_attach, anysee_frontend_attach()
960 adap->fe[0] = dvb_attach(cxd2820r_attach, anysee_frontend_attach()
968 if (!adap->fe[0]) { anysee_frontend_attach()
983 struct dvb_frontend *fe; anysee_tuner_attach() local
992 fe = dvb_attach(dvb_pll_attach, adap->fe[0], (0xc2 >> 1), NULL, anysee_tuner_attach()
1000 fe = dvb_attach(dvb_pll_attach, adap->fe[0], (0xc2 >> 1), anysee_tuner_attach()
1008 fe = dvb_attach(dvb_pll_attach, adap->fe[0], (0xc0 >> 1), anysee_tuner_attach()
1016 fe = dvb_attach(isl6423_attach, adap->fe[0], &d->i2c_adap, anysee_tuner_attach()
1032 tda18212_config.fe = adap->fe[0]; anysee_tuner_attach()
1039 if (adap->fe[1]) { anysee_tuner_attach()
1040 adap->fe[1]->tuner_priv = anysee_tuner_attach()
1041 adap->fe[0]->tuner_priv; anysee_tuner_attach()
1042 memcpy(&adap->fe[1]->ops.tuner_ops, anysee_tuner_attach()
1043 &adap->fe[0]->ops.tuner_ops, anysee_tuner_attach()
1050 fe = dvb_attach(dvb_pll_attach, adap->fe[0], anysee_tuner_attach()
1054 if (fe && adap->fe[1]) { anysee_tuner_attach()
1056 fe = dvb_attach(dvb_pll_attach, adap->fe[1], anysee_tuner_attach()
1070 tda18212_config.fe = adap->fe[0]; anysee_tuner_attach()
1076 if (adap->fe[1]) { anysee_tuner_attach()
1077 adap->fe[1]->tuner_priv = adap->fe[0]->tuner_priv; anysee_tuner_attach()
1078 memcpy(&adap->fe[1]->ops.tuner_ops, anysee_tuner_attach()
1079 &adap->fe[0]->ops.tuner_ops, anysee_tuner_attach()
1091 fe = dvb_attach(stv6110_attach, adap->fe[0], anysee_tuner_attach()
1094 if (fe) { anysee_tuner_attach()
1096 fe = dvb_attach(isl6423_attach, adap->fe[0], anysee_tuner_attach()
1108 tda18212_config.fe = adap->fe[0]; anysee_tuner_attach()
1116 fe = NULL; anysee_tuner_attach()
1119 if (fe) anysee_tuner_attach()
H A Ddvbsky.c46 /* fe hook functions*/
47 int (*fe_set_voltage)(struct dvb_frontend *fe,
49 int (*fe_read_status)(struct dvb_frontend *fe,
90 static int dvbsky_streaming_ctrl(struct dvb_frontend *fe, int onoff) dvbsky_streaming_ctrl() argument
92 struct dvb_usb_device *d = fe_to_d(fe); dvbsky_streaming_ctrl()
239 static int dvbsky_usb_set_voltage(struct dvb_frontend *fe, dvbsky_usb_set_voltage() argument
242 struct dvb_usb_device *d = fe_to_d(fe); dvbsky_usb_set_voltage()
252 return state->fe_set_voltage(fe, voltage); dvbsky_usb_set_voltage()
280 static int dvbsky_usb_read_status(struct dvb_frontend *fe, dvbsky_usb_read_status() argument
283 struct dvb_usb_device *d = fe_to_d(fe); dvbsky_usb_read_status()
287 ret = state->fe_read_status(fe, status); dvbsky_usb_read_status()
323 adap->fe[0] = dvb_attach(m88ds3103_attach, dvbsky_s960_attach()
327 if (!adap->fe[0]) { dvbsky_s960_attach()
334 ts2020_config.fe = adap->fe[0]; dvbsky_s960_attach()
342 dvb_frontend_detach(adap->fe[0]); dvbsky_s960_attach()
349 dvb_frontend_detach(adap->fe[0]); dvbsky_s960_attach()
355 adap->fe[0]->ops.read_signal_strength = dvbsky_s960_attach()
356 adap->fe[0]->ops.tuner_ops.get_rf_strength; dvbsky_s960_attach()
358 /* hook fe: need to resync the slave fifo when signal locks. */ dvbsky_s960_attach()
359 state->fe_read_status = adap->fe[0]->ops.read_status; dvbsky_s960_attach()
360 adap->fe[0]->ops.read_status = dvbsky_usb_read_status; dvbsky_s960_attach()
362 /* hook fe: LNB off/on is control by Cypress usb chip. */ dvbsky_s960_attach()
363 state->fe_set_voltage = adap->fe[0]->ops.set_voltage; dvbsky_s960_attach()
364 adap->fe[0]->ops.set_voltage = dvbsky_usb_set_voltage; dvbsky_s960_attach()
372 static int dvbsky_usb_ci_set_voltage(struct dvb_frontend *fe, dvbsky_usb_ci_set_voltage() argument
375 struct dvb_usb_device *d = fe_to_d(fe); dvbsky_usb_ci_set_voltage()
385 return state->fe_set_voltage(fe, voltage); dvbsky_usb_ci_set_voltage()
446 adap->fe[0] = dvb_attach(m88ds3103_attach, dvbsky_s960c_attach()
450 if (!adap->fe[0]) { dvbsky_s960c_attach()
457 ts2020_config.fe = adap->fe[0]; dvbsky_s960c_attach()
496 adap->fe[0]->ops.read_signal_strength = dvbsky_s960c_attach()
497 adap->fe[0]->ops.tuner_ops.get_rf_strength; dvbsky_s960c_attach()
499 /* hook fe: need to resync the slave fifo when signal locks. */ dvbsky_s960c_attach()
500 state->fe_read_status = adap->fe[0]->ops.read_status; dvbsky_s960c_attach()
501 adap->fe[0]->ops.read_status = dvbsky_usb_read_status; dvbsky_s960c_attach()
503 /* hook fe: LNB off/on is control by Cypress usb chip. */ dvbsky_s960c_attach()
504 state->fe_set_voltage = adap->fe[0]->ops.set_voltage; dvbsky_s960c_attach()
505 adap->fe[0]->ops.set_voltage = dvbsky_usb_ci_set_voltage; dvbsky_s960c_attach()
517 dvb_frontend_detach(adap->fe[0]); dvbsky_s960c_attach()
537 si2168_config.fe = &adap->fe[0]; dvbsky_t680c_attach()
554 si2157_config.fe = adap->fe[0]; dvbsky_t680c_attach()
621 si2168_config.fe = &adap->fe[0]; dvbsky_t330_attach()
639 si2157_config.fe = adap->fe[0]; dvbsky_t330_attach()
H A Dlmedm04.c266 struct dvb_frontend *fe = adap->fe[0]; lme2510_update_stats() local
270 if (!fe) lme2510_update_stats()
273 c = &fe->dtv_property_cache; lme2510_update_stats()
607 static int lme2510_streaming_ctrl(struct dvb_frontend *fe, int onoff) lme2510_streaming_ctrl() argument
609 struct dvb_usb_adapter *adap = fe_to_adap(fe); lme2510_streaming_ctrl()
864 static int dm04_lme2510_set_voltage(struct dvb_frontend *fe, dm04_lme2510_set_voltage() argument
867 struct dvb_usb_device *d = fe_to_d(fe); dm04_lme2510_set_voltage()
868 struct lme2510_state *st = fe_to_priv(fe); dm04_lme2510_set_voltage()
894 st->fe_set_voltage(fe, voltage); dm04_lme2510_set_voltage()
900 static int dm04_read_status(struct dvb_frontend *fe, enum fe_status *status) dm04_read_status() argument
902 struct dvb_usb_device *d = fe_to_d(fe); dm04_read_status()
908 ret = st->fe_read_status(fe, status); dm04_read_status()
935 struct dvb_usb_adapter *adap = fe_to_adap(fe); dm04_read_status()
945 static int dm04_read_signal_strength(struct dvb_frontend *fe, u16 *strength) dm04_read_signal_strength() argument
947 struct dtv_frontend_properties *c = &fe->dtv_property_cache; dm04_read_signal_strength()
948 struct lme2510_state *st = fe_to_priv(fe); dm04_read_signal_strength()
951 return st->fe_read_signal_strength(fe, strength); dm04_read_signal_strength()
961 static int dm04_read_snr(struct dvb_frontend *fe, u16 *snr) dm04_read_snr() argument
963 struct dtv_frontend_properties *c = &fe->dtv_property_cache; dm04_read_snr()
964 struct lme2510_state *st = fe_to_priv(fe); dm04_read_snr()
967 return st->fe_read_snr(fe, snr); dm04_read_snr()
977 static int dm04_read_ber(struct dvb_frontend *fe, u32 *ber) dm04_read_ber() argument
979 struct lme2510_state *st = fe_to_priv(fe); dm04_read_ber()
982 return st->fe_read_ber(fe, ber); dm04_read_ber()
989 static int dm04_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) dm04_read_ucblocks() argument
991 struct lme2510_state *st = fe_to_priv(fe); dm04_read_ucblocks()
994 return st->fe_read_ucblocks(fe, ucblocks); dm04_read_ucblocks()
1008 char *name = adap->fe[0]->ops.info.name; lme_name()
1027 adap->fe[0] = dvb_attach(tda10086_attach, dm04_lme2510_frontend_attach()
1029 if (adap->fe[0]) { dm04_lme2510_frontend_attach()
1043 adap->fe[0] = dvb_attach(stv0299_attach, dm04_lme2510_frontend_attach()
1045 if (adap->fe[0]) { dm04_lme2510_frontend_attach()
1059 adap->fe[0] = dvb_attach(stv0288_attach, &lme_config, dm04_lme2510_frontend_attach()
1062 if (adap->fe[0]) { dm04_lme2510_frontend_attach()
1076 adap->fe[0] = dvb_attach(m88rs2000_attach, dm04_lme2510_frontend_attach()
1079 if (adap->fe[0]) { dm04_lme2510_frontend_attach()
1081 dvb_attach(ts2020_attach, adap->fe[0], &ts2020_config, dm04_lme2510_frontend_attach()
1088 adap->fe[0]->ops.set_voltage; dm04_lme2510_frontend_attach()
1093 if (adap->fe[0] == NULL) { dm04_lme2510_frontend_attach()
1099 if (adap->fe[0]) { dm04_lme2510_frontend_attach()
1100 dvb_frontend_detach(adap->fe[0]); dm04_lme2510_frontend_attach()
1101 adap->fe[0] = NULL; dm04_lme2510_frontend_attach()
1107 st->fe_read_status = adap->fe[0]->ops.read_status; dm04_lme2510_frontend_attach()
1108 st->fe_read_signal_strength = adap->fe[0]->ops.read_signal_strength; dm04_lme2510_frontend_attach()
1109 st->fe_read_snr = adap->fe[0]->ops.read_snr; dm04_lme2510_frontend_attach()
1110 st->fe_read_ber = adap->fe[0]->ops.read_ber; dm04_lme2510_frontend_attach()
1111 st->fe_read_ucblocks = adap->fe[0]->ops.read_ucblocks; dm04_lme2510_frontend_attach()
1113 adap->fe[0]->ops.read_status = dm04_read_status; dm04_lme2510_frontend_attach()
1114 adap->fe[0]->ops.read_signal_strength = dm04_read_signal_strength; dm04_lme2510_frontend_attach()
1115 adap->fe[0]->ops.read_snr = dm04_read_snr; dm04_lme2510_frontend_attach()
1116 adap->fe[0]->ops.read_ber = dm04_read_ber; dm04_lme2510_frontend_attach()
1117 adap->fe[0]->ops.read_ucblocks = dm04_read_ucblocks; dm04_lme2510_frontend_attach()
1118 adap->fe[0]->ops.set_voltage = dm04_lme2510_set_voltage; dm04_lme2510_frontend_attach()
1133 if (dvb_attach(tda826x_attach, adap->fe[0], 0x60, dm04_lme2510_tuner()
1138 if (dvb_attach(ix2505v_attach , adap->fe[0], &lme_tuner, dm04_lme2510_tuner()
1143 if (dvb_attach(dvb_pll_attach , adap->fe[0], 0x60, dm04_lme2510_tuner()
1218 static int lme2510_get_stream_config(struct dvb_frontend *fe, u8 *ts_type, lme2510_get_stream_config() argument
1221 struct dvb_usb_adapter *adap = fe_to_adap(fe); lme2510_get_stream_config()
H A Daf9015.h135 int (*set_frontend[2]) (struct dvb_frontend *fe);
136 int (*read_status[2]) (struct dvb_frontend *fe, enum fe_status *status);
137 int (*init[2]) (struct dvb_frontend *fe);
138 int (*sleep[2]) (struct dvb_frontend *fe);
139 int (*tuner_init[2]) (struct dvb_frontend *fe);
140 int (*tuner_sleep[2]) (struct dvb_frontend *fe);
H A Daf9015.c608 static int af9015_get_stream_config(struct dvb_frontend *fe, u8 *ts_type, af9015_get_stream_config() argument
611 struct dvb_usb_device *d = fe_to_d(fe); af9015_get_stream_config()
612 dev_dbg(&d->udev->dev, "%s: adap=%d\n", __func__, fe_to_adap(fe)->id); af9015_get_stream_config()
627 static int af9015_af9013_set_frontend(struct dvb_frontend *fe) af9015_af9013_set_frontend() argument
630 struct af9015_state *state = fe_to_priv(fe); af9015_af9013_set_frontend()
635 ret = state->set_frontend[fe_to_adap(fe)->id](fe); af9015_af9013_set_frontend()
643 static int af9015_af9013_read_status(struct dvb_frontend *fe, af9015_af9013_read_status() argument
647 struct af9015_state *state = fe_to_priv(fe); af9015_af9013_read_status()
652 ret = state->read_status[fe_to_adap(fe)->id](fe, status); af9015_af9013_read_status()
660 static int af9015_af9013_init(struct dvb_frontend *fe) af9015_af9013_init() argument
663 struct af9015_state *state = fe_to_priv(fe); af9015_af9013_init()
668 ret = state->init[fe_to_adap(fe)->id](fe); af9015_af9013_init()
676 static int af9015_af9013_sleep(struct dvb_frontend *fe) af9015_af9013_sleep() argument
679 struct af9015_state *state = fe_to_priv(fe); af9015_af9013_sleep()
684 ret = state->sleep[fe_to_adap(fe)->id](fe); af9015_af9013_sleep()
692 static int af9015_tuner_init(struct dvb_frontend *fe) af9015_tuner_init() argument
695 struct af9015_state *state = fe_to_priv(fe); af9015_tuner_init()
700 ret = state->tuner_init[fe_to_adap(fe)->id](fe); af9015_tuner_init()
708 static int af9015_tuner_sleep(struct dvb_frontend *fe) af9015_tuner_sleep() argument
711 struct af9015_state *state = fe_to_priv(fe); af9015_tuner_sleep()
716 ret = state->tuner_sleep[fe_to_adap(fe)->id](fe); af9015_tuner_sleep()
843 adap->fe[0] = dvb_attach(af9013_attach, af9015_af9013_frontend_attach()
853 if (adap->fe[0]) { af9015_af9013_frontend_attach()
855 adap->fe[0]->ops.set_frontend; af9015_af9013_frontend_attach()
856 adap->fe[0]->ops.set_frontend = af9015_af9013_frontend_attach()
860 adap->fe[0]->ops.read_status; af9015_af9013_frontend_attach()
861 adap->fe[0]->ops.read_status = af9015_af9013_frontend_attach()
864 state->init[adap->id] = adap->fe[0]->ops.init; af9015_af9013_frontend_attach()
865 adap->fe[0]->ops.init = af9015_af9013_init; af9015_af9013_frontend_attach()
867 state->sleep[adap->id] = adap->fe[0]->ops.sleep; af9015_af9013_frontend_attach()
868 adap->fe[0]->ops.sleep = af9015_af9013_sleep; af9015_af9013_frontend_attach()
871 return adap->fe[0] == NULL ? -ENODEV : 0; af9015_af9013_frontend_attach()
947 ret = dvb_attach(mt2060_attach, adap->fe[0], af9015_tuner_attach()
954 ret = dvb_attach(qt1010_attach, adap->fe[0], af9015_tuner_attach()
959 ret = dvb_attach(tda18271_attach, adap->fe[0], 0xc0, af9015_tuner_attach()
964 ret = dvb_attach(tda18218_attach, adap->fe[0], af9015_tuner_attach()
969 ret = dvb_attach(mxl5005s_attach, adap->fe[0], af9015_tuner_attach()
975 ret = dvb_attach(mxl5005s_attach, adap->fe[0], af9015_tuner_attach()
980 ret = dvb_attach(dvb_pll_attach, adap->fe[0], 0xc0, af9015_tuner_attach()
985 ret = dvb_attach(mc44s803_attach, adap->fe[0], af9015_tuner_attach()
990 ret = dvb_attach(mxl5007t_attach, adap->fe[0], af9015_tuner_attach()
1002 if (adap->fe[0]->ops.tuner_ops.init) { af9015_tuner_attach()
1004 adap->fe[0]->ops.tuner_ops.init; af9015_tuner_attach()
1005 adap->fe[0]->ops.tuner_ops.init = af9015_tuner_init; af9015_tuner_attach()
1008 if (adap->fe[0]->ops.tuner_ops.sleep) { af9015_tuner_attach()
1010 adap->fe[0]->ops.tuner_ops.sleep; af9015_tuner_attach()
1011 adap->fe[0]->ops.tuner_ops.sleep = af9015_tuner_sleep; af9015_tuner_attach()
H A Drtl28xxu.c692 adap->fe[0] = pdata->get_dvb_frontend(client); rtl2831u_frontend_attach()
913 adap->fe[0] = pdata->get_dvb_frontend(client); rtl2832u_frontend_attach()
918 /* set fe callback */ rtl2832u_frontend_attach()
919 adap->fe[0]->callback = rtl2832u_frontend_callback; rtl2832u_frontend_attach()
934 mn88472_config.fe = &adap->fe[1]; rtl2832u_frontend_attach()
959 mn88473_config.fe = &adap->fe[1]; rtl2832u_frontend_attach()
983 si2168_config.fe = &adap->fe[1]; rtl2832u_frontend_attach()
1082 struct dvb_frontend *fe; rtl2831u_tuner_attach() local
1088 fe = dvb_attach(qt1010_attach, adap->fe[0], rtl2831u_tuner_attach()
1093 fe = dvb_attach(mt2060_attach, adap->fe[0], rtl2831u_tuner_attach()
1098 fe = dvb_attach(mxl5005s_attach, adap->fe[0], rtl2831u_tuner_attach()
1103 fe = NULL; rtl2831u_tuner_attach()
1107 if (fe == NULL) { rtl2831u_tuner_attach()
1142 struct dvb_frontend *fe = NULL; rtl2832u_tuner_attach() local
1156 fe = dvb_attach(fc0012_attach, adap->fe[0], rtl2832u_tuner_attach()
1161 adap->fe[0]->ops.read_signal_strength = rtl2832u_tuner_attach()
1162 adap->fe[0]->ops.tuner_ops.get_rf_strength; rtl2832u_tuner_attach()
1165 fe = dvb_attach(fc0013_attach, adap->fe[0], rtl2832u_tuner_attach()
1169 adap->fe[0]->ops.read_signal_strength = rtl2832u_tuner_attach()
1170 adap->fe[0]->ops.tuner_ops.get_rf_strength; rtl2832u_tuner_attach()
1174 .fe = adap->fe[0], rtl2832u_tuner_attach()
1198 .dvb_frontend = adap->fe[0], rtl2832u_tuner_attach()
1220 .dvb_frontend = adap->fe[0], rtl2832u_tuner_attach()
1248 fe = dvb_attach(r820t_attach, adap->fe[0], rtl2832u_tuner_attach()
1253 adap->fe[0]->ops.read_signal_strength = rtl2832u_tuner_attach()
1254 adap->fe[0]->ops.tuner_ops.get_rf_strength; rtl2832u_tuner_attach()
1257 fe = dvb_attach(r820t_attach, adap->fe[0], rtl2832u_tuner_attach()
1260 adap->fe[0]->ops.read_signal_strength = rtl2832u_tuner_attach()
1261 adap->fe[0]->ops.tuner_ops.get_rf_strength; rtl2832u_tuner_attach()
1263 if (adap->fe[1]) { rtl2832u_tuner_attach()
1264 fe = dvb_attach(r820t_attach, adap->fe[1], rtl2832u_tuner_attach()
1267 adap->fe[1]->ops.read_signal_strength = rtl2832u_tuner_attach()
1268 adap->fe[1]->ops.tuner_ops.get_rf_strength; rtl2832u_tuner_attach()
1273 .fe = adap->fe[0], rtl2832u_tuner_attach()
1295 if (adap->fe[1]) { rtl2832u_tuner_attach()
1296 adap->fe[1]->tuner_priv = rtl2832u_tuner_attach()
1297 adap->fe[0]->tuner_priv; rtl2832u_tuner_attach()
1298 memcpy(&adap->fe[1]->ops.tuner_ops, rtl2832u_tuner_attach()
1299 &adap->fe[0]->ops.tuner_ops, rtl2832u_tuner_attach()
1307 if (fe == NULL && dev->i2c_client_tuner == NULL) { rtl2832u_tuner_attach()
1326 pdata.dvb_frontend = adap->fe[0]; rtl2832u_tuner_attach()
1547 static int rtl28xxu_frontend_ctrl(struct dvb_frontend *fe, int onoff) rtl28xxu_frontend_ctrl() argument
1549 struct dvb_usb_device *d = fe_to_d(fe); rtl28xxu_frontend_ctrl()
1550 struct rtl28xxu_dev *dev = fe_to_priv(fe); rtl28xxu_frontend_ctrl()
1555 dev_dbg(&d->intf->dev, "fe=%d onoff=%d\n", fe->id, onoff); rtl28xxu_frontend_ctrl()
1561 if (fe->id == 0 && onoff) rtl28xxu_frontend_ctrl()
1571 if (fe->id == 1 && onoff) { rtl28xxu_frontend_ctrl()
1794 return pdata->pid_filter_ctrl(adap->fe[0], onoff); rtl28xxu_pid_filter_ctrl()
1798 return pdata->pid_filter_ctrl(adap->fe[0], onoff); rtl28xxu_pid_filter_ctrl()
1810 return pdata->pid_filter(adap->fe[0], index, pid, onoff); rtl28xxu_pid_filter()
1814 return pdata->pid_filter(adap->fe[0], index, pid, onoff); rtl28xxu_pid_filter()
/linux-4.4.14/drivers/media/pci/cx18/
H A Dcx18-dvb.c166 static int yuan_mpc718_mt352_init(struct dvb_frontend *fe) yuan_mpc718_mt352_init() argument
168 struct cx18_dvb *dvb = container_of(fe->dvb, yuan_mpc718_mt352_init()
194 mt352_write(fe, buf, 3); yuan_mpc718_mt352_init()
203 mt352_write(fe, buf, 3); yuan_mpc718_mt352_init()
208 mt352_write(fe, buf, 2); yuan_mpc718_mt352_init()
215 mt352_write(fe, buf, 2); yuan_mpc718_mt352_init()
462 dvb_unregister_frontend(dvb->fe); cx18_dvb_unregister()
463 dvb_frontend_detach(dvb->fe); cx18_dvb_unregister()
479 dvb->fe = dvb_attach(s5h1409_attach, dvb_register()
482 if (dvb->fe != NULL) { dvb_register()
483 dvb_attach(mxl5005s_attach, dvb->fe, dvb_register()
490 dvb->fe = dvb_attach(s5h1411_attach, dvb_register()
493 if (dvb->fe != NULL) dvb_register()
494 dvb_attach(tda18271_attach, dvb->fe, dvb_register()
499 dvb->fe = dvb_attach(zl10353_attach, dvb_register()
502 if (dvb->fe != NULL) { dvb_register()
503 struct dvb_frontend *fe; dvb_register() local
516 fe = dvb_attach(xc2028_attach, dvb->fe, &cfg); dvb_register()
517 if (fe != NULL && fe->ops.tuner_ops.set_config != NULL) dvb_register()
518 fe->ops.tuner_ops.set_config(fe, &ctrl); dvb_register()
527 dvb->fe = dvb_attach(mt352_attach, dvb_register()
530 if (dvb->fe == NULL) dvb_register()
531 dvb->fe = dvb_attach(zl10353_attach, dvb_register()
534 if (dvb->fe != NULL) { dvb_register()
535 struct dvb_frontend *fe; dvb_register() local
548 fe = dvb_attach(xc2028_attach, dvb->fe, &cfg); dvb_register()
549 if (fe != NULL && fe->ops.tuner_ops.set_config != NULL) dvb_register()
550 fe->ops.tuner_ops.set_config(fe, &ctrl); dvb_register()
554 dvb->fe = dvb_attach(zl10353_attach, dvb_register()
557 if (dvb->fe != NULL) { dvb_register()
558 struct dvb_frontend *fe; dvb_register() local
571 fe = dvb_attach(xc2028_attach, dvb->fe, &cfg); dvb_register()
572 if (fe != NULL && fe->ops.tuner_ops.set_config != NULL) dvb_register()
573 fe->ops.tuner_ops.set_config(fe, &ctrl); dvb_register()
581 if (dvb->fe == NULL) { dvb_register()
586 dvb->fe->callback = cx18_reset_tuner_gpio; dvb_register()
588 ret = dvb_register_frontend(&dvb->dvb_adapter, dvb->fe); dvb_register()
590 if (dvb->fe->ops.release) dvb_register()
591 dvb->fe->ops.release(dvb->fe); dvb_register()
/linux-4.4.14/drivers/media/pci/saa7134/
H A Dsaa7134-dvb.c112 static int mt352_pinnacle_init(struct dvb_frontend* fe) mt352_pinnacle_init() argument
126 mt352_write(fe, clock_config, sizeof(clock_config)); mt352_pinnacle_init()
128 mt352_write(fe, reset, sizeof(reset)); mt352_pinnacle_init()
129 mt352_write(fe, adc_ctl_1_cfg, sizeof(adc_ctl_1_cfg)); mt352_pinnacle_init()
130 mt352_write(fe, agc_cfg, sizeof(agc_cfg)); mt352_pinnacle_init()
131 mt352_write(fe, capt_range_cfg, sizeof(capt_range_cfg)); mt352_pinnacle_init()
132 mt352_write(fe, gpp_ctl_cfg, sizeof(gpp_ctl_cfg)); mt352_pinnacle_init()
134 mt352_write(fe, fsm_ctl_cfg, sizeof(fsm_ctl_cfg)); mt352_pinnacle_init()
135 mt352_write(fe, scan_ctl_cfg, sizeof(scan_ctl_cfg)); mt352_pinnacle_init()
136 mt352_write(fe, irq_cfg, sizeof(irq_cfg)); mt352_pinnacle_init()
141 static int mt352_aver777_init(struct dvb_frontend* fe) mt352_aver777_init() argument
149 mt352_write(fe, clock_config, sizeof(clock_config)); mt352_aver777_init()
151 mt352_write(fe, reset, sizeof(reset)); mt352_aver777_init()
152 mt352_write(fe, adc_ctl_1_cfg, sizeof(adc_ctl_1_cfg)); mt352_aver777_init()
153 mt352_write(fe, agc_cfg, sizeof(agc_cfg)); mt352_aver777_init()
154 mt352_write(fe, capt_range_cfg, sizeof(capt_range_cfg)); mt352_aver777_init()
159 static int mt352_avermedia_xc3028_init(struct dvb_frontend *fe) mt352_avermedia_xc3028_init() argument
167 mt352_write(fe, clock_config, sizeof(clock_config)); mt352_avermedia_xc3028_init()
169 mt352_write(fe, reset, sizeof(reset)); mt352_avermedia_xc3028_init()
170 mt352_write(fe, adc_ctl_1_cfg, sizeof(adc_ctl_1_cfg)); mt352_avermedia_xc3028_init()
171 mt352_write(fe, agc_cfg, sizeof(agc_cfg)); mt352_avermedia_xc3028_init()
172 mt352_write(fe, capt_range_cfg, sizeof(capt_range_cfg)); mt352_avermedia_xc3028_init()
176 static int mt352_pinnacle_tuner_set_params(struct dvb_frontend *fe) mt352_pinnacle_tuner_set_params() argument
178 struct dtv_frontend_properties *c = &fe->dtv_property_cache; mt352_pinnacle_tuner_set_params()
183 struct saa7134_dev *dev = fe->dvb->priv; mt352_pinnacle_tuner_set_params()
190 if (fe->ops.i2c_gate_ctrl) mt352_pinnacle_tuner_set_params()
191 fe->ops.i2c_gate_ctrl(fe, 1); mt352_pinnacle_tuner_set_params()
195 if (fe->ops.i2c_gate_ctrl) mt352_pinnacle_tuner_set_params()
196 fe->ops.i2c_gate_ctrl(fe, 1); mt352_pinnacle_tuner_set_params()
202 return mt352_pinnacle_init(fe); mt352_pinnacle_tuner_set_params()
240 static int kworld_sbtvd_gate_ctrl(struct dvb_frontend* fe, int enable) kworld_sbtvd_gate_ctrl() argument
242 struct saa7134_dev *dev = fe->dvb->priv; kworld_sbtvd_gate_ctrl()
269 static int philips_tda1004x_request_firmware(struct dvb_frontend *fe, philips_tda1004x_request_firmware() argument
272 struct saa7134_dev *dev = fe->dvb->priv; philips_tda1004x_request_firmware()
280 static int philips_tda6651_pll_set(struct dvb_frontend *fe) philips_tda6651_pll_set() argument
282 struct dtv_frontend_properties *c = &fe->dtv_property_cache; philips_tda6651_pll_set()
283 struct saa7134_dev *dev = fe->dvb->priv; philips_tda6651_pll_set()
284 struct tda1004x_state *state = fe->demodulator_priv; philips_tda6651_pll_set()
358 if (fe->ops.i2c_gate_ctrl) philips_tda6651_pll_set()
359 fe->ops.i2c_gate_ctrl(fe, 1); philips_tda6651_pll_set()
369 static int philips_tu1216_init(struct dvb_frontend *fe) philips_tu1216_init() argument
371 struct saa7134_dev *dev = fe->dvb->priv; philips_tu1216_init()
372 struct tda1004x_state *state = fe->demodulator_priv; philips_tu1216_init()
378 if (fe->ops.i2c_gate_ctrl) philips_tu1216_init()
379 fe->ops.i2c_gate_ctrl(fe, 1); philips_tu1216_init()
414 static int philips_td1316_tuner_init(struct dvb_frontend *fe) philips_td1316_tuner_init() argument
416 struct saa7134_dev *dev = fe->dvb->priv; philips_td1316_tuner_init()
417 struct tda1004x_state *state = fe->demodulator_priv; philips_td1316_tuner_init()
423 if (fe->ops.i2c_gate_ctrl) philips_td1316_tuner_init()
424 fe->ops.i2c_gate_ctrl(fe, 1); philips_td1316_tuner_init()
430 static int philips_td1316_tuner_set_params(struct dvb_frontend *fe) philips_td1316_tuner_set_params() argument
432 return philips_tda6651_pll_set(fe); philips_td1316_tuner_set_params()
435 static int philips_td1316_tuner_sleep(struct dvb_frontend *fe) philips_td1316_tuner_sleep() argument
437 struct saa7134_dev *dev = fe->dvb->priv; philips_td1316_tuner_sleep()
438 struct tda1004x_state *state = fe->demodulator_priv; philips_td1316_tuner_sleep()
444 if (fe->ops.i2c_gate_ctrl) philips_td1316_tuner_sleep()
445 fe->ops.i2c_gate_ctrl(fe, 1); philips_td1316_tuner_sleep()
453 static int philips_europa_tuner_init(struct dvb_frontend *fe) philips_europa_tuner_init() argument
455 struct saa7134_dev *dev = fe->dvb->priv; philips_europa_tuner_init()
460 if (philips_td1316_tuner_init(fe)) philips_europa_tuner_init()
469 static int philips_europa_tuner_sleep(struct dvb_frontend *fe) philips_europa_tuner_sleep() argument
471 struct saa7134_dev *dev = fe->dvb->priv; philips_europa_tuner_sleep()
476 if (philips_td1316_tuner_sleep(fe)) philips_europa_tuner_sleep()
480 if (fe->ops.i2c_gate_ctrl) philips_europa_tuner_sleep()
481 fe->ops.i2c_gate_ctrl(fe, 1); philips_europa_tuner_sleep()
486 static int philips_europa_demod_sleep(struct dvb_frontend *fe) philips_europa_demod_sleep() argument
488 struct saa7134_dev *dev = fe->dvb->priv; philips_europa_demod_sleep()
491 dev->original_demod_sleep(fe); philips_europa_demod_sleep()
492 fe->ops.i2c_gate_ctrl(fe, 1); philips_europa_demod_sleep()
534 static int tda8290_i2c_gate_ctrl( struct dvb_frontend* fe, int enable) tda8290_i2c_gate_ctrl() argument
536 struct tda1004x_state *state = fe->demodulator_priv; tda8290_i2c_gate_ctrl()
555 static int philips_tda827x_tuner_init(struct dvb_frontend *fe) philips_tda827x_tuner_init() argument
557 struct saa7134_dev *dev = fe->dvb->priv; philips_tda827x_tuner_init()
558 struct tda1004x_state *state = fe->demodulator_priv; philips_tda827x_tuner_init()
575 static int philips_tda827x_tuner_sleep(struct dvb_frontend *fe) philips_tda827x_tuner_sleep() argument
577 struct saa7134_dev *dev = fe->dvb->priv; philips_tda827x_tuner_sleep()
578 struct tda1004x_state *state = fe->demodulator_priv; philips_tda827x_tuner_sleep()
899 static int ads_duo_tuner_init(struct dvb_frontend *fe) ads_duo_tuner_init() argument
901 struct saa7134_dev *dev = fe->dvb->priv; ads_duo_tuner_init()
902 philips_tda827x_tuner_init(fe); ads_duo_tuner_init()
908 static int ads_duo_tuner_sleep(struct dvb_frontend *fe) ads_duo_tuner_sleep() argument
910 struct saa7134_dev *dev = fe->dvb->priv; ads_duo_tuner_sleep()
913 philips_tda827x_tuner_sleep(fe); ads_duo_tuner_sleep()
990 static int md8800_set_voltage(struct dvb_frontend *fe, md8800_set_voltage() argument
994 struct saa7134_dev *dev = fe->dvb->priv; md8800_set_voltage()
995 if (fe->ops.i2c_gate_ctrl) { md8800_set_voltage()
996 fe->ops.i2c_gate_ctrl(fe, 1); md8800_set_voltage()
998 res = dev->original_set_voltage(fe, voltage); md8800_set_voltage()
999 fe->ops.i2c_gate_ctrl(fe, 0); md8800_set_voltage()
1004 static int md8800_set_high_voltage(struct dvb_frontend *fe, long arg) md8800_set_high_voltage() argument
1007 struct saa7134_dev *dev = fe->dvb->priv; md8800_set_high_voltage()
1008 if (fe->ops.i2c_gate_ctrl) { md8800_set_high_voltage()
1009 fe->ops.i2c_gate_ctrl(fe, 1); md8800_set_high_voltage()
1011 res = dev->original_set_high_voltage(fe, arg); md8800_set_high_voltage()
1012 fe->ops.i2c_gate_ctrl(fe, 0); md8800_set_high_voltage()
1017 static int md8800_set_voltage2(struct dvb_frontend *fe, md8800_set_voltage2() argument
1020 struct saa7134_dev *dev = fe->dvb->priv; md8800_set_voltage2()
1038 static int md8800_set_high_voltage2(struct dvb_frontend *fe, long arg) md8800_set_high_voltage2() argument
1444 struct dvb_frontend *fe = fe0->dvb.frontend; dvb_init() local
1457 fe->ops.i2c_gate_ctrl(fe, 1); dvb_init()
1458 if (dvb_attach(isl6405_attach, fe, dvb_init()
1470 fe->ops.i2c_gate_ctrl(fe, 0); dvb_init()
1471 dev->original_set_voltage = fe->ops.set_voltage; dvb_init()
1472 fe->ops.set_voltage = md8800_set_voltage; dvb_init()
1473 dev->original_set_high_voltage = fe->ops.enable_high_lnb_voltage; dvb_init()
1474 fe->ops.enable_high_lnb_voltage = md8800_set_high_voltage; dvb_init()
1476 fe->ops.set_voltage = md8800_set_voltage2; dvb_init()
1477 fe->ops.enable_high_lnb_voltage = md8800_set_high_voltage2; dvb_init()
1628 struct dvb_frontend *fe; dvb_init() local
1636 fe = fe0->dvb.frontend; dvb_init()
1637 fe->ops.i2c_gate_ctrl(fe, 1); dvb_init()
1638 if (dvb_attach(isl6405_attach, fe, dvb_init()
1644 fe->ops.i2c_gate_ctrl(fe, 0); dvb_init()
1645 dev->original_set_voltage = fe->ops.set_voltage; dvb_init()
1646 fe->ops.set_voltage = md8800_set_voltage; dvb_init()
1647 dev->original_set_high_voltage = fe->ops.enable_high_lnb_voltage; dvb_init()
1648 fe->ops.enable_high_lnb_voltage = md8800_set_high_voltage; dvb_init()
1861 struct dvb_frontend *fe; dvb_init() local
1870 fe = dvb_attach(xc2028_attach, fe0->dvb.frontend, &cfg); dvb_init()
1871 if (!fe) { dvb_init()
1935 struct dvb_frontend *fe; dvb_fini() local
1936 fe = fe0->dvb.frontend; dvb_fini()
1937 if (fe->ops.i2c_gate_ctrl) { dvb_fini()
1938 fe->ops.i2c_gate_ctrl(fe, 1); dvb_fini()
1940 fe->ops.i2c_gate_ctrl(fe, 0); dvb_fini()
/linux-4.4.14/include/sound/
H A Dsoc-dpcm.h75 struct snd_soc_pcm_runtime *fe; member in struct:snd_soc_dpcm
110 int snd_soc_dpcm_can_be_free_stop(struct snd_soc_pcm_runtime *fe,
114 int snd_soc_dpcm_can_be_params(struct snd_soc_pcm_runtime *fe,
118 int snd_soc_dpcm_fe_can_update(struct snd_soc_pcm_runtime *fe, int stream);
121 int snd_soc_dpcm_be_can_update(struct snd_soc_pcm_runtime *fe,
137 int soc_dpcm_be_digital_mute(struct snd_soc_pcm_runtime *fe, int mute);
141 int dpcm_path_get(struct snd_soc_pcm_runtime *fe,
143 int dpcm_process_paths(struct snd_soc_pcm_runtime *fe,
145 int dpcm_be_dai_startup(struct snd_soc_pcm_runtime *fe, int stream);
146 int dpcm_be_dai_shutdown(struct snd_soc_pcm_runtime *fe, int stream);
147 void dpcm_be_disconnect(struct snd_soc_pcm_runtime *fe, int stream);
148 void dpcm_clear_pending_state(struct snd_soc_pcm_runtime *fe, int stream);
149 int dpcm_be_dai_hw_free(struct snd_soc_pcm_runtime *fe, int stream);
150 int dpcm_be_dai_hw_params(struct snd_soc_pcm_runtime *fe, int tream);
151 int dpcm_be_dai_trigger(struct snd_soc_pcm_runtime *fe, int stream, int cmd);
152 int dpcm_be_dai_prepare(struct snd_soc_pcm_runtime *fe, int stream);
153 int dpcm_dapm_stream_event(struct snd_soc_pcm_runtime *fe, int dir,
/linux-4.4.14/drivers/media/platform/sti/c8sectpfe/
H A Dc8sectpfe-dvb.c116 int c8sectpfe_frontend_attach(struct dvb_frontend **fe, c8sectpfe_frontend_attach() argument
138 *fe = dvb_attach(stv0367ter_attach, c8sectpfe_frontend_attach()
142 *fe = dvb_attach(stv0367ter_attach, c8sectpfe_frontend_attach()
146 *fe = dvb_attach(stv0367ter_attach, c8sectpfe_frontend_attach()
150 if (!*fe) { c8sectpfe_frontend_attach()
161 (*fe)->ops.init(*fe); c8sectpfe_frontend_attach()
176 tda18212->fe = (*fe); c8sectpfe_frontend_attach()
184 dvb_frontend_detach(*fe); c8sectpfe_frontend_attach()
190 dvb_frontend_detach(*fe); c8sectpfe_frontend_attach()
199 *fe = dvb_attach(stv090x_attach, &stv090x_config, c8sectpfe_frontend_attach()
201 if (!*fe) { c8sectpfe_frontend_attach()
208 fe2 = dvb_attach(stv6110x_attach, *fe, c8sectpfe_frontend_attach()
228 dvb_attach(lnbh24_attach, *fe, tsin->i2c_adapter, 0, 0, 0x9); c8sectpfe_frontend_attach()
238 (*fe)->id = chan_num; c8sectpfe_frontend_attach()
/linux-4.4.14/drivers/media/pci/bt8xx/
H A Ddvb-bt8xx.c133 static int thomson_dtt7579_demod_init(struct dvb_frontend* fe) thomson_dtt7579_demod_init() argument
142 mt352_write(fe, mt352_clock_config, sizeof(mt352_clock_config)); thomson_dtt7579_demod_init()
144 mt352_write(fe, mt352_reset, sizeof(mt352_reset)); thomson_dtt7579_demod_init()
145 mt352_write(fe, mt352_adc_ctl_1_cfg, sizeof(mt352_adc_ctl_1_cfg)); thomson_dtt7579_demod_init()
147 mt352_write(fe, mt352_agc_cfg, sizeof(mt352_agc_cfg)); thomson_dtt7579_demod_init()
148 mt352_write(fe, mt352_gpp_ctl_cfg, sizeof(mt352_gpp_ctl_cfg)); thomson_dtt7579_demod_init()
149 mt352_write(fe, mt352_capt_range_cfg, sizeof(mt352_capt_range_cfg)); thomson_dtt7579_demod_init()
154 static int thomson_dtt7579_tuner_calc_regs(struct dvb_frontend *fe, u8* pllbuf, int buf_len) thomson_dtt7579_tuner_calc_regs() argument
156 struct dtv_frontend_properties *c = &fe->dtv_property_cache; thomson_dtt7579_tuner_calc_regs()
198 static int cx24108_tuner_set_params(struct dvb_frontend *fe) cx24108_tuner_set_params() argument
200 struct dtv_frontend_properties *c = &fe->dtv_property_cache; cx24108_tuner_set_params()
239 cx24110_pll_write(fe,band); cx24108_tuner_set_params()
242 cx24110_pll_write(fe,0x500c0000); cx24108_tuner_set_params()
243 cx24110_pll_write(fe,0x83f1f800); cx24108_tuner_set_params()
244 cx24110_pll_write(fe,pll); cx24108_tuner_set_params()
250 static int pinnsat_tuner_init(struct dvb_frontend* fe) pinnsat_tuner_init() argument
252 struct dvb_bt8xx_card *card = fe->dvb->priv; pinnsat_tuner_init()
260 static int pinnsat_tuner_sleep(struct dvb_frontend* fe) pinnsat_tuner_sleep() argument
262 struct dvb_bt8xx_card *card = fe->dvb->priv; pinnsat_tuner_sleep()
273 static int microtune_mt7202dtf_tuner_set_params(struct dvb_frontend *fe) microtune_mt7202dtf_tuner_set_params() argument
275 struct dtv_frontend_properties *c = &fe->dtv_property_cache; microtune_mt7202dtf_tuner_set_params()
276 struct dvb_bt8xx_card *card = (struct dvb_bt8xx_card *) fe->dvb->priv; microtune_mt7202dtf_tuner_set_params()
308 if (fe->ops.i2c_gate_ctrl) microtune_mt7202dtf_tuner_set_params()
309 fe->ops.i2c_gate_ctrl(fe, 1); microtune_mt7202dtf_tuner_set_params()
314 static int microtune_mt7202dtf_request_firmware(struct dvb_frontend* fe, const struct firmware **fw, char* name) microtune_mt7202dtf_request_firmware() argument
316 struct dvb_bt8xx_card* bt = (struct dvb_bt8xx_card*) fe->dvb->priv; microtune_mt7202dtf_request_firmware()
326 static int advbt771_samsung_tdtc9251dh0_demod_init(struct dvb_frontend* fe) advbt771_samsung_tdtc9251dh0_demod_init() argument
336 mt352_write(fe, mt352_clock_config, sizeof(mt352_clock_config)); advbt771_samsung_tdtc9251dh0_demod_init()
338 mt352_write(fe, mt352_reset, sizeof(mt352_reset)); advbt771_samsung_tdtc9251dh0_demod_init()
339 mt352_write(fe, mt352_adc_ctl_1_cfg, sizeof(mt352_adc_ctl_1_cfg)); advbt771_samsung_tdtc9251dh0_demod_init()
341 mt352_write(fe, mt352_agc_cfg,sizeof(mt352_agc_cfg)); advbt771_samsung_tdtc9251dh0_demod_init()
343 mt352_write(fe, mt352_av771_extra,sizeof(mt352_av771_extra)); advbt771_samsung_tdtc9251dh0_demod_init()
344 mt352_write(fe, mt352_capt_range_cfg, sizeof(mt352_capt_range_cfg)); advbt771_samsung_tdtc9251dh0_demod_init()
349 static int advbt771_samsung_tdtc9251dh0_tuner_calc_regs(struct dvb_frontend *fe, u8 *pllbuf, int buf_len) advbt771_samsung_tdtc9251dh0_tuner_calc_regs() argument
351 struct dtv_frontend_properties *c = &fe->dtv_property_cache; advbt771_samsung_tdtc9251dh0_tuner_calc_regs()
416 static int or51211_request_firmware(struct dvb_frontend* fe, const struct firmware **fw, char* name) or51211_request_firmware() argument
418 struct dvb_bt8xx_card* bt = (struct dvb_bt8xx_card*) fe->dvb->priv; or51211_request_firmware()
423 static void or51211_setmode(struct dvb_frontend * fe, int mode) or51211_setmode() argument
425 struct dvb_bt8xx_card *bt = fe->dvb->priv; or51211_setmode()
430 static void or51211_reset(struct dvb_frontend * fe) or51211_reset() argument
432 struct dvb_bt8xx_card *bt = fe->dvb->priv; or51211_reset()
455 static void or51211_sleep(struct dvb_frontend * fe) or51211_sleep() argument
457 struct dvb_bt8xx_card *bt = fe->dvb->priv; or51211_sleep()
469 static int vp3021_alps_tded4_tuner_set_params(struct dvb_frontend *fe) vp3021_alps_tded4_tuner_set_params() argument
471 struct dtv_frontend_properties *c = &fe->dtv_property_cache; vp3021_alps_tded4_tuner_set_params()
472 struct dvb_bt8xx_card *card = (struct dvb_bt8xx_card *) fe->dvb->priv; vp3021_alps_tded4_tuner_set_params()
493 if (fe->ops.i2c_gate_ctrl) vp3021_alps_tded4_tuner_set_params()
494 fe->ops.i2c_gate_ctrl(fe, 1); vp3021_alps_tded4_tuner_set_params()
504 static int digitv_alps_tded4_demod_init(struct dvb_frontend* fe) digitv_alps_tded4_demod_init() argument
512 mt352_write(fe, mt352_clock_config, sizeof(mt352_clock_config)); digitv_alps_tded4_demod_init()
514 mt352_write(fe, mt352_reset, sizeof(mt352_reset)); digitv_alps_tded4_demod_init()
515 mt352_write(fe, mt352_adc_ctl_1_cfg, sizeof(mt352_adc_ctl_1_cfg)); digitv_alps_tded4_demod_init()
516 mt352_write(fe, mt352_agc_cfg,sizeof(mt352_agc_cfg)); digitv_alps_tded4_demod_init()
517 mt352_write(fe, mt352_capt_range_cfg, sizeof(mt352_capt_range_cfg)); digitv_alps_tded4_demod_init()
522 static int digitv_alps_tded4_tuner_calc_regs(struct dvb_frontend *fe, u8 *pllbuf, int buf_len) digitv_alps_tded4_tuner_calc_regs() argument
525 struct dtv_frontend_properties *c = &fe->dtv_property_cache; digitv_alps_tded4_tuner_calc_regs()
603 card->fe = dvb_attach(mt352_attach, &thomson_dtt7579_config, card->i2c_adapter); frontend_init()
605 if (card->fe == NULL) frontend_init()
606 card->fe = dvb_attach(zl10353_attach, &thomson_dtt7579_zl10353_config, frontend_init()
609 if (card->fe != NULL) { frontend_init()
610 card->fe->ops.tuner_ops.calc_regs = thomson_dtt7579_tuner_calc_regs; frontend_init()
611 card->fe->ops.info.frequency_min = 174000000; frontend_init()
612 card->fe->ops.info.frequency_max = 862000000; frontend_init()
618 card->fe = dvb_attach(lgdt330x_attach, &tdvs_tua6034_config, card->i2c_adapter); frontend_init()
619 if (card->fe != NULL) { frontend_init()
620 dvb_attach(simple_tuner_attach, card->fe, frontend_init()
635 card->fe = dvb_attach(nxt6000_attach, &vp3021_alps_tded4_config, card->i2c_adapter); frontend_init()
636 if (card->fe != NULL) { frontend_init()
637 card->fe->ops.tuner_ops.set_params = vp3021_alps_tded4_tuner_set_params; frontend_init()
644 card->fe = dvb_attach(mt352_attach, &digitv_alps_tded4_config, card->i2c_adapter); frontend_init()
646 if (card->fe != NULL) { frontend_init()
647 card->fe->ops.tuner_ops.calc_regs = digitv_alps_tded4_tuner_calc_regs; frontend_init()
653 card->fe = dvb_attach(sp887x_attach, &microtune_mt7202dtf_config, card->i2c_adapter); frontend_init()
654 if (card->fe) { frontend_init()
655 card->fe->ops.tuner_ops.set_params = microtune_mt7202dtf_tuner_set_params; frontend_init()
660 card->fe = dvb_attach(mt352_attach, &advbt771_samsung_tdtc9251dh0_config, card->i2c_adapter); frontend_init()
661 if (card->fe != NULL) { frontend_init()
662 card->fe->ops.tuner_ops.calc_regs = advbt771_samsung_tdtc9251dh0_tuner_calc_regs; frontend_init()
663 card->fe->ops.info.frequency_min = 174000000; frontend_init()
664 card->fe->ops.info.frequency_max = 862000000; frontend_init()
687 card->fe = &state->frontend; frontend_init()
693 card->fe = dvb_attach(cx24110_attach, &pctvsat_config, card->i2c_adapter); frontend_init()
694 if (card->fe) { frontend_init()
695 card->fe->ops.tuner_ops.init = pinnsat_tuner_init; frontend_init()
696 card->fe->ops.tuner_ops.sleep = pinnsat_tuner_sleep; frontend_init()
697 card->fe->ops.tuner_ops.set_params = cx24108_tuner_set_params; frontend_init()
702 card->fe = dvb_attach(or51211_attach, &or51211_config, card->i2c_adapter); frontend_init()
703 if (card->fe != NULL) frontend_init()
704 dvb_attach(simple_tuner_attach, card->fe, frontend_init()
710 if (card->fe == NULL) frontend_init()
717 if (dvb_register_frontend(&card->dvb_adapter, card->fe)) { frontend_init()
719 dvb_frontend_detach(card->fe); frontend_init()
720 card->fe = NULL; frontend_init()
939 if (card->fe) { dvb_bt8xx_remove()
940 dvb_unregister_frontend(card->fe); dvb_bt8xx_remove()
941 dvb_frontend_detach(card->fe); dvb_bt8xx_remove()
/linux-4.4.14/drivers/media/pci/pt3/
H A Dpt3.c125 static inline struct pt3_adapter *pt3_find_adapter(struct dvb_frontend *fe) pt3_find_adapter() argument
131 pt3 = fe->dvb->priv; pt3_find_adapter()
133 if (pt3->adaps[i]->fe == fe) pt3_find_adapter()
136 return container_of(fe->dvb, struct pt3_adapter, dvb_adap); pt3_find_adapter()
156 static int pt3_set_lna(struct dvb_frontend *fe) pt3_set_lna() argument
165 adap = pt3_find_adapter(fe); pt3_set_lna()
166 val = fe->dtv_property_cache.lna; pt3_set_lna()
191 static int pt3_set_voltage(struct dvb_frontend *fe, enum fe_sec_voltage volt) pt3_set_voltage() argument
199 adap = pt3_find_adapter(fe); pt3_set_voltage()
253 struct dvb_frontend *fe; pt3_fe_init() local
264 fe = pt3->adaps[i]->fe; pt3_fe_init()
266 if (fe->ops.delsys[0] == SYS_ISDBS) pt3_fe_init()
277 ret = fe->ops.init(fe); pt3_fe_init()
291 fe = pt3->adaps[i]->fe; pt3_fe_init()
292 if (fe->ops.delsys[0] == SYS_ISDBS) pt3_fe_init()
307 fe = pt3->adaps[i]->fe; pt3_fe_init()
308 if (fe->ops.delsys[0] != SYS_ISDBS) pt3_fe_init()
311 ret = fe->ops.tuner_ops.init(fe); pt3_fe_init()
335 fe = pt3->adaps[i]->fe; pt3_fe_init()
337 if (fe->ops.delsys[0] == SYS_ISDBT) pt3_fe_init()
338 ret = fe->ops.tuner_ops.init(fe); pt3_fe_init()
340 if (ret == 0 && fe->dtv_property_cache.frequency == 0) { pt3_fe_init()
341 fe->dtv_property_cache.frequency = pt3_fe_init()
343 ret = fe->ops.tuner_ops.set_params(fe); pt3_fe_init()
354 fe = pt3->adaps[i]->fe; pt3_fe_init()
355 if (fe->ops.tuner_ops.sleep) pt3_fe_init()
356 ret = fe->ops.tuner_ops.sleep(fe); pt3_fe_init()
359 if (fe->ops.sleep) pt3_fe_init()
360 ret = fe->ops.sleep(fe); pt3_fe_init()
363 if (fe->ops.delsys[0] == SYS_ISDBS) pt3_fe_init()
364 fe->ops.set_voltage = &pt3_set_voltage; pt3_fe_init()
366 fe->ops.set_lna = &pt3_set_lna; pt3_fe_init()
402 tcfg.fe = cfg.fe; pt3_attach_fe()
411 tcfg.fe = cfg.fe; pt3_attach_fe()
424 ret = dvb_register_frontend(dvb_adap, cfg.fe); pt3_attach_fe()
427 pt3->adaps[i]->fe = cfg.fe; pt3_attach_fe()
505 adap->dvb_adap.num, adap->fe->id); pt3_stop_streaming()
632 if (adap->fe) { pt3_cleanup_adapter()
633 adap->fe->callback = NULL; pt3_cleanup_adapter()
634 if (adap->fe->frontend_priv) pt3_cleanup_adapter()
635 dvb_unregister_frontend(adap->fe); pt3_cleanup_adapter()
667 dvb_frontend_suspend(adap->fe); pt3_suspend()
694 dvb_frontend_resume(adap->fe); pt3_resume()
/linux-4.4.14/drivers/media/usb/ttusb-dec/
H A Dttusbdecfe.c41 static int ttusbdecfe_dvbs_read_status(struct dvb_frontend *fe, ttusbdecfe_dvbs_read_status() argument
50 static int ttusbdecfe_dvbt_read_status(struct dvb_frontend *fe, ttusbdecfe_dvbt_read_status() argument
53 struct ttusbdecfe_state* state = fe->demodulator_priv; ttusbdecfe_dvbt_read_status()
61 ret=state->config->send_command(fe, 0x73, sizeof(b), b, &len, result); ttusbdecfe_dvbt_read_status()
90 static int ttusbdecfe_dvbt_set_frontend(struct dvb_frontend *fe) ttusbdecfe_dvbt_set_frontend() argument
92 struct dtv_frontend_properties *p = &fe->dtv_property_cache; ttusbdecfe_dvbt_set_frontend()
93 struct ttusbdecfe_state* state = (struct ttusbdecfe_state*) fe->demodulator_priv; ttusbdecfe_dvbt_set_frontend()
102 state->config->send_command(fe, 0x71, sizeof(b), b, NULL, NULL); ttusbdecfe_dvbt_set_frontend()
107 static int ttusbdecfe_dvbt_get_tune_settings(struct dvb_frontend* fe, ttusbdecfe_dvbt_get_tune_settings() argument
117 static int ttusbdecfe_dvbs_set_frontend(struct dvb_frontend *fe) ttusbdecfe_dvbs_set_frontend() argument
119 struct dtv_frontend_properties *p = &fe->dtv_property_cache; ttusbdecfe_dvbs_set_frontend()
120 struct ttusbdecfe_state* state = (struct ttusbdecfe_state*) fe->demodulator_priv; ttusbdecfe_dvbs_set_frontend()
147 state->config->send_command(fe, 0x71, sizeof(b), b, NULL, NULL); ttusbdecfe_dvbs_set_frontend()
152 static int ttusbdecfe_dvbs_diseqc_send_master_cmd(struct dvb_frontend* fe, struct dvb_diseqc_master_cmd *cmd) ttusbdecfe_dvbs_diseqc_send_master_cmd() argument
154 struct ttusbdecfe_state* state = (struct ttusbdecfe_state*) fe->demodulator_priv; ttusbdecfe_dvbs_diseqc_send_master_cmd()
164 state->config->send_command(fe, 0x72, ttusbdecfe_dvbs_diseqc_send_master_cmd()
172 static int ttusbdecfe_dvbs_set_tone(struct dvb_frontend *fe, ttusbdecfe_dvbs_set_tone() argument
175 struct ttusbdecfe_state* state = (struct ttusbdecfe_state*) fe->demodulator_priv; ttusbdecfe_dvbs_set_tone()
183 static int ttusbdecfe_dvbs_set_voltage(struct dvb_frontend *fe, ttusbdecfe_dvbs_set_voltage() argument
186 struct ttusbdecfe_state* state = (struct ttusbdecfe_state*) fe->demodulator_priv; ttusbdecfe_dvbs_set_voltage()
202 static void ttusbdecfe_release(struct dvb_frontend* fe) ttusbdecfe_release() argument
204 struct ttusbdecfe_state* state = (struct ttusbdecfe_state*) fe->demodulator_priv; ttusbdecfe_release()
/linux-4.4.14/drivers/media/pci/cx88/
H A Dcx88-dvb.c173 static int cx88_dvb_bus_ctrl(struct dvb_frontend* fe, int acquire) cx88_dvb_bus_ctrl() argument
175 struct cx8802_dev *dev= fe->dvb->priv; cx88_dvb_bus_ctrl()
180 fe_id = vb2_dvb_find_frontend(&dev->frontends, fe); cx88_dvb_bus_ctrl()
205 struct vb2_dvb_frontend *fe; cx88_dvb_gate_ctrl() local
216 fe = vb2_dvb_get_frontend(f, 1); cx88_dvb_gate_ctrl()
218 fe = vb2_dvb_get_frontend(f, f->gate); cx88_dvb_gate_ctrl()
220 if (fe && fe->dvb.frontend && fe->dvb.frontend->ops.i2c_gate_ctrl) cx88_dvb_gate_ctrl()
221 fe->dvb.frontend->ops.i2c_gate_ctrl(fe->dvb.frontend, open); cx88_dvb_gate_ctrl()
226 static int dvico_fusionhdtv_demod_init(struct dvb_frontend* fe) dvico_fusionhdtv_demod_init() argument
235 mt352_write(fe, clock_config, sizeof(clock_config)); dvico_fusionhdtv_demod_init()
237 mt352_write(fe, reset, sizeof(reset)); dvico_fusionhdtv_demod_init()
238 mt352_write(fe, adc_ctl_1_cfg, sizeof(adc_ctl_1_cfg)); dvico_fusionhdtv_demod_init()
240 mt352_write(fe, agc_cfg, sizeof(agc_cfg)); dvico_fusionhdtv_demod_init()
241 mt352_write(fe, gpp_ctl_cfg, sizeof(gpp_ctl_cfg)); dvico_fusionhdtv_demod_init()
242 mt352_write(fe, capt_range_cfg, sizeof(capt_range_cfg)); dvico_fusionhdtv_demod_init()
246 static int dvico_dual_demod_init(struct dvb_frontend *fe) dvico_dual_demod_init() argument
255 mt352_write(fe, clock_config, sizeof(clock_config)); dvico_dual_demod_init()
257 mt352_write(fe, reset, sizeof(reset)); dvico_dual_demod_init()
258 mt352_write(fe, adc_ctl_1_cfg, sizeof(adc_ctl_1_cfg)); dvico_dual_demod_init()
260 mt352_write(fe, agc_cfg, sizeof(agc_cfg)); dvico_dual_demod_init()
261 mt352_write(fe, gpp_ctl_cfg, sizeof(gpp_ctl_cfg)); dvico_dual_demod_init()
262 mt352_write(fe, capt_range_cfg, sizeof(capt_range_cfg)); dvico_dual_demod_init()
267 static int dntv_live_dvbt_demod_init(struct dvb_frontend* fe) dntv_live_dvbt_demod_init() argument
277 mt352_write(fe, clock_config, sizeof(clock_config)); dntv_live_dvbt_demod_init()
279 mt352_write(fe, reset, sizeof(reset)); dntv_live_dvbt_demod_init()
280 mt352_write(fe, adc_ctl_1_cfg, sizeof(adc_ctl_1_cfg)); dntv_live_dvbt_demod_init()
282 mt352_write(fe, agc_cfg, sizeof(agc_cfg)); dntv_live_dvbt_demod_init()
284 mt352_write(fe, dntv_extra, sizeof(dntv_extra)); dntv_live_dvbt_demod_init()
285 mt352_write(fe, capt_range_cfg, sizeof(capt_range_cfg)); dntv_live_dvbt_demod_init()
316 static int dntv_live_dvbt_pro_demod_init(struct dvb_frontend* fe) dntv_live_dvbt_pro_demod_init() argument
326 mt352_write(fe, clock_config, sizeof(clock_config)); dntv_live_dvbt_pro_demod_init()
328 mt352_write(fe, reset, sizeof(reset)); dntv_live_dvbt_pro_demod_init()
329 mt352_write(fe, adc_ctl_1_cfg, sizeof(adc_ctl_1_cfg)); dntv_live_dvbt_pro_demod_init()
331 mt352_write(fe, agc_cfg, sizeof(agc_cfg)); dntv_live_dvbt_pro_demod_init()
333 mt352_write(fe, dntv_extra, sizeof(dntv_extra)); dntv_live_dvbt_pro_demod_init()
334 mt352_write(fe, capt_range_cfg, sizeof(capt_range_cfg)); dntv_live_dvbt_pro_demod_init()
378 static int or51132_set_ts_param(struct dvb_frontend* fe, int is_punctured) or51132_set_ts_param() argument
380 struct cx8802_dev *dev= fe->dvb->priv; or51132_set_ts_param()
390 static int lgdt330x_pll_rf_set(struct dvb_frontend* fe, int index) lgdt330x_pll_rf_set() argument
392 struct cx8802_dev *dev= fe->dvb->priv; lgdt330x_pll_rf_set()
403 static int lgdt330x_set_ts_param(struct dvb_frontend* fe, int is_punctured) lgdt330x_set_ts_param() argument
405 struct cx8802_dev *dev= fe->dvb->priv; lgdt330x_set_ts_param()
434 static int nxt200x_set_ts_param(struct dvb_frontend* fe, int is_punctured) nxt200x_set_ts_param() argument
436 struct cx8802_dev *dev= fe->dvb->priv; nxt200x_set_ts_param()
446 static int cx24123_set_ts_param(struct dvb_frontend* fe, cx24123_set_ts_param() argument
449 struct cx8802_dev *dev= fe->dvb->priv; cx24123_set_ts_param()
454 static int kworld_dvbs_100_set_voltage(struct dvb_frontend* fe, kworld_dvbs_100_set_voltage() argument
457 struct cx8802_dev *dev= fe->dvb->priv; kworld_dvbs_100_set_voltage()
466 return core->prev_set_voltage(fe, voltage); kworld_dvbs_100_set_voltage()
470 static int geniatech_dvbs_set_voltage(struct dvb_frontend *fe, geniatech_dvbs_set_voltage() argument
473 struct cx8802_dev *dev= fe->dvb->priv; geniatech_dvbs_set_voltage()
482 return core->prev_set_voltage(fe, voltage); geniatech_dvbs_set_voltage()
486 static int tevii_dvbs_set_voltage(struct dvb_frontend *fe, tevii_dvbs_set_voltage() argument
489 struct cx8802_dev *dev= fe->dvb->priv; tevii_dvbs_set_voltage()
506 return core->prev_set_voltage(fe, voltage); tevii_dvbs_set_voltage()
510 static int vp1027_set_voltage(struct dvb_frontend *fe, vp1027_set_voltage() argument
513 struct cx8802_dev *dev = fe->dvb->priv; vp1027_set_voltage()
532 return core->prev_set_voltage(fe, voltage); vp1027_set_voltage()
614 struct dvb_frontend *fe; attach_xc3028() local
642 fe = dvb_attach(xc2028_attach, fe0->dvb.frontend, &cfg); attach_xc3028()
643 if (!fe) { attach_xc3028()
660 struct dvb_frontend *fe; attach_xc4000() local
675 fe = dvb_attach(xc4000_attach, fe0->dvb.frontend, &dev->core->i2c_adap, attach_xc4000()
677 if (!fe) { attach_xc4000()
691 static int cx24116_set_ts_param(struct dvb_frontend *fe, cx24116_set_ts_param() argument
694 struct cx8802_dev *dev = fe->dvb->priv; cx24116_set_ts_param()
700 static int stv0900_set_ts_param(struct dvb_frontend *fe, stv0900_set_ts_param() argument
703 struct cx8802_dev *dev = fe->dvb->priv; stv0900_set_ts_param()
709 static int cx24116_reset_device(struct dvb_frontend *fe) cx24116_reset_device() argument
711 struct cx8802_dev *dev = fe->dvb->priv; cx24116_reset_device()
737 static int ds3000_set_ts_param(struct dvb_frontend *fe, ds3000_set_ts_param() argument
740 struct cx8802_dev *dev = fe->dvb->priv; ds3000_set_ts_param()
795 struct vb2_dvb_frontend *fe = NULL; cx8802_alloc_frontends() local
807 fe = vb2_dvb_alloc_frontend(&dev->frontends, i); cx8802_alloc_frontends()
808 if (!fe) { cx8802_alloc_frontends()
871 static int samsung_smt_7020_tuner_set_params(struct dvb_frontend *fe) samsung_smt_7020_tuner_set_params() argument
873 struct dtv_frontend_properties *c = &fe->dtv_property_cache; samsung_smt_7020_tuner_set_params()
874 struct cx8802_dev *dev = fe->dvb->priv; samsung_smt_7020_tuner_set_params()
893 if (fe->ops.i2c_gate_ctrl) samsung_smt_7020_tuner_set_params()
894 fe->ops.i2c_gate_ctrl(fe, 1); samsung_smt_7020_tuner_set_params()
902 static int samsung_smt_7020_set_tone(struct dvb_frontend *fe, samsung_smt_7020_set_tone() argument
905 struct cx8802_dev *dev = fe->dvb->priv; samsung_smt_7020_set_tone()
924 static int samsung_smt_7020_set_voltage(struct dvb_frontend *fe, samsung_smt_7020_set_voltage() argument
927 struct cx8802_dev *dev = fe->dvb->priv; samsung_smt_7020_set_voltage()
957 static int samsung_smt_7020_stv0299_set_symbol_rate(struct dvb_frontend *fe, samsung_smt_7020_stv0299_set_symbol_rate() argument
983 stv0299_writereg(fe, 0x13, aclk); samsung_smt_7020_stv0299_set_symbol_rate()
984 stv0299_writereg(fe, 0x14, bclk); samsung_smt_7020_stv0299_set_symbol_rate()
985 stv0299_writereg(fe, 0x1f, (ratio >> 16) & 0xff); samsung_smt_7020_stv0299_set_symbol_rate()
986 stv0299_writereg(fe, 0x20, (ratio >> 8) & 0xff); samsung_smt_7020_stv0299_set_symbol_rate()
987 stv0299_writereg(fe, 0x21, ratio & 0xf0); samsung_smt_7020_stv0299_set_symbol_rate()
1376 struct dvb_frontend *fe; dvb_register() local
1387 fe = dvb_attach(xc2028_attach, dvb_register()
1389 if (fe != NULL && fe->ops.tuner_ops.set_config != NULL) dvb_register()
1390 fe->ops.tuner_ops.set_config(fe, &ctl); dvb_register()
1747 struct vb2_dvb_frontend *fe; cx8802_dvb_probe() local
1778 fe = vb2_dvb_get_frontend(&core->dvbdev->frontends, i); cx8802_dvb_probe()
1779 if (fe == NULL) { cx8802_dvb_probe()
1784 q = &fe->dvb.dvbq; cx8802_dvb_probe()
1801 fe->dvb.name = dev->core->name; cx8802_dvb_probe()
/linux-4.4.14/drivers/media/usb/ttusb-budget/
H A Ddvb-ttusb-budget.c131 struct dvb_frontend* fe; member in struct:ttusb
473 static int ttusb_send_diseqc(struct dvb_frontend* fe, ttusb_send_diseqc() argument
476 struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; ttusb_send_diseqc()
514 static int ttusb_set_voltage(struct dvb_frontend *fe, ttusb_set_voltage() argument
517 struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; ttusb_set_voltage()
524 static int ttusb_set_tone(struct dvb_frontend *fe, enum fe_sec_tone_mode tone) ttusb_set_tone() argument
526 struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; ttusb_set_tone()
1022 static int alps_tdmb7_tuner_set_params(struct dvb_frontend *fe) alps_tdmb7_tuner_set_params() argument
1024 struct dtv_frontend_properties *p = &fe->dtv_property_cache; alps_tdmb7_tuner_set_params()
1025 struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; alps_tdmb7_tuner_set_params()
1037 if (fe->ops.i2c_gate_ctrl) alps_tdmb7_tuner_set_params()
1038 fe->ops.i2c_gate_ctrl(fe, 1); alps_tdmb7_tuner_set_params()
1051 static int philips_tdm1316l_tuner_init(struct dvb_frontend* fe) philips_tdm1316l_tuner_init() argument
1053 struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; philips_tdm1316l_tuner_init()
1059 if (fe->ops.i2c_gate_ctrl) philips_tdm1316l_tuner_init()
1060 fe->ops.i2c_gate_ctrl(fe, 1); philips_tdm1316l_tuner_init()
1068 if (fe->ops.i2c_gate_ctrl) philips_tdm1316l_tuner_init()
1069 fe->ops.i2c_gate_ctrl(fe, 1); philips_tdm1316l_tuner_init()
1077 static int philips_tdm1316l_tuner_set_params(struct dvb_frontend *fe) philips_tdm1316l_tuner_set_params() argument
1079 struct dtv_frontend_properties *p = &fe->dtv_property_cache; philips_tdm1316l_tuner_set_params()
1080 struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; philips_tdm1316l_tuner_set_params()
1114 tda1004x_writereg(fe, 0x0C, 0); philips_tdm1316l_tuner_set_params()
1119 tda1004x_writereg(fe, 0x0C, 0); philips_tdm1316l_tuner_set_params()
1124 tda1004x_writereg(fe, 0x0C, 0xFF); philips_tdm1316l_tuner_set_params()
1142 if (fe->ops.i2c_gate_ctrl) philips_tdm1316l_tuner_set_params()
1143 fe->ops.i2c_gate_ctrl(fe, 1); philips_tdm1316l_tuner_set_params()
1151 static int philips_tdm1316l_request_firmware(struct dvb_frontend* fe, const struct firmware **fw, char* name) philips_tdm1316l_request_firmware() argument
1153 struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; philips_tdm1316l_request_firmware()
1250 static int alps_stv0299_set_symbol_rate(struct dvb_frontend *fe, u32 srate, u32 ratio) alps_stv0299_set_symbol_rate() argument
1275 stv0299_writereg(fe, 0x13, aclk); alps_stv0299_set_symbol_rate()
1276 stv0299_writereg(fe, 0x14, bclk); alps_stv0299_set_symbol_rate()
1277 stv0299_writereg(fe, 0x1f, (ratio >> 16) & 0xff); alps_stv0299_set_symbol_rate()
1278 stv0299_writereg(fe, 0x20, (ratio >> 8) & 0xff); alps_stv0299_set_symbol_rate()
1279 stv0299_writereg(fe, 0x21, (ratio) & 0xf0); alps_stv0299_set_symbol_rate()
1284 static int philips_tsa5059_tuner_set_params(struct dvb_frontend *fe) philips_tsa5059_tuner_set_params() argument
1286 struct dtv_frontend_properties *p = &fe->dtv_property_cache; philips_tsa5059_tuner_set_params()
1287 struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; philips_tsa5059_tuner_set_params()
1308 if (fe->ops.i2c_gate_ctrl) philips_tsa5059_tuner_set_params()
1309 fe->ops.i2c_gate_ctrl(fe, 1); philips_tsa5059_tuner_set_params()
1328 static int ttusb_novas_grundig_29504_491_tuner_set_params(struct dvb_frontend *fe) ttusb_novas_grundig_29504_491_tuner_set_params() argument
1330 struct dtv_frontend_properties *p = &fe->dtv_property_cache; ttusb_novas_grundig_29504_491_tuner_set_params()
1331 struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; ttusb_novas_grundig_29504_491_tuner_set_params()
1343 if (fe->ops.i2c_gate_ctrl) ttusb_novas_grundig_29504_491_tuner_set_params()
1344 fe->ops.i2c_gate_ctrl(fe, 1); ttusb_novas_grundig_29504_491_tuner_set_params()
1356 static int alps_tdbe2_tuner_set_params(struct dvb_frontend *fe) alps_tdbe2_tuner_set_params() argument
1358 struct dtv_frontend_properties *p = &fe->dtv_property_cache; alps_tdbe2_tuner_set_params()
1359 struct ttusb* ttusb = fe->dvb->priv; alps_tdbe2_tuner_set_params()
1371 if (fe->ops.i2c_gate_ctrl) alps_tdbe2_tuner_set_params()
1372 fe->ops.i2c_gate_ctrl(fe, 1); alps_tdbe2_tuner_set_params()
1401 static int dvbc_philips_tdm1316l_tuner_set_params(struct dvb_frontend *fe) dvbc_philips_tdm1316l_tuner_set_params() argument
1403 struct dtv_frontend_properties *p = &fe->dtv_property_cache; dvbc_philips_tdm1316l_tuner_set_params()
1404 struct ttusb *ttusb = (struct ttusb *) fe->dvb->priv; dvbc_philips_tdm1316l_tuner_set_params()
1441 if (fe->ops.i2c_gate_ctrl) dvbc_philips_tdm1316l_tuner_set_params()
1442 fe->ops.i2c_gate_ctrl(fe, 1); dvbc_philips_tdm1316l_tuner_set_params()
1450 if (fe->ops.i2c_gate_ctrl) dvbc_philips_tdm1316l_tuner_set_params()
1451 fe->ops.i2c_gate_ctrl(fe, 1); dvbc_philips_tdm1316l_tuner_set_params()
1575 ttusb->fe = dvb_attach(stv0299_attach, &alps_stv0299_config, &ttusb->i2c_adap); frontend_init()
1576 if (ttusb->fe != NULL) { frontend_init()
1577 ttusb->fe->ops.tuner_ops.set_params = philips_tsa5059_tuner_set_params; frontend_init()
1581 dvb_attach(lnbp21_attach, ttusb->fe, &ttusb->i2c_adap, 0, 0); frontend_init()
1583 ttusb->fe->ops.set_voltage = ttusb_set_voltage; frontend_init()
1589 ttusb->fe = dvb_attach(tda8083_attach, &ttusb_novas_grundig_29504_491_config, &ttusb->i2c_adap); frontend_init()
1590 if (ttusb->fe != NULL) { frontend_init()
1591 ttusb->fe->ops.tuner_ops.set_params = ttusb_novas_grundig_29504_491_tuner_set_params; frontend_init()
1592 ttusb->fe->ops.set_voltage = ttusb_set_voltage; frontend_init()
1598 ttusb->fe = dvb_attach(ves1820_attach, &alps_tdbe2_config, &ttusb->i2c_adap, read_pwm(ttusb)); frontend_init()
1599 if (ttusb->fe != NULL) { frontend_init()
1600 ttusb->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params; frontend_init()
1604 ttusb->fe = dvb_attach(stv0297_attach, &dvbc_philips_tdm1316l_config, &ttusb->i2c_adap); frontend_init()
1605 if (ttusb->fe != NULL) { frontend_init()
1606 ttusb->fe->ops.tuner_ops.set_params = dvbc_philips_tdm1316l_tuner_set_params; frontend_init()
1613 ttusb->fe = dvb_attach(cx22700_attach, &alps_tdmb7_config, &ttusb->i2c_adap); frontend_init()
1614 if (ttusb->fe != NULL) { frontend_init()
1615 ttusb->fe->ops.tuner_ops.set_params = alps_tdmb7_tuner_set_params; frontend_init()
1620 ttusb->fe = dvb_attach(tda10046_attach, &philips_tdm1316l_config, &ttusb->i2c_adap); frontend_init()
1621 if (ttusb->fe != NULL) { frontend_init()
1622 ttusb->fe->ops.tuner_ops.init = philips_tdm1316l_tuner_init; frontend_init()
1623 ttusb->fe->ops.tuner_ops.set_params = philips_tdm1316l_tuner_set_params; frontend_init()
1629 if (ttusb->fe == NULL) { frontend_init()
1634 if (dvb_register_frontend(&ttusb->adapter, ttusb->fe)) { frontend_init()
1636 dvb_frontend_detach(ttusb->fe); frontend_init()
1637 ttusb->fe = NULL; frontend_init()
1785 if (ttusb->fe != NULL) { ttusb_disconnect()
1786 dvb_unregister_frontend(ttusb->fe); ttusb_disconnect()
1787 dvb_frontend_detach(ttusb->fe); ttusb_disconnect()
/linux-4.4.14/drivers/media/pci/pt1/
H A Dva1j5jf8007t.c45 struct dvb_frontend fe; member in struct:va1j5jf8007t_state
49 static int va1j5jf8007t_read_snr(struct dvb_frontend *fe, u16 *snr) va1j5jf8007t_read_snr() argument
58 state = fe->demodulator_priv; va1j5jf8007t_read_snr()
95 static int va1j5jf8007t_get_frontend_algo(struct dvb_frontend *fe) va1j5jf8007t_get_frontend_algo() argument
101 va1j5jf8007t_read_status(struct dvb_frontend *fe, enum fe_status *status) va1j5jf8007t_read_status() argument
105 state = fe->demodulator_priv; va1j5jf8007t_read_status()
167 frequency = state->fe.dtv_property_cache.frequency; va1j5jf8007t_set_frequency()
266 va1j5jf8007t_tune(struct dvb_frontend *fe, va1j5jf8007t_tune() argument
275 state = fe->demodulator_priv; va1j5jf8007t_tune()
399 static int va1j5jf8007t_sleep(struct dvb_frontend *fe) va1j5jf8007t_sleep() argument
404 state = fe->demodulator_priv; va1j5jf8007t_sleep()
413 static int va1j5jf8007t_init(struct dvb_frontend *fe) va1j5jf8007t_init() argument
417 state = fe->demodulator_priv; va1j5jf8007t_init()
423 static void va1j5jf8007t_release(struct dvb_frontend *fe) va1j5jf8007t_release() argument
426 state = fe->demodulator_priv; va1j5jf8007t_release()
464 int va1j5jf8007t_prepare(struct dvb_frontend *fe) va1j5jf8007t_prepare() argument
473 state = fe->demodulator_priv; va1j5jf8007t_prepare()
507 struct dvb_frontend *fe; va1j5jf8007t_attach() local
518 fe = &state->fe; va1j5jf8007t_attach()
519 memcpy(&fe->ops, &va1j5jf8007t_ops, sizeof(struct dvb_frontend_ops)); va1j5jf8007t_attach()
520 fe->demodulator_priv = state; va1j5jf8007t_attach()
535 return fe; va1j5jf8007t_attach()
H A Dva1j5jf8007s.c47 struct dvb_frontend fe; member in struct:va1j5jf8007s_state
51 static int va1j5jf8007s_read_snr(struct dvb_frontend *fe, u16 *snr) va1j5jf8007s_read_snr() argument
60 state = fe->demodulator_priv; va1j5jf8007s_read_snr()
105 static int va1j5jf8007s_get_frontend_algo(struct dvb_frontend *fe) va1j5jf8007s_get_frontend_algo() argument
111 va1j5jf8007s_read_status(struct dvb_frontend *fe, enum fe_status *status) va1j5jf8007s_read_status() argument
115 state = fe->demodulator_priv; va1j5jf8007s_read_status()
181 frequency = state->fe.dtv_property_cache.frequency; va1j5jf8007s_set_frequency_1()
231 frequency = state->fe.dtv_property_cache.frequency; va1j5jf8007s_set_frequency_3()
332 ts_id = state->fe.dtv_property_cache.stream_id; va1j5jf8007s_set_ts_id()
359 ts_id = state->fe.dtv_property_cache.stream_id; va1j5jf8007s_check_ts_id()
387 va1j5jf8007s_tune(struct dvb_frontend *fe, va1j5jf8007s_tune() argument
396 state = fe->demodulator_priv; va1j5jf8007s_tune()
550 static int va1j5jf8007s_sleep(struct dvb_frontend *fe) va1j5jf8007s_sleep() argument
555 state = fe->demodulator_priv; va1j5jf8007s_sleep()
564 static int va1j5jf8007s_init(struct dvb_frontend *fe) va1j5jf8007s_init() argument
568 state = fe->demodulator_priv; va1j5jf8007s_init()
574 static void va1j5jf8007s_release(struct dvb_frontend *fe) va1j5jf8007s_release() argument
577 state = fe->demodulator_priv; va1j5jf8007s_release()
684 int va1j5jf8007s_prepare(struct dvb_frontend *fe) va1j5jf8007s_prepare() argument
689 state = fe->demodulator_priv; va1j5jf8007s_prepare()
707 struct dvb_frontend *fe; va1j5jf8007s_attach() local
718 fe = &state->fe; va1j5jf8007s_attach()
719 memcpy(&fe->ops, &va1j5jf8007s_ops, sizeof(struct dvb_frontend_ops)); va1j5jf8007s_attach()
720 fe->demodulator_priv = state; va1j5jf8007s_attach()
735 return fe; va1j5jf8007s_attach()
H A Dpt1.c102 struct dvb_frontend *fe; member in struct:pt1_adapter
103 int (*orig_set_voltage)(struct dvb_frontend *fe,
105 int (*orig_sleep)(struct dvb_frontend *fe);
106 int (*orig_init)(struct dvb_frontend *fe);
578 static int pt1_set_voltage(struct dvb_frontend *fe, enum fe_sec_voltage voltage) pt1_set_voltage() argument
582 adap = container_of(fe->dvb, struct pt1_adapter, adap); pt1_set_voltage()
587 return adap->orig_set_voltage(fe, voltage); pt1_set_voltage()
592 static int pt1_sleep(struct dvb_frontend *fe) pt1_sleep() argument
596 adap = container_of(fe->dvb, struct pt1_adapter, adap); pt1_sleep()
601 return adap->orig_sleep(fe); pt1_sleep()
606 static int pt1_wakeup(struct dvb_frontend *fe) pt1_wakeup() argument
610 adap = container_of(fe->dvb, struct pt1_adapter, adap); pt1_wakeup()
616 return adap->orig_init(fe); pt1_wakeup()
740 dvb_unregister_frontend(adap->fe); pt1_cleanup_frontend()
743 static int pt1_init_frontend(struct pt1_adapter *adap, struct dvb_frontend *fe) pt1_init_frontend() argument
747 adap->orig_set_voltage = fe->ops.set_voltage; pt1_init_frontend()
748 adap->orig_sleep = fe->ops.sleep; pt1_init_frontend()
749 adap->orig_init = fe->ops.init; pt1_init_frontend()
750 fe->ops.set_voltage = pt1_set_voltage; pt1_init_frontend()
751 fe->ops.sleep = pt1_sleep; pt1_init_frontend()
752 fe->ops.init = pt1_wakeup; pt1_init_frontend()
754 ret = dvb_register_frontend(&adap->adap, fe); pt1_init_frontend()
758 adap->fe = fe; pt1_init_frontend()
823 struct dvb_frontend *fe[4]; pt1_init_frontends() local
834 fe[i] = va1j5jf8007s_attach(&config->va1j5jf8007s_config, pt1_init_frontends()
836 if (!fe[i]) { pt1_init_frontends()
842 fe[i] = va1j5jf8007t_attach(&config->va1j5jf8007t_config, pt1_init_frontends()
844 if (!fe[i]) { pt1_init_frontends()
850 ret = va1j5jf8007s_prepare(fe[i - 2]); pt1_init_frontends()
854 ret = va1j5jf8007t_prepare(fe[i - 1]); pt1_init_frontends()
861 ret = pt1_init_frontend(pt1->adaps[j], fe[j]); pt1_init_frontends()
870 fe[i]->ops.release(fe[i]); pt1_init_frontends()
873 dvb_unregister_frontend(fe[j]); pt1_init_frontends()
/linux-4.4.14/drivers/media/pci/ttpci/
H A Dav7110.c1172 static int av7110_set_tone(struct dvb_frontend *fe, enum fe_sec_tone_mode tone) av7110_set_tone() argument
1174 struct av7110* av7110 = fe->dvb->priv; av7110_set_tone()
1188 static int av7110_diseqc_send_master_cmd(struct dvb_frontend* fe, av7110_diseqc_send_master_cmd() argument
1191 struct av7110* av7110 = fe->dvb->priv; av7110_diseqc_send_master_cmd()
1196 static int av7110_diseqc_send_burst(struct dvb_frontend* fe, av7110_diseqc_send_burst() argument
1199 struct av7110* av7110 = fe->dvb->priv; av7110_diseqc_send_burst()
1422 if (av7110->fe != NULL) { dvb_unregister()
1423 dvb_unregister_frontend(av7110->fe); dvb_unregister()
1424 dvb_frontend_detach(av7110->fe); dvb_unregister()
1570 static int alps_bsrv2_tuner_set_params(struct dvb_frontend *fe) alps_bsrv2_tuner_set_params() argument
1572 struct dtv_frontend_properties *p = &fe->dtv_property_cache; alps_bsrv2_tuner_set_params()
1573 struct av7110* av7110 = fe->dvb->priv; alps_bsrv2_tuner_set_params()
1600 if (fe->ops.i2c_gate_ctrl) alps_bsrv2_tuner_set_params()
1601 fe->ops.i2c_gate_ctrl(fe, 1); alps_bsrv2_tuner_set_params()
1613 static int alps_tdbe2_tuner_set_params(struct dvb_frontend *fe) alps_tdbe2_tuner_set_params() argument
1615 struct dtv_frontend_properties *p = &fe->dtv_property_cache; alps_tdbe2_tuner_set_params()
1616 struct av7110* av7110 = fe->dvb->priv; alps_tdbe2_tuner_set_params()
1628 if (fe->ops.i2c_gate_ctrl) alps_tdbe2_tuner_set_params()
1629 fe->ops.i2c_gate_ctrl(fe, 1); alps_tdbe2_tuner_set_params()
1645 static int grundig_29504_451_tuner_set_params(struct dvb_frontend *fe) grundig_29504_451_tuner_set_params() argument
1647 struct dtv_frontend_properties *p = &fe->dtv_property_cache; grundig_29504_451_tuner_set_params()
1648 struct av7110* av7110 = fe->dvb->priv; grundig_29504_451_tuner_set_params()
1659 if (fe->ops.i2c_gate_ctrl) grundig_29504_451_tuner_set_params()
1660 fe->ops.i2c_gate_ctrl(fe, 1); grundig_29504_451_tuner_set_params()
1672 static int philips_cd1516_tuner_set_params(struct dvb_frontend *fe) philips_cd1516_tuner_set_params() argument
1674 struct dtv_frontend_properties *p = &fe->dtv_property_cache; philips_cd1516_tuner_set_params()
1675 struct av7110* av7110 = fe->dvb->priv; philips_cd1516_tuner_set_params()
1688 if (fe->ops.i2c_gate_ctrl) philips_cd1516_tuner_set_params()
1689 fe->ops.i2c_gate_ctrl(fe, 1); philips_cd1516_tuner_set_params()
1704 static int alps_tdlb7_tuner_set_params(struct dvb_frontend *fe) alps_tdlb7_tuner_set_params() argument
1706 struct dtv_frontend_properties *p = &fe->dtv_property_cache; alps_tdlb7_tuner_set_params()
1707 struct av7110* av7110 = fe->dvb->priv; alps_tdlb7_tuner_set_params()
1724 if (fe->ops.i2c_gate_ctrl) alps_tdlb7_tuner_set_params()
1725 fe->ops.i2c_gate_ctrl(fe, 1); alps_tdlb7_tuner_set_params()
1731 static int alps_tdlb7_request_firmware(struct dvb_frontend* fe, const struct firmware **fw, char* name) alps_tdlb7_request_firmware() argument
1734 struct av7110* av7110 = fe->dvb->priv; alps_tdlb7_request_firmware()
1842 static int nexusca_stv0297_tuner_set_params(struct dvb_frontend *fe) nexusca_stv0297_tuner_set_params() argument
1844 struct dtv_frontend_properties *p = &fe->dtv_property_cache; nexusca_stv0297_tuner_set_params()
1845 struct av7110* av7110 = fe->dvb->priv; nexusca_stv0297_tuner_set_params()
1869 if (fe->ops.i2c_gate_ctrl) nexusca_stv0297_tuner_set_params()
1870 fe->ops.i2c_gate_ctrl(fe, 1); nexusca_stv0297_tuner_set_params()
1878 if (fe->ops.i2c_gate_ctrl) nexusca_stv0297_tuner_set_params()
1879 fe->ops.i2c_gate_ctrl(fe, 1); nexusca_stv0297_tuner_set_params()
1898 static int grundig_29504_401_tuner_set_params(struct dvb_frontend *fe) grundig_29504_401_tuner_set_params() argument
1900 struct dtv_frontend_properties *p = &fe->dtv_property_cache; grundig_29504_401_tuner_set_params()
1901 struct av7110* av7110 = fe->dvb->priv; grundig_29504_401_tuner_set_params()
1934 if (fe->ops.i2c_gate_ctrl) grundig_29504_401_tuner_set_params()
1935 fe->ops.i2c_gate_ctrl(fe, 1); grundig_29504_401_tuner_set_params()
1987 static int av7110_fe_set_frontend(struct dvb_frontend *fe) av7110_fe_set_frontend() argument
1989 struct av7110* av7110 = fe->dvb->priv; av7110_fe_set_frontend()
1993 ret = av7110->fe_set_frontend(fe); av7110_fe_set_frontend()
1998 static int av7110_fe_init(struct dvb_frontend* fe) av7110_fe_init() argument
2000 struct av7110* av7110 = fe->dvb->priv; av7110_fe_init()
2004 ret = av7110->fe_init(fe); av7110_fe_init()
2008 static int av7110_fe_read_status(struct dvb_frontend *fe, av7110_fe_read_status() argument
2011 struct av7110* av7110 = fe->dvb->priv; av7110_fe_read_status()
2014 int ret = av7110->fe_read_status(fe, status); av7110_fe_read_status()
2021 static int av7110_fe_diseqc_reset_overload(struct dvb_frontend* fe) av7110_fe_diseqc_reset_overload() argument
2023 struct av7110* av7110 = fe->dvb->priv; av7110_fe_diseqc_reset_overload()
2027 ret = av7110->fe_diseqc_reset_overload(fe); av7110_fe_diseqc_reset_overload()
2031 static int av7110_fe_diseqc_send_master_cmd(struct dvb_frontend* fe, av7110_fe_diseqc_send_master_cmd() argument
2034 struct av7110* av7110 = fe->dvb->priv; av7110_fe_diseqc_send_master_cmd()
2039 ret = av7110->fe_diseqc_send_master_cmd(fe, cmd); av7110_fe_diseqc_send_master_cmd()
2044 static int av7110_fe_diseqc_send_burst(struct dvb_frontend *fe, av7110_fe_diseqc_send_burst() argument
2047 struct av7110* av7110 = fe->dvb->priv; av7110_fe_diseqc_send_burst()
2052 ret = av7110->fe_diseqc_send_burst(fe, minicmd); av7110_fe_diseqc_send_burst()
2057 static int av7110_fe_set_tone(struct dvb_frontend *fe, av7110_fe_set_tone() argument
2060 struct av7110* av7110 = fe->dvb->priv; av7110_fe_set_tone()
2065 ret = av7110->fe_set_tone(fe, tone); av7110_fe_set_tone()
2070 static int av7110_fe_set_voltage(struct dvb_frontend *fe, av7110_fe_set_voltage() argument
2073 struct av7110* av7110 = fe->dvb->priv; av7110_fe_set_voltage()
2078 ret = av7110->fe_set_voltage(fe, voltage); av7110_fe_set_voltage()
2083 static int av7110_fe_dishnetwork_send_legacy_command(struct dvb_frontend* fe, unsigned long cmd) av7110_fe_dishnetwork_send_legacy_command() argument
2085 struct av7110* av7110 = fe->dvb->priv; av7110_fe_dishnetwork_send_legacy_command()
2089 ret = av7110->fe_dishnetwork_send_legacy_command(fe, cmd); av7110_fe_dishnetwork_send_legacy_command()
2095 av7110_fe_init(av7110->fe); dvb_s_recover()
2097 av7110_fe_set_voltage(av7110->fe, av7110->saved_voltage); dvb_s_recover()
2100 av7110_fe_diseqc_send_master_cmd(av7110->fe, &av7110->saved_master_cmd); dvb_s_recover()
2103 av7110_fe_diseqc_send_burst(av7110->fe, av7110->saved_minicmd); dvb_s_recover()
2105 av7110_fe_set_tone(av7110->fe, av7110->saved_tone); dvb_s_recover()
2107 av7110_fe_set_frontend(av7110->fe); dvb_s_recover()
2130 av7110->fe = dvb_attach(ves1820_attach, &philips_cd1516_config, frontend_init()
2132 if (av7110->fe) { frontend_init()
2133 av7110->fe->ops.tuner_ops.set_params = philips_cd1516_tuner_set_params; frontend_init()
2145 av7110->fe = dvb_attach(ves1x93_attach, &alps_bsrv2_config, &av7110->i2c_adap); frontend_init()
2146 if (av7110->fe) { frontend_init()
2147 av7110->fe->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params; frontend_init()
2148 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; frontend_init()
2149 av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst; frontend_init()
2150 av7110->fe->ops.set_tone = av7110_set_tone; frontend_init()
2156 av7110->fe = dvb_attach(stv0299_attach, &alps_bsru6_config, &av7110->i2c_adap); frontend_init()
2157 if (av7110->fe) { frontend_init()
2158 av7110->fe->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; frontend_init()
2159 av7110->fe->tuner_priv = &av7110->i2c_adap; frontend_init()
2161 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; frontend_init()
2162 av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst; frontend_init()
2163 av7110->fe->ops.set_tone = av7110_set_tone; frontend_init()
2169 av7110->fe = dvb_attach(tda8083_attach, &grundig_29504_451_config, &av7110->i2c_adap); frontend_init()
2170 if (av7110->fe) { frontend_init()
2171 av7110->fe->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params; frontend_init()
2172 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; frontend_init()
2173 av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst; frontend_init()
2174 av7110->fe->ops.set_tone = av7110_set_tone; frontend_init()
2183 av7110->fe = dvb_attach(ves1820_attach, &philips_cd1516_config, &av7110->i2c_adap, frontend_init()
2185 if (av7110->fe) { frontend_init()
2186 av7110->fe->ops.tuner_ops.set_params = philips_cd1516_tuner_set_params; frontend_init()
2191 av7110->fe = dvb_attach(ves1820_attach, &alps_tdbe2_config, &av7110->i2c_adap, frontend_init()
2193 if (av7110->fe) { frontend_init()
2194 av7110->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params; frontend_init()
2202 av7110->fe = dvb_attach(sp8870_attach, &alps_tdlb7_config, &av7110->i2c_adap); frontend_init()
2203 if (av7110->fe) { frontend_init()
2204 av7110->fe->ops.tuner_ops.set_params = alps_tdlb7_tuner_set_params; frontend_init()
2211 av7110->fe = dvb_attach(l64781_attach, &grundig_29504_401_config, &av7110->i2c_adap); frontend_init()
2212 if (av7110->fe) frontend_init()
2213 av7110->fe->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params; frontend_init()
2218 av7110->fe = dvb_attach(ves1820_attach, &alps_tdbe2_config, &av7110->i2c_adap, read_pwm(av7110)); frontend_init()
2219 if (av7110->fe) { frontend_init()
2220 av7110->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params; frontend_init()
2226 av7110->fe = dvb_attach(ves1x93_attach, &alps_bsrv2_config, &av7110->i2c_adap); frontend_init()
2227 if (av7110->fe) { frontend_init()
2228 av7110->fe->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params; frontend_init()
2229 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; frontend_init()
2230 av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst; frontend_init()
2231 av7110->fe->ops.set_tone = av7110_set_tone; frontend_init()
2238 av7110->fe = dvb_attach(tda8083_attach, &grundig_29504_451_config, &av7110->i2c_adap); frontend_init()
2239 if (av7110->fe) { frontend_init()
2240 av7110->fe->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params; frontend_init()
2241 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; frontend_init()
2242 av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst; frontend_init()
2243 av7110->fe->ops.set_tone = av7110_set_tone; frontend_init()
2250 av7110->fe = dvb_attach(stv0297_attach, &nexusca_stv0297_config, &av7110->i2c_adap); frontend_init()
2251 if (av7110->fe) { frontend_init()
2252 av7110->fe->ops.tuner_ops.set_params = nexusca_stv0297_tuner_set_params; frontend_init()
2266 av7110->fe = dvb_attach(stv0299_attach, &alps_bsbe1_config, &av7110->i2c_adap); frontend_init()
2267 if (av7110->fe) { frontend_init()
2268 av7110->fe->ops.tuner_ops.set_params = alps_bsbe1_tuner_set_params; frontend_init()
2269 av7110->fe->tuner_priv = &av7110->i2c_adap; frontend_init()
2271 if (dvb_attach(lnbp21_attach, av7110->fe, &av7110->i2c_adap, 0, 0) == NULL) { frontend_init()
2273 if (av7110->fe->ops.release) frontend_init()
2274 av7110->fe->ops.release(av7110->fe); frontend_init()
2275 av7110->fe = NULL; frontend_init()
2277 av7110->fe->ops.dishnetwork_send_legacy_command = NULL; frontend_init()
2285 if (!av7110->fe) { frontend_init()
2294 FE_FUNC_OVERRIDE(av7110->fe->ops.init, av7110->fe_init, av7110_fe_init); frontend_init()
2295 FE_FUNC_OVERRIDE(av7110->fe->ops.read_status, av7110->fe_read_status, av7110_fe_read_status); frontend_init()
2296 FE_FUNC_OVERRIDE(av7110->fe->ops.diseqc_reset_overload, av7110->fe_diseqc_reset_overload, av7110_fe_diseqc_reset_overload); frontend_init()
2297 FE_FUNC_OVERRIDE(av7110->fe->ops.diseqc_send_master_cmd, av7110->fe_diseqc_send_master_cmd, av7110_fe_diseqc_send_master_cmd); frontend_init()
2298 FE_FUNC_OVERRIDE(av7110->fe->ops.diseqc_send_burst, av7110->fe_diseqc_send_burst, av7110_fe_diseqc_send_burst); frontend_init()
2299 FE_FUNC_OVERRIDE(av7110->fe->ops.set_tone, av7110->fe_set_tone, av7110_fe_set_tone); frontend_init()
2300 FE_FUNC_OVERRIDE(av7110->fe->ops.set_voltage, av7110->fe_set_voltage, av7110_fe_set_voltage); frontend_init()
2301 FE_FUNC_OVERRIDE(av7110->fe->ops.dishnetwork_send_legacy_command, av7110->fe_dishnetwork_send_legacy_command, av7110_fe_dishnetwork_send_legacy_command); frontend_init()
2302 FE_FUNC_OVERRIDE(av7110->fe->ops.set_frontend, av7110->fe_set_frontend, av7110_fe_set_frontend); frontend_init()
2304 ret = dvb_register_frontend(&av7110->dvb_adapter, av7110->fe); frontend_init()
2307 dvb_frontend_detach(av7110->fe); frontend_init()
2308 av7110->fe = NULL; frontend_init()
H A Dbudget.c161 static int siemens_budget_set_voltage(struct dvb_frontend *fe, siemens_budget_set_voltage() argument
164 struct budget* budget = (struct budget*) fe->dvb->priv; siemens_budget_set_voltage()
169 static int budget_set_tone(struct dvb_frontend *fe, budget_set_tone() argument
172 struct budget* budget = (struct budget*) fe->dvb->priv; budget_set_tone()
190 static int budget_diseqc_send_master_cmd(struct dvb_frontend* fe, struct dvb_diseqc_master_cmd* cmd) budget_diseqc_send_master_cmd() argument
192 struct budget* budget = (struct budget*) fe->dvb->priv; budget_diseqc_send_master_cmd()
199 static int budget_diseqc_send_burst(struct dvb_frontend *fe, budget_diseqc_send_burst() argument
202 struct budget* budget = (struct budget*) fe->dvb->priv; budget_diseqc_send_burst()
209 static int alps_bsrv2_tuner_set_params(struct dvb_frontend *fe) alps_bsrv2_tuner_set_params() argument
211 struct dtv_frontend_properties *c = &fe->dtv_property_cache; alps_bsrv2_tuner_set_params()
212 struct budget* budget = (struct budget*) fe->dvb->priv; alps_bsrv2_tuner_set_params()
238 if (fe->ops.i2c_gate_ctrl) alps_bsrv2_tuner_set_params()
239 fe->ops.i2c_gate_ctrl(fe, 1); alps_bsrv2_tuner_set_params()
251 static int alps_tdbe2_tuner_set_params(struct dvb_frontend *fe) alps_tdbe2_tuner_set_params() argument
253 struct dtv_frontend_properties *c = &fe->dtv_property_cache; alps_tdbe2_tuner_set_params()
254 struct budget* budget = (struct budget*) fe->dvb->priv; alps_tdbe2_tuner_set_params()
266 if (fe->ops.i2c_gate_ctrl) alps_tdbe2_tuner_set_params()
267 fe->ops.i2c_gate_ctrl(fe, 1); alps_tdbe2_tuner_set_params()
279 static int grundig_29504_401_tuner_set_params(struct dvb_frontend *fe) grundig_29504_401_tuner_set_params() argument
281 struct dtv_frontend_properties *c = &fe->dtv_property_cache; grundig_29504_401_tuner_set_params()
282 struct budget *budget = fe->dvb->priv; grundig_29504_401_tuner_set_params()
283 u8 *tuner_addr = fe->tuner_priv; grundig_29504_401_tuner_set_params()
321 if (fe->ops.i2c_gate_ctrl) grundig_29504_401_tuner_set_params()
322 fe->ops.i2c_gate_ctrl(fe, 1); grundig_29504_401_tuner_set_params()
337 static int grundig_29504_451_tuner_set_params(struct dvb_frontend *fe) grundig_29504_451_tuner_set_params() argument
339 struct dtv_frontend_properties *c = &fe->dtv_property_cache; grundig_29504_451_tuner_set_params()
340 struct budget* budget = (struct budget*) fe->dvb->priv; grundig_29504_451_tuner_set_params()
351 if (fe->ops.i2c_gate_ctrl) grundig_29504_451_tuner_set_params()
352 fe->ops.i2c_gate_ctrl(fe, 1); grundig_29504_451_tuner_set_params()
361 static int s5h1420_tuner_set_params(struct dvb_frontend *fe) s5h1420_tuner_set_params() argument
363 struct dtv_frontend_properties *c = &fe->dtv_property_cache; s5h1420_tuner_set_params()
364 struct budget* budget = (struct budget*) fe->dvb->priv; s5h1420_tuner_set_params()
383 if (fe->ops.i2c_gate_ctrl) s5h1420_tuner_set_params()
384 fe->ops.i2c_gate_ctrl(fe, 1); s5h1420_tuner_set_params()
423 static int alps_tdhd1_204_request_firmware(struct dvb_frontend *fe, const struct firmware **fw, char *name) alps_tdhd1_204_request_firmware() argument
425 struct budget *budget = (struct budget *)fe->dvb->priv; alps_tdhd1_204_request_firmware()
H A Dbudget-av.c475 static int philips_su1278_ty_ci_set_symbol_rate(struct dvb_frontend *fe, u32 srate, u32 ratio) philips_su1278_ty_ci_set_symbol_rate() argument
495 stv0299_writereg(fe, 0x13, aclk); philips_su1278_ty_ci_set_symbol_rate()
496 stv0299_writereg(fe, 0x14, bclk); philips_su1278_ty_ci_set_symbol_rate()
497 stv0299_writereg(fe, 0x1f, (ratio >> 16) & 0xff); philips_su1278_ty_ci_set_symbol_rate()
498 stv0299_writereg(fe, 0x20, (ratio >> 8) & 0xff); philips_su1278_ty_ci_set_symbol_rate()
499 stv0299_writereg(fe, 0x21, (ratio) & 0xf0); philips_su1278_ty_ci_set_symbol_rate()
500 stv0299_writereg(fe, 0x0f, 0x80 | m1); philips_su1278_ty_ci_set_symbol_rate()
505 static int philips_su1278_ty_ci_tuner_set_params(struct dvb_frontend *fe) philips_su1278_ty_ci_tuner_set_params() argument
507 struct dtv_frontend_properties *c = &fe->dtv_property_cache; philips_su1278_ty_ci_tuner_set_params()
510 struct budget *budget = (struct budget *) fe->dvb->priv; philips_su1278_ty_ci_tuner_set_params()
534 if (fe->ops.i2c_gate_ctrl) philips_su1278_ty_ci_tuner_set_params()
535 fe->ops.i2c_gate_ctrl(fe, 1); philips_su1278_ty_ci_tuner_set_params()
620 static int philips_cu1216_tuner_set_params(struct dvb_frontend *fe) philips_cu1216_tuner_set_params() argument
622 struct dtv_frontend_properties *c = &fe->dtv_property_cache; philips_cu1216_tuner_set_params()
623 struct budget *budget = (struct budget *) fe->dvb->priv; philips_cu1216_tuner_set_params()
641 if (fe->ops.i2c_gate_ctrl) philips_cu1216_tuner_set_params()
642 fe->ops.i2c_gate_ctrl(fe, 1); philips_cu1216_tuner_set_params()
650 if (fe->ops.i2c_gate_ctrl) philips_cu1216_tuner_set_params()
651 fe->ops.i2c_gate_ctrl(fe, 1); philips_cu1216_tuner_set_params()
662 if (fe->ops.i2c_gate_ctrl) philips_cu1216_tuner_set_params()
663 fe->ops.i2c_gate_ctrl(fe, 1); philips_cu1216_tuner_set_params()
685 static int philips_tu1216_tuner_init(struct dvb_frontend *fe) philips_tu1216_tuner_init() argument
687 struct budget *budget = (struct budget *) fe->dvb->priv; philips_tu1216_tuner_init()
692 if (fe->ops.i2c_gate_ctrl) philips_tu1216_tuner_init()
693 fe->ops.i2c_gate_ctrl(fe, 1); philips_tu1216_tuner_init()
701 static int philips_tu1216_tuner_set_params(struct dvb_frontend *fe) philips_tu1216_tuner_set_params() argument
703 struct dtv_frontend_properties *c = &fe->dtv_property_cache; philips_tu1216_tuner_set_params()
704 struct budget *budget = (struct budget *) fe->dvb->priv; philips_tu1216_tuner_set_params()
776 if (fe->ops.i2c_gate_ctrl) philips_tu1216_tuner_set_params()
777 fe->ops.i2c_gate_ctrl(fe, 1); philips_tu1216_tuner_set_params()
785 static int philips_tu1216_request_firmware(struct dvb_frontend *fe, philips_tu1216_request_firmware() argument
788 struct budget *budget = (struct budget *) fe->dvb->priv; philips_tu1216_request_firmware()
847 static int philips_sd1878_ci_set_symbol_rate(struct dvb_frontend *fe, philips_sd1878_ci_set_symbol_rate() argument
868 stv0299_writereg(fe, 0x0e, 0x23); philips_sd1878_ci_set_symbol_rate()
869 stv0299_writereg(fe, 0x0f, 0x94); philips_sd1878_ci_set_symbol_rate()
870 stv0299_writereg(fe, 0x10, 0x39); philips_sd1878_ci_set_symbol_rate()
871 stv0299_writereg(fe, 0x13, aclk); philips_sd1878_ci_set_symbol_rate()
872 stv0299_writereg(fe, 0x14, bclk); philips_sd1878_ci_set_symbol_rate()
873 stv0299_writereg(fe, 0x15, 0xc9); philips_sd1878_ci_set_symbol_rate()
874 stv0299_writereg(fe, 0x1f, (ratio >> 16) & 0xff); philips_sd1878_ci_set_symbol_rate()
875 stv0299_writereg(fe, 0x20, (ratio >> 8) & 0xff); philips_sd1878_ci_set_symbol_rate()
876 stv0299_writereg(fe, 0x21, (ratio) & 0xf0); philips_sd1878_ci_set_symbol_rate()
877 stv0299_writereg(fe, 0x0f, 0x80 | m1); philips_sd1878_ci_set_symbol_rate()
1216 struct dvb_frontend * fe = NULL; frontend_init() local
1250 fe = dvb_attach(stv0299_attach, &cinergy_1200s_1894_0010_config, frontend_init()
1252 if (fe) { frontend_init()
1253 dvb_attach(tua6100_attach, fe, 0x60, &budget_av->budget.i2c_adap); frontend_init()
1256 fe = dvb_attach(stv0299_attach, &typhoon_config, frontend_init()
1258 if (fe) { frontend_init()
1259 fe->ops.tuner_ops.set_params = philips_su1278_ty_ci_tuner_set_params; frontend_init()
1270 fe = dvb_attach(stv0299_attach, &philips_sd1878_config, frontend_init()
1272 if (fe) { frontend_init()
1273 dvb_attach(dvb_pll_attach, fe, 0x60, frontend_init()
1280 fe = dvb_attach(stv0299_attach, &typhoon_config, frontend_init()
1282 if (fe) { frontend_init()
1283 fe->ops.tuner_ops.set_params = philips_su1278_ty_ci_tuner_set_params; frontend_init()
1290 if ((fe = dvb_attach(stb0899_attach, &knc1_dvbs2_config, &budget_av->budget.i2c_adap))) frontend_init()
1291 dvb_attach(tda8261_attach, fe, &sd1878c_config, &budget_av->budget.i2c_adap); frontend_init()
1295 fe = dvb_attach(stv0299_attach, &cinergy_1200s_config, frontend_init()
1297 if (fe) { frontend_init()
1298 fe->ops.tuner_ops.set_params = philips_su1278_ty_ci_tuner_set_params; frontend_init()
1308 fe = dvb_attach(tda10021_attach, &philips_cu1216_config, frontend_init()
1311 if (fe == NULL) frontend_init()
1312 fe = dvb_attach(tda10021_attach, &philips_cu1216_config_altaddress, frontend_init()
1315 if (fe) { frontend_init()
1316 fe->ops.tuner_ops.set_params = philips_cu1216_tuner_set_params; frontend_init()
1327 fe = dvb_attach(tda10023_attach, frontend_init()
1331 if (fe) { frontend_init()
1332 fe->ops.tuner_ops.set_params = philips_cu1216_tuner_set_params; frontend_init()
1341 fe = dvb_attach(tda10046_attach, &philips_tu1216_config, frontend_init()
1343 if (fe) { frontend_init()
1344 fe->ops.tuner_ops.init = philips_tu1216_tuner_init; frontend_init()
1345 fe->ops.tuner_ops.set_params = philips_tu1216_tuner_set_params; frontend_init()
1350 if (fe == NULL) { frontend_init()
1359 budget_av->budget.dvb_frontend = fe; frontend_init()
/linux-4.4.14/fs/ocfs2/
H A Dresize.c102 struct ocfs2_dinode *fe = (struct ocfs2_dinode *) bm_bh->b_data; ocfs2_update_last_group_and_inode() local
103 struct ocfs2_chain_list *cl = &fe->id2.i_chain; ocfs2_update_last_group_and_inode()
155 le32_add_cpu(&fe->id1.bitmap1.i_total, num_bits); ocfs2_update_last_group_and_inode()
156 le32_add_cpu(&fe->i_clusters, new_clusters); ocfs2_update_last_group_and_inode()
160 le32_add_cpu(&fe->id1.bitmap1.i_used, backups); ocfs2_update_last_group_and_inode()
164 OCFS2_I(bm_inode)->ip_clusters = le32_to_cpu(fe->i_clusters); ocfs2_update_last_group_and_inode()
165 le64_add_cpu(&fe->i_size, (u64)new_clusters << osb->s_clustersize_bits); ocfs2_update_last_group_and_inode()
167 i_size_write(bm_inode, le64_to_cpu(fe->i_size)); ocfs2_update_last_group_and_inode()
280 struct ocfs2_dinode *fe = NULL; ocfs2_group_extend() local
312 fe = (struct ocfs2_dinode *)main_bm_bh->b_data; ocfs2_group_extend()
316 BUG_ON(!OCFS2_IS_VALID_DINODE(fe)); ocfs2_group_extend()
318 if (le16_to_cpu(fe->id2.i_chain.cl_cpg) != ocfs2_group_extend()
327 first_new_cluster = le32_to_cpu(fe->i_clusters); ocfs2_group_extend()
331 ret = ocfs2_read_group_descriptor(main_bm_inode, fe, lgd_blkno, ocfs2_group_extend()
339 cl_bpc = le16_to_cpu(fe->id2.i_chain.cl_bpc); ocfs2_group_extend()
341 le16_to_cpu(fe->id2.i_chain.cl_cpg)) { ocfs2_group_extend()
468 struct ocfs2_dinode *fe = NULL; ocfs2_group_add() local
497 fe = (struct ocfs2_dinode *)main_bm_bh->b_data; ocfs2_group_add()
499 if (le16_to_cpu(fe->id2.i_chain.cl_cpg) != ocfs2_group_add()
517 ret = ocfs2_verify_group_and_input(main_bm_inode, fe, input, group_bh); ocfs2_group_add()
533 cl_bpc = le16_to_cpu(fe->id2.i_chain.cl_bpc); ocfs2_group_add()
534 cl = &fe->id2.i_chain; ocfs2_group_add()
566 le32_add_cpu(&fe->id1.bitmap1.i_total, input->clusters *cl_bpc); ocfs2_group_add()
567 le32_add_cpu(&fe->id1.bitmap1.i_used, ocfs2_group_add()
569 le32_add_cpu(&fe->i_clusters, input->clusters); ocfs2_group_add()
574 OCFS2_I(main_bm_inode)->ip_clusters = le32_to_cpu(fe->i_clusters); ocfs2_group_add()
575 le64_add_cpu(&fe->i_size, (u64)input->clusters << osb->s_clustersize_bits); ocfs2_group_add()
577 i_size_write(main_bm_inode, le64_to_cpu(fe->i_size)); ocfs2_group_add()
H A Dinode.c265 void ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe, ocfs2_populate_inode() argument
283 BUG_ON(!OCFS2_IS_VALID_DINODE(fe)); /* This means that read_inode ocfs2_populate_inode()
287 BUG_ON(!(fe->i_flags & cpu_to_le32(OCFS2_VALID_FL))); ocfs2_populate_inode()
288 BUG_ON(le32_to_cpu(fe->i_fs_generation) != osb->fs_generation); ocfs2_populate_inode()
291 OCFS2_I(inode)->ip_clusters = le32_to_cpu(fe->i_clusters); ocfs2_populate_inode()
292 OCFS2_I(inode)->ip_attr = le32_to_cpu(fe->i_attr); ocfs2_populate_inode()
293 OCFS2_I(inode)->ip_dyn_features = le16_to_cpu(fe->i_dyn_features); ocfs2_populate_inode()
296 inode->i_generation = le32_to_cpu(fe->i_generation); ocfs2_populate_inode()
297 inode->i_rdev = huge_decode_dev(le64_to_cpu(fe->id1.dev1.i_rdev)); ocfs2_populate_inode()
298 inode->i_mode = le16_to_cpu(fe->i_mode); ocfs2_populate_inode()
299 i_uid_write(inode, le32_to_cpu(fe->i_uid)); ocfs2_populate_inode()
300 i_gid_write(inode, le32_to_cpu(fe->i_gid)); ocfs2_populate_inode()
303 if (S_ISLNK(inode->i_mode) && !fe->i_clusters) { ocfs2_populate_inode()
310 inode->i_atime.tv_sec = le64_to_cpu(fe->i_atime); ocfs2_populate_inode()
311 inode->i_atime.tv_nsec = le32_to_cpu(fe->i_atime_nsec); ocfs2_populate_inode()
312 inode->i_mtime.tv_sec = le64_to_cpu(fe->i_mtime); ocfs2_populate_inode()
313 inode->i_mtime.tv_nsec = le32_to_cpu(fe->i_mtime_nsec); ocfs2_populate_inode()
314 inode->i_ctime.tv_sec = le64_to_cpu(fe->i_ctime); ocfs2_populate_inode()
315 inode->i_ctime.tv_nsec = le32_to_cpu(fe->i_ctime_nsec); ocfs2_populate_inode()
317 if (OCFS2_I(inode)->ip_blkno != le64_to_cpu(fe->i_blkno)) ocfs2_populate_inode()
321 (unsigned long long)le64_to_cpu(fe->i_blkno)); ocfs2_populate_inode()
323 set_nlink(inode, ocfs2_read_links_count(fe)); ocfs2_populate_inode()
326 le32_to_cpu(fe->i_flags)); ocfs2_populate_inode()
327 if (fe->i_flags & cpu_to_le32(OCFS2_SYSTEM_FL)) { ocfs2_populate_inode()
332 if (fe->i_flags & cpu_to_le32(OCFS2_LOCAL_ALLOC_FL)) { ocfs2_populate_inode()
334 } else if (fe->i_flags & cpu_to_le32(OCFS2_BITMAP_FL)) { ocfs2_populate_inode()
336 } else if (fe->i_flags & cpu_to_le32(OCFS2_QUOTA_FL)) { ocfs2_populate_inode()
338 } else if (fe->i_flags & cpu_to_le32(OCFS2_SUPER_BLOCK_FL)) { ocfs2_populate_inode()
351 i_size_write(inode, le64_to_cpu(fe->i_size)); ocfs2_populate_inode()
359 i_size_write(inode, le64_to_cpu(fe->i_size)); ocfs2_populate_inode()
364 i_size_write(inode, le64_to_cpu(fe->i_size)); ocfs2_populate_inode()
375 le64_to_cpu(fe->i_blkno)); ocfs2_populate_inode()
382 BUG_ON(le32_to_cpu(fe->i_flags) & OCFS2_SYSTEM_FL); ocfs2_populate_inode()
410 struct ocfs2_dinode *fe; ocfs2_read_locked_inode() local
514 fe = (struct ocfs2_dinode *) bh->b_data; ocfs2_read_locked_inode()
521 mlog_bug_on_msg(!!(fe->i_flags & cpu_to_le32(OCFS2_SYSTEM_FL)) != ocfs2_read_locked_inode()
526 if (S_ISCHR(le16_to_cpu(fe->i_mode)) || ocfs2_read_locked_inode()
527 S_ISBLK(le16_to_cpu(fe->i_mode))) ocfs2_read_locked_inode()
528 inode->i_rdev = huge_decode_dev(le64_to_cpu(fe->id1.dev1.i_rdev)); ocfs2_read_locked_inode()
530 ocfs2_populate_inode(inode, fe, 0); ocfs2_read_locked_inode()
532 BUG_ON(args->fi_blkno != le64_to_cpu(fe->i_blkno)); ocfs2_read_locked_inode()
558 struct ocfs2_dinode *fe; ocfs2_truncate_for_delete() local
561 fe = (struct ocfs2_dinode *) fe_bh->b_data; ocfs2_truncate_for_delete()
567 if (fe->i_clusters) { ocfs2_truncate_for_delete()
1266 struct ocfs2_dinode *fe = (struct ocfs2_dinode *) bh->b_data; ocfs2_mark_inode_dirty() local
1278 fe->i_clusters = cpu_to_le32(OCFS2_I(inode)->ip_clusters); ocfs2_mark_inode_dirty()
1280 fe->i_attr = cpu_to_le32(OCFS2_I(inode)->ip_attr); ocfs2_mark_inode_dirty()
1281 fe->i_dyn_features = cpu_to_le16(OCFS2_I(inode)->ip_dyn_features); ocfs2_mark_inode_dirty()
1284 fe->i_size = cpu_to_le64(i_size_read(inode)); ocfs2_mark_inode_dirty()
1285 ocfs2_set_links_count(fe, inode->i_nlink); ocfs2_mark_inode_dirty()
1286 fe->i_uid = cpu_to_le32(i_uid_read(inode)); ocfs2_mark_inode_dirty()
1287 fe->i_gid = cpu_to_le32(i_gid_read(inode)); ocfs2_mark_inode_dirty()
1288 fe->i_mode = cpu_to_le16(inode->i_mode); ocfs2_mark_inode_dirty()
1289 fe->i_atime = cpu_to_le64(inode->i_atime.tv_sec); ocfs2_mark_inode_dirty()
1290 fe->i_atime_nsec = cpu_to_le32(inode->i_atime.tv_nsec); ocfs2_mark_inode_dirty()
1291 fe->i_ctime = cpu_to_le64(inode->i_ctime.tv_sec); ocfs2_mark_inode_dirty()
1292 fe->i_ctime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec); ocfs2_mark_inode_dirty()
1293 fe->i_mtime = cpu_to_le64(inode->i_mtime.tv_sec); ocfs2_mark_inode_dirty()
1294 fe->i_mtime_nsec = cpu_to_le32(inode->i_mtime.tv_nsec); ocfs2_mark_inode_dirty()
1308 struct ocfs2_dinode *fe) ocfs2_refresh_inode()
1312 OCFS2_I(inode)->ip_clusters = le32_to_cpu(fe->i_clusters); ocfs2_refresh_inode()
1313 OCFS2_I(inode)->ip_attr = le32_to_cpu(fe->i_attr); ocfs2_refresh_inode()
1314 OCFS2_I(inode)->ip_dyn_features = le16_to_cpu(fe->i_dyn_features); ocfs2_refresh_inode()
1316 i_size_write(inode, le64_to_cpu(fe->i_size)); ocfs2_refresh_inode()
1317 set_nlink(inode, ocfs2_read_links_count(fe)); ocfs2_refresh_inode()
1318 i_uid_write(inode, le32_to_cpu(fe->i_uid)); ocfs2_refresh_inode()
1319 i_gid_write(inode, le32_to_cpu(fe->i_gid)); ocfs2_refresh_inode()
1320 inode->i_mode = le16_to_cpu(fe->i_mode); ocfs2_refresh_inode()
1321 if (S_ISLNK(inode->i_mode) && le32_to_cpu(fe->i_clusters) == 0) ocfs2_refresh_inode()
1325 inode->i_atime.tv_sec = le64_to_cpu(fe->i_atime); ocfs2_refresh_inode()
1326 inode->i_atime.tv_nsec = le32_to_cpu(fe->i_atime_nsec); ocfs2_refresh_inode()
1327 inode->i_mtime.tv_sec = le64_to_cpu(fe->i_mtime); ocfs2_refresh_inode()
1328 inode->i_mtime.tv_nsec = le32_to_cpu(fe->i_mtime_nsec); ocfs2_refresh_inode()
1329 inode->i_ctime.tv_sec = le64_to_cpu(fe->i_ctime); ocfs2_refresh_inode()
1330 inode->i_ctime.tv_nsec = le32_to_cpu(fe->i_ctime_nsec); ocfs2_refresh_inode()
1307 ocfs2_refresh_inode(struct inode *inode, struct ocfs2_dinode *fe) ocfs2_refresh_inode() argument
/linux-4.4.14/drivers/media/pci/ngene/
H A Dngene-cards.c68 ctl = dvb_attach(stv6110x_attach, chan->fe, tunerconf, i2c); tuner_attach_stv6110()
90 static int drxk_gate_ctrl(struct dvb_frontend *fe, int enable) drxk_gate_ctrl() argument
92 struct ngene_channel *chan = fe->sec_priv; drxk_gate_ctrl()
97 status = chan->gate_ctrl(fe, 1); drxk_gate_ctrl()
99 status = chan->gate_ctrl(fe, 0); drxk_gate_ctrl()
108 struct dvb_frontend *fe; tuner_attach_tda18271() local
111 if (chan->fe->ops.i2c_gate_ctrl) tuner_attach_tda18271()
112 chan->fe->ops.i2c_gate_ctrl(chan->fe, 1); tuner_attach_tda18271()
113 fe = dvb_attach(tda18271c2dd_attach, chan->fe, i2c, 0x60); tuner_attach_tda18271()
114 if (chan->fe->ops.i2c_gate_ctrl) tuner_attach_tda18271()
115 chan->fe->ops.i2c_gate_ctrl(chan->fe, 0); tuner_attach_tda18271()
116 if (!fe) { tuner_attach_tda18271()
147 chan->fe = dvb_attach(stv090x_attach, feconf, i2c, demod_attach_stv0900()
150 if (chan->fe == NULL) { demod_attach_stv0900()
157 chan->fe->analog_demod_priv = chan; demod_attach_stv0900()
159 if (!dvb_attach(lnbh24_attach, chan->fe, i2c, 0, demod_attach_stv0900()
162 dvb_frontend_detach(chan->fe); demod_attach_stv0900()
163 chan->fe = NULL; demod_attach_stv0900()
170 static void cineS2_tuner_i2c_lock(struct dvb_frontend *fe, int lock) cineS2_tuner_i2c_lock() argument
172 struct ngene_channel *chan = fe->analog_demod_priv; cineS2_tuner_i2c_lock()
225 chan->fe = dvb_attach(drxk_attach, &config, i2c); demod_attach_drxk()
226 if (!chan->fe) { demod_attach_drxk()
230 chan->fe->sec_priv = chan; demod_attach_drxk()
231 chan->gate_ctrl = chan->fe->ops.i2c_gate_ctrl; demod_attach_drxk()
232 chan->fe->ops.i2c_gate_ctrl = drxk_gate_ctrl; demod_attach_drxk()
306 chan->fe = dvb_attach(lgdt330x_attach, &aver_m780, &chan->i2c_adapter); demod_attach_lg330x()
307 if (chan->fe == NULL) { demod_attach_lg330x()
312 dvb_attach(mt2131_attach, chan->fe, &chan->i2c_adapter, demod_attach_lg330x()
315 return (chan->fe) ? 0 : -ENODEV; demod_attach_lg330x()
324 chan->fe = dvb_attach(drxd_attach, feconf, chan, demod_attach_drxd()
326 if (!chan->fe) { demod_attach_drxd()
339 if (!dvb_attach(dvb_pll_attach, chan->fe, feconf->pll_address, tuner_attach_dtt7520x()
/linux-4.4.14/drivers/media/common/siano/
H A Dsmsdvb-main.c127 static void smsdvb_stats_not_ready(struct dvb_frontend *fe) smsdvb_stats_not_ready() argument
130 container_of(fe, struct smsdvb_client_t, frontend); smsdvb_stats_not_ready()
132 struct dtv_frontend_properties *c = &fe->dtv_property_cache; smsdvb_stats_not_ready()
226 struct dvb_frontend *fe = &client->frontend; smsdvb_update_tx_params() local
227 struct dtv_frontend_properties *c = &fe->dtv_property_cache; smsdvb_update_tx_params()
243 struct dvb_frontend *fe = &client->frontend; smsdvb_update_per_slices() local
244 struct dtv_frontend_properties *c = &fe->dtv_property_cache; smsdvb_update_per_slices()
283 struct dvb_frontend *fe = &client->frontend; smsdvb_update_dvb_stats() local
284 struct dtv_frontend_properties *c = &fe->dtv_property_cache; smsdvb_update_dvb_stats()
335 struct dvb_frontend *fe = &client->frontend; smsdvb_update_isdbt_stats() local
336 struct dtv_frontend_properties *c = &fe->dtv_property_cache; smsdvb_update_isdbt_stats()
431 struct dvb_frontend *fe = &client->frontend; smsdvb_update_isdbt_stats_ex() local
432 struct dtv_frontend_properties *c = &fe->dtv_property_cache; smsdvb_update_isdbt_stats_ex()
522 struct dvb_frontend *fe = &client->frontend; smsdvb_onresponse() local
523 struct dtv_frontend_properties *c = &fe->dtv_property_cache; smsdvb_onresponse()
602 smsdvb_stats_not_ready(fe); smsdvb_onresponse()
756 static int smsdvb_read_status(struct dvb_frontend *fe, enum fe_status *stat) smsdvb_read_status() argument
760 client = container_of(fe, struct smsdvb_client_t, frontend); smsdvb_read_status()
771 static int smsdvb_read_ber(struct dvb_frontend *fe, u32 *ber) smsdvb_read_ber() argument
776 client = container_of(fe, struct smsdvb_client_t, frontend); smsdvb_read_ber()
787 static int smsdvb_read_signal_strength(struct dvb_frontend *fe, u16 *strength) smsdvb_read_signal_strength() argument
789 struct dtv_frontend_properties *c = &fe->dtv_property_cache; smsdvb_read_signal_strength()
794 client = container_of(fe, struct smsdvb_client_t, frontend); smsdvb_read_signal_strength()
810 static int smsdvb_read_snr(struct dvb_frontend *fe, u16 *snr) smsdvb_read_snr() argument
812 struct dtv_frontend_properties *c = &fe->dtv_property_cache; smsdvb_read_snr()
816 client = container_of(fe, struct smsdvb_client_t, frontend); smsdvb_read_snr()
828 static int smsdvb_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) smsdvb_read_ucblocks() argument
831 struct dtv_frontend_properties *c = &fe->dtv_property_cache; smsdvb_read_ucblocks()
834 client = container_of(fe, struct smsdvb_client_t, frontend); smsdvb_read_ucblocks()
845 static int smsdvb_get_tune_settings(struct dvb_frontend *fe, smsdvb_get_tune_settings() argument
856 static int smsdvb_dvbt_set_frontend(struct dvb_frontend *fe) smsdvb_dvbt_set_frontend() argument
858 struct dtv_frontend_properties *c = &fe->dtv_property_cache; smsdvb_dvbt_set_frontend()
860 container_of(fe, struct smsdvb_client_t, frontend); smsdvb_dvbt_set_frontend()
872 fe->dtv_property_cache.delivery_system = SYS_DVBT; smsdvb_dvbt_set_frontend()
909 smsdvb_read_status(fe, &status); smsdvb_dvbt_set_frontend()
922 static int smsdvb_isdbt_set_frontend(struct dvb_frontend *fe) smsdvb_isdbt_set_frontend() argument
924 struct dtv_frontend_properties *c = &fe->dtv_property_cache; smsdvb_isdbt_set_frontend()
926 container_of(fe, struct smsdvb_client_t, frontend); smsdvb_isdbt_set_frontend()
937 fe->dtv_property_cache.delivery_system = SYS_ISDBT; smsdvb_isdbt_set_frontend()
980 smsdvb_read_status(fe, &status); smsdvb_isdbt_set_frontend()
992 static int smsdvb_set_frontend(struct dvb_frontend *fe) smsdvb_set_frontend() argument
994 struct dtv_frontend_properties *c = &fe->dtv_property_cache; smsdvb_set_frontend()
996 container_of(fe, struct smsdvb_client_t, frontend); smsdvb_set_frontend()
999 smsdvb_stats_not_ready(fe); smsdvb_set_frontend()
1008 return smsdvb_dvbt_set_frontend(fe); smsdvb_set_frontend()
1011 return smsdvb_isdbt_set_frontend(fe); smsdvb_set_frontend()
1018 static int smsdvb_get_frontend(struct dvb_frontend *fe) smsdvb_get_frontend() argument
1023 static int smsdvb_init(struct dvb_frontend *fe) smsdvb_init() argument
1026 container_of(fe, struct smsdvb_client_t, frontend); smsdvb_init()
1034 static int smsdvb_sleep(struct dvb_frontend *fe) smsdvb_sleep() argument
1037 container_of(fe, struct smsdvb_client_t, frontend); smsdvb_sleep()
1047 static void smsdvb_release(struct dvb_frontend *fe) smsdvb_release() argument
/linux-4.4.14/drivers/staging/media/mn88472/
H A Dmn88472.c19 static int mn88472_get_tune_settings(struct dvb_frontend *fe, mn88472_get_tune_settings() argument
26 static int mn88472_set_frontend(struct dvb_frontend *fe) mn88472_set_frontend() argument
28 struct i2c_client *client = fe->demodulator_priv; mn88472_set_frontend()
30 struct dtv_frontend_properties *c = &fe->dtv_property_cache; mn88472_set_frontend()
82 if (fe->ops.tuner_ops.set_params) { mn88472_set_frontend()
83 ret = fe->ops.tuner_ops.set_params(fe); mn88472_set_frontend()
88 if (fe->ops.tuner_ops.get_if_frequency) { mn88472_set_frontend()
89 ret = fe->ops.tuner_ops.get_if_frequency(fe, &if_frequency); mn88472_set_frontend()
221 static int mn88472_read_status(struct dvb_frontend *fe, enum fe_status *status) mn88472_read_status() argument
223 struct i2c_client *client = fe->demodulator_priv; mn88472_read_status()
225 struct dtv_frontend_properties *c = &fe->dtv_property_cache; mn88472_read_status()
278 static int mn88472_init(struct dvb_frontend *fe) mn88472_init() argument
280 struct i2c_client *client = fe->demodulator_priv; mn88472_init()
374 static int mn88472_sleep(struct dvb_frontend *fe) mn88472_sleep() argument
376 struct i2c_client *client = fe->demodulator_priv; mn88472_sleep()
452 if (config->fe == NULL) { mn88472_probe()
514 memcpy(&dev->fe.ops, &mn88472_ops, sizeof(struct dvb_frontend_ops)); mn88472_probe()
515 dev->fe.demodulator_priv = client; mn88472_probe()
516 *config->fe = &dev->fe; mn88472_probe()
/linux-4.4.14/drivers/staging/media/mn88473/
H A Dmn88473.c19 static int mn88473_get_tune_settings(struct dvb_frontend *fe, mn88473_get_tune_settings() argument
26 static int mn88473_set_frontend(struct dvb_frontend *fe) mn88473_set_frontend() argument
28 struct i2c_client *client = fe->demodulator_priv; mn88473_set_frontend()
30 struct dtv_frontend_properties *c = &fe->dtv_property_cache; mn88473_set_frontend()
78 if (fe->ops.tuner_ops.set_params) { mn88473_set_frontend()
79 ret = fe->ops.tuner_ops.set_params(fe); mn88473_set_frontend()
84 if (fe->ops.tuner_ops.get_if_frequency) { mn88473_set_frontend()
85 ret = fe->ops.tuner_ops.get_if_frequency(fe, &if_frequency); mn88473_set_frontend()
170 static int mn88473_read_status(struct dvb_frontend *fe, enum fe_status *status) mn88473_read_status() argument
172 struct i2c_client *client = fe->demodulator_priv; mn88473_read_status()
174 struct dtv_frontend_properties *c = &fe->dtv_property_cache; mn88473_read_status()
238 static int mn88473_init(struct dvb_frontend *fe) mn88473_init() argument
240 struct i2c_client *client = fe->demodulator_priv; mn88473_init()
325 static int mn88473_sleep(struct dvb_frontend *fe) mn88473_sleep() argument
327 struct i2c_client *client = fe->demodulator_priv; mn88473_sleep()
397 if (config->fe == NULL) { mn88473_probe()
460 memcpy(&dev->fe.ops, &mn88473_ops, sizeof(struct dvb_frontend_ops)); mn88473_probe()
461 dev->fe.demodulator_priv = client; mn88473_probe()
462 *config->fe = &dev->fe; mn88473_probe()

Completed in 6467 milliseconds

123