From 80f8b9aa0f0cf148985ce859b07551f2391a46e2 Mon Sep 17 00:00:00 2001 From: Devin Heitmueller Date: Mon, 20 Oct 2008 10:19:07 -0300 Subject: [PATCH] --- yaml --- r: 117055 b: refs/heads/master c: 50eac6bc466f69e1ecb3a1b64346ed7b979547ac h: refs/heads/master i: 117053: 20ad7c5a1971aa666ec66dfc2714b4d6ac263457 117051: 82b271cfa46e491e910c0e4bb876622756c7454e 117047: a423cf0c0440afc99db0f89c6af391cbcf479346 117039: b049053651ac5d8b53fb422a2645c7cb0c95b143 117023: ae1241bc0ee0fc17dee74cf3e1806a00bd26e098 116991: 3bf053d1b61a10caac5e093468b22da1910ed97d v: v3 --- [refs] | 2 +- trunk/drivers/media/dvb/frontends/s5h1411.c | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 5d4dad04f6e4..f01f95301adf 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f0d041e50bc6c8a677922d72b010f80af9b23b18 +refs/heads/master: 50eac6bc466f69e1ecb3a1b64346ed7b979547ac diff --git a/trunk/drivers/media/dvb/frontends/s5h1411.c b/trunk/drivers/media/dvb/frontends/s5h1411.c index 40e0fedf381e..b9ac6d35a1eb 100644 --- a/trunk/drivers/media/dvb/frontends/s5h1411.c +++ b/trunk/drivers/media/dvb/frontends/s5h1411.c @@ -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; @@ -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__); @@ -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; @@ -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);