Changeset 290 for GPL/branches/alsa-resync1/alsa-kernel/pci
- Timestamp:
- Feb 16, 2008, 7:40:20 AM (18 years ago)
- Location:
- GPL/branches/alsa-resync1/alsa-kernel/pci
- Files:
-
- 19 edited
-
ac97/ac97_patch.c (modified) (2 diffs)
-
ali5451/ali5451.c (modified) (1 diff)
-
als4000.c (modified) (3 diffs)
-
cmipci.c (modified) (4 diffs)
-
cs4281.c (modified) (1 diff)
-
emu10k1/memory.c (modified) (1 diff)
-
es1968.c (modified) (3 diffs)
-
ice1712/ak4xxx.c (modified) (1 diff)
-
ice1712/ice1712.c (modified) (2 diffs)
-
ice1712/ice1724.c (modified) (2 diffs)
-
intel8x0.c (modified) (6 diffs)
-
korg1212/korg1212.c (modified) (1 diff)
-
maestro3.c (modified) (2 diffs)
-
rme96.c (modified) (1 diff)
-
rme9652/hdsp.c (modified) (2 diffs)
-
rme9652/rme9652.c (modified) (1 diff)
-
sonicvibes.c (modified) (4 diffs)
-
trident/trident_main.c (modified) (2 diffs)
-
ymfpci/ymfpci.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/alsa-resync1/alsa-kernel/pci/ac97/ac97_patch.c
r206 r290 2161 2161 unsigned short misc; 2162 2162 2163 patch_ad1881(ac97);2164 2163 ac97->build_ops = &patch_ad1985_build_ops; 2165 2164 misc = snd_ac97_read(ac97, AC97_AD_MISC); … … 2167 2166 /* AD-compatible mode */ 2168 2167 /* Stereo mutes enabled */ 2168 /* in accordance with ADI driver: misc | 0x5c28 */ 2169 2169 snd_ac97_write_cache(ac97, AC97_AD_MISC, misc | 2170 2170 AC97_AD198X_LOSEL | -
GPL/branches/alsa-resync1/alsa-kernel/pci/ali5451/ali5451.c
r210 r290 2116 2116 return err; 2117 2117 /* 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) { 2119 2120 snd_printk("architecture does not support 31bit PCI busmaster DMA\n"); 2120 2121 return -ENXIO; 2121 2122 } 2122 pci_set_dma_mask(pci, 0x7fffffff);2123 2123 2124 2124 if ((codec = kcalloc(1, sizeof(*codec), GFP_KERNEL)) == NULL) -
GPL/branches/alsa-resync1/alsa-kernel/pci/als4000.c
r281 r290 626 626 } 627 627 /* 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) { 629 630 snd_printk("architecture does not support 24bit PCI busmaster DMA\n"); 630 631 return -ENXIO; 631 632 } 632 pci_set_dma_mask(pci, 0x00ffffff);633 633 634 634 if ((err = pci_request_regions(pci, "ALS4000")) < 0) … … 686 686 chip->pci = pci; 687 687 chip->alt_port = gcr; 688 snd_card_set_dev(card, &pci->dev); 688 689 689 690 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); 690 696 691 697 if ((err = snd_mpu401_uart_new( card, 0, MPU401_HW_ALS4000, … … 723 729 } 724 730 #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);729 731 730 732 if ((err = snd_card_register(card)) < 0) { -
GPL/branches/alsa-resync1/alsa-kernel/pci/cmipci.c
r281 r290 1549 1549 runtime->hw.channels_max = cm->max_channels; 1550 1550 snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_SIZE, 0, 0x10000); 1551 cm->dig_pcm_status = cm->dig_status; 1551 1552 return 0; 1552 1553 } … … 3005 3006 } 3006 3007 #endif 3008 snd_card_set_dev(card, &pci->dev); 3009 3007 3010 *rcmipci = cm; 3008 3011 return 0; … … 3206 3209 3207 3210 /* format is: snd-cmipci=enable,index,id, 3208 mpu_port,fm_port,soft_ac3,joystick */3211 mpu_port,fm_port,soft_ac3,joystick_port */ 3209 3212 3210 3213 static int __init alsa_card_cmipci_setup(char *str) … … 3223 3226 #endif 3224 3227 #ifdef SUPPORT_JOYSTICK 3225 && get_option(&str,&joystick [nr_dev]) == 23228 && get_option(&str,&joystick_port[nr_dev]) == 2 3226 3229 #endif 3227 3230 ); -
GPL/branches/alsa-resync1/alsa-kernel/pci/cs4281.c
r250 r290 1447 1447 } 1448 1448 1449 snd_card_set_dev(card, &pci->dev); 1450 1449 1451 *rchip = chip; 1450 1452 return 0; -
GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/memory.c
r84 r290 539 539 * copy_from_user(blk + offset, data, size) 540 540 */ 541 int snd_emu10k1_synth_copy_from_user(struct snd_emu10k1 *emu, snd_util_memblk_t *blk, int offset, const char *data, int size)541 int snd_emu10k1_synth_copy_from_user(struct snd_emu10k1 *emu, snd_util_memblk_t *blk, int offset, const char __user *data, int size) 542 542 { 543 543 int page, nextofs, end_offset, temp, temp1; -
GPL/branches/alsa-resync1/alsa-kernel/pci/es1968.c
r277 r290 2573 2573 es1968_t **chip_ret) 2574 2574 { 2575 #ifdef TARGET_OS22576 2575 static snd_device_ops_t ops = { 2577 2576 .dev_free = snd_es1968_dev_free, 2578 2577 }; 2579 #else2580 static snd_device_ops_t ops = {2581 dev_free: snd_es1968_dev_free,2582 };2583 #endif2584 2578 es1968_t *chip; 2585 2579 int i, err; … … 2591 2585 return err; 2592 2586 /* 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) { 2594 2589 snd_printk("architecture does not support 28bit PCI busmaster DMA\n"); 2595 2590 return -ENXIO; 2596 2591 } 2597 pci_set_consistent_dma_mask(pci, 0x0fffffff);2598 2592 2599 2593 chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); … … 2669 2663 return err; 2670 2664 } 2665 2666 snd_card_set_dev(card, &pci->dev); 2671 2667 2672 2668 *chip_ret = chip; -
GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712/ak4xxx.c
r260 r290 176 176 } 177 177 178 static int __init alsa_ice1712_akm4xxx_module_init(void) 179 { 180 return 0; 181 } 182 183 static void __exit alsa_ice1712_akm4xxx_module_exit(void) 184 { 185 } 186 187 module_init(alsa_ice1712_akm4xxx_module_init) 188 module_exit(alsa_ice1712_akm4xxx_module_exit) 189 178 190 EXPORT_SYMBOL(snd_ice1712_akm4xxx_init); 179 191 EXPORT_SYMBOL(snd_ice1712_akm4xxx_free); -
GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712/ice1712.c
r281 r290 2364 2364 return err; 2365 2365 /* 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) { 2367 2368 snd_printk("architecture does not support 28bit PCI busmaster DMA\n"); 2368 2369 return -ENXIO; 2369 2370 } 2370 pci_set_consistent_dma_mask(pci, 0x0fffffff);2371 2371 2372 2372 ice = snd_magic_kcalloc(ice1712_t, 0, GFP_KERNEL); … … 2446 2446 } 2447 2447 2448 snd_card_set_dev(card, &pci->dev); 2449 2448 2450 *r_ice1712 = ice; 2449 2451 return 0; -
GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712/ice1724.c
r281 r290 1802 1802 if ((err = pci_enable_device(pci)) < 0) 1803 1803 return err; 1804 pci_set_consistent_dma_mask(pci, 0xffffffff);1805 1804 1806 1805 ice = snd_magic_kcalloc(ice1712_t, 0, GFP_KERNEL); … … 1866 1865 } 1867 1866 1867 snd_card_set_dev(card, &pci->dev); 1868 1868 1869 *r_ice1712 = ice; 1869 1870 return 0; -
GPL/branches/alsa-resync1/alsa-kernel/pci/intel8x0.c
r278 r290 778 778 } 779 779 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 */ 787 static 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 780 797 /* 781 798 * Interrupt handler … … 980 997 struct intel8x0 *chip = snd_pcm_substream_chip(substream); 981 998 struct ichdev *ichdev = get_ichdev(substream); 999 struct snd_pcm_runtime *runtime = substream->runtime; 1000 size_t size = params_buffer_bytes(hw_params); 982 1001 int dbl = params_rate(hw_params) > 48000; 983 1002 int err; 984 1003 1004 if (chip->fix_nocache && runtime->dma_area && runtime->dma_bytes < size) 1005 fill_nocache(runtime->dma_area, runtime->dma_bytes, 0); /* clear */ 985 1006 err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); 986 1007 if (err < 0) 987 1008 return err; 1009 if (chip->fix_nocache && err > 0) 1010 fill_nocache(runtime->dma_area, runtime->dma_bytes, 1); 988 1011 if (ichdev->pcm_open_flag) { 989 1012 snd_ac97_pcm_close(ichdev->pcm); … … 1004 1027 static int snd_intel8x0_hw_free(snd_pcm_substream_t * substream) 1005 1028 { 1029 struct intel8x0 *chip = snd_pcm_substream_chip(substream); 1006 1030 struct ichdev *ichdev = get_ichdev(substream); 1007 1031 … … 1010 1034 ichdev->pcm_open_flag = 0; 1011 1035 } 1036 if (chip->fix_nocache && substream->runtime->dma_area) 1037 fill_nocache(substream->runtime->dma_area, substream->runtime->dma_bytes, 0); 1012 1038 return snd_pcm_lib_free_pages(substream); 1013 1039 } … … 2958 2984 /* tables must be aligned to 8 bytes here, but the kernel pages 2959 2985 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); 2961 2989 int_sta_masks = 0; 2962 2990 for (i = 0; i < chip->bdbars_count; i++) { … … 3018 3046 return err; 3019 3047 } 3048 3049 snd_card_set_dev(card, &pci->dev); 3020 3050 3021 3051 *r_intel8x0 = chip; -
GPL/branches/alsa-resync1/alsa-kernel/pci/korg1212/korg1212.c
r281 r290 2462 2462 } 2463 2463 2464 snd_card_set_dev(card, &pci->dev); 2465 2464 2466 * rchip = korg1212; 2465 2467 return 0; -
GPL/branches/alsa-resync1/alsa-kernel/pci/maestro3.c
r250 r290 2706 2706 2707 2707 /* 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) { 2709 2710 snd_printk("architecture does not support 28bit PCI busmaster DMA\n"); 2710 2711 return -ENXIO; 2711 2712 } 2712 pci_set_consistent_dma_mask(pci, 0x0fffffff);2713 2713 2714 2714 chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); … … 2829 2829 snd_m3_enable_ints(chip); 2830 2830 snd_m3_assp_continue(chip); 2831 2832 snd_card_set_dev(card, &pci->dev); 2831 2833 2832 2834 *chip_ret = chip; -
GPL/branches/alsa-resync1/alsa-kernel/pci/rme96.c
r281 r290 2511 2511 rme96->card = card; 2512 2512 rme96->pci = pci; 2513 snd_card_set_dev(card, &pci->dev); 2513 2514 if ((err = snd_rme96_create(rme96)) < 0) { 2514 2515 snd_card_free(card); -
GPL/branches/alsa-resync1/alsa-kernel/pci/rme9652/hdsp.c
r281 r290 4986 4986 4987 4987 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 4988 4998 strcpy(card->driver, "H-DSP"); 4989 4999 strcpy(card->mixername, "Xilinx FPGA"); … … 5148 5158 hdsp->dev = dev; 5149 5159 hdsp->pci = pci; 5160 snd_card_set_dev(card, &pci->dev); 5150 5161 5151 5162 if ((err = snd_hdsp_create(card, hdsp, precise_ptr[dev])) < 0) { -
GPL/branches/alsa-resync1/alsa-kernel/pci/rme9652/rme9652.c
r281 r290 2706 2706 rme9652->dev = dev; 2707 2707 rme9652->pci = pci; 2708 snd_card_set_dev(card, &pci->dev); 2708 2709 2709 2710 if ((err = snd_rme9652_create(card, rme9652, precise_ptr[dev])) < 0) { -
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) { -
GPL/branches/alsa-resync1/alsa-kernel/pci/trident/trident_main.c
r256 r290 3540 3540 return err; 3541 3541 /* 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) { 3543 3544 snd_printk("architecture does not support 30bit PCI busmaster DMA\n"); 3544 3545 return -ENXIO; 3545 3546 } 3546 pci_set_dma_mask(pci, 0x3fffffff);3547 3547 3548 3548 trident = kcalloc(1, sizeof(*trident), GFP_KERNEL); … … 3640 3640 return err; 3641 3641 } 3642 snd_card_set_dev(card, &pci->dev); 3642 3643 *rtrident = trident; 3643 3644 return 0; -
GPL/branches/alsa-resync1/alsa-kernel/pci/ymfpci/ymfpci.c
r281 r290 316 316 } 317 317 #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);324 318 325 319 if ((err = snd_card_register(card)) < 0) {
Note:
See TracChangeset
for help on using the changeset viewer.
