aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/dvb/frontends/cx24116.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/drivers/media/dvb/frontends/cx24116.c b/drivers/media/dvb/frontends/cx24116.c
index a62ae5f578b0..9b6c89e93f16 100644
--- a/drivers/media/dvb/frontends/cx24116.c
+++ b/drivers/media/dvb/frontends/cx24116.c
@@ -106,7 +106,7 @@ MODULE_PARM_DESC(debug, "Activates frontend debugging (default:0)");
106#define CX24116_HAS_SYNCLOCK (0x08) 106#define CX24116_HAS_SYNCLOCK (0x08)
107#define CX24116_HAS_UNKNOWN1 (0x10) 107#define CX24116_HAS_UNKNOWN1 (0x10)
108#define CX24116_HAS_UNKNOWN2 (0x20) 108#define CX24116_HAS_UNKNOWN2 (0x20)
109#define CX24116_STATUS_MASK (0x3f) 109#define CX24116_STATUS_MASK (0x0f)
110#define CX24116_SIGNAL_MASK (0xc0) 110#define CX24116_SIGNAL_MASK (0xc0)
111 111
112#define CX24116_DISEQC_TONEOFF (0) /* toneburst never sent */ 112#define CX24116_DISEQC_TONEOFF (0) /* toneburst never sent */
@@ -681,7 +681,8 @@ static int cx24116_read_status(struct dvb_frontend *fe, fe_status_t *status)
681{ 681{
682 struct cx24116_state *state = fe->demodulator_priv; 682 struct cx24116_state *state = fe->demodulator_priv;
683 683
684 int lock = cx24116_readreg(state, CX24116_REG_SSTATUS); 684 int lock = cx24116_readreg(state, CX24116_REG_SSTATUS) &
685 CX24116_STATUS_MASK;
685 686
686 dprintk("%s: status = 0x%02x\n", __func__, lock); 687 dprintk("%s: status = 0x%02x\n", __func__, lock);
687 688
@@ -1430,6 +1431,23 @@ tuned: /* Set/Reset B/W */
1430 return ret; 1431 return ret;
1431} 1432}
1432 1433
1434static int cx24116_tune(struct dvb_frontend *fe, struct dvb_frontend_parameters *params,
1435 unsigned int mode_flags, unsigned int *delay, fe_status_t *status)
1436{
1437 *delay = HZ / 5;
1438 if (params) {
1439 int ret = cx24116_set_frontend(fe, params);
1440 if (ret)
1441 return ret;
1442 }
1443 return cx24116_read_status(fe, status);
1444}
1445
1446static int cx24116_get_algo(struct dvb_frontend *fe)
1447{
1448 return DVBFE_ALGO_HW;
1449}
1450
1433static struct dvb_frontend_ops cx24116_ops = { 1451static struct dvb_frontend_ops cx24116_ops = {
1434 1452
1435 .info = { 1453 .info = {
@@ -1461,6 +1479,8 @@ static struct dvb_frontend_ops cx24116_ops = {
1461 .set_voltage = cx24116_set_voltage, 1479 .set_voltage = cx24116_set_voltage,
1462 .diseqc_send_master_cmd = cx24116_send_diseqc_msg, 1480 .diseqc_send_master_cmd = cx24116_send_diseqc_msg,
1463 .diseqc_send_burst = cx24116_diseqc_send_burst, 1481 .diseqc_send_burst = cx24116_diseqc_send_burst,
1482 .get_frontend_algo = cx24116_get_algo,
1483 .tune = cx24116_tune,
1464 1484
1465 .set_property = cx24116_set_property, 1485 .set_property = cx24116_set_property,
1466 .get_property = cx24116_get_property, 1486 .get_property = cx24116_get_property,