Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330984
b: refs/heads/master
c: db32d74
h: refs/heads/master
v: v3
  • Loading branch information
Antti Palosaari authored and Mauro Carvalho Chehab committed Sep 15, 2012
1 parent 971e541 commit d28a1b9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 73983497ff816109e2739ad23ace06fd42c552e9
refs/heads/master: db32d74a0e5fa2b25b6bdbd1cb3f69045538c956
19 changes: 19 additions & 0 deletions trunk/drivers/media/dvb-frontends/rtl2832.c
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,24 @@ static int rtl2832_read_snr(struct dvb_frontend *fe, u16 *snr)
return ret;
}

static int rtl2832_read_ber(struct dvb_frontend *fe, u32 *ber)
{
struct rtl2832_priv *priv = fe->demodulator_priv;
int ret;
u8 buf[2];

ret = rtl2832_rd_regs(priv, 0x4e, 3, buf, 2);
if (ret)
goto err;

*ber = buf[0] << 8 | buf[1];

return 0;
err:
dbg("%s: failed=%d", __func__, ret);
return ret;
}

static struct dvb_frontend_ops rtl2832_ops;

static void rtl2832_release(struct dvb_frontend *fe)
Expand Down Expand Up @@ -909,6 +927,7 @@ static struct dvb_frontend_ops rtl2832_ops = {

.read_status = rtl2832_read_status,
.read_snr = rtl2832_read_snr,
.read_ber = rtl2832_read_ber,

.i2c_gate_ctrl = rtl2832_i2c_gate_ctrl,
};
Expand Down

0 comments on commit d28a1b9

Please sign in to comment.