Lines Matching +full:high +full:- +full:bandwidth

1 // SPDX-License-Identifier: GPL-2.0-or-later
33 kfree(fe->tuner_priv); in tda826x_release()
34 fe->tuner_priv = NULL; in tda826x_release()
39 struct tda826x_priv *priv = fe->tuner_priv; in tda826x_sleep()
42 struct i2c_msg msg = { .addr = priv->i2c_address, .flags = 0, .buf = buf, .len = 2 }; in tda826x_sleep()
46 if (!priv->has_loopthrough) in tda826x_sleep()
49 if (fe->ops.i2c_gate_ctrl) in tda826x_sleep()
50 fe->ops.i2c_gate_ctrl(fe, 1); in tda826x_sleep()
51 if ((ret = i2c_transfer (priv->i2c, &msg, 1)) != 1) { in tda826x_sleep()
54 if (fe->ops.i2c_gate_ctrl) in tda826x_sleep()
55 fe->ops.i2c_gate_ctrl(fe, 0); in tda826x_sleep()
62 struct dtv_frontend_properties *p = &fe->dtv_property_cache; in tda826x_set_params()
63 struct tda826x_priv *priv = fe->tuner_priv; in tda826x_set_params()
67 u32 bandwidth; in tda826x_set_params() local
69 struct i2c_msg msg = { .addr = priv->i2c_address, .flags = 0, .buf = buf, .len = 11 }; in tda826x_set_params()
73 div = (p->frequency + (1000-1)) / 1000; in tda826x_set_params()
77 ksyms = p->symbol_rate / 1000; in tda826x_set_params()
78 bandwidth = (878 * ksyms + 6500000) / 1000000 + 1; in tda826x_set_params()
79 if (bandwidth < 5) in tda826x_set_params()
80 bandwidth = 5; in tda826x_set_params()
81 else if (bandwidth > 36) in tda826x_set_params()
82 bandwidth = 36; in tda826x_set_params()
86 if (!priv->has_loopthrough) in tda826x_set_params()
91 buf[5] = ((bandwidth - 5) << 3) | 7; /* baseband cut-off */ in tda826x_set_params()
93 buf[7] = 0x83; // charge pumps at high, tests off in tda826x_set_params()
98 if (fe->ops.i2c_gate_ctrl) in tda826x_set_params()
99 fe->ops.i2c_gate_ctrl(fe, 1); in tda826x_set_params()
100 if ((ret = i2c_transfer (priv->i2c, &msg, 1)) != 1) { in tda826x_set_params()
103 if (fe->ops.i2c_gate_ctrl) in tda826x_set_params()
104 fe->ops.i2c_gate_ctrl(fe, 0); in tda826x_set_params()
106 priv->frequency = div * 1000; in tda826x_set_params()
113 struct tda826x_priv *priv = fe->tuner_priv; in tda826x_get_frequency()
114 *frequency = priv->frequency; in tda826x_get_frequency()
142 if (fe->ops.i2c_gate_ctrl) in tda826x_attach()
143 fe->ops.i2c_gate_ctrl(fe, 1); in tda826x_attach()
145 if (fe->ops.i2c_gate_ctrl) in tda826x_attach()
146 fe->ops.i2c_gate_ctrl(fe, 0); in tda826x_attach()
157 priv->i2c_address = addr; in tda826x_attach()
158 priv->i2c = i2c; in tda826x_attach()
159 priv->has_loopthrough = has_loopthrough; in tda826x_attach()
161 memcpy(&fe->ops.tuner_ops, &tda826x_tuner_ops, sizeof(struct dvb_tuner_ops)); in tda826x_attach()
163 fe->tuner_priv = priv; in tda826x_attach()