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

Merged to ALSA 1.0.2

Location:
GPL/branches/alsa-resync1/alsa-kernel/pci
Files:
19 edited

Legend:

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

    r206 r290  
    21612161        unsigned short misc;
    21622162
    2163         patch_ad1881(ac97);
    21642163        ac97->build_ops = &patch_ad1985_build_ops;
    21652164        misc = snd_ac97_read(ac97, AC97_AD_MISC);
     
    21672166        /* AD-compatible mode */
    21682167        /* Stereo mutes enabled */
     2168        /* in accordance with ADI driver: misc | 0x5c28 */
    21692169        snd_ac97_write_cache(ac97, AC97_AD_MISC, misc |
    21702170                             AC97_AD198X_LOSEL |
  • GPL/branches/alsa-resync1/alsa-kernel/pci/ali5451/ali5451.c

    r210 r290  
    21162116        return err;
    21172117    /* check, if we can restrict PCI DMA transfers to 31 bits */
    2118     if (!pci_dma_supported(pci, 0x7fffffff)) {
     2118        if (pci_set_dma_mask(pci, 0x7fffffff) < 0 ||
     2119            pci_set_consistent_dma_mask(pci, 0x7fffffff) < 0) {
    21192120        snd_printk("architecture does not support 31bit PCI busmaster DMA\n");
    21202121        return -ENXIO;
    21212122    }
    2122     pci_set_dma_mask(pci, 0x7fffffff);
    21232123
    21242124    if ((codec = kcalloc(1, sizeof(*codec), GFP_KERNEL)) == NULL)
  • GPL/branches/alsa-resync1/alsa-kernel/pci/als4000.c

    r281 r290  
    626626    }
    627627    /* check, if we can restrict PCI DMA transfers to 24 bits */
    628     if (!pci_dma_supported(pci, 0x00ffffff)) {
     628        if (pci_set_dma_mask(pci, 0x00ffffff) < 0 ||
     629            pci_set_consistent_dma_mask(pci, 0x00ffffff) < 0) {
    629630        snd_printk("architecture does not support 24bit PCI busmaster DMA\n");
    630631        return -ENXIO;
    631632    }
    632     pci_set_dma_mask(pci, 0x00ffffff);
    633633
    634634    if ((err = pci_request_regions(pci, "ALS4000")) < 0)
     
    686686    chip->pci = pci;
    687687    chip->alt_port = gcr;
     688        snd_card_set_dev(card, &pci->dev);
    688689
    689690    snd_als4000_configure(chip);
     691
     692        strcpy(card->driver, "ALS4000");
     693        strcpy(card->shortname, "Avance Logic ALS4000");
     694        sprintf(card->longname, "%s at 0x%lx, irq %i",
     695                card->shortname, chip->alt_port, chip->irq);
    690696
    691697    if ((err = snd_mpu401_uart_new( card, 0, MPU401_HW_ALS4000,
     
    723729        }
    724730#endif
    725     strcpy(card->driver, "ALS4000");
    726     strcpy(card->shortname, "Avance Logic ALS4000");
    727     sprintf(card->longname, "%s at 0x%lx, irq %i",
    728             card->shortname, chip->alt_port, chip->irq);
    729731
    730732    if ((err = snd_card_register(card)) < 0) {
  • GPL/branches/alsa-resync1/alsa-kernel/pci/cmipci.c

    r281 r290  
    15491549    runtime->hw.channels_max = cm->max_channels;
    15501550    snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_SIZE, 0, 0x10000);
     1551        cm->dig_pcm_status = cm->dig_status;
    15511552    return 0;
    15521553}
     
    30053006        }
    30063007#endif
     3008        snd_card_set_dev(card, &pci->dev);
     3009
    30073010    *rcmipci = cm;
    30083011    return 0;
     
    32063209
    32073210/* format is: snd-cmipci=enable,index,id,
    3208                          mpu_port,fm_port,soft_ac3,joystick */
     3211                         mpu_port,fm_port,soft_ac3,joystick_port */
    32093212
    32103213static int __init alsa_card_cmipci_setup(char *str)
     
    32233226#endif
    32243227#ifdef SUPPORT_JOYSTICK
    3225                && get_option(&str,&joystick[nr_dev]) == 2
     3228               && get_option(&str,&joystick_port[nr_dev]) == 2
    32263229#endif
    32273230               );
  • GPL/branches/alsa-resync1/alsa-kernel/pci/cs4281.c

    r250 r290  
    14471447    }
    14481448
     1449        snd_card_set_dev(card, &pci->dev);
     1450
    14491451    *rchip = chip;
    14501452    return 0;
  • GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/memory.c

    r84 r290  
    539539 * copy_from_user(blk + offset, data, size)
    540540 */
    541 int snd_emu10k1_synth_copy_from_user(struct snd_emu10k1 *emu, snd_util_memblk_t *blk, int offset, const char *data, int size)
     541int snd_emu10k1_synth_copy_from_user(struct snd_emu10k1 *emu, snd_util_memblk_t *blk, int offset, const char __user *data, int size)
    542542{
    543543        int page, nextofs, end_offset, temp, temp1;
  • GPL/branches/alsa-resync1/alsa-kernel/pci/es1968.c

    r277 r290  
    25732573                                       es1968_t **chip_ret)
    25742574{
    2575 #ifdef TARGET_OS2
    25762575    static snd_device_ops_t ops = {
    25772576                .dev_free =     snd_es1968_dev_free,
    25782577    };
    2579 #else
    2580     static snd_device_ops_t ops = {
    2581     dev_free:       snd_es1968_dev_free,
    2582     };
    2583 #endif
    25842578    es1968_t *chip;
    25852579    int i, err;
     
    25912585        return err;
    25922586    /* check, if we can restrict PCI DMA transfers to 28 bits */
    2593     if (!pci_dma_supported(pci, 0x0fffffff)) {
     2587        if (pci_set_dma_mask(pci, 0x0fffffff) < 0 ||
     2588            pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) {
    25942589        snd_printk("architecture does not support 28bit PCI busmaster DMA\n");
    25952590        return -ENXIO;
    25962591    }
    2597     pci_set_consistent_dma_mask(pci, 0x0fffffff);
    25982592
    25992593    chip = kcalloc(1, sizeof(*chip), GFP_KERNEL);
     
    26692663        return err;
    26702664    }
     2665
     2666        snd_card_set_dev(card, &pci->dev);
    26712667
    26722668    *chip_ret = chip;
  • GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712/ak4xxx.c

    r260 r290  
    176176}
    177177
     178static int __init alsa_ice1712_akm4xxx_module_init(void)
     179{
     180        return 0;
     181}
     182       
     183static void __exit alsa_ice1712_akm4xxx_module_exit(void)
     184{
     185}
     186       
     187module_init(alsa_ice1712_akm4xxx_module_init)
     188module_exit(alsa_ice1712_akm4xxx_module_exit)
     189
    178190EXPORT_SYMBOL(snd_ice1712_akm4xxx_init);
    179191EXPORT_SYMBOL(snd_ice1712_akm4xxx_free);
  • GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712/ice1712.c

    r281 r290  
    23642364                return err;
    23652365        /* check, if we can restrict PCI DMA transfers to 28 bits */
    2366         if (!pci_dma_supported(pci, 0x0fffffff)) {
     2366        if (pci_set_dma_mask(pci, 0x0fffffff) < 0 ||
     2367            pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) {
    23672368                snd_printk("architecture does not support 28bit PCI busmaster DMA\n");
    23682369                return -ENXIO;
    23692370        }
    2370         pci_set_consistent_dma_mask(pci, 0x0fffffff);
    23712371
    23722372        ice = snd_magic_kcalloc(ice1712_t, 0, GFP_KERNEL);
     
    24462446        }
    24472447
     2448        snd_card_set_dev(card, &pci->dev);
     2449
    24482450        *r_ice1712 = ice;
    24492451        return 0;
  • GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712/ice1724.c

    r281 r290  
    18021802        if ((err = pci_enable_device(pci)) < 0)
    18031803                return err;
    1804         pci_set_consistent_dma_mask(pci, 0xffffffff);
    18051804
    18061805        ice = snd_magic_kcalloc(ice1712_t, 0, GFP_KERNEL);
     
    18661865        }
    18671866
     1867        snd_card_set_dev(card, &pci->dev);
     1868
    18681869        *r_ice1712 = ice;
    18691870        return 0;
  • GPL/branches/alsa-resync1/alsa-kernel/pci/intel8x0.c

    r278 r290  
    778778}
    779779
     780#ifdef __i386__
     781/*
     782 * Intel 82443MX running a 100MHz processor system bus has a hardware bug,
     783 * which aborts PCI busmaster for audio transfer.  A workaround is to set
     784 * the pages as non-cached.  For details, see the errata in
     785 *      http://www.intel.com/design/chipsets/specupdt/245051.htm
     786 */
     787static void fill_nocache(void *buf, int size, int nocache)
     788{
     789        size = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
     790        change_page_attr(virt_to_page(buf), size, nocache ? PAGE_KERNEL_NOCACHE : PAGE_KERNEL);
     791        global_flush_tlb();
     792}
     793#else
     794#define fill_nocache(buf,size,nocache)
     795#endif
     796
    780797/*
    781798 *  Interrupt handler
     
    980997    struct intel8x0 *chip = snd_pcm_substream_chip(substream);
    981998    struct ichdev *ichdev = get_ichdev(substream);
     999        struct snd_pcm_runtime *runtime = substream->runtime;
     1000        size_t size = params_buffer_bytes(hw_params);
    9821001    int dbl = params_rate(hw_params) > 48000;
    9831002    int err;
    9841003
     1004        if (chip->fix_nocache && runtime->dma_area && runtime->dma_bytes < size)
     1005                fill_nocache(runtime->dma_area, runtime->dma_bytes, 0); /* clear */
    9851006    err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
    9861007    if (err < 0)
    9871008        return err;
     1009        if (chip->fix_nocache && err > 0)
     1010                fill_nocache(runtime->dma_area, runtime->dma_bytes, 1);
    9881011    if (ichdev->pcm_open_flag) {
    9891012        snd_ac97_pcm_close(ichdev->pcm);
     
    10041027static int snd_intel8x0_hw_free(snd_pcm_substream_t * substream)
    10051028{
     1029        struct intel8x0 *chip = snd_pcm_substream_chip(substream);
    10061030    struct ichdev *ichdev = get_ichdev(substream);
    10071031
     
    10101034        ichdev->pcm_open_flag = 0;
    10111035    }
     1036        if (chip->fix_nocache && substream->runtime->dma_area)
     1037                fill_nocache(substream->runtime->dma_area, substream->runtime->dma_bytes, 0);
    10121038    return snd_pcm_lib_free_pages(substream);
    10131039}
     
    29582984    /* tables must be aligned to 8 bytes here, but the kernel pages
    29592985     are much bigger, so we don't care (on i386) */
    2960 
     2986        /* workaround for 440MX */
     2987        if (chip->fix_nocache)
     2988                fill_nocache(chip->bdbars, chip->bdbars_count * sizeof(u32) * ICH_MAX_FRAGS * 2, 1);
    29612989    int_sta_masks = 0;
    29622990    for (i = 0; i < chip->bdbars_count; i++) {
     
    30183046        return err;
    30193047    }
     3048
     3049        snd_card_set_dev(card, &pci->dev);
    30203050
    30213051    *r_intel8x0 = chip;
  • GPL/branches/alsa-resync1/alsa-kernel/pci/korg1212/korg1212.c

    r281 r290  
    24622462        }
    24632463       
     2464        snd_card_set_dev(card, &pci->dev);
     2465
    24642466        * rchip = korg1212;
    24652467        return 0;
  • GPL/branches/alsa-resync1/alsa-kernel/pci/maestro3.c

    r250 r290  
    27062706
    27072707    /* check, if we can restrict PCI DMA transfers to 28 bits */
    2708     if (!pci_dma_supported(pci, 0x0fffffff)) {
     2708        if (pci_set_dma_mask(pci, 0x0fffffff) < 0 ||
     2709            pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) {
    27092710        snd_printk("architecture does not support 28bit PCI busmaster DMA\n");
    27102711        return -ENXIO;
    27112712    }
    2712     pci_set_consistent_dma_mask(pci, 0x0fffffff);
    27132713
    27142714    chip = kcalloc(1, sizeof(*chip), GFP_KERNEL);
     
    28292829    snd_m3_enable_ints(chip);
    28302830    snd_m3_assp_continue(chip);
     2831
     2832        snd_card_set_dev(card, &pci->dev);
    28312833
    28322834    *chip_ret = chip;
  • GPL/branches/alsa-resync1/alsa-kernel/pci/rme96.c

    r281 r290  
    25112511        rme96->card = card;
    25122512        rme96->pci = pci;
     2513        snd_card_set_dev(card, &pci->dev);
    25132514        if ((err = snd_rme96_create(rme96)) < 0) {
    25142515                snd_card_free(card);
  • GPL/branches/alsa-resync1/alsa-kernel/pci/rme9652/hdsp.c

    r281 r290  
    49864986       
    49874987        pci_read_config_word(hdsp->pci, PCI_CLASS_REVISION, &hdsp->firmware_rev);
     4988       
     4989        /* From Martin Bjoernsen :
     4990            "It is important that the card's latency timer register in
     4991            the PCI configuration space is set to a value much larger
     4992            than 0 by the computer's BIOS or the driver.
     4993            The windows driver always sets this 8 bit register [...]
     4994            to its maximum 255 to avoid problems with some computers."
     4995        */
     4996        pci_write_config_byte(hdsp->pci, PCI_LATENCY_TIMER, 0xFF);
     4997       
    49884998        strcpy(card->driver, "H-DSP");
    49894999        strcpy(card->mixername, "Xilinx FPGA");
     
    51485158        hdsp->dev = dev;
    51495159        hdsp->pci = pci;
     5160        snd_card_set_dev(card, &pci->dev);
    51505161
    51515162        if ((err = snd_hdsp_create(card, hdsp, precise_ptr[dev])) < 0) {
  • GPL/branches/alsa-resync1/alsa-kernel/pci/rme9652/rme9652.c

    r281 r290  
    27062706        rme9652->dev = dev;
    27072707        rme9652->pci = pci;
     2708        snd_card_set_dev(card, &pci->dev);
    27082709
    27092710        if ((err = snd_rme9652_create(card, rme9652, precise_ptr[dev])) < 0) {
  • 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) {
  • GPL/branches/alsa-resync1/alsa-kernel/pci/trident/trident_main.c

    r256 r290  
    35403540        return err;
    35413541    /* check, if we can restrict PCI DMA transfers to 30 bits */
    3542     if (!pci_dma_supported(pci, 0x3fffffff)) {
     3542        if (pci_set_dma_mask(pci, 0x3fffffff) < 0 ||
     3543            pci_set_consistent_dma_mask(pci, 0x3fffffff) < 0) {
    35433544        snd_printk("architecture does not support 30bit PCI busmaster DMA\n");
    35443545        return -ENXIO;
    35453546    }
    3546     pci_set_dma_mask(pci, 0x3fffffff);
    35473547
    35483548    trident = kcalloc(1, sizeof(*trident), GFP_KERNEL);
     
    36403640        return err;
    36413641    }
     3642        snd_card_set_dev(card, &pci->dev);
    36423643    *rtrident = trident;
    36433644    return 0;
  • GPL/branches/alsa-resync1/alsa-kernel/pci/ymfpci/ymfpci.c

    r281 r290  
    316316        }
    317317#endif
    318         strcpy(card->driver, str);
    319         sprintf(card->shortname, "Yamaha DS-XG PCI (%s)", str);
    320         sprintf(card->longname, "%s at 0x%lx, irq %i",
    321                 card->shortname,
    322                 chip->reg_area_phys,
    323                 chip->irq);
    324318
    325319        if ((err = snd_card_register(card)) < 0) {
Note: See TracChangeset for help on using the changeset viewer.