summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tuner-simple.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <devnull@localhost>2005-05-27 05:45:45 +0000
committerMauro Carvalho Chehab <devnull@localhost>2005-05-27 05:45:45 +0000
commitf8eb38699738a836f5f78ee7428edc90a5ddaa49 (patch)
tree971d494853e875d5b4c7fdbad710966963bebb58 /linux/drivers/media/video/tuner-simple.c
parent04d537ab2fb327d92a27b45cb513da6e9f06e64c (diff)
downloadmediapointer-dvb-s2-f8eb38699738a836f5f78ee7428edc90a5ddaa49.tar.gz
mediapointer-dvb-s2-f8eb38699738a836f5f78ee7428edc90a5ddaa49.tar.bz2
Mauro Carvalho Chehab (mchehab .at. brturbo.com.br):
Added support for Radio tuner for Ymec TVF xxx3 MF tuner. Doing lack of documentation, the buffer values were determinated empirically. There's a hack for selecting I2C bus for Radio (0xC0) instead of 0xC2 for Video.
Diffstat (limited to 'linux/drivers/media/video/tuner-simple.c')
-rw-r--r--linux/drivers/media/video/tuner-simple.c13
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)