Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 366707
b: refs/heads/master
c: f35d09d
h: refs/heads/master
i:
  366705: 7dd277e
  366703: 6d8b53e
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Mar 22, 2013
1 parent 300ba4b commit a17f839
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d7104bffcfb7a1a7f1dbb1274443e339588c2cb3
refs/heads/master: f35d09db0e61009679e41cc5afa2d205b99c3816
9 changes: 6 additions & 3 deletions trunk/drivers/media/common/siano/smsdvb-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <asm/div64.h>

#include "dmxdev.h"
#include "dvbdev.h"
Expand Down Expand Up @@ -244,6 +245,7 @@ static void smsdvb_update_per_slices(struct smsdvb_client_t *client,
{
struct dvb_frontend *fe = &client->frontend;
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
u64 tmp;

client->fe_status = sms_to_status(p->is_demod_locked, p->is_rf_locked);
c->modulation = sms_to_modulation(p->constellation);
Expand Down Expand Up @@ -272,8 +274,9 @@ static void smsdvb_update_per_slices(struct smsdvb_client_t *client,
c->post_bit_count.stat[0].uvalue += p->ber_bit_count;

/* Legacy PER/BER */
client->legacy_per = (p->ets_packets * 65535) /
(p->ts_packets + p->ets_packets);
tmp = p->ets_packets * 65535;
do_div(tmp, p->ts_packets + p->ets_packets);
client->legacy_per = tmp;
}

static void smsdvb_update_dvb_stats(struct smsdvb_client_t *client,
Expand Down Expand Up @@ -803,7 +806,7 @@ static int smsdvb_read_snr(struct dvb_frontend *fe, u16 *snr)
rc = smsdvb_send_statistics_request(client);

/* Preferred scale for SNR with legacy API: 0.1 dB */
*snr = c->cnr.stat[0].svalue / 100;
*snr = ((u32)c->cnr.stat[0].svalue) / 100;

led_feedback(client);

Expand Down

0 comments on commit a17f839

Please sign in to comment.