diff options
author | Andrew de Quincy <devnull@localhost> | 2005-06-12 16:50:50 +0000 |
---|---|---|
committer | Andrew de Quincy <devnull@localhost> | 2005-06-12 16:50:50 +0000 |
commit | 368a0978ac3f29b217dbd4b65c169f21277718f6 (patch) | |
tree | 4b64ea2517f6028df0b575fbfc4ef44889327902 /linux/drivers/media/dvb/frontends/s5h1420.c | |
parent | 1999ce4d08b9a327dda73ca2bd99847f293eae72 (diff) | |
download | mediapointer-dvb-s2-368a0978ac3f29b217dbd4b65c169f21277718f6.tar.gz mediapointer-dvb-s2-368a0978ac3f29b217dbd4b65c169f21277718f6.tar.bz2 |
Implement fe status functions
Diffstat (limited to 'linux/drivers/media/dvb/frontends/s5h1420.c')
-rw-r--r-- | linux/drivers/media/dvb/frontends/s5h1420.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/linux/drivers/media/dvb/frontends/s5h1420.c b/linux/drivers/media/dvb/frontends/s5h1420.c index 8d3b42d7d..6a8ede614 100644 --- a/linux/drivers/media/dvb/frontends/s5h1420.c +++ b/linux/drivers/media/dvb/frontends/s5h1420.c @@ -360,32 +360,27 @@ static int s5h1420_read_ber(struct dvb_frontend* fe, u32* ber) { struct s5h1420_state* state = fe->demodulator_priv; - // FIXME - return 0; + s5h1420_writereg(state, 0x46, 0x1d); + mdelay(25); + return (s5h1420_readreg(state, 0x48) << 8) | s5h1420_readreg(state, 0x47); } static int s5h1420_read_signal_strength(struct dvb_frontend* fe, u16* strength) { struct s5h1420_state* state = fe->demodulator_priv; - // FIXME - return 0; -} + u8 val = 0xff - s5h1420_readreg(state, 0x15); -static int s5h1420_read_snr(struct dvb_frontend* fe, u16* snr) -{ - struct s5h1420_state* state = fe->demodulator_priv; - - // FIXME - return 0; + return (int) ((val << 8) | val); } static int s5h1420_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) { struct s5h1420_state* state = fe->demodulator_priv; - // FIXME - return 0; + s5h1420_writereg(state, 0x46, 0x1f); + mdelay(25); + return (s5h1420_readreg(state, 0x48) << 8) | s5h1420_readreg(state, 0x47); } static void s5h1420_reset(struct s5h1420_state* state) @@ -740,7 +735,6 @@ static struct dvb_frontend_ops s5h1420_ops = { .read_status = s5h1420_read_status, .read_ber = s5h1420_read_ber, .read_signal_strength = s5h1420_read_signal_strength, - .read_snr = s5h1420_read_snr, .read_ucblocks = s5h1420_read_ucblocks, .diseqc_send_master_cmd = s5h1420_send_master_cmd, |