Commit 0249ef16 authored by Manu Abraham's avatar Manu Abraham Committed by Mauro Carvalho Chehab

V4L/DVB (4160): Use device specific algorithms

Signed-off-by: default avatarManu Abraham <manu@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 8cfba630
...@@ -72,6 +72,8 @@ MODULE_PARM_DESC(dvb_powerdown_on_sleep, "0: do not power down, 1: turn LNB volt ...@@ -72,6 +72,8 @@ MODULE_PARM_DESC(dvb_powerdown_on_sleep, "0: do not power down, 1: turn LNB volt
#define FESTATE_SEARCHING_FAST (FESTATE_TUNING_FAST | FESTATE_ZIGZAG_FAST) #define FESTATE_SEARCHING_FAST (FESTATE_TUNING_FAST | FESTATE_ZIGZAG_FAST)
#define FESTATE_SEARCHING_SLOW (FESTATE_TUNING_SLOW | FESTATE_ZIGZAG_SLOW) #define FESTATE_SEARCHING_SLOW (FESTATE_TUNING_SLOW | FESTATE_ZIGZAG_SLOW)
#define FESTATE_LOSTLOCK (FESTATE_ZIGZAG_FAST | FESTATE_ZIGZAG_SLOW) #define FESTATE_LOSTLOCK (FESTATE_ZIGZAG_FAST | FESTATE_ZIGZAG_SLOW)
#define FE_ALGO_HW 1
/* /*
* FESTATE_IDLE. No tuning parameters have been supplied and the loop is idling. * FESTATE_IDLE. No tuning parameters have been supplied and the loop is idling.
* FESTATE_RETUNE. Parameters have been supplied, but we have not yet performed the first tune. * FESTATE_RETUNE. Parameters have been supplied, but we have not yet performed the first tune.
...@@ -554,7 +556,7 @@ static int dvb_frontend_thread(void *data) ...@@ -554,7 +556,7 @@ static int dvb_frontend_thread(void *data)
} }
/* do an iteration of the tuning loop */ /* do an iteration of the tuning loop */
if (fe->ops.tune) { if (fe->ops.get_frontend_algo(fe) == FE_ALGO_HW) {
/* have we been asked to retune? */ /* have we been asked to retune? */
params = NULL; params = NULL;
if (fepriv->state & FESTATE_RETUNE) { if (fepriv->state & FESTATE_RETUNE) {
......
...@@ -102,6 +102,8 @@ struct dvb_frontend_ops { ...@@ -102,6 +102,8 @@ struct dvb_frontend_ops {
unsigned int mode_flags, unsigned int mode_flags,
int *delay, int *delay,
fe_status_t *status); fe_status_t *status);
/* get frontend tuning algorithm from the module */
int (*get_frontend_algo)(struct dvb_frontend *fe);
/* these two are only used for the swzigzag code */ /* these two are only used for the swzigzag code */
int (*set_frontend)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params); int (*set_frontend)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment