diff options
Diffstat (limited to 'linux/drivers/media/video/tuner-simple.c')
-rw-r--r-- | linux/drivers/media/video/tuner-simple.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/linux/drivers/media/video/tuner-simple.c b/linux/drivers/media/video/tuner-simple.c index c602ae39f..7a828a9bc 100644 --- a/linux/drivers/media/video/tuner-simple.c +++ b/linux/drivers/media/video/tuner-simple.c @@ -1,5 +1,5 @@ /* - * $Id: tuner-simple.c,v 1.11 2005/05/18 01:30:51 mchehab Exp $ + * $Id: tuner-simple.c,v 1.12 2005/05/27 05:45:45 mchehab Exp $ * * i2c tv tuner chip device driver * controls all those simple 4-control-bytes style tuners. @@ -424,12 +424,21 @@ static void default_set_radio_freq(struct i2c_client *c, unsigned int freq) unsigned char buffer[4]; unsigned div; int rc; + int old_addr=c->addr; tun=&tuners[t->type]; div = freq + (int)(16*10.7); buffer[2] = tun->config; switch (t->type) { + case TUNER_YMEC_TVF_5533MF: + c->addr=0x60; /* Forces usage of I2C FM Tuner which is different from TV */ + + /*These values are empirically determinated */ + div = (int)(freq*7.625)- 20; + buffer[2] = 0x80; /* could be also 0x88 */ + buffer[3] = 0x10; /* could be also 0x18 or 0x19 */ + break; case TUNER_PHILIPS_FM1216ME_MK3: case TUNER_PHILIPS_FM1236_MK3: buffer[3] = 0x19; @@ -454,6 +463,8 @@ static void default_set_radio_freq(struct i2c_client *c, unsigned int freq) if (4 != (rc = i2c_master_send(c,buffer,4))) tuner_warn("i2c i/o error: rc == %d (should be 4)\n",rc); + + c->addr=old_addr; } int default_tuner_init(struct i2c_client *c) |