Changeset 598 for GPL/trunk/alsa-kernel/pci/fm801.c
- Timestamp:
- Apr 3, 2017, 4:51:56 PM (8 years ago)
- Location:
- GPL/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk
-
Property svn:mergeinfo
set to
/GPL/branches/uniaud32-2.1.x merged eligible
-
Property svn:mergeinfo
set to
-
GPL/trunk/alsa-kernel/pci/fm801.c
r410 r598 56 56 * 2 = MediaForte 256-PCPR 57 57 * 3 = MediaForte 64-PCR 58 * 16 = setup tuner only (this is additional bit), i.e. SF -64-PCR FM card58 * 16 = setup tuner only (this is additional bit), i.e. SF64-PCR FM card 59 59 * High 16-bits are video (radio) device number + 1 60 60 */ … … 68 68 MODULE_PARM_DESC(enable, "Enable FM801 soundcard."); 69 69 module_param_array(tea575x_tuner, int, NULL, 0444); 70 MODULE_PARM_DESC(tea575x_tuner, "Enable TEA575x tuner."); 70 MODULE_PARM_DESC(tea575x_tuner, "TEA575x tuner access method (1 = SF256-PCS, 2=SF256-PCPR, 3=SF64-PCR, +16=tuner-only)."); 71 72 #define TUNER_ONLY (1<<4) 73 #define TUNER_TYPE_MASK (~TUNER_ONLY & 0xFFFF) 71 74 72 75 /* … … 161 164 secondary: 1; /* secondary codec */ 162 165 unsigned char secondary_addr; /* address of the secondary codec */ 163 unsigned int tea575x_tuner; /* tuner flags */166 unsigned int tea575x_tuner; /* tuner access method & flags */ 164 167 165 168 unsigned short ply_ctrl; /* playback control */ … … 203 206 }; 204 207 205 static struct pci_device_id snd_fm801_ids[]= {208 static DEFINE_PCI_DEVICE_TABLE(snd_fm801_ids) = { 206 209 { 0x1319, 0x0801, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0, }, /* FM801 */ 207 210 { 0x5213, 0x0510, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0, }, /* Gallant Odyssey Sound 4 */ … … 1288 1291 unsigned short cmdw; 1289 1292 1290 if (chip->tea575x_tuner & 0x0010)1293 if (chip->tea575x_tuner & TUNER_ONLY) 1291 1294 goto __ac97_ok; 1292 1295 … … 1297 1300 outw(0, FM801_REG(chip, CODEC_CTRL)); 1298 1301 1299 if (wait_for_codec(chip, 0, AC97_RESET, msecs_to_jiffies(750)) < 0) { 1300 snd_printk(KERN_ERR "Primary AC'97 codec not found\n"); 1301 if (! resume) 1302 return -EIO; 1303 } 1302 if (wait_for_codec(chip, 0, AC97_RESET, msecs_to_jiffies(750)) < 0) 1303 if (!resume) { 1304 snd_printk(KERN_INFO "Primary AC'97 codec not found, " 1305 "assume SF64-PCR (tuner-only)\n"); 1306 chip->tea575x_tuner = 3 | TUNER_ONLY; 1307 goto __ac97_ok; 1308 } 1304 1309 1305 1310 if (chip->multichannel) { … … 1415 1420 } 1416 1421 chip->port = pci_resource_start(pci, 0); 1417 if ((tea575x_tuner & 0x0010) == 0) {1422 if ((tea575x_tuner & TUNER_ONLY) == 0) { 1418 1423 if (request_irq(pci->irq, snd_fm801_interrupt, IRQF_SHARED, 1419 1424 "FM801", chip)) { … … 1434 1439 1435 1440 snd_fm801_chip_init(chip, 0); 1441 /* init might set tuner access method */ 1442 tea575x_tuner = chip->tea575x_tuner; 1443 1444 if (chip->irq >= 0 && (tea575x_tuner & TUNER_ONLY)) { 1445 pci_clear_master(pci); 1446 free_irq(chip->irq, chip); 1447 chip->irq = -1; 1448 } 1436 1449 1437 1450 if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) { … … 1443 1456 1444 1457 #ifdef TEA575X_RADIO 1445 if (tea575x_tuner > 0 && (tea575x_tuner & 0x000f) < 4) { 1458 if ((tea575x_tuner & TUNER_TYPE_MASK) > 0 && 1459 (tea575x_tuner & TUNER_TYPE_MASK) < 4) { 1446 1460 chip->tea.dev_nr = tea575x_tuner >> 16; 1447 1461 chip->tea.card = card; 1448 1462 chip->tea.freq_fixup = 10700; 1449 1463 chip->tea.private_data = chip; 1450 chip->tea.ops = &snd_fm801_tea_ops[(tea575x_tuner & 0x000f) - 1];1464 chip->tea.ops = &snd_fm801_tea_ops[(tea575x_tuner & TUNER_TYPE_MASK) - 1]; 1451 1465 snd_tea575x_init(&chip->tea); 1452 1466 } … … 1488 1502 card->shortname, chip->port, chip->irq); 1489 1503 1490 if ( tea575x_tuner[dev] & 0x0010)1504 if (chip->tea575x_tuner & TUNER_ONLY) 1491 1505 goto __fm801_tuner_only; 1492 1506
Note:
See TracChangeset
for help on using the changeset viewer.