aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends
diff options
context:
space:
mode:
authorAbylay Ospan <aospan@netup.ru>2011-01-02 07:12:00 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-22 03:54:10 -0400
commit78db66e5b2b4ef48eeede17a7159cb0622c7f03d (patch)
treed7dc2ae75ce4817c1e1ab8a52fc7dee44c015087 /drivers/media/dvb/frontends
parent01a475df3d178d9ace345cc81173537970cf93e2 (diff)
[media] stv0367: implement uncorrected blocks counter
Signed-off-by: Abylay Ospan <aospan@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends')
-rw-r--r--drivers/media/dvb/frontends/stv0367.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/media/dvb/frontends/stv0367.c b/drivers/media/dvb/frontends/stv0367.c
index 6d4d49ecbee6..120fed8229a8 100644
--- a/drivers/media/dvb/frontends/stv0367.c
+++ b/drivers/media/dvb/frontends/stv0367.c
@@ -3367,6 +3367,24 @@ static int stv0367cab_read_snr(struct dvb_frontend *fe, u16 *snr)
3367 return 0; 3367 return 0;
3368} 3368}
3369 3369
3370static int stv0367cab_read_ucblcks(struct dvb_frontend *fe, u32 *ucblocks)
3371{
3372 struct stv0367_state *state = fe->demodulator_priv;
3373 int corrected, tscount;
3374
3375 *ucblocks = (stv0367_readreg(state, R367CAB_RS_COUNTER_5) << 8)
3376 | stv0367_readreg(state, R367CAB_RS_COUNTER_4);
3377 corrected = (stv0367_readreg(state, R367CAB_RS_COUNTER_3) << 8)
3378 | stv0367_readreg(state, R367CAB_RS_COUNTER_2);
3379 tscount = (stv0367_readreg(state, R367CAB_RS_COUNTER_2) << 8)
3380 | stv0367_readreg(state, R367CAB_RS_COUNTER_1);
3381
3382 dprintk("%s: uncorrected blocks=%d corrected blocks=%d tscount=%d\n",
3383 __func__, *ucblocks, corrected, tscount);
3384
3385 return 0;
3386};
3387
3370static struct dvb_frontend_ops stv0367cab_ops = { 3388static struct dvb_frontend_ops stv0367cab_ops = {
3371 .info = { 3389 .info = {
3372 .name = "ST STV0367 DVB-C", 3390 .name = "ST STV0367 DVB-C",
@@ -3391,7 +3409,7 @@ static struct dvb_frontend_ops stv0367cab_ops = {
3391/* .read_ber = stv0367cab_read_ber, */ 3409/* .read_ber = stv0367cab_read_ber, */
3392 .read_signal_strength = stv0367cab_read_strength, 3410 .read_signal_strength = stv0367cab_read_strength,
3393 .read_snr = stv0367cab_read_snr, 3411 .read_snr = stv0367cab_read_snr,
3394/* .read_ucblocks = stv0367cab_read_ucblcks,*/ 3412 .read_ucblocks = stv0367cab_read_ucblcks,
3395 .get_tune_settings = stv0367_get_tune_settings, 3413 .get_tune_settings = stv0367_get_tune_settings,
3396}; 3414};
3397 3415