From: Abylay Ospan <aospan@netup.ru>
To: mchehab@infradead.org, linux-media@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 3/5 v2] stv0367: implement uncorrected blocks counter.
Date: Sun, 02 Jan 2011 16:47:31 +0000 [thread overview]
Message-ID: <4D20AC23.1080609@netup.ru> (raw)
Signed-off-by: Abylay Ospan <aospan@netup.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 b85b9b9..67301a3 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
reply other threads:[~2011-01-02 16:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D20AC23.1080609@netup.ru \
--to=aospan@netup.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.