aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/bt8xx
diff options
context:
space:
mode:
authorAndrew de Quincey <adq_dvb@lidskialf.net>2006-01-09 12:25:07 -0500
committerMauro Carvalho Chehab <mchehab@brturbo.com.br>2006-01-09 12:25:07 -0500
commit36cb557a2f64513e2fdc1a542167e5e8a6c1c67e (patch)
tree02822705dd0bafb191f4fe26fb3f28ef876b1429 /drivers/media/dvb/bt8xx
parent47f3692096eef208d8cb455bfa2b3308cdfc40de (diff)
DVB (2444): Implement frontend-specific tuning and the ability to disable zigzag
- Implement frontend-specific tuning and the ability to disable zigzag Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'drivers/media/dvb/bt8xx')
-rw-r--r--drivers/media/dvb/bt8xx/dst.c52
1 files changed, 31 insertions, 21 deletions
diff --git a/drivers/media/dvb/bt8xx/dst.c b/drivers/media/dvb/bt8xx/dst.c
index 8977c7a313df..3a2ff1cc24b7 100644
--- a/drivers/media/dvb/bt8xx/dst.c
+++ b/drivers/media/dvb/bt8xx/dst.c
@@ -1341,30 +1341,40 @@ static int dst_read_snr(struct dvb_frontend *fe, u16 *snr)
1341 return 0; 1341 return 0;
1342} 1342}
1343 1343
1344static int dst_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_parameters *p) 1344static int dst_set_frontend(struct dvb_frontend* fe,
1345 struct dvb_frontend_parameters* p,
1346 unsigned int mode_flags,
1347 int *delay,
1348 fe_status_t *status)
1345{ 1349{
1346 struct dst_state *state = fe->demodulator_priv; 1350 struct dst_state *state = fe->demodulator_priv;
1347 1351
1348 dst_set_freq(state, p->frequency); 1352 if (p != NULL) {
1349 dprintk(verbose, DST_DEBUG, 1, "Set Frequency=[%d]", p->frequency); 1353 dst_set_freq(state, p->frequency);
1354 dprintk(verbose, DST_DEBUG, 1, "Set Frequency=[%d]", p->frequency);
1350 1355
1351 if (state->dst_type == DST_TYPE_IS_SAT) { 1356 if (state->dst_type == DST_TYPE_IS_SAT) {
1352 if (state->type_flags & DST_TYPE_HAS_OBS_REGS) 1357 if (state->type_flags & DST_TYPE_HAS_OBS_REGS)
1353 dst_set_inversion(state, p->inversion); 1358 dst_set_inversion(state, p->inversion);
1354 dst_set_fec(state, p->u.qpsk.fec_inner); 1359 dst_set_fec(state, p->u.qpsk.fec_inner);
1355 dst_set_symbolrate(state, p->u.qpsk.symbol_rate); 1360 dst_set_symbolrate(state, p->u.qpsk.symbol_rate);
1356 dst_set_polarization(state); 1361 dst_set_polarization(state);
1357 dprintk(verbose, DST_DEBUG, 1, "Set Symbolrate=[%d]", p->u.qpsk.symbol_rate); 1362 dprintk(verbose, DST_DEBUG, 1, "Set Symbolrate=[%d]", p->u.qpsk.symbol_rate);
1358 1363
1359 } else if (state->dst_type == DST_TYPE_IS_TERR) 1364 } else if (state->dst_type == DST_TYPE_IS_TERR)
1360 dst_set_bandwidth(state, p->u.ofdm.bandwidth); 1365 dst_set_bandwidth(state, p->u.ofdm.bandwidth);
1361 else if (state->dst_type == DST_TYPE_IS_CABLE) { 1366 else if (state->dst_type == DST_TYPE_IS_CABLE) {
1362 dst_set_fec(state, p->u.qam.fec_inner); 1367 dst_set_fec(state, p->u.qam.fec_inner);
1363 dst_set_symbolrate(state, p->u.qam.symbol_rate); 1368 dst_set_symbolrate(state, p->u.qam.symbol_rate);
1364 dst_set_modulation(state, p->u.qam.modulation); 1369 dst_set_modulation(state, p->u.qam.modulation);
1370 }
1371 dst_write_tuna(fe);
1365 } 1372 }
1366 dst_write_tuna(fe);
1367 1373
1374 if (!(mode_flags & FE_TUNE_MODE_ONESHOT))
1375 dst_read_status(fe, status);
1376
1377 *delay = HZ/10;
1368 return 0; 1378 return 0;
1369} 1379}
1370 1380
@@ -1445,7 +1455,7 @@ static struct dvb_frontend_ops dst_dvbt_ops = {
1445 1455
1446 .release = dst_release, 1456 .release = dst_release,
1447 .init = dst_init, 1457 .init = dst_init,
1448 .set_frontend = dst_set_frontend, 1458 .tune = dst_set_frontend,
1449 .get_frontend = dst_get_frontend, 1459 .get_frontend = dst_get_frontend,
1450 .read_status = dst_read_status, 1460 .read_status = dst_read_status,
1451 .read_signal_strength = dst_read_signal_strength, 1461 .read_signal_strength = dst_read_signal_strength,
@@ -1469,7 +1479,7 @@ static struct dvb_frontend_ops dst_dvbs_ops = {
1469 1479
1470 .release = dst_release, 1480 .release = dst_release,
1471 .init = dst_init, 1481 .init = dst_init,
1472 .set_frontend = dst_set_frontend, 1482 .tune = dst_set_frontend,
1473 .get_frontend = dst_get_frontend, 1483 .get_frontend = dst_get_frontend,
1474 .read_status = dst_read_status, 1484 .read_status = dst_read_status,
1475 .read_signal_strength = dst_read_signal_strength, 1485 .read_signal_strength = dst_read_signal_strength,
@@ -1496,7 +1506,7 @@ static struct dvb_frontend_ops dst_dvbc_ops = {
1496 1506
1497 .release = dst_release, 1507 .release = dst_release,
1498 .init = dst_init, 1508 .init = dst_init,
1499 .set_frontend = dst_set_frontend, 1509 .tune = dst_set_frontend,
1500 .get_frontend = dst_get_frontend, 1510 .get_frontend = dst_get_frontend,
1501 .read_status = dst_read_status, 1511 .read_status = dst_read_status,
1502 .read_signal_strength = dst_read_signal_strength, 1512 .read_signal_strength = dst_read_signal_strength,