Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174025
b: refs/heads/master
c: d6eef49
h: refs/heads/master
i:
  174023: efb2ff2
v: v3
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Dec 5, 2009
1 parent 8d85c0f commit 2f98ba7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 64f4d9a367b4fe329ba78e3171d1abb1338a951f
refs/heads/master: d6eef4947858ebebaf05d79bce7b8be0d4c036ba
9 changes: 7 additions & 2 deletions trunk/drivers/media/video/tuner-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ static void set_type(struct i2c_client *c, unsigned int type,
struct dvb_tuner_ops *fe_tuner_ops = &t->fe.ops.tuner_ops;
struct analog_demod_ops *analog_ops = &t->fe.ops.analog_ops;
unsigned char buffer[4];
int tune_now = 1;

if (type == UNSET || type == TUNER_ABSENT) {
tuner_dbg ("tuner 0x%02x: Tuner type absent\n",c->addr);
Expand Down Expand Up @@ -404,6 +405,7 @@ static void set_type(struct i2c_client *c, unsigned int type,
};
if (!dvb_attach(xc2028_attach, &t->fe, &cfg))
goto attach_failed;
tune_now = 0;
break;
}
case TUNER_TDA9887:
Expand All @@ -419,6 +421,7 @@ static void set_type(struct i2c_client *c, unsigned int type,
if (!dvb_attach(xc5000_attach,
&t->fe, t->i2c->adapter, &xc5000_cfg))
goto attach_failed;
tune_now = 0;
break;
}
case TUNER_NXP_TDA18271:
Expand All @@ -430,6 +433,7 @@ static void set_type(struct i2c_client *c, unsigned int type,
if (!dvb_attach(tda18271_attach, &t->fe, t->i2c->addr,
t->i2c->adapter, &cfg))
goto attach_failed;
tune_now = 0;
break;
}
default:
Expand Down Expand Up @@ -458,12 +462,13 @@ static void set_type(struct i2c_client *c, unsigned int type,
if (t->mode_mask == T_UNINITIALIZED)
t->mode_mask = new_mode_mask;

/* xc2028/3028 and xc5000 requires a firmware to be set-up later
/* Some tuners require more initialization setup before use,
such as firmware download or device calibration.
trying to set a frequency here will just fail
FIXME: better to move set_freq to the tuner code. This is needed
on analog tuners for PLL to properly work
*/
if (t->type != TUNER_XC2028 && t->type != TUNER_XC5000)
if (tune_now)
set_freq(c, (V4L2_TUNER_RADIO == t->mode) ?
t->radio_freq : t->tv_freq);

Expand Down

0 comments on commit 2f98ba7

Please sign in to comment.