diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-12-16 00:56:08 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:43:00 -0400 |
commit | d54093afb1eaa34ff0026cfcf72f471b9bf77e8a (patch) | |
tree | 1a2722b37e0448cac754c2c7c009f0ff48a6648e /drivers/media/dvb/siano/smsdvb.c | |
parent | b72857dd457b96de653b19b3c40394dac6285819 (diff) |
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, | |||
262 | struct SmsMsgHdr_ST Msg; | 262 | struct SmsMsgHdr_ST Msg; |
263 | u32 Data[3]; | 263 | u32 Data[3]; |
264 | } Msg; | 264 | } Msg; |
265 | int ret; | ||
265 | 266 | ||
266 | Msg.Msg.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; | 267 | Msg.Msg.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; |
267 | Msg.Msg.msgDstId = HIF_TASK; | 268 | Msg.Msg.msgDstId = HIF_TASK; |
@@ -282,6 +283,24 @@ static int smsdvb_set_frontend(struct dvb_frontend *fe, | |||
282 | default: return -EINVAL; | 283 | default: return -EINVAL; |
283 | } | 284 | } |
284 | 285 | ||
286 | /* Disable LNA, if any. An error is returned if no LNA is present */ | ||
287 | ret = sms_board_lna_control(client->coredev, 0); | ||
288 | if (ret == 0) { | ||
289 | fe_status_t status; | ||
290 | |||
291 | /* tune with LNA off at first */ | ||
292 | ret = smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg), | ||
293 | &client->tune_done); | ||
294 | |||
295 | smsdvb_read_status(fe, &status); | ||
296 | |||
297 | if (status & FE_HAS_LOCK) | ||
298 | return ret; | ||
299 | |||
300 | /* previous tune didnt lock - enable LNA and tune again */ | ||
301 | sms_board_lna_control(client->coredev, 1); | ||
302 | } | ||
303 | |||
285 | return smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg), | 304 | return smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg), |
286 | &client->tune_done); | 305 | &client->tune_done); |
287 | } | 306 | } |