Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 117055
b: refs/heads/master
c: 50eac6b
h: refs/heads/master
i:
  117053: 20ad7c5
  117051: 82b271c
  117047: a423cf0
  117039: b049053
  117023: ae1241b
  116991: 3bf053d
v: v3
  • Loading branch information
Devin Heitmueller authored and Mauro Carvalho Chehab committed Oct 21, 2008
1 parent 1a3d16c commit 80f8b9a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f0d041e50bc6c8a677922d72b010f80af9b23b18
refs/heads/master: 50eac6bc466f69e1ecb3a1b64346ed7b979547ac
13 changes: 13 additions & 0 deletions trunk/drivers/media/dvb/frontends/s5h1411.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ struct s5h1411_state {
struct dvb_frontend frontend;

fe_modulation_t current_modulation;
unsigned int first_tune:1;

u32 current_frequency;
int if_freq;
Expand Down Expand Up @@ -489,6 +490,12 @@ static int s5h1411_enable_modulation(struct dvb_frontend *fe,

dprintk("%s(0x%08x)\n", __func__, m);

if ((state->first_tune == 0) && (m == state->current_modulation)) {
dprintk("%s() Already at desired modulation. Skipping...\n",
__func__);
return 0;
}

switch (m) {
case VSB_8:
dprintk("%s() VSB_8\n", __func__);
Expand All @@ -513,6 +520,7 @@ static int s5h1411_enable_modulation(struct dvb_frontend *fe,
}

state->current_modulation = m;
state->first_tune = 0;
s5h1411_softreset(fe);

return 0;
Expand Down Expand Up @@ -622,6 +630,11 @@ static int s5h1411_init(struct dvb_frontend *fe)
/* The datasheet says that after initialisation, VSB is default */
state->current_modulation = VSB_8;

/* Although the datasheet says it's in VSB, empirical evidence
shows problems getting lock on the first tuning request. Make
sure we call enable_modulation the first time around */
state->first_tune = 1;

if (state->config->output_mode == S5H1411_SERIAL_OUTPUT)
/* Serial */
s5h1411_set_serialmode(fe, 1);
Expand Down

0 comments on commit 80f8b9a

Please sign in to comment.