aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-12-26 10:32:30 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-12-31 06:30:57 -0500
commit6bfc366766e5f81c7f39f36bddd000f336461200 (patch)
tree6025911a4ed720b601e13e7b23aff17907819686 /drivers/media/dvb
parent80b5b7459de18a3038486eda61d74785634feea3 (diff)
[media] s5h1432: 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')
-rw-r--r--drivers/media/dvb/frontends/s5h1432.c29
1 files changed, 11 insertions, 18 deletions
diff --git a/drivers/media/dvb/frontends/s5h1432.c b/drivers/media/dvb/frontends/s5h1432.c
index f22c71e6a7f7..3a9050fffb80 100644
--- a/drivers/media/dvb/frontends/s5h1432.c
+++ b/drivers/media/dvb/frontends/s5h1432.c
@@ -178,9 +178,9 @@ static int s5h1432_set_IF(struct dvb_frontend *fe, u32 ifFreqHz)
178} 178}
179 179
180/* Talk to the demod, set the FEC, GUARD, QAM settings etc */ 180/* Talk to the demod, set the FEC, GUARD, QAM settings etc */
181static int s5h1432_set_frontend(struct dvb_frontend *fe, 181static int s5h1432_set_frontend(struct dvb_frontend *fe)
182 struct dvb_frontend_parameters *p)
183{ 182{
183 struct dtv_frontend_properties *p = &fe->dtv_property_cache;
184 u32 dvb_bandwidth = 8; 184 u32 dvb_bandwidth = 8;
185 struct s5h1432_state *state = fe->demodulator_priv; 185 struct s5h1432_state *state = fe->demodulator_priv;
186 186
@@ -191,16 +191,16 @@ static int s5h1432_set_frontend(struct dvb_frontend *fe,
191 fe->ops.tuner_ops.set_params(fe); 191 fe->ops.tuner_ops.set_params(fe);
192 msleep(300); 192 msleep(300);
193 s5h1432_set_channel_bandwidth(fe, dvb_bandwidth); 193 s5h1432_set_channel_bandwidth(fe, dvb_bandwidth);
194 switch (p->u.ofdm.bandwidth) { 194 switch (p->bandwidth_hz) {
195 case BANDWIDTH_6_MHZ: 195 case 6000000:
196 dvb_bandwidth = 6; 196 dvb_bandwidth = 6;
197 s5h1432_set_IF(fe, IF_FREQ_4_MHZ); 197 s5h1432_set_IF(fe, IF_FREQ_4_MHZ);
198 break; 198 break;
199 case BANDWIDTH_7_MHZ: 199 case 7000000:
200 dvb_bandwidth = 7; 200 dvb_bandwidth = 7;
201 s5h1432_set_IF(fe, IF_FREQ_4_MHZ); 201 s5h1432_set_IF(fe, IF_FREQ_4_MHZ);
202 break; 202 break;
203 case BANDWIDTH_8_MHZ: 203 case 8000000:
204 dvb_bandwidth = 8; 204 dvb_bandwidth = 8;
205 s5h1432_set_IF(fe, IF_FREQ_4_MHZ); 205 s5h1432_set_IF(fe, IF_FREQ_4_MHZ);
206 break; 206 break;
@@ -215,16 +215,16 @@ static int s5h1432_set_frontend(struct dvb_frontend *fe,
215 s5h1432_writereg(state, S5H1432_I2C_TOP_ADDR, 0x09, 0x1b); 215 s5h1432_writereg(state, S5H1432_I2C_TOP_ADDR, 0x09, 0x1b);
216 216
217 s5h1432_set_channel_bandwidth(fe, dvb_bandwidth); 217 s5h1432_set_channel_bandwidth(fe, dvb_bandwidth);
218 switch (p->u.ofdm.bandwidth) { 218 switch (p->bandwidth_hz) {
219 case BANDWIDTH_6_MHZ: 219 case 6000000:
220 dvb_bandwidth = 6; 220 dvb_bandwidth = 6;
221 s5h1432_set_IF(fe, IF_FREQ_4_MHZ); 221 s5h1432_set_IF(fe, IF_FREQ_4_MHZ);
222 break; 222 break;
223 case BANDWIDTH_7_MHZ: 223 case 7000000:
224 dvb_bandwidth = 7; 224 dvb_bandwidth = 7;
225 s5h1432_set_IF(fe, IF_FREQ_4_MHZ); 225 s5h1432_set_IF(fe, IF_FREQ_4_MHZ);
226 break; 226 break;
227 case BANDWIDTH_8_MHZ: 227 case 8000000:
228 dvb_bandwidth = 8; 228 dvb_bandwidth = 8;
229 s5h1432_set_IF(fe, IF_FREQ_4_MHZ); 229 s5h1432_set_IF(fe, IF_FREQ_4_MHZ);
230 break; 230 break;
@@ -329,12 +329,6 @@ static int s5h1432_read_ber(struct dvb_frontend *fe, u32 *ber)
329 return 0; 329 return 0;
330} 330}
331 331
332static int s5h1432_get_frontend(struct dvb_frontend *fe,
333 struct dvb_frontend_parameters *p)
334{
335 return 0;
336}
337
338static int s5h1432_get_tune_settings(struct dvb_frontend *fe, 332static int s5h1432_get_tune_settings(struct dvb_frontend *fe,
339 struct dvb_frontend_tune_settings *tune) 333 struct dvb_frontend_tune_settings *tune)
340{ 334{
@@ -396,8 +390,7 @@ static struct dvb_frontend_ops s5h1432_ops = {
396 390
397 .init = s5h1432_init, 391 .init = s5h1432_init,
398 .sleep = s5h1432_sleep, 392 .sleep = s5h1432_sleep,
399 .set_frontend_legacy = s5h1432_set_frontend, 393 .set_frontend = s5h1432_set_frontend,
400 .get_frontend_legacy = s5h1432_get_frontend,
401 .get_tune_settings = s5h1432_get_tune_settings, 394 .get_tune_settings = s5h1432_get_tune_settings,
402 .read_status = s5h1432_read_status, 395 .read_status = s5h1432_read_status,
403 .read_ber = s5h1432_read_ber, 396 .read_ber = s5h1432_read_ber,