Changeset 290 for GPL/branches/alsa-resync1/alsa-kernel/pci/sonicvibes.c
- Timestamp:
- Feb 16, 2008, 7:40:20 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/alsa-resync1/alsa-kernel/pci/sonicvibes.c
r281 r290 1254 1254 return err; 1255 1255 /* check, if we can restrict PCI DMA transfers to 24 bits */ 1256 if (!pci_dma_supported(pci, 0x00ffffff)) { 1256 if (pci_set_dma_mask(pci, 0x00ffffff) < 0 || 1257 pci_set_consistent_dma_mask(pci, 0x00ffffff) < 0) { 1257 1258 snd_printk("architecture does not support 24bit PCI busmaster DMA\n"); 1258 1259 return -ENXIO; 1259 1260 } 1260 pci_set_consistent_dma_mask(pci, 0x00ffffff);1261 1261 1262 1262 sonic = snd_magic_kcalloc(sonicvibes_t, 0, GFP_KERNEL); … … 1389 1389 } 1390 1390 1391 snd_card_set_dev(card, &pci->dev); 1392 1391 1393 *rsonic = sonic; 1392 1394 return 0; … … 1472 1474 return err; 1473 1475 } 1474 if ((err = snd_sonicvibes_pcm(sonic, 0, NULL)) < 0) { 1475 snd_card_free(card); 1476 return err; 1477 } 1478 if ((err = snd_sonicvibes_mixer(sonic)) < 0) { 1479 snd_card_free(card); 1480 return err; 1481 } 1482 if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_SONICVIBES, 1483 sonic->midi_port, 1, 1484 sonic->irq, 0, 1485 &midi_uart)) < 0) { 1486 snd_card_free(card); 1487 return err; 1488 } 1489 snd_sonicvibes_midi(sonic, midi_uart); 1490 if ((err = snd_opl3_create(card, sonic->synth_port, 1491 sonic->synth_port + 2, 1492 OPL3_HW_OPL3_SV, 1, &opl3)) < 0) { 1493 snd_card_free(card); 1494 return err; 1495 } 1496 if ((err = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) { 1497 snd_card_free(card); 1498 return err; 1499 } 1500 #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) 1501 sonic->gameport.io = sonic->game_port; 1502 gameport_register_port(&sonic->gameport); 1503 #endif 1476 1504 1477 strcpy(card->driver, "SonicVibes"); 1505 1478 strcpy(card->shortname, "S3 SonicVibes"); … … 1509 1482 pci_resource_start(pci, 1), 1510 1483 sonic->irq); 1484 1485 if ((err = snd_sonicvibes_pcm(sonic, 0, NULL)) < 0) { 1486 snd_card_free(card); 1487 return err; 1488 } 1489 if ((err = snd_sonicvibes_mixer(sonic)) < 0) { 1490 snd_card_free(card); 1491 return err; 1492 } 1493 if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_SONICVIBES, 1494 sonic->midi_port, 1, 1495 sonic->irq, 0, 1496 &midi_uart)) < 0) { 1497 snd_card_free(card); 1498 return err; 1499 } 1500 snd_sonicvibes_midi(sonic, midi_uart); 1501 if ((err = snd_opl3_create(card, sonic->synth_port, 1502 sonic->synth_port + 2, 1503 OPL3_HW_OPL3_SV, 1, &opl3)) < 0) { 1504 snd_card_free(card); 1505 return err; 1506 } 1507 if ((err = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) { 1508 snd_card_free(card); 1509 return err; 1510 } 1511 #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) 1512 sonic->gameport.io = sonic->game_port; 1513 gameport_register_port(&sonic->gameport); 1514 #endif 1511 1515 1512 1516 if ((err = snd_card_register(card)) < 0) {
Note:
See TracChangeset
for help on using the changeset viewer.
