diff options
author | Daniel Scheller <d.scheller@gmx.net> | 2017-07-23 06:13:10 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-08-20 07:13:19 -0400 |
commit | 448461af0e19ca2cc91694f41735c87854df4dd9 (patch) | |
tree | 6c2aa10e44f289dbe322f4e1322a66efe30ec8c1 /drivers/media/dvb-frontends/stv0910.c | |
parent | 399196ed0643c1067e19bb116e05608d3d5ecff3 (diff) | |
download | op-kernel-dev-448461af0e19ca2cc91694f41735c87854df4dd9.zip op-kernel-dev-448461af0e19ca2cc91694f41735c87854df4dd9.tar.gz |
media: dvb-frontends/stv0910: implement diseqc_send_burst
This implements the diseqc_send_burst frontend op to support sending
mini-DISEQC bursts. Picked up from dddvb's driver package where this
specific block was disabled via #if 0/#endif, but is still working
according to feedback from upstream, so add it.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/dvb-frontends/stv0910.c')
-rw-r--r-- | drivers/media/dvb-frontends/stv0910.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/media/dvb-frontends/stv0910.c b/drivers/media/dvb-frontends/stv0910.c index b596ec5..17c7170 100644 --- a/drivers/media/dvb-frontends/stv0910.c +++ b/drivers/media/dvb-frontends/stv0910.c @@ -1638,6 +1638,27 @@ static int send_master_cmd(struct dvb_frontend *fe, return 0; } +static int send_burst(struct dvb_frontend *fe, enum fe_sec_mini_cmd burst) +{ + struct stv *state = fe->demodulator_priv; + u16 offs = state->nr ? 0x40 : 0; + u8 value; + + if (burst == SEC_MINI_A) { + write_reg(state, RSTV0910_P1_DISTXCFG + offs, 0x3F); + value = 0x00; + } else { + write_reg(state, RSTV0910_P1_DISTXCFG + offs, 0x3E); + value = 0xFF; + } + wait_dis(state, 0x40, 0x00); + write_reg(state, RSTV0910_P1_DISTXFIFO + offs, value); + write_reg(state, RSTV0910_P1_DISTXCFG + offs, 0x3A); + wait_dis(state, 0x20, 0x20); + + return 0; +} + static int sleep(struct dvb_frontend *fe) { struct stv *state = fe->demodulator_priv; @@ -1673,6 +1694,7 @@ static struct dvb_frontend_ops stv0910_ops = { .set_tone = set_tone, .diseqc_send_master_cmd = send_master_cmd, + .diseqc_send_burst = send_burst, }; static struct stv_base *match_base(struct i2c_adapter *i2c, u8 adr) |