aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2014-09-06 10:24:14 -0400
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-09-21 18:50:35 -0400
commit2db4d179e16d0fcc1ece25798a8e140fa4f9c18a (patch)
tree98e8384f1671061976e27c71650ad3bf11b84219 /drivers/media
parentd4d6a34d36b1e72d0c5cf470a41fc7bc79acd73f (diff)
[media] af9033: init DVBv5 statistics
We need to init supported stats here in order signal app which stats are supported. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb-frontends/af9033.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/media/dvb-frontends/af9033.c b/drivers/media/dvb-frontends/af9033.c
index be5002af70f7..63a89c1c59ff 100644
--- a/drivers/media/dvb-frontends/af9033.c
+++ b/drivers/media/dvb-frontends/af9033.c
@@ -238,6 +238,7 @@ static u32 af9033_div(struct af9033_dev *dev, u32 a, u32 b, u32 x)
238static int af9033_init(struct dvb_frontend *fe) 238static int af9033_init(struct dvb_frontend *fe)
239{ 239{
240 struct af9033_dev *dev = fe->demodulator_priv; 240 struct af9033_dev *dev = fe->demodulator_priv;
241 struct dtv_frontend_properties *c = &fe->dtv_property_cache;
241 int ret, i, len; 242 int ret, i, len;
242 const struct reg_val *init; 243 const struct reg_val *init;
243 u8 buf[4]; 244 u8 buf[4];
@@ -448,6 +449,19 @@ static int af9033_init(struct dvb_frontend *fe)
448 } 449 }
449 450
450 dev->bandwidth_hz = 0; /* force to program all parameters */ 451 dev->bandwidth_hz = 0; /* force to program all parameters */
452 /* init stats here in order signal app which stats are supported */
453 c->strength.len = 1;
454 c->strength.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
455 c->cnr.len = 1;
456 c->cnr.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
457 c->block_count.len = 1;
458 c->block_count.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
459 c->block_error.len = 1;
460 c->block_error.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
461 c->post_bit_count.len = 1;
462 c->post_bit_count.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
463 c->post_bit_error.len = 1;
464 c->post_bit_error.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
451 /* start statistics polling */ 465 /* start statistics polling */
452 schedule_delayed_work(&dev->stat_work, msecs_to_jiffies(2000)); 466 schedule_delayed_work(&dev->stat_work, msecs_to_jiffies(2000));
453 467