Ignore:
Timestamp:
Feb 16, 2008, 7:40:20 AM (18 years ago)
Author:
Brendan Oakley
Message:

Merged to ALSA 1.0.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/alsa-resync1/alsa-kernel/pci/sonicvibes.c

    r281 r290  
    12541254                return err;
    12551255        /* 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) {
    12571258                snd_printk("architecture does not support 24bit PCI busmaster DMA\n");
    12581259                return -ENXIO;
    12591260        }
    1260         pci_set_consistent_dma_mask(pci, 0x00ffffff);
    12611261
    12621262        sonic = snd_magic_kcalloc(sonicvibes_t, 0, GFP_KERNEL);
     
    13891389        }
    13901390
     1391        snd_card_set_dev(card, &pci->dev);
     1392
    13911393        *rsonic = sonic;
    13921394        return 0;
     
    14721474                return err;
    14731475        }
    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
    15041477        strcpy(card->driver, "SonicVibes");
    15051478        strcpy(card->shortname, "S3 SonicVibes");
     
    15091482                pci_resource_start(pci, 1),
    15101483                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
    15111515
    15121516        if ((err = snd_card_register(card)) < 0) {
Note: See TracChangeset for help on using the changeset viewer.