1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20static int tda8261_get_frequency(struct dvb_frontend *fe, u32 *frequency)
21{
22 struct dvb_frontend_ops *frontend_ops = &fe->ops;
23 struct dvb_tuner_ops *tuner_ops = &frontend_ops->tuner_ops;
24 int err = 0;
25
26 if (tuner_ops->get_frequency) {
27 err = tuner_ops->get_frequency(fe, frequency);
28 if (err < 0) {
29 pr_err("%s: Invalid parameter\n", __func__);
30 return err;
31 }
32 pr_debug("%s: Frequency=%d\n", __func__, *frequency);
33 }
34 return 0;
35}
36
37static int tda8261_set_frequency(struct dvb_frontend *fe, u32 frequency)
38{
39 struct dvb_frontend_ops *frontend_ops = &fe->ops;
40 struct dvb_tuner_ops *tuner_ops = &frontend_ops->tuner_ops;
41 struct dtv_frontend_properties *c = &fe->dtv_property_cache;
42 int err = 0;
43
44 if (tuner_ops->set_params) {
45 err = tuner_ops->set_params(fe);
46 if (err < 0) {
47 pr_err("%s: Invalid parameter\n", __func__);
48 return err;
49 }
50 }
51 pr_debug("%s: Frequency=%d\n", __func__, c->frequency);
52 return 0;
53}
54
55static int tda8261_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth)
56{
57
58 *bandwidth = 40000000;
59
60 return 0;
61}
62