[<prev] [next>] [day] [month] [year] [list]
Message-ID: <4d1d6adc.857a0e0a.45e5.ffffd91e@mx.google.com>
Date: Sat, 28 Aug 2010 16:06:25 +0300
From: Abylay Ospan <liplianin@...by>
To: <mchehab@...radead.org>, linux-media@...r.kernel.org,
<linux-kernel@...r.kernel.org>, <aospan@...up.ru>
Subject: [PATCH 12/18] stv0367: implement uncorrected blocks counter.
Signed-off-by: Abylay Ospan <aospan@...up.ru>
---
drivers/media/dvb/frontends/stv0367.c | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/drivers/media/dvb/frontends/stv0367.c b/drivers/media/dvb/frontends/stv0367.c
index 9439388..aaa2b44 100644
--- a/drivers/media/dvb/frontends/stv0367.c
+++ b/drivers/media/dvb/frontends/stv0367.c
@@ -3327,6 +3327,24 @@ static int stv0367cab_read_snr(struct dvb_frontend *fe, u16 *snr)
return 0;
}
+static int stv0367cab_read_ucblcks(struct dvb_frontend *fe, u32 *ucblocks)
+{
+ struct stv0367_state *state = fe->demodulator_priv;
+ int corrected, tscount;
+
+ *ucblocks = (stv0367_readreg(state, R367CAB_RS_COUNTER_5) << 8)
+ | stv0367_readreg(state, R367CAB_RS_COUNTER_4);
+ corrected = (stv0367_readreg(state, R367CAB_RS_COUNTER_3) << 8)
+ | stv0367_readreg(state, R367CAB_RS_COUNTER_2);
+ tscount = (stv0367_readreg(state, R367CAB_RS_COUNTER_2) << 8)
+ | stv0367_readreg(state, R367CAB_RS_COUNTER_1);
+
+ dprintk("%s: uncorrected blocks=%d corrected blocks=%d tscount=%d\n",
+ __func__, *ucblocks, corrected, tscount);
+
+ return 0;
+};
+
static struct dvb_frontend_ops stv0367cab_ops = {
.info = {
.name = "ST STV0367 DVB-C",
@@ -3351,7 +3369,7 @@ static struct dvb_frontend_ops stv0367cab_ops = {
/* .read_ber = stv0367cab_read_ber,*/
.read_signal_strength = stv0367cab_read_strength,
.read_snr = stv0367cab_read_snr,
-/* .read_ucblocks = stv0367cab_read_ucblcks,*/
+ .read_ucblocks = stv0367cab_read_ucblcks,
.get_tune_settings = stv0367_get_tune_settings,
};
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists