diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-12-26 08:15:30 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-12-31 06:18:05 -0500 |
commit | 41943eaf15b1e18f3800e39d3356f409048c5d41 (patch) | |
tree | ec4d32991101e54ea5ca13691a2b9da637337ae8 /drivers/media/dvb/frontends/ec100.c | |
parent | d53b5102e3bb4a20ad63fbf16ff1638ea42d648d (diff) |
[media] ec100: convert set_fontend to use DVBv5 parameters
Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.
Also, fill the supported delivery systems at dvb_frontend_ops
struct.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/ec100.c')
-rw-r--r-- | drivers/media/dvb/frontends/ec100.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/media/dvb/frontends/ec100.c b/drivers/media/dvb/frontends/ec100.c index 20decd704b8f..39e08112c5d1 100644 --- a/drivers/media/dvb/frontends/ec100.c +++ b/drivers/media/dvb/frontends/ec100.c | |||
@@ -76,15 +76,15 @@ static int ec100_read_reg(struct ec100_state *state, u8 reg, u8 *val) | |||
76 | return 0; | 76 | return 0; |
77 | } | 77 | } |
78 | 78 | ||
79 | static int ec100_set_frontend(struct dvb_frontend *fe, | 79 | static int ec100_set_frontend(struct dvb_frontend *fe) |
80 | struct dvb_frontend_parameters *params) | ||
81 | { | 80 | { |
81 | struct dtv_frontend_properties *c = &fe->dtv_property_cache; | ||
82 | struct ec100_state *state = fe->demodulator_priv; | 82 | struct ec100_state *state = fe->demodulator_priv; |
83 | int ret; | 83 | int ret; |
84 | u8 tmp, tmp2; | 84 | u8 tmp, tmp2; |
85 | 85 | ||
86 | deb_info("%s: freq:%d bw:%d\n", __func__, params->frequency, | 86 | deb_info("%s: freq:%d bw:%d\n", __func__, c->frequency, |
87 | params->u.ofdm.bandwidth); | 87 | c->bandwidth_hz); |
88 | 88 | ||
89 | /* program tuner */ | 89 | /* program tuner */ |
90 | if (fe->ops.tuner_ops.set_params) | 90 | if (fe->ops.tuner_ops.set_params) |
@@ -108,16 +108,16 @@ static int ec100_set_frontend(struct dvb_frontend *fe, | |||
108 | B 0x1b | 0xb7 | 0x00 | 0x49 | 108 | B 0x1b | 0xb7 | 0x00 | 0x49 |
109 | B 0x1c | 0x55 | 0x64 | 0x72 */ | 109 | B 0x1c | 0x55 | 0x64 | 0x72 */ |
110 | 110 | ||
111 | switch (params->u.ofdm.bandwidth) { | 111 | switch (c->bandwidth_hz) { |
112 | case BANDWIDTH_6_MHZ: | 112 | case 6000000: |
113 | tmp = 0xb7; | 113 | tmp = 0xb7; |
114 | tmp2 = 0x55; | 114 | tmp2 = 0x55; |
115 | break; | 115 | break; |
116 | case BANDWIDTH_7_MHZ: | 116 | case 7000000: |
117 | tmp = 0x00; | 117 | tmp = 0x00; |
118 | tmp2 = 0x64; | 118 | tmp2 = 0x64; |
119 | break; | 119 | break; |
120 | case BANDWIDTH_8_MHZ: | 120 | case 8000000: |
121 | default: | 121 | default: |
122 | tmp = 0x49; | 122 | tmp = 0x49; |
123 | tmp2 = 0x72; | 123 | tmp2 = 0x72; |
@@ -306,6 +306,7 @@ error: | |||
306 | EXPORT_SYMBOL(ec100_attach); | 306 | EXPORT_SYMBOL(ec100_attach); |
307 | 307 | ||
308 | static struct dvb_frontend_ops ec100_ops = { | 308 | static struct dvb_frontend_ops ec100_ops = { |
309 | .delsys = { SYS_DVBT }, | ||
309 | .info = { | 310 | .info = { |
310 | .name = "E3C EC100 DVB-T", | 311 | .name = "E3C EC100 DVB-T", |
311 | .type = FE_OFDM, | 312 | .type = FE_OFDM, |
@@ -321,7 +322,7 @@ static struct dvb_frontend_ops ec100_ops = { | |||
321 | }, | 322 | }, |
322 | 323 | ||
323 | .release = ec100_release, | 324 | .release = ec100_release, |
324 | .set_frontend_legacy = ec100_set_frontend, | 325 | .set_frontend = ec100_set_frontend, |
325 | .get_tune_settings = ec100_get_tune_settings, | 326 | .get_tune_settings = ec100_get_tune_settings, |
326 | .read_status = ec100_read_status, | 327 | .read_status = ec100_read_status, |
327 | .read_ber = ec100_read_ber, | 328 | .read_ber = ec100_read_ber, |