* m88rs2000: LNB voltage control implemented
@ 2012-05-08 8:25 Igor M. Liplianin
2012-05-08 23:37 ` Malcolm Priestley
0 siblings, 1 reply; 2+ messages in thread
From: Igor M. Liplianin @ 2012-05-08 8:25 UTC (permalink / raw)
To: linux-media; +Cc: Mauro Carvalho Chehab, Malcolm Priestley
[-- Attachment #1: Type: text/plain, Size: 103 bytes --]
Trival patch to get it working with my cards stuff.
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
[-- Attachment #2: rs2000volt.patch --]
[-- Type: text/x-patch, Size: 916 bytes --]
diff --git a/drivers/media/dvb/frontends/m88rs2000.c b/drivers/media/dvb/frontends/m88rs2000.c
index 547230d..f6d6e39 100644
--- a/drivers/media/dvb/frontends/m88rs2000.c
+++ b/drivers/media/dvb/frontends/m88rs2000.c
@@ -416,9 +416,25 @@ static int m88rs2000_tab_set(struct m88rs2000_state *state,
static int m88rs2000_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t volt)
{
- deb_info("%s: %s\n", __func__,
- volt == SEC_VOLTAGE_13 ? "SEC_VOLTAGE_13" :
- volt == SEC_VOLTAGE_18 ? "SEC_VOLTAGE_18" : "??");
+ struct m88rs2000_state *state = fe->demodulator_priv;
+ u8 data;
+
+ data = m88rs2000_demod_read(state, 0xb2);
+ data |= 0x03; /* bit0 V/H, bit1 off/on */
+
+ switch (volt) {
+ case SEC_VOLTAGE_18:
+ data &= ~0x03;
+ break;
+ case SEC_VOLTAGE_13:
+ data &= ~0x03;
+ data |= 0x01;
+ break;
+ case SEC_VOLTAGE_OFF:
+ break;
+ }
+
+ m88rs2000_demod_write(state, 0xb2, data);
return 0;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: m88rs2000: LNB voltage control implemented
2012-05-08 8:25 m88rs2000: LNB voltage control implemented Igor M. Liplianin
@ 2012-05-08 23:37 ` Malcolm Priestley
0 siblings, 0 replies; 2+ messages in thread
From: Malcolm Priestley @ 2012-05-08 23:37 UTC (permalink / raw)
To: Igor M. Liplianin; +Cc: linux-media, Mauro Carvalho Chehab
On Tue, 2012-05-08 at 11:25 +0300, Igor M. Liplianin wrote:
> Trival patch to get it working with my cards stuff.
>
> Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Acked-by: Malcolm Priestley <tvboxspy@gmail.com>
> differences between files attachment (rs2000volt.patch)
> diff --git a/drivers/media/dvb/frontends/m88rs2000.c b/drivers/media/dvb/frontends/m88rs2000.c index 547230d..f6d6e39 100644 --- a/drivers/media/dvb/frontends/m88rs2000.c +++ b/drivers/media/dvb/frontends/m88rs2000.c @@ -416,9 +416,25 @@ static int m88rs2000_tab_set(struct m88rs2000_state *state, static int m88rs2000_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t volt) { - deb_info("%s: %s\n", __func__, - volt == SEC_VOLTAGE_13 ? "SEC_VOLTAGE_13" : - volt == SEC_VOLTAGE_18 ? "SEC_VOLTAGE_18" : "??"); + struct m88rs2000_state *state = fe->demodulator_priv; + u8 data; + + data = m88rs2000_demod_read(state, 0xb2); + data |= 0x03; /* bit0 V/H, bit1 off/on */ + + switch (volt) { + case SEC_VOLTAGE_18: + data &= ~0x03; + break; + case SEC_VOLTAGE_13: + data &= ~0x03; + data |= 0x01; + break; + case SEC_VOLTAGE_OFF: + break; + } + + m88rs2000_demod_write(state, 0xb2, data); return 0; }
Regards
Malcolm
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-08 23:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-08 8:25 m88rs2000: LNB voltage control implemented Igor M. Liplianin
2012-05-08 23:37 ` Malcolm Priestley
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.