Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 366601
b: refs/heads/master
c: 0c189fa
h: refs/heads/master
i:
  366599: 11a7c56
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Mar 21, 2013
1 parent 8d368fb commit f513880
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a51fea4fdbf1c8151f55029c82f850cbd335ff29
refs/heads/master: 0c189fa69ed3d9c08d6f1db845c6fd174c92c429
19 changes: 18 additions & 1 deletion trunk/drivers/media/common/siano/smsdvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ static int smsdvb_isdbt_set_frontend(struct dvb_frontend *fe)
int board_id = smscore_get_board_id(client->coredev);
struct sms_board *board = sms_get_board(board_id);
enum sms_device_type_st type = board->type;

int ret;
struct {
struct SmsMsgHdr_ST Msg;
u32 Data[4];
Expand Down Expand Up @@ -695,6 +695,23 @@ static int smsdvb_isdbt_set_frontend(struct dvb_frontend *fe)
c->frequency, c->isdbt_sb_segment_count,
c->isdbt_sb_segment_idx);

/* 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 didn't 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);
}
Expand Down

0 comments on commit f513880

Please sign in to comment.