diff options
| -rw-r--r-- | drivers/media/video/tuner.c | 28 | ||||
| -rw-r--r-- | include/media/tuner.h | 4 |
2 files changed, 20 insertions, 12 deletions
diff --git a/drivers/media/video/tuner.c b/drivers/media/video/tuner.c index 3814c8393f0c..18009430c59d 100644 --- a/drivers/media/video/tuner.c +++ b/drivers/media/video/tuner.c @@ -234,6 +234,12 @@ static struct tunertype tuners[] = { 16*157.25,16*454.00,0xa0,0x90,0x30,0x8e,732}, { "Philips NTSC MK3 (FM1236MK3 or FM1236/F)", Philips, NTSC, 16*160.00,16*442.00,0x01,0x02,0x04,0x8,732}, + + { "Philips 4 in 1 (ATI TV Wonder Pro/Conexant)", Philips, NTSC, + 16*160.00,16*442.00,0x01,0x02,0x04,0x8e,732}, + { "Microtune 4049 FM5",Microtune,PAL, + 16*141.00,16*464.00,0xa0,0x90,0x30,0x8e,623}, + }; #define TUNERS ARRAY_SIZE(tuners) @@ -984,19 +990,22 @@ static void set_radio_freq(struct i2c_client *c, unsigned int freq) t->radio_freq(c,freq); } -static void set_type(struct i2c_client *c, unsigned int type) +static void set_type(struct i2c_client *c, unsigned int type, char *source) { struct tuner *t = i2c_get_clientdata(c); if (t->type != UNSET) { - printk("tuner: type already set (%d)\n",t->type); + if (t->type != type) + printk("tuner: type already set to %d, " + "ignoring request for %d\n", t->type, type); return; } if (type >= TUNERS) return; t->type = type; - printk("tuner: type set to %d (%s)\n", t->type,tuners[t->type].name); + printk("tuner: type set to %d (%s) by %s\n", + t->type,tuners[t->type].name, source); strlcpy(c->name, tuners[t->type].name, sizeof(c->name)); switch (t->type) { @@ -1024,7 +1033,8 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind) client_template.adapter = adap; client_template.addr = addr; - printk("tuner: chip found @ 0x%x\n", addr<<1); + printk("tuner: chip found at addr 0x%x i2c-bus %s\n", + addr<<1, adap->name); if (NULL == (client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL))) return -ENOMEM; @@ -1040,12 +1050,8 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind) t->radio_if2 = 10700*1000; // 10.7MHz - FM radio i2c_attach_client(client); - if (type < TUNERS) { - t->type = type; - printk("tuner: type forced to %d (%s) [insmod]\n", - t->type,tuners[t->type].name); - set_type(client,type); - } + if (type < TUNERS) + set_type(client, type, "insmod option"); return 0; } @@ -1094,7 +1100,7 @@ tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) /* --- configuration --- */ case TUNER_SET_TYPE: - set_type(client,*iarg); + set_type(client,*iarg,client->adapter->name); break; case AUDC_SET_RADIO: if (!t->radio) { diff --git a/include/media/tuner.h b/include/media/tuner.h index 15657395aa12..fb571d5965d8 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h @@ -67,7 +67,9 @@ #define TUNER_HITACHI_NTSC 40 #define TUNER_PHILIPS_PAL_MK 41 #define TUNER_PHILIPS_ATSC 42 -#define TUNER_PHILIPS_FM1236_MK3 43 +#define TUNER_PHILIPS_FM1236_MK3 43 +#define TUNER_PHILIPS_4IN1 44 /* ATI TV Wonder Pro - Conexant */ +#define TUNER_MICROTUNE_4049FM5 45 #define NOTUNER 0 #define PAL 1 /* PAL_BG */ |
