summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/siano/smsdvb.c
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-11-22 14:56:37 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-29 17:53:41 -0200
commit851a90914346b9a3b1afc0ae9c1ed2eb3dae9b5a (patch)
tree6229d96d0866a24d838bc5c135a3e91591082ab4 /drivers/media/dvb/siano/smsdvb.c
parent7a6fbed650cc329ba7094af3278deaea0c80bd7b (diff)
downloadblackbird-op-linux-851a90914346b9a3b1afc0ae9c1ed2eb3dae9b5a.tar.gz
blackbird-op-linux-851a90914346b9a3b1afc0ae9c1ed2eb3dae9b5a.zip
V4L/DVB (9738): sms1xxx: fix invalid unc readings
Add function smsdvb_read_ucblocks to report uncorrectable error counts. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/siano/smsdvb.c')
-rw-r--r--drivers/media/dvb/siano/smsdvb.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/media/dvb/siano/smsdvb.c b/drivers/media/dvb/siano/smsdvb.c
index 54144a374946..adf00b989c12 100644
--- a/drivers/media/dvb/siano/smsdvb.c
+++ b/drivers/media/dvb/siano/smsdvb.c
@@ -60,6 +60,7 @@ static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb)
client->fe_snr = p->Stat.SNR;
client->fe_ber = p->Stat.BER;
+ client->fe_unc = p->Stat.BERErrorCount;
if (p->Stat.InBandPwr < -95)
client->fe_signal_strength = 0;
@@ -72,6 +73,7 @@ static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb)
client->fe_status = 0;
client->fe_snr =
client->fe_ber =
+ client->fe_unc =
client->fe_signal_strength = 0;
}
@@ -217,6 +219,18 @@ static int smsdvb_read_snr(struct dvb_frontend *fe, u16 *snr)
return rc;
}
+static int smsdvb_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks)
+{
+ struct smsdvb_client_t *client =
+ container_of(fe, struct smsdvb_client_t, frontend);
+ int rc = smsdvb_send_statistics_request(client);
+
+ if (!rc)
+ *ucblocks = client->fe_unc;
+
+ return rc;
+}
+
static int smsdvb_get_tune_settings(struct dvb_frontend *fe,
struct dvb_frontend_tune_settings *tune)
{
@@ -329,6 +343,7 @@ static struct dvb_frontend_ops smsdvb_fe_ops = {
.read_ber = smsdvb_read_ber,
.read_signal_strength = smsdvb_read_signal_strength,
.read_snr = smsdvb_read_snr,
+ .read_ucblocks = smsdvb_read_ucblocks,
.init = smsdvb_init,
.sleep = smsdvb_sleep,
OpenPOWER on IntegriCloud