summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorHartmut Hackmann <devnull@localhost>2005-06-14 22:52:59 +0000
committerHartmut Hackmann <devnull@localhost>2005-06-14 22:52:59 +0000
commitd44964477849d2a073e709e7b48a43225f1b7dda (patch)
tree588df9e8205e8a9aa6799f5de513ce2d799c184d /linux/drivers/media/video
parent2cecc015fc085847b2c66451f2c9a1eabd6098e1 (diff)
downloadmediapointer-dvb-s2-d44964477849d2a073e709e7b48a43225f1b7dda.tar.gz
mediapointer-dvb-s2-d44964477849d2a073e709e7b48a43225f1b7dda.tar.bz2
- support for Philips FMD12ME hybrid tuner
- allow to initialize with another tuner Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/tuner-core.c9
-rw-r--r--linux/drivers/media/video/tuner-simple.c28
2 files changed, 27 insertions, 10 deletions
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c
index 64fbf1fd4..5f24ab97f 100644
--- a/linux/drivers/media/video/tuner-core.c
+++ b/linux/drivers/media/video/tuner-core.c
@@ -1,5 +1,5 @@
/*
- * $Id: tuner-core.c,v 1.15 2005/06/12 01:36:14 mchehab Exp $
+ * $Id: tuner-core.c,v 1.16 2005/06/14 22:52:59 hhackmann Exp $
*
* i2c tv tuner chip device driver
* core core, i.e. kernel interfaces, registering and so on
@@ -188,8 +188,8 @@ static void set_type(struct i2c_client *c, unsigned int type)
t->type = type;
return;
}
- if (t->initialized)
- /* run only once */
+ if ((t->initialized) && (t->type == type))
+ /* run only once except type change Hac 04/05*/
return;
t->initialized = 1;
@@ -405,8 +405,7 @@ tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
t->radio_if2 = 41300 * 1000;
break;
}
- break;
-
+ break;
/* --- v4l ioctls --- */
/* take care: bttv does userspace copying, we'll get a
kernel pointer here... */
diff --git a/linux/drivers/media/video/tuner-simple.c b/linux/drivers/media/video/tuner-simple.c
index e79366b83..f74ca74ea 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.21 2005/06/10 19:53:26 nsh Exp $
+ * $Id: tuner-simple.c,v 1.22 2005/06/14 22:52:59 hhackmann Exp $
*
* i2c tv tuner chip device driver
* controls all those simple 4-control-bytes style tuners.
@@ -208,10 +208,12 @@ static struct tunertype tuners[] = {
{ "LG PAL (TAPE series)", LGINNOTEK, PAL,
16*170.00, 16*450.00, 0x01,0x02,0x08,0xce,623},
- { "Philips PAL/SECAM multi (FQ1216AME MK4)", Philips, PAL,
- 16*160.00,16*442.00,0x01,0x02,0x04,0xce,623 },
- { "Philips FQ1236A MK4", Philips, NTSC,
- 16*160.00,16*442.00,0x01,0x02,0x04,0x8e,732 },
+ { "Philips PAL/SECAM multi (FQ1216AME MK4)", Philips, PAL,
+ 16*160.00,16*442.00,0x01,0x02,0x04,0xce,623 },
+ { "Philips FQ1236A MK4", Philips, NTSC,
+ 16*160.00,16*442.00,0x01,0x02,0x04,0x8e,732 },
+ { "Philips FMD1216ME MK3 Hybrid Tuner", Philips, PAL,
+ 16*160.00,16*442.00,0x51,0x52,0x54,0x86,623 },
/* Should work for TVF8531MF, TVF8831MF, TVF8731MF */
{ "Ymec TVision TVF-8531MF", Philips, NTSC,
@@ -466,6 +468,7 @@ static void default_set_radio_freq(struct i2c_client *c, unsigned int freq)
break;
case TUNER_PHILIPS_FM1216ME_MK3:
case TUNER_PHILIPS_FM1236_MK3:
+ case TUNER_PHILIPS_FMD1216ME_MK3:
buffer[3] = 0x19;
break;
case TUNER_PHILIPS_FM1256_IH3:
@@ -493,6 +496,7 @@ static void default_set_radio_freq(struct i2c_client *c, unsigned int freq)
int default_tuner_init(struct i2c_client *c)
{
struct tuner *t = i2c_get_clientdata(c);
+ unsigned char buffer[4];
tuner_info("type set to %d (%s)\n",
t->type, tuners[t->type].name);
@@ -502,6 +506,20 @@ int default_tuner_init(struct i2c_client *c)
t->radio_freq = default_set_radio_freq;
t->has_signal = tuner_signal;
t->is_stereo = tuner_stereo;
+ /* initialize hybrid tuners to analog mode */
+ switch (t->type) {
+ case TUNER_PHILIPS_FMD1216ME_MK3:
+ buffer[0] = 0x0b;
+ buffer[1] = 0xdc;
+ buffer[2] = 0x9c;
+ buffer[3] = 0x60;
+ i2c_master_send(c,buffer,4);
+ mdelay(1);
+ buffer[2] = 0x86;
+ buffer[3] = 0x54;
+ i2c_master_send(c,buffer,4);
+ break;
+ }
return 0;
}