diff options
author | Andreas Regel <andreas.regel@gmx.de> | 2010-02-13 14:48:07 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-17 23:46:49 -0400 |
commit | 5817ea0c83665dbc117cb7ca637202da0fb1abce (patch) | |
tree | dbd3d47d177cdab1c3d8e51e36974415b3baa921 /drivers/media/dvb/frontends | |
parent | 85532d1454dd3df7327d12bf6ca7ef5a00bb1282 (diff) |
V4L/DVB: Budget/STV090x/STV6110x: Initialize the demodulator immediately after the tuner is attached
Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends')
-rw-r--r-- | drivers/media/dvb/frontends/stv090x.c | 14 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/stv6110x.c | 20 |
2 files changed, 14 insertions, 20 deletions
diff --git a/drivers/media/dvb/frontends/stv090x.c b/drivers/media/dvb/frontends/stv090x.c index 3cc1be28534e..a461fdff2c9c 100644 --- a/drivers/media/dvb/frontends/stv090x.c +++ b/drivers/media/dvb/frontends/stv090x.c | |||
@@ -4324,6 +4324,20 @@ static int stv090x_init(struct dvb_frontend *fe) | |||
4324 | u32 reg; | 4324 | u32 reg; |
4325 | 4325 | ||
4326 | if (state->internal->mclk == 0) { | 4326 | if (state->internal->mclk == 0) { |
4327 | /* call tuner init to configure the tuner's clock output | ||
4328 | divider directly before setting up the master clock of | ||
4329 | the stv090x. */ | ||
4330 | if (stv090x_i2c_gate_ctrl(state, 1) < 0) | ||
4331 | goto err; | ||
4332 | |||
4333 | if (config->tuner_init) { | ||
4334 | if (config->tuner_init(fe) < 0) | ||
4335 | goto err_gateoff; | ||
4336 | } | ||
4337 | |||
4338 | if (stv090x_i2c_gate_ctrl(state, 0) < 0) | ||
4339 | goto err; | ||
4340 | |||
4327 | stv090x_set_mclk(state, 135000000, config->xtal); /* 135 Mhz */ | 4341 | stv090x_set_mclk(state, 135000000, config->xtal); /* 135 Mhz */ |
4328 | msleep(5); | 4342 | msleep(5); |
4329 | if (stv090x_write_reg(state, STV090x_SYNTCTRL, | 4343 | if (stv090x_write_reg(state, STV090x_SYNTCTRL, |
diff --git a/drivers/media/dvb/frontends/stv6110x.c b/drivers/media/dvb/frontends/stv6110x.c index c1ddb83e6349..2f9cd2441340 100644 --- a/drivers/media/dvb/frontends/stv6110x.c +++ b/drivers/media/dvb/frontends/stv6110x.c | |||
@@ -361,7 +361,6 @@ struct stv6110x_devctl *stv6110x_attach(struct dvb_frontend *fe, | |||
361 | { | 361 | { |
362 | struct stv6110x_state *stv6110x; | 362 | struct stv6110x_state *stv6110x; |
363 | u8 default_regs[] = {0x07, 0x11, 0xdc, 0x85, 0x17, 0x01, 0xe6, 0x1e}; | 363 | u8 default_regs[] = {0x07, 0x11, 0xdc, 0x85, 0x17, 0x01, 0xe6, 0x1e}; |
364 | int ret; | ||
365 | 364 | ||
366 | stv6110x = kzalloc(sizeof (struct stv6110x_state), GFP_KERNEL); | 365 | stv6110x = kzalloc(sizeof (struct stv6110x_state), GFP_KERNEL); |
367 | if (stv6110x == NULL) | 366 | if (stv6110x == NULL) |
@@ -390,25 +389,6 @@ struct stv6110x_devctl *stv6110x_attach(struct dvb_frontend *fe, | |||
390 | break; | 389 | break; |
391 | } | 390 | } |
392 | 391 | ||
393 | if (fe->ops.i2c_gate_ctrl) { | ||
394 | ret = fe->ops.i2c_gate_ctrl(fe, 1); | ||
395 | if (ret < 0) | ||
396 | goto error; | ||
397 | } | ||
398 | |||
399 | ret = stv6110x_write_regs(stv6110x, 0, stv6110x->regs, | ||
400 | ARRAY_SIZE(stv6110x->regs)); | ||
401 | if (ret < 0) { | ||
402 | dprintk(FE_ERROR, 1, "Initialization failed"); | ||
403 | goto error; | ||
404 | } | ||
405 | |||
406 | if (fe->ops.i2c_gate_ctrl) { | ||
407 | ret = fe->ops.i2c_gate_ctrl(fe, 0); | ||
408 | if (ret < 0) | ||
409 | goto error; | ||
410 | } | ||
411 | |||
412 | fe->tuner_priv = stv6110x; | 392 | fe->tuner_priv = stv6110x; |
413 | fe->ops.tuner_ops = stv6110x_ops; | 393 | fe->ops.tuner_ops = stv6110x_ops; |
414 | 394 | ||