aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-12-22 19:20:31 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-12-31 05:27:58 -0500
commit8579881bb617cd81559f36523cf5bdcde26af6f7 (patch)
tree3a4167ee459eed3e68725e142ef678db8e702baa
parent27b7faf13af878807ebff04322cad74b053510b4 (diff)
[media] zl10039: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to set the tuner Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/dvb/frontends/zl10039.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/dvb/frontends/zl10039.c b/drivers/media/dvb/frontends/zl10039.c
index c085e58a94bf..7fc8cef408b7 100644
--- a/drivers/media/dvb/frontends/zl10039.c
+++ b/drivers/media/dvb/frontends/zl10039.c
@@ -177,8 +177,9 @@ static int zl10039_sleep(struct dvb_frontend *fe)
177} 177}
178 178
179static int zl10039_set_params(struct dvb_frontend *fe, 179static int zl10039_set_params(struct dvb_frontend *fe,
180 struct dvb_frontend_parameters *params) 180 struct dvb_frontend_parameters *params)
181{ 181{
182 struct dtv_frontend_properties *c = &fe->dtv_property_cache;
182 struct zl10039_state *state = fe->tuner_priv; 183 struct zl10039_state *state = fe->tuner_priv;
183 u8 buf[6]; 184 u8 buf[6];
184 u8 bf; 185 u8 bf;
@@ -188,12 +189,12 @@ static int zl10039_set_params(struct dvb_frontend *fe,
188 189
189 dprintk("%s\n", __func__); 190 dprintk("%s\n", __func__);
190 dprintk("Set frequency = %d, symbol rate = %d\n", 191 dprintk("Set frequency = %d, symbol rate = %d\n",
191 params->frequency, params->u.qpsk.symbol_rate); 192 c->frequency, c->symbol_rate);
192 193
193 /* Assumed 10.111 MHz crystal oscillator */ 194 /* Assumed 10.111 MHz crystal oscillator */
194 /* Cancelled num/den 80 to prevent overflow */ 195 /* Cancelled num/den 80 to prevent overflow */
195 div = (params->frequency * 1000) / 126387; 196 div = (c->frequency * 1000) / 126387;
196 fbw = (params->u.qpsk.symbol_rate * 27) / 32000; 197 fbw = (c->symbol_rate * 27) / 32000;
197 /* Cancelled num/den 10 to prevent overflow */ 198 /* Cancelled num/den 10 to prevent overflow */
198 bf = ((fbw * 5088) / 1011100) - 1; 199 bf = ((fbw * 5088) / 1011100) - 1;
199 200