summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorGerd Knorr <devnull@localhost>2004-04-22 11:06:45 +0000
committerGerd Knorr <devnull@localhost>2004-04-22 11:06:45 +0000
commit8eaf3df89e72c6bcad69267531b1b05390cffa54 (patch)
tree351321c4b9b6b6e011df4057755f9b36249549bb /linux/drivers
parenta35cda5504266d06a8ecb0fe58b5a36e27f7220b (diff)
downloadmediapointer-dvb-s2-8eaf3df89e72c6bcad69267531b1b05390cffa54.tar.gz
mediapointer-dvb-s2-8eaf3df89e72c6bcad69267531b1b05390cffa54.tar.bz2
- cx88: print some help for unknown cards.
- tda9887: make qss insmod option work for both enable/disable.
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/video/cx88/cx88-cards.c30
-rw-r--r--linux/drivers/media/video/cx88/cx88-video.c4
-rw-r--r--linux/drivers/media/video/cx88/cx88.h3
-rw-r--r--linux/drivers/media/video/tda9887.c13
4 files changed, 43 insertions, 7 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c
index 13d905339..69b5c881c 100644
--- a/linux/drivers/media/video/cx88/cx88-cards.c
+++ b/linux/drivers/media/video/cx88/cx88-cards.c
@@ -261,7 +261,6 @@ struct cx88_subid cx88_subids[] = {
};
const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids);
-
/* ----------------------------------------------------------------------- */
/* some leadtek specific stuff */
@@ -459,7 +458,33 @@ i2c_eeprom(struct i2c_client *c, unsigned char *eedata, int len)
return 0;
}
-void __devinit cx88_card_setup(struct cx8800_dev *dev)
+void cx88_card_list(struct cx8800_dev *dev)
+{
+ int i;
+
+ if (0 == dev->pci->subsystem_vendor &&
+ 0 == dev->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 complains 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);
+ } 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);
+ }
+ printk("%s: Here is a list of valid choices for the card=<n> insmod option:\n",
+ dev->name);
+ for (i = 0; i < cx88_idcount; i++)
+ printk("%s: card=%d -> %s\n",
+ dev->name, i, cx88_boards[i].name);
+}
+
+void cx88_card_setup(struct cx8800_dev *dev)
{
static u8 eeprom[128];
@@ -488,6 +513,7 @@ EXPORT_SYMBOL(cx88_boards);
EXPORT_SYMBOL(cx88_bcount);
EXPORT_SYMBOL(cx88_subids);
EXPORT_SYMBOL(cx88_idcount);
+EXPORT_SYMBOL(cx88_card_list);
EXPORT_SYMBOL(cx88_card_setup);
/*
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c
index bab86d9aa..48a35015c 100644
--- a/linux/drivers/media/video/cx88/cx88-video.c
+++ b/linux/drivers/media/video/cx88/cx88-video.c
@@ -2357,8 +2357,10 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
if (pci_dev->subsystem_vendor == cx88_subids[i].subvendor &&
pci_dev->subsystem_device == cx88_subids[i].subdevice)
dev->board = cx88_subids[i].card;
- if (UNSET == dev->board)
+ if (UNSET == dev->board) {
dev->board = CX88_BOARD_UNKNOWN;
+ cx88_card_list(dev);
+ }
printk(KERN_INFO "%s: subsystem: %04x:%04x, board: %s [card=%d,%s]\n",
dev->name,pci_dev->subsystem_vendor,
pci_dev->subsystem_device,cx88_boards[dev->board].name,
diff --git a/linux/drivers/media/video/cx88/cx88.h b/linux/drivers/media/video/cx88/cx88.h
index 628fdfe99..96af2cdf3 100644
--- a/linux/drivers/media/video/cx88/cx88.h
+++ b/linux/drivers/media/video/cx88/cx88.h
@@ -371,7 +371,8 @@ extern const unsigned int cx88_bcount;
extern struct cx88_subid cx88_subids[];
extern const unsigned int cx88_idcount;
-extern void __devinit cx88_card_setup(struct cx8800_dev *dev);
+extern void cx88_card_list(struct cx8800_dev *dev);
+extern void cx88_card_setup(struct cx8800_dev *dev);
/* ----------------------------------------------------------- */
/* cx88-tvaudio.c */
diff --git a/linux/drivers/media/video/tda9887.c b/linux/drivers/media/video/tda9887.c
index 4385c2ee2..377ac7397 100644
--- a/linux/drivers/media/video/tda9887.c
+++ b/linux/drivers/media/video/tda9887.c
@@ -370,7 +370,7 @@ static int tda9887_set_tvnorm(struct tda9887 *t, char *buf)
static unsigned int port1 = 1;
static unsigned int port2 = 1;
-static unsigned int qss = 0;
+static unsigned int qss = UNSET;
static unsigned int adjust = 0x10;
MODULE_PARM(port1,"i");
MODULE_PARM(port2,"i");
@@ -383,10 +383,16 @@ static int tda9887_set_insmod(struct tda9887 *t, char *buf)
buf[1] |= cOutputPort1Inactive;
if (port2)
buf[1] |= cOutputPort2Inactive;
- if (qss)
- buf[1] |= cQSS;
+ if (UNSET != qss) {
+ if (qss)
+ buf[1] |= cQSS;
+ else
+ buf[1] &= ~cQSS;
+ }
+
if (adjust >= 0x00 && adjust < 0x20)
buf[2] |= adjust;
+ return 0;
}
/* ---------------------------------------------------------------------- */
@@ -500,6 +506,7 @@ static int tda9887_status(struct tda9887 *t)
if (1 != (rc = i2c_master_recv(&t->client,buf,1)))
printk(PREFIX "i2c i/o error: rc == %d (should be 1)\n",rc);
dump_read_message(buf);
+ return 0;
}
/* ---------------------------------------------------------------------- */