diff options
author | Andy Walls <awalls@radix.net> | 2009-01-17 08:59:31 -0500 |
---|---|---|
committer | Andy Walls <awalls@radix.net> | 2009-01-17 08:59:31 -0500 |
commit | c6138eadff2f01fd6d20a1f9a39b6ba4cbeff85b (patch) | |
tree | 4ad3708cf7dc5ff01b2e657e314883ab2330c658 /linux/drivers/media/common | |
parent | 708ba0701edccea0b0fc2b0ea9303337a85ff05c (diff) | |
parent | b0fc8c78cb5fd9394d8d4ff3198bdc9390b96001 (diff) | |
download | mediapointer-dvb-s2-c6138eadff2f01fd6d20a1f9a39b6ba4cbeff85b.tar.gz mediapointer-dvb-s2-c6138eadff2f01fd6d20a1f9a39b6ba4cbeff85b.tar.bz2 |
Merge from master v4l-dvb repo
Diffstat (limited to 'linux/drivers/media/common')
-rw-r--r-- | linux/drivers/media/common/tuners/tda8290.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/common/tuners/tuner-simple.c | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/linux/drivers/media/common/tuners/tda8290.c b/linux/drivers/media/common/tuners/tda8290.c index 6eaaacca0..67c0fd5f7 100644 --- a/linux/drivers/media/common/tuners/tda8290.c +++ b/linux/drivers/media/common/tuners/tda8290.c @@ -173,7 +173,7 @@ static void set_audio(struct dvb_frontend *fe, } } -struct { +static struct { unsigned char seq[2]; } fm_mode[] = { { { 0x01, 0x81} }, /* Put device into expert mode */ @@ -230,7 +230,6 @@ static void tda8290_set_params(struct dvb_frontend *fe, msleep(1); if (params->mode == V4L2_TUNER_RADIO) { - int i; unsigned char deemphasis[] = { 0x13, 1 }; /* FIXME: allow using a different deemphasis */ @@ -790,7 +789,8 @@ struct dvb_frontend *tda829x_attach(struct dvb_frontend *fe, fe->ops.analog_ops.info.name = name; if (priv->ver & TDA8290) { - tda8290_init_tuner(fe); + if (priv->ver & (TDA8275 | TDA8275A)) + tda8290_init_tuner(fe); tda8290_init_if(fe); } else if (priv->ver & TDA8295) tda8295_init_if(fe); diff --git a/linux/drivers/media/common/tuners/tuner-simple.c b/linux/drivers/media/common/tuners/tuner-simple.c index e65c170c8..36aaa7e75 100644 --- a/linux/drivers/media/common/tuners/tuner-simple.c +++ b/linux/drivers/media/common/tuners/tuner-simple.c @@ -840,6 +840,15 @@ static u32 simple_dvb_configure(struct dvb_frontend *fe, u8 *buf, int ret; unsigned frequency = params->frequency / 62500; + if (!tun->stepsize) { + /* tuner-core was loaded before the digital tuner was + * configured and somehow picked the wrong tuner type */ + tuner_err("attempt to treat tuner %d (%s) as digital tuner " + "without stepsize defined.\n", + priv->type, priv->tun->name); + return 0; /* failure */ + } + t_params = simple_tuner_params(fe, TUNER_PARAM_TYPE_DIGITAL); ret = simple_config_lookup(fe, t_params, &frequency, &config, &cb); if (ret < 0) |