]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
V4L/DVB: af9013: program tuner before demodulator
authorAntti Palosaari <crope@iki.fi>
Wed, 16 Jun 2010 19:43:40 +0000 (16:43 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 2 Aug 2010 19:43:11 +0000 (16:43 -0300)
Program tuner before demodulator in case of channel set. Earlier it was
programmed during demodulator programming. This seems to resolve weird
error where demodulator misses sometimes ability to gain lock.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/frontends/af9013.c

index 12e018b4107daec6758c7571ef3bb3bd4e244159..c85ab3e31773f59bd198ce3e50aedffc8901ab69 100644 (file)
@@ -761,6 +761,10 @@ static int af9013_set_frontend(struct dvb_frontend *fe,
 
        state->frequency = params->frequency;
 
+       /* program tuner */
+       if (fe->ops.tuner_ops.set_params)
+               fe->ops.tuner_ops.set_params(fe, params);
+
        /* program CFOE coefficients */
        ret = af9013_set_coeff(state, params->u.ofdm.bandwidth);
        if (ret)
@@ -791,10 +795,6 @@ static int af9013_set_frontend(struct dvb_frontend *fe,
        if (ret)
                goto error;
 
-       /* program tuner */
-       if (fe->ops.tuner_ops.set_params)
-               fe->ops.tuner_ops.set_params(fe, params);
-
        /* program TPS and bandwidth, check if auto mode needed */
        ret = af9013_set_ofdm_params(state, &params->u.ofdm, &auto_mode);
        if (ret)