diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-12-16 02:56:08 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 12:43:00 -0300 |
commit | d54093afb1eaa34ff0026cfcf72f471b9bf77e8a (patch) | |
tree | 1a2722b37e0448cac754c2c7c009f0ff48a6648e /drivers/media/dvb/siano/smsdvb.c | |
parent | b72857dd457b96de653b19b3c40394dac6285819 (diff) | |
download | blackbird-op-linux-d54093afb1eaa34ff0026cfcf72f471b9bf77e8a.tar.gz blackbird-op-linux-d54093afb1eaa34ff0026cfcf72f471b9bf77e8a.zip |
V4L/DVB (10746): sms1xxx: enable rf switch on Hauppauge Tiger devices
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/siano/smsdvb.c')
-rw-r--r-- | drivers/media/dvb/siano/smsdvb.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/media/dvb/siano/smsdvb.c b/drivers/media/dvb/siano/smsdvb.c index 2da953a4f4f5..0a7af92b66aa 100644 --- a/drivers/media/dvb/siano/smsdvb.c +++ b/drivers/media/dvb/siano/smsdvb.c @@ -262,6 +262,7 @@ static int smsdvb_set_frontend(struct dvb_frontend *fe, struct SmsMsgHdr_ST Msg; u32 Data[3]; } Msg; + int ret; Msg.Msg.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; Msg.Msg.msgDstId = HIF_TASK; @@ -282,6 +283,24 @@ static int smsdvb_set_frontend(struct dvb_frontend *fe, default: return -EINVAL; } + /* Disable LNA, if any. An error is returned if no LNA is present */ + ret = sms_board_lna_control(client->coredev, 0); + if (ret == 0) { + fe_status_t status; + + /* tune with LNA off at first */ + ret = smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg), + &client->tune_done); + + smsdvb_read_status(fe, &status); + + if (status & FE_HAS_LOCK) + return ret; + + /* previous tune didnt lock - enable LNA and tune again */ + sms_board_lna_control(client->coredev, 1); + } + return smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg), &client->tune_done); } |