Sometimes, we need to control the Low Noise Amplifier (LNA)
at the antena, in order to get a signal. This is dependent on
the way the tuner is connected to the antena, and if the antena
has support for it.
Add a logic at the code to set it. By default, LNA will be in auto
mode, with is the DVB core's default.
Enabling or disabling it is just a matter of changing parms->lna.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
struct dtv_property dvb_prop[DTV_MAX_COMMAND];
int legacy_fe;
struct dvb_v5_stats stats;
+ int lna;
/* Satellite specific stuff, specified by the library client */
const struct dvb_sat_lnb *lnb;
parms->sat_number = -1;
parms->abort = 0;
parms->logfunc = logfunc;
+ parms->lna = LNA_AUTO;
if (ioctl(fd, FE_GET_INFO, &parms->info) == -1) {
dvb_perror("FE_GET_INFO");
memset(&prop, 0, sizeof(prop));
prop.props = tmp_parms.dvb_prop;
prop.num = tmp_parms.n_props;
+ prop.props[prop.num].cmd = DTV_LNA;
+ prop.props[prop.num].u.data = parms->lna;
+ prop.num++;
prop.props[prop.num].cmd = DTV_TUNE;
prop.num++;
dvb_fe_prt_parms(parms);
return -1;
}
+ if (parms->lna != LNA_AUTO && parms->verbose)
+ dvb_logdbg("LNA is %s", parms->lna ? "ON" : "OFF");
+
return 0;
}
/* DVBv3 call */