diff mbox

[3/5,v2] stv0367: implement uncorrected blocks counter.

Message ID 4D20AC23.1080609@netup.ru (mailing list archive)
State Changes Requested
Headers show

Commit Message

Abylai Ospan Jan. 2, 2011, 4:47 p.m. UTC
None
diff mbox

Patch

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 = {