diff options
author | Manu Abraham <manu@linuxtv.org> | 2006-02-07 03:45:30 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-02-07 03:45:30 -0500 |
commit | 6a5b28f9b7688638eed23b891d6bf5d9aaca94d3 (patch) | |
tree | d2f9b4c39e8a63c5be7c84de213787925d586261 | |
parent | 19d7509c0531b0e08f52ab93070569e0aba54cdf (diff) |
V4L/DVB (3294): Fix [Bug 5895] to correct snd_87x autodetect
With DVB drivers enabled snd_87x (ALSA) don't detect.
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | drivers/media/dvb/bt8xx/bt878.c | 44 | ||||
-rw-r--r-- | drivers/media/dvb/bt8xx/bt878.h | 17 |
2 files changed, 60 insertions, 1 deletions
diff --git a/drivers/media/dvb/bt8xx/bt878.c b/drivers/media/dvb/bt8xx/bt878.c index a04bb61f21f4..34c3189a1a33 100644 --- a/drivers/media/dvb/bt8xx/bt878.c +++ b/drivers/media/dvb/bt8xx/bt878.c | |||
@@ -381,6 +381,23 @@ bt878_device_control(struct bt878 *bt, unsigned int cmd, union dst_gpio_packet * | |||
381 | 381 | ||
382 | EXPORT_SYMBOL(bt878_device_control); | 382 | EXPORT_SYMBOL(bt878_device_control); |
383 | 383 | ||
384 | |||
385 | struct cards card_list[] __devinitdata = { | ||
386 | |||
387 | { 0x01010071, BTTV_BOARD_NEBULA_DIGITV, "Nebula Electronics DigiTV" }, | ||
388 | { 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" }, | ||
389 | { 0x001c11bd, BTTV_BOARD_PINNACLESAT, "Pinnacle PCTV Sat" }, | ||
390 | { 0x002611bd, BTTV_BOARD_TWINHAN_DST, "Pinnacle PCTV SAT CI" }, | ||
391 | { 0x00011822, BTTV_BOARD_TWINHAN_DST, "Twinhan VisionPlus DVB" }, | ||
392 | { 0xfc00270f, BTTV_BOARD_TWINHAN_DST, "ChainTech digitop DST-1000 DVB-S" }, | ||
393 | { 0x07711461, BTTV_BOARD_AVDVBT_771, "AVermedia AverTV DVB-T 771" }, | ||
394 | { 0xdb1018ac, BTTV_BOARD_DVICO_DVBT_LITE, "DViCO FusionHDTV DVB-T Lite" }, | ||
395 | { 0xd50018ac, BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE, "DViCO FusionHDTV 5 Lite" }, | ||
396 | { 0x20007063, BTTV_BOARD_PC_HDTV, "pcHDTV HD-2000 TV"}, | ||
397 | { 0, -1, NULL } | ||
398 | }; | ||
399 | |||
400 | |||
384 | /***********************/ | 401 | /***********************/ |
385 | /* PCI device handling */ | 402 | /* PCI device handling */ |
386 | /***********************/ | 403 | /***********************/ |
@@ -388,18 +405,41 @@ EXPORT_SYMBOL(bt878_device_control); | |||
388 | static int __devinit bt878_probe(struct pci_dev *dev, | 405 | static int __devinit bt878_probe(struct pci_dev *dev, |
389 | const struct pci_device_id *pci_id) | 406 | const struct pci_device_id *pci_id) |
390 | { | 407 | { |
391 | int result; | 408 | int result = 0, has_dvb = 0, i; |
392 | unsigned char lat; | 409 | unsigned char lat; |
393 | struct bt878 *bt; | 410 | struct bt878 *bt; |
394 | #if defined(__powerpc__) | 411 | #if defined(__powerpc__) |
395 | unsigned int cmd; | 412 | unsigned int cmd; |
396 | #endif | 413 | #endif |
414 | unsigned int cardid; | ||
415 | unsigned short id; | ||
416 | struct cards *dvb_cards; | ||
397 | 417 | ||
398 | printk(KERN_INFO "bt878: Bt878 AUDIO function found (%d).\n", | 418 | printk(KERN_INFO "bt878: Bt878 AUDIO function found (%d).\n", |
399 | bt878_num); | 419 | bt878_num); |
400 | if (pci_enable_device(dev)) | 420 | if (pci_enable_device(dev)) |
401 | return -EIO; | 421 | return -EIO; |
402 | 422 | ||
423 | pci_read_config_word(dev, PCI_SUBSYSTEM_ID, &id); | ||
424 | cardid = id << 16; | ||
425 | pci_read_config_word(dev, PCI_SUBSYSTEM_VENDOR_ID, &id); | ||
426 | cardid |= id; | ||
427 | |||
428 | for (i = 0, dvb_cards = card_list; i < ARRAY_SIZE(card_list); i++, dvb_cards++) { | ||
429 | if (cardid == dvb_cards->pci_id) { | ||
430 | printk("%s: card id=[0x%x],[ %s ] has DVB functions.\n", | ||
431 | __func__, cardid, dvb_cards->name); | ||
432 | has_dvb = 1; | ||
433 | } | ||
434 | } | ||
435 | |||
436 | if (!has_dvb) { | ||
437 | printk("%s: card id=[0x%x], Unknown card.\nExiting..\n", __func__, cardid); | ||
438 | result = -EINVAL; | ||
439 | |||
440 | goto fail0; | ||
441 | } | ||
442 | |||
403 | bt = &bt878[bt878_num]; | 443 | bt = &bt878[bt878_num]; |
404 | bt->dev = dev; | 444 | bt->dev = dev; |
405 | bt->nr = bt878_num; | 445 | bt->nr = bt878_num; |
@@ -416,6 +456,8 @@ static int __devinit bt878_probe(struct pci_dev *dev, | |||
416 | 456 | ||
417 | pci_read_config_byte(dev, PCI_CLASS_REVISION, &bt->revision); | 457 | pci_read_config_byte(dev, PCI_CLASS_REVISION, &bt->revision); |
418 | pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat); | 458 | pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat); |
459 | |||
460 | |||
419 | printk(KERN_INFO "bt878(%d): Bt%x (rev %d) at %02x:%02x.%x, ", | 461 | printk(KERN_INFO "bt878(%d): Bt%x (rev %d) at %02x:%02x.%x, ", |
420 | bt878_num, bt->id, bt->revision, dev->bus->number, | 462 | bt878_num, bt->id, bt->revision, dev->bus->number, |
421 | PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); | 463 | PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); |
diff --git a/drivers/media/dvb/bt8xx/bt878.h b/drivers/media/dvb/bt8xx/bt878.h index a73baf00ca39..9faf93770d08 100644 --- a/drivers/media/dvb/bt8xx/bt878.h +++ b/drivers/media/dvb/bt8xx/bt878.h | |||
@@ -88,6 +88,23 @@ | |||
88 | 88 | ||
89 | #define BT878_RISC_SYNC_MASK (1 << 15) | 89 | #define BT878_RISC_SYNC_MASK (1 << 15) |
90 | 90 | ||
91 | |||
92 | #define BTTV_BOARD_UNKNOWN 0x00 | ||
93 | #define BTTV_BOARD_PINNACLESAT 0x5e | ||
94 | #define BTTV_BOARD_NEBULA_DIGITV 0x68 | ||
95 | #define BTTV_BOARD_PC_HDTV 0x70 | ||
96 | #define BTTV_BOARD_TWINHAN_DST 0x71 | ||
97 | #define BTTV_BOARD_AVDVBT_771 0x7b | ||
98 | #define BTTV_BOARD_AVDVBT_761 0x7c | ||
99 | #define BTTV_BOARD_DVICO_DVBT_LITE 0x80 | ||
100 | #define BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE 0x87 | ||
101 | |||
102 | struct cards { | ||
103 | __u32 pci_id; | ||
104 | __u16 card_id; | ||
105 | char *name; | ||
106 | }; | ||
107 | |||
91 | extern int bt878_num; | 108 | extern int bt878_num; |
92 | 109 | ||
93 | struct bt878 { | 110 | struct bt878 { |