]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
media: xc5000: Add rf strength function
authorBradford Love <brad@nextdimension.cc>
Thu, 12 Mar 2026 21:35:24 +0000 (16:35 -0500)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Tue, 17 Mar 2026 09:50:19 +0000 (10:50 +0100)
Without a rf strength function implemented, analog lock
cannot be detected by standardized command line tools.

Signed-off-by: Bradford Love <brad@nextdimension.cc>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/tuners/xc5000.c

index a28481edd22ed0568c93cc55321fad95845899f8..1a9c4574a8e8e4f3e540c81294074b470ba2b526 100644 (file)
@@ -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,