diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-08-25 19:08:45 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 19:01:05 -0200 |
commit | 746d9732dbd5b95c3ba36230e2814fa2c391a311 (patch) | |
tree | bb63bc3eeea67bedd6b92727280ea8a35d5656b5 /drivers/media/video/tuner-core.c | |
parent | de3fe21ba2fdc0733ad4e555b95121baeba7fcd5 (diff) |
V4L/DVB (6433): Move all tda8275/8275a tuning code from tda8290 module into tda827x module
Add analog tuning support to tda827x dvb_frontend tuner module.
Convert tda8290 module back to native tuner interface.
The tda8290 analog demodulator will be handled the same way as tda9887.
The tuner.ko module (tuner-core) will pass commands to tda8290 via the
tuner_operations interface. tda8290 will communicate with tda827x via
the dvb_frontend interface, while passing a pointer to a private data
structure.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/tuner-core.c')
-rw-r--r-- | drivers/media/video/tuner-core.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 13112732ed2..99558c708ae 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c @@ -220,15 +220,6 @@ static void tuner_i2c_address_check(struct tuner *t) tuner_warn("====================== WARNING! ======================\n"); } -static void attach_tda8290(struct tuner *t) -{ - struct tda8290_config cfg = { - .lna_cfg = &t->config, - .tuner_callback = t->tuner_callback - }; - tda8290_attach(&t->fe, t->i2c.adapter, t->i2c.addr, &cfg); -} - static void attach_simple_tuner(struct tuner *t) { struct simple_tuner_config cfg = { @@ -284,7 +275,7 @@ static void set_type(struct i2c_client *c, unsigned int type, break; case TUNER_PHILIPS_TDA8290: { - attach_tda8290(t); + tda8290_attach(t); break; } case TUNER_TEA5767: @@ -343,7 +334,8 @@ static void set_type(struct i2c_client *c, unsigned int type, break; } - if (fe_tuner_ops->set_analog_params) { + if ((fe_tuner_ops->set_analog_params) && + ((NULL == t->ops.set_tv_freq) && (NULL == t->ops.set_radio_freq))) { strlcpy(t->i2c.name, fe_tuner_ops->info.name, sizeof(t->i2c.name)); t->ops.set_tv_freq = fe_set_freq; @@ -624,7 +616,7 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind) case 0x4b: /* If chip is not tda8290, don't register. since it can be tda9887*/ - if (tda8290_probe(t->i2c.adapter, t->i2c.addr) == 0) { + if (tda8290_probe(t) == 0) { tuner_dbg("chip at addr %x is a tda8290\n", addr); } else { /* Default is being tda9887 */ |