Commit bad32ae4 authored by Bradford Love's avatar Bradford Love Committed by Hans Verkuil
Browse files

media: xc5000: Add rf strength function



Without a rf strength function implemented, analog lock
cannot be detected by standardized command line tools.

Signed-off-by: default avatarBradford Love <brad@nextdimension.cc>
Signed-off-by: default avatarHans Verkuil <hverkuil+cisco@kernel.org>
parent 36200241
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -1333,6 +1333,15 @@ static int xc5000_set_config(struct dvb_frontend *fe, void *priv_cfg)
}


static int xc5000_get_rf_strength(struct dvb_frontend *fe, u16 *rssi)
{
	struct xc5000_priv *priv = fe->tuner_priv;

	dprintk(1, "%s()\n", __func__);

	return xc_get_lock_status(priv, rssi);
}

static const struct dvb_tuner_ops xc5000_tuner_ops = {
	.info = {
		.name              = "Xceive XC5000",
@@ -1353,7 +1362,8 @@ static const struct dvb_tuner_ops xc5000_tuner_ops = {
	.get_frequency	   = xc5000_get_frequency,
	.get_if_frequency  = xc5000_get_if_frequency,
	.get_bandwidth	   = xc5000_get_bandwidth,
	.get_status	   = xc5000_get_status
	.get_status	   = xc5000_get_status,
	.get_rf_strength   = xc5000_get_rf_strength,
};

struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe,