diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-04-08 01:09:11 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-18 14:23:11 -0300 |
commit | 8573a9e6a8ed724b7e3074dc8762d4117ed0b3aa (patch) | |
tree | c84aa587103700a3db61f271dfb7c0b99aa37492 /drivers/media/video/tuner-core.c | |
parent | 8b4a40809e5330c9da5d20107d693d92d73b31dc (diff) | |
download | blackbird-op-linux-8573a9e6a8ed724b7e3074dc8762d4117ed0b3aa.tar.gz blackbird-op-linux-8573a9e6a8ed724b7e3074dc8762d4117ed0b3aa.zip |
V4L/DVB (5563a): Add experimental support for tea5761 tuner
This driver were made based on tea5761 specs.
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 | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 505591a7abe9..591ca9ce0440 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c @@ -25,6 +25,9 @@ /* standard i2c insmod options */ static unsigned short normal_i2c[] = { +#ifdef CONFIG_TUNER_5761 + 0x10, +#endif 0x42, 0x43, 0x4a, 0x4b, /* tda8290 */ 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, @@ -189,6 +192,16 @@ static void set_type(struct i2c_client *c, unsigned int type, } t->mode_mask = T_RADIO; break; +#ifdef CONFIG_TUNER_5761 + case TUNER_TEA5761: + if (tea5761_tuner_init(c) == EINVAL) { + t->type = TUNER_ABSENT; + t->mode_mask = T_UNINITIALIZED; + return -ENODEV; + } + t->mode_mask = T_RADIO; + break; +#endif case TUNER_PHILIPS_FMD1216ME_MK3: buffer[0] = 0x0b; buffer[1] = 0xdc; @@ -460,6 +473,19 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind) /* autodetection code based on the i2c addr */ if (!no_autodetect) { switch (addr) { +#ifdef CONFIG_TUNER_5761 + case 0x10: + if (tea5761_autodetection(&t->i2c) != EINVAL) { + t->type = TUNER_TEA5761; + t->mode_mask = T_RADIO; + t->mode = T_STANDBY; + t->radio_freq = 87.5 * 16000; /* Sets freq to FM range */ + default_mode_mask &= ~T_RADIO; + + goto register_client; + } + break; +#endif case 0x42: case 0x43: case 0x4a: |