Changeset 348
- Timestamp:
- 04/21/08 02:52:19 (7 months ago)
- Location:
- GPL/branches/alsa-resync1/alsa-kernel
- Files:
-
- 52 modified
-
core/init.c (modified) (2 diffs)
-
core/memalloc.c (modified) (8 diffs)
-
core/pcm.c (modified) (1 diff)
-
core/pcm_lib.c (modified) (4 diffs)
-
core/sgbuf.c (modified) (7 diffs)
-
drivers/dummy.c (modified) (2 diffs)
-
drivers/mpu401/mpu401.c (modified) (11 diffs)
-
drivers/serial-u16550.c (modified) (2 diffs)
-
include/sound/adriver.h (modified) (6 diffs)
-
include/sound/compat_22.h (modified) (5 diffs)
-
include/sound/core.h (modified) (1 diff)
-
include/sound/memalloc.h (modified) (5 diffs)
-
include/sound/version.h (modified) (1 diff)
-
isa/ad1816a/ad1816a_lib.c (modified) (1 diff)
-
isa/ad1848/ad1848_lib.c (modified) (1 diff)
-
isa/cmi8330.c (modified) (1 diff)
-
isa/cs423x/cs4231_lib.c (modified) (1 diff)
-
isa/dt019x.c (modified) (3 diffs)
-
isa/es1688/es1688.c (modified) (2 diffs)
-
isa/es1688/es1688_lib.c (modified) (1 diff)
-
isa/es18xx.c (modified) (3 diffs)
-
isa/gus/gus_pcm.c (modified) (2 diffs)
-
isa/gus/gusclassic.c (modified) (2 diffs)
-
isa/gus/gusextreme.c (modified) (9 diffs)
-
isa/gus/gusmax.c (modified) (2 diffs)
-
isa/gus/interwave.c (modified) (2 diffs)
-
isa/opti9xx/opti92x-ad1848.c (modified) (7 diffs)
-
isa/sb/es968.c (modified) (1 diff)
-
isa/sb/sb16.c (modified) (2 diffs)
-
isa/sb/sb16_main.c (modified) (1 diff)
-
isa/sb/sb8.c (modified) (2 diffs)
-
isa/sb/sb8_main.c (modified) (1 diff)
-
pci/ac97/ac97_patch.c (modified) (1 diff)
-
pci/emu10k1/emu10k1.c (modified) (1 diff)
-
pci/emu10k1/emu10k1_callback.c (modified) (1 diff)
-
pci/emu10k1/emufx.c (modified) (1 diff)
-
pci/ice1712/aureon.c (modified) (1 diff)
-
pci/ice1712/delta.c (modified) (3 diffs)
-
pci/ice1712/ews.c (modified) (2 diffs)
-
pci/ice1712/hoontech.c (modified) (1 diff)
-
pci/ice1712/ice1712.c (modified) (14 diffs)
-
pci/ice1712/ice1712.h (modified) (2 diffs)
-
pci/ice1712/ice1724.c (modified) (3 diffs)
-
pci/ice1712/revo.c (modified) (1 diff)
-
pci/intel8x0.c (modified) (5 diffs)
-
pci/korg1212/korg1212.c (modified) (13 diffs)
-
pci/rme96.c (modified) (2 diffs)
-
pci/rme9652/hdsp.c (modified) (2 diffs)
-
pci/rme9652/rme9652.c (modified) (2 diffs)
-
pci/sonicvibes.c (modified) (1 diff)
-
pci/trident/trident_main.c (modified) (1 diff)
-
pci/trident/trident_memory.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/alsa-resync1/alsa-kernel/core/init.c
r281 r348 86 86 strlcpy(card->id, xid, sizeof(card->id)); 87 87 } 88 err = 0; 88 89 write_lock(&snd_card_rwlock); 89 90 if (idx < 0) { … … 101 102 } else if (idx < snd_ecards_limit) { 102 103 if (snd_cards_lock & (1 << idx)) 103 idx = -1; /* invalid */104 err = -ENODEV; /* invalid */ 104 105 } else if (idx < SNDRV_CARDS) 105 106 snd_ecards_limit = idx + 1; /* increase the limit */ 106 107 else 107 idx = -1;108 if (idx < 0 ) {108 err = -ENODEV; 109 if (idx < 0 || err < 0) { 109 110 write_unlock(&snd_card_rwlock); 110 if (idx >= snd_ecards_limit) 111 snd_printk(KERN_ERR "card %i is out of range (0-%i)\n", idx, snd_ecards_limit-1); 111 snd_printk(KERN_ERR "cannot find the slot for index %d (range 0-%i)\n", idx, snd_ecards_limit - 1); 112 112 goto __error; 113 113 } -
GPL/branches/alsa-resync1/alsa-kernel/core/memalloc.c
r206 r348 27 27 #include <linux/proc_fs.h> 28 28 #include <sound/memalloc.h> 29 #ifdef CONFIG_SBUS 30 #include <asm/sbus.h> 31 #endif 29 32 30 33 … … 65 68 #ifdef CONFIG_PCI 66 69 #if defined(__i386__) || defined(__ppc__) || defined(__x86_64__) 67 #define HACK_PCI_ALLOC_CONSISTENT 68 69 /* 70 * A hack to allocate large buffers via pci_alloc_consistent() 71 * 72 * since pci_alloc_consistent always tries GFP_DMA when the requested 70 71 /* 72 * A hack to allocate large buffers via dma_alloc_coherent() 73 * 74 * since dma_alloc_coherent always tries GFP_DMA when the requested 73 75 * pci memory region is below 32bit, it happens quite often that even 74 76 * 2 order of pages cannot be allocated. … … 78 80 * with the requested region, then realloate with the original dma_mask 79 81 * again. 80 */ 81 82 static void *snd_pci_hack_alloc_consistent(struct pci_dev *hwdev, size_t size, 83 dma_addr_t *dma_handle) 82 * 83 * Really, we want to move this type of thing into dma_alloc_coherent() 84 * so dma_mask doesn't have to be messed with. 85 */ 86 87 static void *snd_dma_hack_alloc_coherent(struct device *dev, size_t size, 88 dma_addr_t *dma_handle, int flags) 84 89 { 85 90 void *ret; 86 u64 dma_mask, cdma_mask; 87 unsigned long mask; 88 89 if (hwdev == NULL) 90 return pci_alloc_consistent(hwdev, size, dma_handle); 91 dma_mask = hwdev->dma_mask; 92 cdma_mask = hwdev->consistent_dma_mask; 93 mask = (unsigned long)dma_mask && (unsigned long)cdma_mask; 94 hwdev->dma_mask = 0xffffffff; /* do without masking */ 95 hwdev->consistent_dma_mask = 0xffffffff; /* do without masking */ 96 ret = pci_alloc_consistent(hwdev, size, dma_handle); 97 hwdev->dma_mask = dma_mask; /* restore */ 98 hwdev->consistent_dma_mask = cdma_mask; /* restore */ 91 u64 dma_mask; 92 93 if (dev == NULL || !dev->dma_mask) 94 return dma_alloc_coherent(dev, size, dma_handle, flags); 95 dma_mask = *dev->dma_mask; 96 *dev->dma_mask = 0xffffffff; /* do without masking */ 97 ret = dma_alloc_coherent(dev, size, dma_handle, flags); 98 *dev->dma_mask = dma_mask; /* restore */ 99 99 if (ret) { 100 100 /* obtained address is out of range? */ 101 if (((unsigned long)*dma_handle + size - 1) & ~ mask) {101 if (((unsigned long)*dma_handle + size - 1) & ~dma_mask) { 102 102 /* reallocate with the proper mask */ 103 pci_free_consistent(hwdev, size, ret, *dma_handle);104 ret = pci_alloc_consistent(hwdev, size, dma_handle);103 dma_free_coherent(dev, size, ret, *dma_handle); 104 ret = dma_alloc_coherent(dev, size, dma_handle, flags); 105 105 } 106 106 } else { 107 107 /* wish to success now with the proper mask... */ 108 if ( mask != 0xffffffffUL)109 ret = pci_alloc_consistent(hwdev, size, dma_handle);108 if (dma_mask != 0xffffffffUL) 109 ret = dma_alloc_coherent(dev, size, dma_handle, flags); 110 110 } 111 111 return ret; 112 112 } 113 113 114 /* redefine pci_alloc_consistent for some architectures */115 #undef pci_alloc_consistent116 #define pci_alloc_consistent snd_pci_hack_alloc_consistent114 /* redefine dma_alloc_coherent for some architectures */ 115 #undef dma_alloc_coherent 116 #define dma_alloc_coherent snd_dma_hack_alloc_coherent 117 117 118 118 #endif /* arch */ … … 395 395 * Returns the pointer of the buffer, or NULL if no enoguh memory. 396 396 */ 397 void *snd_malloc_pages( unsigned longsize, unsigned int dma_flags)397 void *snd_malloc_pages(size_t size, unsigned int dma_flags) 398 398 { 399 399 int pg; … … 416 416 * Releases the buffer allocated via snd_malloc_pages(). 417 417 */ 418 void snd_free_pages(void *ptr, unsigned longsize)418 void snd_free_pages(void *ptr, size_t size) 419 419 { 420 420 int pg; … … 721 721 {0 }, /* terminator */ 722 722 }; 723 724 /* 725 * compose a snd_dma_device struct for the PCI device 726 */ 727 static inline void snd_dma_device_pci(struct snd_dma_device *dev, struct pci_dev *pci, unsigned int id) 728 { 729 memset(dev, 0, sizeof(*dev)); 730 dev->type = SNDRV_DMA_TYPE_DEV; 731 dev->dev = snd_dma_pci_data(pci); 732 dev->id = id; 733 } 723 734 724 735 static void __init preallocate_cards(void) … … 846 857 */ 847 858 EXPORT_SYMBOL(snd_dma_alloc_pages); 859 EXPORT_SYMBOL(snd_dma_alloc_pages_fallback); 848 860 EXPORT_SYMBOL(snd_dma_free_pages); 861 849 862 EXPORT_SYMBOL(snd_dma_get_reserved); 850 863 EXPORT_SYMBOL(snd_dma_free_reserved); … … 854 867 EXPORT_SYMBOL(snd_malloc_pages_fallback); 855 868 EXPORT_SYMBOL(snd_free_pages); 856 #if defined(CONFIG_ISA) && ! defined(CONFIG_PCI)857 EXPORT_SYMBOL(snd_malloc_isa_pages);858 EXPORT_SYMBOL(snd_malloc_isa_pages_fallback);859 #endif860 #ifdef CONFIG_PCI861 EXPORT_SYMBOL(snd_malloc_pci_pages);862 EXPORT_SYMBOL(snd_malloc_pci_pages_fallback);863 EXPORT_SYMBOL(snd_malloc_pci_page);864 EXPORT_SYMBOL(snd_free_pci_pages);865 EXPORT_SYMBOL(snd_malloc_sgbuf_pages);866 EXPORT_SYMBOL(snd_free_sgbuf_pages);867 #endif868 #ifdef CONFIG_SBUS869 EXPORT_SYMBOL(snd_malloc_sbus_pages);870 EXPORT_SYMBOL(snd_malloc_sbus_pages_fallback);871 EXPORT_SYMBOL(snd_free_sbus_pages);872 #endif873 -
GPL/branches/alsa-resync1/alsa-kernel/core/pcm.c
r300 r348 406 406 char line[64]; 407 407 if (!snd_info_get_line(buffer, line, sizeof(line))) 408 pstr->xrun_debug = !!simple_strtoul(line, NULL, 10);408 pstr->xrun_debug = simple_strtoul(line, NULL, 10); 409 409 } 410 410 #endif -
GPL/branches/alsa-resync1/alsa-kernel/core/pcm_lib.c
r290 r348 188 188 substream->pcm->device, 189 189 substream->stream ? 'c' : 'p'); 190 if (substream->pstr->xrun_debug > 1) 190 191 dump_stack(); 191 192 } … … 219 220 if ((snd_pcm_uframes_t)delta < runtime->buffer_size / 2) { 220 221 #ifdef CONFIG_SND_DEBUG 221 if (runtime->periods > 1) 222 if (runtime->periods > 1 && substream->pstr->xrun_debug) { 222 223 snd_printd(KERN_ERR "Unexpected hw_pointer value [1] (stream = %i, delta: -%ld, max jitter = %ld): wrong interrupt acknowledge?\n", substream->stream, (long) delta, runtime->buffer_size / 2); 224 if (substream->pstr->xrun_debug > 1) 225 dump_stack(); 226 } 223 227 #endif 224 228 return 0; … … 261 265 if ((snd_pcm_uframes_t)delta < runtime->buffer_size / 2) { 262 266 #ifdef CONFIG_SND_DEBUG 263 if (runtime->periods > 2) 267 if (runtime->periods > 2 && substream->pstr->xrun_debug) { 264 268 snd_printd(KERN_ERR "Unexpected hw_pointer value [2] (stream = %i, delta: -%ld, max jitter = %ld): wrong interrupt acknowledge?\n", substream->stream, (long) delta, runtime->buffer_size / 2); 269 if (substream->pstr->xrun_debug > 1) 270 dump_stack(); 271 } 265 272 #endif 266 273 return 0; … … 2689 2696 EXPORT_SYMBOL(snd_pcm_lib_preallocate_pages); 2690 2697 EXPORT_SYMBOL(snd_pcm_lib_preallocate_pages_for_all); 2698 EXPORT_SYMBOL(snd_pcm_sgbuf_ops_page); 2691 2699 EXPORT_SYMBOL(snd_pcm_lib_malloc_pages); 2692 2700 EXPORT_SYMBOL(snd_pcm_lib_free_pages); 2693 #ifdef CONFIG_ISA2694 EXPORT_SYMBOL(snd_pcm_lib_preallocate_isa_pages);2695 EXPORT_SYMBOL(snd_pcm_lib_preallocate_isa_pages_for_all);2696 #endif2697 #ifdef CONFIG_PCI2698 EXPORT_SYMBOL(snd_pcm_lib_preallocate_pci_pages);2699 EXPORT_SYMBOL(snd_pcm_lib_preallocate_pci_pages_for_all);2700 EXPORT_SYMBOL(snd_pcm_lib_preallocate_sg_pages);2701 EXPORT_SYMBOL(snd_pcm_lib_preallocate_sg_pages_for_all);2702 EXPORT_SYMBOL(snd_pcm_sgbuf_ops_page);2703 #endif2704 #ifdef CONFIG_SBUS2705 EXPORT_SYMBOL(snd_pcm_lib_preallocate_sbus_pages);2706 EXPORT_SYMBOL(snd_pcm_lib_preallocate_sbus_pages_for_all);2707 #endif -
GPL/branches/alsa-resync1/alsa-kernel/core/sgbuf.c
r206 r348 20 20 */ 21 21 22 #include <linux/config.h> 23 #include <linux/slab.h> 24 #include <linux/mm.h> 25 #include <linux/vmalloc.h> 22 26 #ifdef TARGET_OS2 23 #include <sound/driver.h>24 #include <sound/core.h>25 27 #include <sound/info.h> 26 28 #endif /* TARGET_OS2 */ … … 31 33 #define sgbuf_align_table(tbl) ((((tbl) + SGBUF_TBL_ALIGN - 1) / SGBUF_TBL_ALIGN) * SGBUF_TBL_ALIGN) 32 34 33 /* 34 * shrink to the given pages. 35 * free the unused pages 36 */ 37 static void sgbuf_shrink(struct snd_sg_buf *sgbuf, int pages) 35 int snd_free_sgbuf_pages(struct snd_dma_buffer *dmab) 38 36 { 39 snd_assert(sgbuf, return); 40 if (! sgbuf->table) 41 return; 42 while (sgbuf->pages > pages) { 43 sgbuf->pages--; 44 snd_free_pci_pages(sgbuf->pci, PAGE_SIZE, 45 sgbuf->table[sgbuf->pages].buf, 46 sgbuf->table[sgbuf->pages].addr); 47 } 37 struct snd_sg_buf *sgbuf = dmab->private_data; 38 struct snd_dma_buffer tmpb; 39 int i; 40 41 if (! sgbuf) 42 return -EINVAL; 43 44 for (i = 0; i < sgbuf->pages; i++) { 45 tmpb.area = sgbuf->table[i].buf; 46 tmpb.addr = sgbuf->table[i].addr; 47 tmpb.bytes = PAGE_SIZE; 48 snd_dma_free_pages(&tmpb); 49 } 50 #ifndef TARGET_OS2 51 if (dmab->area) 52 vunmap(dmab->area); 53 #endif 54 dmab->area = NULL; 55 56 if (sgbuf->table) 57 kfree(sgbuf->table); 58 if (sgbuf->page_table) 59 kfree(sgbuf->page_table); 60 kfree(sgbuf); 61 dmab->private_data = NULL; 62 63 return 0; 48 64 } 49 65 50 /** 51 * snd_malloc_sgbuf_pages - allocate the pages for the PCI SG buffer 52 * @pci: the pci device pointer 53 * @size: the requested buffer size in bytes 54 * @dmab: the buffer record to store 55 * 56 * Initializes the SG-buffer table and allocates the buffer pages 57 * for the given size. 58 * The pages are mapped to the virtually continuous memory. 59 * 60 * This function is usually called from the middle-level functions such as 61 * snd_pcm_lib_malloc_pages(). 62 * 63 * Returns the mapped virtual address of the buffer if allocation was 64 * successful, or NULL at error. 65 */ 66 void *snd_malloc_sgbuf_pages(struct pci_dev *pci, 67 size_t size, 68 struct snd_dma_buffer *dmab, 66 void *snd_malloc_sgbuf_pages(const struct snd_dma_device *dev, 67 size_t size, struct snd_dma_buffer *dmab, 69 68 size_t *res_size) 70 69 { 71 70 struct snd_sg_buf *sgbuf; 72 unsigned int pages; 73 void *ptr; 74 dma_addr_t addr; 71 unsigned int i, pages; 72 struct snd_dma_buffer tmpb; 75 73 76 74 #ifdef DEBUG … … 89 87 } 90 88 memset(sgbuf, 0, sizeof(*sgbuf)); 91 sgbuf->pci = pci; 89 sgbuf->dev = *dev; 90 sgbuf->dev.type = SNDRV_DMA_TYPE_DEV; 92 91 pages = snd_sgbuf_aligned_pages(size); 93 92 sgbuf->tblsize = sgbuf_align_table(pages); … … 98 97 dprintf(("snd_malloc_sgbuf_pages failed: error allocating sgbuf->table")); 99 98 #endif 100 return NULL;99 goto _failed; 101 100 } 102 101 memset(sgbuf->table, 0, sizeof(*sgbuf->table) * sgbuf->tblsize); … … 107 106 dprintf(("snd_malloc_sgbuf_pages failed: error allocating sgbuf->page_table")); 108 107 #endif 109 return NULL;108 goto _failed; 110 109 } 111 110 memset(sgbuf->page_table, 0, sizeof(*sgbuf->page_table) * sgbuf->tblsize); … … 114 113 dprintf(("allocating %d pages",pages)); 115 114 #endif 116 ptr = snd_malloc_pci_pages(sgbuf->pci, size, &addr);117 if (! ptr)118 goto _failed;119 115 120 116 /* allocate each page */ 121 while (sgbuf->pages < pages) { 122 mem_map_t *page; 123 124 sgbuf->table[sgbuf->pages].buf = (char*)ptr + PAGE_SIZE*sgbuf->pages; 125 sgbuf->table[sgbuf->pages].addr = addr + PAGE_SIZE*sgbuf->pages; 126 page = (mem_map_t *)virt_to_page((int)sgbuf->table[sgbuf->pages].buf); 127 sgbuf->page_table[sgbuf->pages] = page; 128 SetPageReserved(page); 117 for (i = 0; i < pages; i++) { 118 if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV,sgbuf->dev.dev, PAGE_SIZE, &tmpb) < 0) { 119 if (res_size == NULL) 120 goto _failed; 121 *res_size = size = sgbuf->pages * PAGE_SIZE; 122 break; 123 } 124 sgbuf->table[i].buf = tmpb.area; 125 sgbuf->table[i].addr = tmpb.addr; 126 sgbuf->page_table[i] = virt_to_page(tmpb.area); 129 127 sgbuf->pages++; 130 128 } 131 129 132 memset(ptr,0,size);133 134 dmab->area = ptr;135 130 sgbuf->size = size; 131 #ifndef TARGET_OS2 132 dmab->area = vmap(sgbuf->page_table, sgbuf->pages, VM_MAP, PAGE_KERNEL); 133 #else 134 dmab->area = NULL; 135 #endif 136 if (! dmab->area) 137 goto _failed; 136 138 return dmab->area; 137 139 … … 144 146 return NULL; 145 147 } 146 147 148 /**149 * snd_free_sgbuf_pages - free the sg buffer150 * @dmab: buffer record151 *152 * Releases the pages and the SG-buffer table.153 *154 * This function is called usually from the middle-level function155 * such as snd_pcm_lib_free_pages().156 *157 * Returns zero if successful, or a negative error code on failure.158 */159 int snd_free_sgbuf_pages(struct snd_dma_buffer *dmab)160 {161 struct snd_sg_buf *sgbuf = dmab->private_data;162 163 sgbuf_shrink(sgbuf, 0);164 if (sgbuf->table)165 kfree(sgbuf->table);166 sgbuf->table = NULL;167 if (sgbuf->page_table)168 kfree(sgbuf->page_table);169 kfree(sgbuf);170 dmab->private_data = NULL;171 172 return 0;173 }174 175 -
GPL/branches/alsa-resync1/alsa-kernel/drivers/dummy.c
r277 r348 358 358 if (dpcm == NULL) 359 359 return -ENOMEM; 360 if ((runtime->dma_area = snd_malloc_pages_fallback(MAX_BUFFER_SIZE, GFP_KERNEL, (unsigned long *)&runtime->dma_bytes)) == NULL) {360 if ((runtime->dma_area = snd_malloc_pages_fallback(MAX_BUFFER_SIZE, GFP_KERNEL, &runtime->dma_bytes)) == NULL) { 361 361 kfree(dpcm); 362 362 return -ENOMEM; … … 393 393 if (dpcm == NULL) 394 394 return -ENOMEM; 395 if ((runtime->dma_area = snd_malloc_pages_fallback(MAX_BUFFER_SIZE, GFP_KERNEL, (unsigned long *)&runtime->dma_bytes)) == NULL) {395 if ((runtime->dma_area = snd_malloc_pages_fallback(MAX_BUFFER_SIZE, GFP_KERNEL, &runtime->dma_bytes)) == NULL) { 396 396 kfree(dpcm); 397 397 return -ENOMEM; -
GPL/branches/alsa-resync1/alsa-kernel/drivers/mpu401/mpu401.c
r212 r348 2 2 * Driver for generic MPU-401 boards (UART mode only) 3 3 * Copyright (c) by Jaroslav Kysela <perex@suse.cz> 4 * 5 * ACPI PnP Copyright (c) 2004 by Clemens Ladisch <clemens@ladisch.de> 6 * based on 8250_acpi.c 7 * Copyright (c) 2002-2003 Matthew Wilcox for Hewlett-Packard 8 * Copyright (C) 2004 Hewlett-Packard Co 9 * Bjorn Helgaas <bjorn.helgaas@hp.com> 4 10 * 5 11 * … … 22 28 #include <sound/driver.h> 23 29 #include <linux/init.h> 24 #i nclude <linux/wait.h>25 #include < linux/sched.h>26 # include <linux/slab.h>30 #ifdef CONFIG_ACPI_BUS 31 #include <acpi/acpi_bus.h> 32 #endif 27 33 #include <sound/core.h> 28 34 #include <sound/mpu401.h> 29 35 #define SNDRV_GET_ID 30 36 #include <sound/initval.h> 31 #include <linux/delay.h> 37 38 #ifdef CONFIG_ACPI_BUS 39 #define USE_ACPI_PNP 40 #endif 32 41 33 42 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>"); … … 39 48 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ 40 49 static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE; /* Enable this card */ 50 #ifdef USE_ACPI_PNP 51 static int acpipnp[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 1 }; 52 #endif 41 53 static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* MPU-401 port number */ 42 54 static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* MPU-401 IRQ */ … … 54 66 MODULE_PARM_DESC(enable, "Enable MPU-401 device."); 55 67 MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); 68 #ifdef USE_ACPI_PNP 69 MODULE_PARM(acpipnp, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); 70 MODULE_PARM_DESC(acpipnp, "ACPI PnP detection for MPU-401 device."); 71 MODULE_PARM_SYNTAX(acpipnp, SNDRV_ENABLED "," SNDRV_BOOLEAN_TRUE_DESC); 72 #endif 56 73 MODULE_PARM(port, "1-" __MODULE_STRING(SNDRV_CARDS) "l"); 57 74 MODULE_PARM_DESC(port, "Port # for MPU-401 device."); … … 66 83 #endif 67 84 68 static snd_card_t *snd_mpu401_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; 69 70 static int __init snd_card_mpu401_probe(int dev) 85 #ifndef CONFIG_ACPI_BUS 86 struct acpi_device; 87 #endif 88 89 static snd_card_t *snd_mpu401_legacy_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; 90 static int cards; 91 92 #ifdef USE_ACPI_PNP 93 94 static int acpi_driver_registered; 95 96 struct mpu401_resources { 97 unsigned long port; 98 int irq; 99 }; 100 101 static acpi_status __devinit snd_mpu401_acpi_resource(struct acpi_resource *res, 102 void *data) 103 { 104 struct mpu401_resources *resources = (struct mpu401_resources *)data; 105 106 if (res->id == ACPI_RSTYPE_IRQ) { 107
