Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124253
b: refs/heads/master
c: 851a909
h: refs/heads/master
i:
  124251: 0b0971c
v: v3
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Dec 29, 2008
1 parent c7d2cd7 commit 045a305
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 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: 7a6fbed650cc329ba7094af3278deaea0c80bd7b
refs/heads/master: 851a90914346b9a3b1afc0ae9c1ed2eb3dae9b5a
2 changes: 1 addition & 1 deletion trunk/drivers/media/dvb/siano/smscoreapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ struct smsdvb_client_t {
struct dvb_frontend frontend;

fe_status_t fe_status;
int fe_ber, fe_snr, fe_signal_strength;
int fe_ber, fe_snr, fe_unc, fe_signal_strength;

struct completion tune_done, stat_done;

Expand Down
15 changes: 15 additions & 0 deletions trunk/drivers/media/dvb/siano/smsdvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}

Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 045a305

Please sign in to comment.