1
0
mirror of https://github.com/DigitalDevices/dddvb.git synced 2023-10-10 13:37:43 +02:00

get frontend info at appropriate places

This commit is contained in:
Ralph Metzler 2018-01-16 23:55:21 +01:00
parent e19f29dbfa
commit 402a822751

View File

@ -547,6 +547,7 @@ static int get_snr(struct dvb_frontend *fe)
struct dtv_frontend_properties *p = &fe->dtv_property_cache; struct dtv_frontend_properties *p = &fe->dtv_property_cache;
s32 snr; s32 snr;
get_info(fe);
p->cnr.len = 1; p->cnr.len = 1;
p->cnr.stat[0].scale = FE_SCALE_DECIBEL; p->cnr.stat[0].scale = FE_SCALE_DECIBEL;
p->cnr.stat[0].svalue = (s64) state->signal_info.dvbs2_signal_info.signal_to_noise * 100; p->cnr.stat[0].svalue = (s64) state->signal_info.dvbs2_signal_info.signal_to_noise * 100;
@ -559,6 +560,7 @@ static int get_strength(struct dvb_frontend *fe)
struct dtv_frontend_properties *p = &fe->dtv_property_cache; struct dtv_frontend_properties *p = &fe->dtv_property_cache;
s32 str; s32 str;
get_info(fe);
str = 100000 - (state->signal_info.dvbs2_signal_info.channel_power * 10 + 108750); str = 100000 - (state->signal_info.dvbs2_signal_info.channel_power * 10 + 108750);
p->strength.len = 1; p->strength.len = 1;
p->strength.stat[0].scale = FE_SCALE_DECIBEL; p->strength.stat[0].scale = FE_SCALE_DECIBEL;