summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx88/cx88-cards.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/cx88/cx88-cards.c')
-rw-r--r--linux/drivers/media/video/cx88/cx88-cards.c70
1 files changed, 36 insertions, 34 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c
index 47ad256d7..84d7a6a29 100644
--- a/linux/drivers/media/video/cx88/cx88-cards.c
+++ b/linux/drivers/media/video/cx88/cx88-cards.c
@@ -276,6 +276,7 @@ struct cx88_board cx88_boards[] = {
.gpio2 = 0x000000e9,
.gpio3 = 0x00000000,
},
+ .blackbird = 1,
},
[CX88_BOARD_MSI_TVANYWHERE] = {
.name = "MSI TV-@nywhere",
@@ -392,7 +393,7 @@ const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids);
/* ----------------------------------------------------------------------- */
/* some leadtek specific stuff */
-static void __devinit leadtek_eeprom(struct cx8800_dev *dev, u8 *eeprom_data)
+static void __devinit leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)
{
/* This is just for the Winfast 2000 XP board ATM; I don't have data on
* any others.
@@ -403,16 +404,17 @@ static void __devinit leadtek_eeprom(struct cx8800_dev *dev, u8 *eeprom_data)
if (eeprom_data[4] != 0x7d ||
eeprom_data[5] != 0x10 ||
eeprom_data[7] != 0x66) {
- printk(KERN_WARNING "%s Leadtek eeprom invalid.\n", dev->name);
+ printk(KERN_WARNING "%s: Leadtek eeprom invalid.\n",
+ core->name);
return;
}
- dev->has_radio = 1;
- dev->tuner_type = (eeprom_data[6] == 0x13) ? 43 : 38;
+ core->has_radio = 1;
+ core->tuner_type = (eeprom_data[6] == 0x13) ? 43 : 38;
printk(KERN_INFO "%s: Leadtek Winfast 2000 XP config: "
"tuner=%d, eeprom[0]=0x%02x\n",
- dev->name, dev->tuner_type, eeprom_data[0]);
+ core->name, core->tuner_type, eeprom_data[0]);
}
@@ -476,13 +478,13 @@ static struct {
{ TUNER_LG_PAL_I, "LG TAPC-I701D"}
};
-static void hauppauge_eeprom(struct cx8800_dev *dev, u8 *eeprom_data)
+static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
{
unsigned int blk2,tuner,radio,model;
if (eeprom_data[0] != 0x84 || eeprom_data[2] != 0) {
printk(KERN_WARNING "%s: Hauppauge eeprom: invalid\n",
- dev->name);
+ core->name);
return;
}
@@ -495,14 +497,14 @@ static void hauppauge_eeprom(struct cx8800_dev *dev, u8 *eeprom_data)
radio = eeprom_data[blk2-1] & 0x01;
if (tuner < ARRAY_SIZE(hauppauge_tuner))
- dev->tuner_type = hauppauge_tuner[tuner].id;
+ core->tuner_type = hauppauge_tuner[tuner].id;
if (radio)
- dev->has_radio = 1;
+ core->has_radio = 1;
printk(KERN_INFO "%s: hauppauge eeprom: model=%d, "
"tuner=%s (%d), radio=%s\n",
- dev->name, model, hauppauge_tuner[tuner].name,
- dev->tuner_type, radio ? "yes" : "no");
+ core->name, model, hauppauge_tuner[tuner].name,
+ core->tuner_type, radio ? "yes" : "no");
}
/* ----------------------------------------------------------------------- */
@@ -543,17 +545,17 @@ static struct {
.name = "PHILIPS_FI1216_MK3" },
};
-static void gdi_eeprom(struct cx8800_dev *dev, u8 *eeprom_data)
+static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)
{
char *name = (eeprom_data[0x0d] < ARRAY_SIZE(gdi_tuner))
? gdi_tuner[eeprom_data[0x0d]].name : NULL;
- printk(KERN_INFO "%s: GDI: tuner=%s\n", dev->name,
+ printk(KERN_INFO "%s: GDI: tuner=%s\n", core->name,
name ? name : "unknown");
if (NULL == name)
return;
- dev->tuner_type = gdi_tuner[eeprom_data[0x0d]].id;
- dev->has_radio = gdi_tuner[eeprom_data[0x0d]].fm;
+ core->tuner_type = gdi_tuner[eeprom_data[0x0d]].id;
+ core->has_radio = gdi_tuner[eeprom_data[0x0d]].fm;
}
/* ----------------------------------------------------------------------- */
@@ -588,55 +590,55 @@ i2c_eeprom(struct i2c_client *c, unsigned char *eedata, int len)
return 0;
}
-void cx88_card_list(struct cx8800_dev *dev)
+void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
{
int i;
- if (0 == dev->pci->subsystem_vendor &&
- 0 == dev->pci->subsystem_device) {
+ if (0 == pci->subsystem_vendor &&
+ 0 == pci->subsystem_device) {
printk("%s: Your board has no valid PCI Subsystem ID and thus can't\n"
"%s: be autodetected. Please pass card=<n> insmod option to\n"
"%s: workaround that. Redirect complaints to the vendor of\n"
"%s: the TV card. Best regards,\n"
"%s: -- tux\n",
- dev->name,dev->name,dev->name,dev->name,dev->name);
+ core->name,core->name,core->name,core->name,core->name);
} else {
printk("%s: Your board isn't known (yet) to the driver. You can\n"
"%s: try to pick one of the existing card configs via\n"
"%s: card=<n> insmod option. Updating to the latest\n"
"%s: version might help as well.\n",
- dev->name,dev->name,dev->name,dev->name);
+ core->name,core->name,core->name,core->name);
}
printk("%s: Here is a list of valid choices for the card=<n> insmod option:\n",
- dev->name);
+ core->name);
for (i = 0; i < cx88_bcount; i++)
printk("%s: card=%d -> %s\n",
- dev->name, i, cx88_boards[i].name);
+ core->name, i, cx88_boards[i].name);
}
-void cx88_card_setup(struct cx8800_dev *dev)
+void cx88_card_setup(struct cx88_core *core)
{
static u8 eeprom[128];
- switch (dev->board) {
+ switch (core->board) {
case CX88_BOARD_HAUPPAUGE:
- if (0 == dev->i2c_rc)
- i2c_eeprom(&dev->i2c_client,eeprom,sizeof(eeprom));
- hauppauge_eeprom(dev,eeprom+8);
+ if (0 == core->i2c_rc)
+ i2c_eeprom(&core->i2c_client,eeprom,sizeof(eeprom));
+ hauppauge_eeprom(core,eeprom+8);
break;
case CX88_BOARD_GDI:
- if (0 == dev->i2c_rc)
- i2c_eeprom(&dev->i2c_client,eeprom,sizeof(eeprom));
- gdi_eeprom(dev,eeprom);
+ if (0 == core->i2c_rc)
+ i2c_eeprom(&core->i2c_client,eeprom,sizeof(eeprom));
+ gdi_eeprom(core,eeprom);
break;
case CX88_BOARD_WINFAST2000XP:
- if (0 == dev->i2c_rc)
- i2c_eeprom(&dev->i2c_client,eeprom,sizeof(eeprom));
- leadtek_eeprom(dev,eeprom);
+ if (0 == core->i2c_rc)
+ i2c_eeprom(&core->i2c_client,eeprom,sizeof(eeprom));
+ leadtek_eeprom(core,eeprom);
break;
case CX88_BOARD_ASUS_PVR_416:
case CX88_BOARD_MSI_TVANYWHERE_MASTER:
- dev->has_radio = 1;
+ core->has_radio = 1;
break;
}
}