@@ -3011,6 +3011,25 @@ static int stv0367ddb_set_frontend(struct dvb_frontend *fe)
return -EINVAL;
}
+static void stv0367ddb_read_signal_strength(struct dvb_frontend *fe)
+{
+ struct stv0367_state *state = fe->demodulator_priv;
+ struct dtv_frontend_properties *p = &fe->dtv_property_cache;
+ s32 signalstrength;
+
+ switch (state->activedemod) {
+ case demod_cab:
+ signalstrength = stv0367cab_get_rf_lvl(state) * 1000;
+ break;
+ default:
+ p->strength.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
+ return;
+ }
+
+ p->strength.stat[0].scale = FE_SCALE_DECIBEL;
+ p->strength.stat[0].uvalue = signalstrength;
+}
+
static void stv0367ddb_read_snr(struct dvb_frontend *fe)
{
struct stv0367_state *state = fe->demodulator_priv;
@@ -3086,6 +3105,8 @@ static int stv0367ddb_read_status(struct dvb_frontend *fe,
if (ret)
return ret;
+ stv0367ddb_read_signal_strength(fe);
+
/* read carrier/noise when a carrier is detected */
if (*status & FE_HAS_CARRIER)
stv0367ddb_read_snr(fe);