Changeset 290
- Timestamp:
- Feb 16, 2008, 7:40:20 AM (17 years ago)
- Location:
- GPL/branches/alsa-resync1/alsa-kernel
- Files:
-
- 57 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/alsa-resync1/alsa-kernel/core/control.c
r277 r290 43 43 44 44 #define snd_kctl_ioctl(n) list_entry(n, snd_kctl_ioctl_t, list) 45 46 /* find id without lock */47 static snd_kcontrol_t *_ctl_find_id(snd_card_t * card, snd_ctl_elem_id_t *id);48 45 49 46 static DECLARE_RWSEM(snd_ioctl_rwsem); -
GPL/branches/alsa-resync1/alsa-kernel/core/pcm_lib.c
r260 r290 182 182 else 183 183 xrun(substream); 184 #ifdef CONFIG_SND_DEBUG 185 if (substream->pstr->xrun_debug) { 186 snd_printd(KERN_DEBUG "XRUN: pcmC%dD%d%c\n", 187 substream->pcm->card->number, 188 substream->pcm->device, 189 substream->stream ? 'c' : 'p'); 190 dump_stack(); 191 } 192 #endif 184 193 return -EPIPE; 185 194 } -
GPL/branches/alsa-resync1/alsa-kernel/core/sound.c
r281 r290 41 41 int snd_major; 42 42 static int cards_limit = 1; 43 #ifdef CONFIG_DEVFS_FS44 43 static int device_mode = S_IFCHR | S_IRUGO | S_IWUGO; 45 #endif46 44 47 45 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>"); … … 73 71 static DECLARE_MUTEX(sound_mutex); 74 72 75 #ifdef CONFIG_DEVFS_FS76 73 extern struct class_simple *sound_class; 77 #endif 74 78 75 79 76 #ifdef CONFIG_KMOD … … 240 237 } 241 238 list_add_tail(&preg->list, &snd_minors_hash[SNDRV_MINOR_CARD(minor)]); 242 #if def CONFIG_DEVFS_FS239 #ifndef TARGET_OS2 243 240 if (strncmp(name, "controlC", 8) || card->number >= cards_limit) { 244 241 devfs_mk_cdev(MKDEV(major, minor), S_IFCHR | device_mode, "snd/%s", name); … … 276 273 return -EINVAL; 277 274 } 278 #if def CONFIG_DEVFS_FS279 if (strncmp(name, "controlC", 8) || card->number >= cards_limit) { 275 #ifndef TARGET_OS2 276 if (strncmp(mptr->name, "controlC", 8) || card->number >= cards_limit) { /* created in sound.c */ 280 277 devfs_remove("snd/%s", mptr->name); 281 278 class_simple_device_remove(MKDEV(major, minor)); … … 347 344 static int __init alsa_sound_init(void) 348 345 { 349 #ifdef CONFIG_DEVFS_FS350 346 short controlnum; 351 #endif352 347 #ifdef CONFIG_SND_OSSEMUL 353 348 int err; … … 391 386 snd_info_minor_register(); 392 387 #endif 393 #if def CONFIG_DEVFS_FS388 #ifndef TARGET_OS2 394 389 for (controlnum = 0; controlnum < cards_limit; controlnum++) { 395 390 devfs_mk_cdev(MKDEV(major, controlnum<<5), S_IFCHR | device_mode, "snd/controlC%d", controlnum); -
GPL/branches/alsa-resync1/alsa-kernel/drivers/serial-u16550.c
r281 r290 357 357 358 358 uart->res_base = request_region(io_base, 8, "Serial MIDI"); 359 if (uart->res_base == NULL) 359 if (uart->res_base == NULL) { 360 snd_printk(KERN_ERR "u16550: can't grab port 0x%lx\n", io_base); 360 361 return -EBUSY; 362 } 361 363 362 364 ok = 1; /* uart detected unless one of the following tests should fail */ -
GPL/branches/alsa-resync1/alsa-kernel/include/sound/adriver.h
r281 r290 87 87 #include <asm/page.h> 88 88 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 3) 89 #define pci_set_dma_mask(pci, mask) pci->dma_mask = mask89 #define pci_set_dma_mask(pci, mask) (pci->dma_mask = mask, 0) 90 90 #endif 91 91 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 7) … … 157 157 #endif 158 158 159 #if defined(CONFIG_ISAPNP) || (defined(CONFIG_ISAPNP_MODULE) && defined(MODULE)) 160 #ifdef TARGET_OS2 161 #include "isapnp.h" 162 #else /* !TARGET_OS2 */ 163 #include <linux/isapnp.h> 164 #endif /* !TARGET_OS2 */ 165 #ifndef CONFIG_PNP 166 #define CONFIG_PNP 167 #endif 168 #if (defined(CONFIG_ISAPNP_KERNEL) && defined(ALSA_BUILD)) || (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 3, 30) && !defined(ALSA_BUILD)) 169 #define isapnp_dev pci_dev 170 #define isapnp_card pci_bus 171 #endif 172 #undef __ISAPNP__ 173 #define __ISAPNP__ 174 #else 159 /* isapnp support for 2.2 kernels */ 160 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 0) 161 #undef CONFIG_ISAPNP 162 #ifdef CONFIG_SND_ISAPNP 163 #define CONFIG_ISAPNP 164 #endif 165 #endif 166 167 /* support of pnp compatible layer for 2.2/2.4 kernels */ 175 168 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) 176 169 #undef CONFIG_PNP 170 #ifdef CONFIG_SND_PNP 171 #define CONFIG_PNP 177 172 #endif 178 173 #endif … … 288 283 289 284 #ifndef CONFIG_HAVE_PCI_CONSISTENT_DMA_MASK 290 #define pci_set_consistent_dma_mask(p,x) pci_set_dma_mask(p,x) 285 #define pci_set_consistent_dma_mask(p,x) 0 /* success */ 286 #endif 287 288 /* sysfs */ 289 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 2) 290 struct class_simple; 291 static inline void class_simple_device_add(struct class_simple *class, int devnum, ...) { return; } 292 static inline void class_simple_device_remove(int devnum) { return; } 291 293 #endif 292 294 … … 298 300 #define ssleep(x) msleep((unsigned int)(x) * 1000) 299 301 #endif 302 #endif 303 304 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) 305 #define snd_card_set_dev(card,dev) /* no struct device */ 300 306 #endif 301 307 -
GPL/branches/alsa-resync1/alsa-kernel/include/sound/compat_22.h
r281 r290 506 506 { restore_flags(flags); } 507 507 508 #ifndef CONFIG_HAVE_PCI_CONSISTENT_DMA_MASK509 #define pci_set_consistent_dma_mask(p,x) pci_set_dma_mask(p,x)510 #endif511 512 508 struct completion { 513 509 unsigned int done; -
GPL/branches/alsa-resync1/alsa-kernel/include/sound/config.h
r281 r290 175 175 #endif 176 176 177 #ifndef snd_card_set_dev178 #define snd_card_set_dev(card,devptr) ((card)->dev = (devptr))179 #endif180 181 177 /* for easier backward-porting */ 182 178 #if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE) -
GPL/branches/alsa-resync1/alsa-kernel/include/sound/core.h
r260 r290 310 310 int snd_card_file_remove(struct snd_card *card, struct file *file); 311 311 312 #ifndef snd_card_set_dev 313 #define snd_card_set_dev(card,devptr) ((card)->dev = (devptr)) 314 #endif 315 312 316 /* device.c */ 313 317 … … 333 337 int snd_task_name(struct task_struct *task, char *name, size_t size); 334 338 #ifdef CONFIG_SND_VERBOSE_PRINTK 335 void snd_verbose_printk(const char *file, int line, const char *format, ...); 339 void snd_verbose_printk(const char *file, int line, const char *format, ...) 340 __attribute__ ((format (printf, 3, 4))); 336 341 #endif 337 342 #if defined(CONFIG_SND_DEBUG) && defined(CONFIG_SND_VERBOSE_PRINTK) 338 void snd_verbose_printd(const char *file, int line, const char *format, ...); 343 void snd_verbose_printd(const char *file, int line, const char *format, ...) 344 __attribute__ ((format (printf, 3, 4))); 339 345 #endif 340 346 -
GPL/branches/alsa-resync1/alsa-kernel/include/sound/emu8000.h
r96 r290 114 114 void snd_emu8000_update_reverb_mode(emu8000_t *emu); 115 115 void snd_emu8000_update_equalizer(emu8000_t *emu); 116 int snd_emu8000_load_chorus_fx(emu8000_t *emu, int mode, const void *buf, long len);117 int snd_emu8000_load_reverb_fx(emu8000_t *emu, int mode, const void *buf, long len);116 int snd_emu8000_load_chorus_fx(emu8000_t *emu, int mode, const void __user *buf, long len); 117 int snd_emu8000_load_reverb_fx(emu8000_t *emu, int mode, const void __user *buf, long len); 118 118 119 119 #endif /* __SOUND_EMU8000_H */ -
GPL/branches/alsa-resync1/alsa-kernel/include/sound/pcm.h
r61 r290 411 411 struct snd_info_entry *proc_xrun_debug_entry; 412 412 #endif 413 #ifdef CONFIG_SND_DEBUG 414 unsigned int xrun_debug: 1; 415 snd_info_entry_t *proc_xrun_debug_entry; 416 #endif 413 417 }; 414 418 -
GPL/branches/alsa-resync1/alsa-kernel/include/sound/version.h
r281 r290 1 1 /* include/version.h. Generated by configure. */ 2 #define CONFIG_SND_VERSION "1.0. 1"2 #define CONFIG_SND_VERSION "1.0.2" 3 3 #define CONFIG_SND_DATE "" -
GPL/branches/alsa-resync1/alsa-kernel/isa/ad1816a/ad1816a.c
r277 r290 211 211 return error; 212 212 } 213 snd_card_set_dev(card, &pcard->card->dev); 213 214 214 215 if ((error = snd_ad1816a_create(card, port[dev], … … 220 221 return error; 221 222 } 223 224 strcpy(card->driver, "AD1816A"); 225 strcpy(card->shortname, "ADI SoundPort AD1816A"); 226 sprintf(card->longname, "%s, SS at 0x%lx, irq %d, dma %d&%d", 227 card->shortname, chip->port, irq[dev], dma1[dev], dma2[dev]); 222 228 223 229 if ((error = snd_ad1816a_pcm(chip, 0, NULL)) < 0) { … … 255 261 } 256 262 257 strcpy(card->driver, "AD1816A");258 strcpy(card->shortname, "ADI SoundPort AD1816A");259 sprintf(card->longname, "%s soundcard, SS at 0x%lx, irq %d, dma %d&%d",260 card->shortname, chip->port, irq[dev], dma1[dev], dma2[dev]);261 262 263 if ((error = snd_card_register(card)) < 0) { 263 264 snd_card_free(card); -
GPL/branches/alsa-resync1/alsa-kernel/isa/ad1816a/ad1816a_lib.c
r256 r290 594 594 595 595 if ((chip->res_port = request_region(port, 16, "AD1816A")) == NULL) { 596 snd_printk(KERN_ERR "ad1816a: can't grab port 0x%lx\n", port); 596 597 snd_ad1816a_free(chip); 597 598 return -EBUSY; 598 599 } 599 600 if (request_irq(irq, snd_ad1816a_interrupt, SA_INTERRUPT, "AD1816A", (void *) chip)) { 601 snd_printk(KERN_ERR "ad1816a: can't grab IRQ %d\n", irq); 600 602 snd_ad1816a_free(chip); 601 603 return -EBUSY; … … 603 605 chip->irq = irq; 604 606 if (request_dma(dma1, "AD1816A - 1")) { 607 snd_printk(KERN_ERR "ad1816a: can't grab DMA1 %d\n", dma1); 605 608 snd_ad1816a_free(chip); 606 609 return -EBUSY; … … 608 611 chip->dma1 = dma1; 609 612 if (request_dma(dma2, "AD1816A - 2")) { 613 snd_printk(KERN_ERR "ad1816a: can't grab DMA2 %d\n", dma2); 610 614 snd_ad1816a_free(chip); 611 615 return -EBUSY; -
GPL/branches/alsa-resync1/alsa-kernel/isa/ad1848/ad1848_lib.c
r281 r290 953 953 954 954 if ((chip->res_port = request_region(port, 4, "AD1848")) == NULL) { 955 snd_printk(KERN_ERR "ad1848: can't grab port 0x%lx\n", port); 955 956 snd_ad1848_free(chip); 956 957 return -EBUSY; 957 958 } 958 959 if (request_irq(irq, snd_ad1848_interrupt, SA_INTERRUPT, "AD1848", (void *) chip)) { 960 snd_printk(KERN_ERR "ad1848: can't grab IRQ %d\n", irq); 959 961 snd_ad1848_free(chip); 960 962 return -EBUSY; … … 962 964 chip->irq = irq; 963 965 if (request_dma(dma, "AD1848")) { 966 snd_printk(KERN_ERR "ad1848: can't grab DMA %d\n", dma); 964 967 snd_ad1848_free(chip); 965 968 return -EBUSY; -
GPL/branches/alsa-resync1/alsa-kernel/isa/als100.c
r281 r290 229 229 return error; 230 230 } 231 snd_card_set_dev(card, &pcard->card->dev); 231 232 232 233 if ((error = snd_sbdsp_create(card, port[dev], … … 239 240 return error; 240 241 } 242 243 strcpy(card->driver, "ALS100"); 244 strcpy(card->shortname, "Avance Logic ALS100"); 245 sprintf(card->longname, "%s, %s at 0x%lx, irq %d, dma %d&%d", 246 card->shortname, chip->name, chip->port, 247 irq[dev], dma8[dev], dma16[dev]); 241 248 242 249 if ((error = snd_sb16dsp_pcm(chip, 0, NULL)) < 0) { … … 276 283 } 277 284 278 strcpy(card->driver, "ALS100");279 strcpy(card->shortname, "Avance Logic ALS100");280 sprintf(card->longname, "%s soundcard, %s at 0x%lx, irq %d, dma %d&%d",281 card->shortname, chip->name, chip->port,282 irq[dev], dma8[dev], dma16[dev]);283 285 if ((error = snd_card_register(card)) < 0) { 284 286 snd_card_free(card); -
GPL/branches/alsa-resync1/alsa-kernel/isa/azt2320.c
r281 r290 256 256 return error; 257 257 } 258 snd_card_set_dev(card, &pcard->card->dev); 258 259 259 260 if ((error = snd_card_azt2320_enable_wss(port[dev]))) { … … 270 271 return error; 271 272 } 273 274 strcpy(card->driver, "AZT2320"); 275 strcpy(card->shortname, "Aztech AZT2320"); 276 sprintf(card->longname, "%s, WSS at 0x%lx, irq %i, dma %i&%i", 277 card->shortname, chip->port, irq[dev], dma1[dev], dma2[dev]); 272 278 273 279 if ((error = snd_cs4231_pcm(chip, 0, NULL)) < 0) { … … 310 316 } 311 317 312 strcpy(card->driver, "AZT2320");313 strcpy(card->shortname, "Aztech AZT2320");314 sprintf(card->longname, "%s soundcard, WSS at 0x%lx, irq %i, dma %i&%i",315 card->shortname, chip->port, irq[dev], dma1[dev], dma2[dev]);316 317 318 if ((error = snd_card_register(card)) < 0) { 318 319 snd_card_free(card); -
GPL/branches/alsa-resync1/alsa-kernel/isa/cmi8330.c
r277 r290 486 486 487 487 #ifdef CONFIG_PNP 488 if (isapnp[dev] && (err = snd_cmi8330_pnp(dev, acard, pcard, pid)) < 0) { 488 if (isapnp[dev]) { 489 if ((err = snd_cmi8330_pnp(dev, acard, pcard, pid)) < 0) { 489 490 snd_printk("PnP detection failed\n"); 490 491 snd_card_free(card); 491 492 return err; 493 } 494 snd_card_set_dev(card, &pcard->card->dev); 492 495 } 493 496 #endif -
GPL/branches/alsa-resync1/alsa-kernel/isa/cs423x/cs4231.c
r281 r290 118 118 return err; 119 119 } 120 121 strcpy(card->driver, "CS4231"); 122 strcpy(card->shortname, pcm->name); 123 sprintf(card->longname, "%s at 0x%lx, irq %d, dma %d", 124 pcm->name, chip->port, irq[dev], dma1[dev]); 125 if (dma2[dev] >= 0) 126 sprintf(card->longname + strlen(card->longname), "&%d", dma2[dev]); 127 120 128 if ((err = snd_cs4231_mixer(chip)) < 0) { 121 129 snd_card_free(card); … … 137 145 printk(KERN_ERR "cs4231: MPU401 not detected\n"); 138 146 } 139 strcpy(card->driver, "CS4231");140 strcpy(card->shortname, pcm->name);141 sprintf(card->longname, "%s at 0x%lx, irq %d, dma %d",142 pcm->name, chip->port, irq[dev], dma1[dev]);143 if (dma2[dev] >= 0)144 sprintf(card->longname + strlen(card->longname), "&%d", dma2[dev]);145 147 if ((err = snd_card_register(card)) < 0) { 146 148 snd_card_free(card); -
GPL/branches/alsa-resync1/alsa-kernel/isa/cs423x/cs4231_lib.c
r250 r290 1532 1532 1533 1533 if ((chip->res_port = request_region(port, 4, "CS4231")) == NULL) { 1534 snd_printk(KERN_ERR "cs4231: can't grab port 0x%lx\n", port); 1534 1535 snd_cs4231_free(chip); 1535 1536 return -EBUSY; … … 1537 1538 chip->port = port; 1538 1539 if ((long)cport >= 0 && (chip->res_cport = request_region(cport, 8, "CS4232 Control")) == NULL) { 1540 snd_printk(KERN_ERR "cs4231: can't grab control port 0x%lx\n", cport); 1539 1541 snd_cs4231_free(chip); 1540 1542 return -ENODEV; … … 1542 1544 chip->cport = cport; 1543 1545 if (!(hwshare & CS4231_HWSHARE_IRQ) && request_irq(irq, snd_cs4231_interrupt, SA_INTERRUPT, "CS4231", (void *) chip)) { 1546 snd_printk(KERN_ERR "cs4231: can't grab IRQ %d\n", irq); 1544 1547 snd_cs4231_free(chip); 1545 1548 return -EBUSY; … … 1547 1550 chip->irq = irq; 1548 1551 if (!(hwshare & CS4231_HWSHARE_DMA1) && request_dma(dma1, "CS4231 - 1")) { 1552 snd_printk(KERN_ERR "cs4231: can't grab DMA1 %d\n", dma1); 1549 1553 snd_cs4231_free(chip); 1550 1554 return -EBUSY; … … 1552 1556 chip->dma1 = dma1; 1553 1557 if (!(hwshare & CS4231_HWSHARE_DMA2) && dma1 != dma2 && dma2 >= 0 && request_dma(dma2, "CS4231 - 2")) { 1558 snd_printk(KERN_ERR "cs4231: can't grab DMA2 %d\n", dma2); 1554 1559 snd_cs4231_free(chip); 1555 1560 return -EBUSY; -
GPL/branches/alsa-resync1/alsa-kernel/isa/cs423x/cs4236.c
r281 r290 459 459 card->private_free = snd_card_cs4236_free; 460 460 #ifdef CONFIG_PNP 461 if (isapnp[dev] && (err = snd_card_cs4236_pnp(dev, acard, pcard, pid))<0) { 461 if (isapnp[dev]) { 462 if ((err = snd_card_cs4236_pnp(dev, acard, pcard, pid))<0) { 462 463 printk(KERN_ERR "isapnp detection failed and probing for " IDENT " is not supported\n"); 463 464 snd_card_free(card); 464 465 return -ENXIO; 466 } 467 snd_card_set_dev(card, &pcard->card->dev); 465 468 } 466 469 #endif … … 516 519 } 517 520 #endif 521 strcpy(card->driver, pcm->name); 522 strcpy(card->shortname, pcm->name); 523 sprintf(card->longname, "%s at 0x%lx, irq %i, dma %i", 524 pcm->name, 525 chip->port, 526 irq[dev], 527 dma1[dev]); 528 if (dma2[dev] >= 0) 529 sprintf(card->longname + strlen(card->longname), "&%d", dma2[dev]); 518 530 519 531 if ((err = snd_cs4231_timer(chip, 0, NULL)) < 0) { … … 544 556 printk(KERN_ERR IDENT ": MPU401 not detected\n"); 545 557 } 546 strcpy(card->driver, pcm->name);547 strcpy(card->shortname, pcm->name);548 sprintf(card->longname, "%s at 0x%lx, irq %i, dma %i",549 pcm->name,550 chip->port,551 irq[dev],552 dma1[dev]);553 if (dma2[dev] >= 0)554 sprintf(card->longname + strlen(card->longname), "&%d", dma2[dev]);555 558 if ((err = snd_card_register(card)) < 0) { 556 559 snd_card_free(card); -
GPL/branches/alsa-resync1/alsa-kernel/isa/dt019x.c
r281 r290 211 211 acard = (struct snd_card_dt019x *)card->private_data; 212 212 213 snd_card_set_dev(card, &pcard->card->dev); 213 214 if ((error = snd_card_dt019x_pnp(dev, acard, pcard, pid))) { 214 215 snd_card_free(card); … … 226 227 return error; 227 228 } 229 230 strcpy(card->driver, "DT-019X"); 231 strcpy(card->shortname, "Diamond Tech. DT-019X"); 232 sprintf(card->longname, "%s, %s at 0x%lx, irq %d, dma %d", 233 card->shortname, chip->name, chip->port, 234 irq[dev], dma8[dev]); 228 235 229 236 if ((error = snd_sb16dsp_pcm(chip, 0, NULL)) < 0) { … … 268 275 } 269 276 270 strcpy(card->driver, "DT-019X");271 strcpy(card->shortname, "Diamond Tech. DT-019X");272 sprintf(card->longname, "%s soundcard, %s at 0x%lx, irq %d, dma %d",273 card->shortname, chip->name, chip->port,274 irq[dev], dma8[dev]);275 277 if ((error = snd_card_register(card)) < 0) { 276 278 snd_card_free(card); -
GPL/branches/alsa-resync1/alsa-kernel/isa/es1688/es1688.c
r277 r290 135 135 } 136 136 137 strcpy(card->driver, "ES1688"); 138 strcpy(card->shortname, pcm->name); 139 sprintf(card->longname, "%s at 0x%lx, irq %i, dma %i", pcm->name, chip->port, xirq, xdma); 140 137 141 if ((snd_opl3_create(card, chip->port, chip->port + 2, OPL3_HW_OPL3, 0, &opl3)) < 0) { 138 142 printk(KERN_ERR "es1688: opl3 not detected at 0x%lx\n", chip->port); … … 154 158 } 155 159 } 156 strcpy(card->driver, "ES1688");157 strcpy(card->shortname, pcm->name);158 sprintf(card->longname, "%s at 0x%lx, irq %i, dma %i", pcm->name, chip->port, xirq, xdma);159 160 if ((err = snd_card_register(card)) < 0) { 160 161 snd_card_free(card); -
GPL/branches/alsa-resync1/alsa-kernel/isa/es1688/es1688_lib.c
r246 r290 660 660 661 661 if ((chip->res_port = request_region(port + 4, 12, "ES1688")) == NULL) { 662 snd_printk(KERN_ERR "es1688: can't grab port 0x%lx\n", port + 4); 662 663 snd_es1688_free(chip); 663 664 return -EBUSY; 664 665 } 665 666 if (request_irq(irq, snd_es1688_interrupt, SA_INTERRUPT, "ES1688", (void *) chip)) { 667 snd_printk(KERN_ERR "es1688: can't grab IRQ %d\n", irq); 666 668 snd_es1688_free(chip); 667 669 return -EBUSY; … … 669 671 chip->irq = irq; 670 672 if (request_dma(dma8, "ES1688")) { 673 snd_printk(KERN_ERR "es1688: can't grab DMA8 %d\n", dma8); 671 674 snd_es1688_free(chip); 672 675 return -EBUSY; -
GPL/branches/alsa-resync1/alsa-kernel/isa/es18xx.c
r277 r290 1472 1472 chip->ctrl_port += inb(chip->port + 0x05); 1473 1473 1474 if ((chip->res_ctrl_port = request_region(chip->ctrl_port, 8, "ES18xx - CTRL")) == NULL) 1474 if ((chip->res_ctrl_port = request_region(chip->ctrl_port, 8, "ES18xx - CTRL")) == NULL) { 1475 snd_printk(KERN_ERR PFX "unable go grab port 0x%lx\n", chip->ctrl_port); 1475 1476 return -EBUSY; 1477 } 1476 1478 1477 1479 return 0; … … 2064 2066 acard = (struct snd_audiodrive *)card->private_data; 2065 2067 #ifdef CONFIG_PNP 2066 if (isapnp[dev] && (err = snd_audiodrive_pnp(dev, acard, pcard, pid)) < 0) { 2068 if (isapnp[dev]) { 2069 if ((err = snd_audiodrive_pnp(dev, acard, pcard, pid)) < 0) { 2067 2070 snd_card_free(card); 2068 2071 return err; 2072 } 2073 snd_card_set_dev(card, &pcard->card->dev); 2069 2074 } 2070 2075 #endif … … 2104 2109 return err; 2105 2110 } 2111 2112 sprintf(card->driver, "ES%x", chip->version); 2113 sprintf(card->shortname, "ESS AudioDrive ES%x", chip->version); 2114 if (xdma1 != xdma2) 2115 sprintf(card->longname, "%s at 0x%lx, irq %d, dma1 %d, dma2 %d", 2116 card->shortname, 2117 chip->port, 2118 xirq, xdma1, xdma2); 2119 else 2120 sprintf(card->longname, "%s at 0x%lx, irq %d, dma %d", 2121 card->shortname, 2122 chip->port, 2123 xirq, xdma1); 2124 2106 2125 if ((err = snd_es18xx_pcm(chip, 0, NULL)) < 0) { 2107 2126 snd_card_free(card); … … 2145 2164 } 2146 2165 #endif 2147 sprintf(card->driver, "ES%x", chip->version);2148 sprintf(card->shortname, "ESS AudioDrive ES%x", chip->version);2149 if (xdma1 != xdma2)2150 sprintf(card->longname, "%s at 0x%lx, irq %d, dma1 %d, dma2 %d",2151 card->shortname,2152 chip->port,2153 xirq, xdma1, xdma2);2154 else2155 sprintf(card->longname, "%s at 0x%lx, irq %d, dma %d",2156 card->shortname,2157 chip->port,2158 xirq, xdma1);2159 2166 if ((err = snd_card_register(card)) < 0) { 2160 2167 snd_card_free(card); -
GPL/branches/alsa-resync1/alsa-kernel/isa/gus/gus_main.c
r256 r290 179 179 /* allocate resources */ 180 180 if ((gus->gf1.res_port1 = request_region(port, 16, "GUS GF1 (Adlib/SB)")) == NULL) { 181 snd_printk(KERN_ERR "gus: can't grab SB port 0x%lx\n", port); 181 182 snd_gus_free(gus); 182 183 return -EBUSY; 183 184 } 184 185 if ((gus->gf1.res_port2 = request_region(port + 0x100, 12, "GUS GF1 (Synth)")) == NULL) { 186 snd_printk(KERN_ERR "gus: can't grab synth port 0x%lx\n", port + 0x100); 185 187 snd_gus_free(gus); 186 188 return -EBUSY; 187 189 } 188 190 if (irq >= 0 && request_irq(irq, snd_gus_interrupt, SA_INTERRUPT, "GUS GF1", (void *) gus)) { 191 snd_printk(KERN_ERR "gus: can't grab irq %d\n", irq); 189 192 snd_gus_free(gus); 190 193 return -EBUSY; … … 192 195 gus->gf1.irq = irq; 193 196 if (request_dma(dma1, "GUS - 1")) { 197 snd_printk(KERN_ERR "gus: can't grab DMA1 %d\n", dma1); 194 198 snd_gus_free(gus); 195 199 return -EBUSY; … … 198 202 if (dma2 >= 0 && dma1 != dma2) { 199 203 if (request_dma(dma2, "GUS - 2")) { 204 snd_printk(KERN_ERR "gus: can't grab DMA2 %d\n", dma2); 200 205 snd_gus_free(gus); 201 206 return -EBUSY; -
GPL/branches/alsa-resync1/alsa-kernel/isa/gus/interwave.c
r281 r290 245 245 iwcard->i2c_res = request_region(port, 1, "InterWave (I2C bus)"); 246 246 } 247 if (iwcard->i2c_res == NULL) 247 if (iwcard->i2c_res == NULL) { 248 snd_printk(KERN_ERR "interwave: can't grab i2c bus port\n"); 248 249 return -ENODEV; 250 } 249 251 250 252 sprintf(name, "InterWave-%i", card->number); … … 712 714 card->private_free = snd_interwave_free; 713 715 #ifdef CONFIG_PNP 714 if (isapnp[dev] && snd_interwave_pnp(dev, iwcard, pcard, pid)) { 716 if (isapnp[dev]) { 717 if (snd_interwave_pnp(dev, iwcard, pcard, pid)) { 715 718 snd_card_free(card); 716 719 return -ENODEV; 720 } 721 snd_card_set_dev(card, &pcard->card->dev); 717 722 } 718 723 #endif -
GPL/branches/alsa-resync1/alsa-kernel/isa/opl3sa2.c
r277 r290 245 245 card = chip->card; 246 246 port = chip->port; 247 if ((chip->res_port = request_region(port, 2, "OPL3-SA control")) == NULL) 247 if ((chip->res_port = request_region(port, 2, "OPL3-SA control")) == NULL) { 248 snd_printk(KERN_ERR "opl3sa2: can't grab port 0x%lx\n", port); 248 249 return -EBUSY; 250 } 249 251 // snd_printk("REG 0A = 0x%x\n", snd_opl3sa2_read(chip, 0x0a)); 250 252 chip->version = 0; … … 726 728 goto __error; 727 729 #ifdef CONFIG_PNP 728 if (isapnp[dev] && (err = snd_opl3sa2_pnp(dev, chip, pcard, pid)) < 0) 729 goto __error; 730 if (isapnp[dev]) { 731 if ((err = snd_opl3sa2_pnp(dev, chip, pcard, pid)) < 0) 732 goto __error; 733 snd_card_set_dev(card, &pcard->card->dev); 734 } 730 735 #endif 731 736 chip->ymode = opl3sa3_ymode[dev] & 0x03 ; /* initialise this card from supplied (or default) parameter*/ … … 740 745 goto __error; 741 746 if (request_irq(xirq, snd_opl3sa2_interrupt, SA_INTERRUPT, "OPL3-SA2/3", (void *)chip)) { 747 snd_printk(KERN_ERR "opl3sa2: can't grab IRQ %d\n", xirq); 742 748 err = -ENODEV; 743 749 goto __error; -
GPL/branches/alsa-resync1/alsa-kernel/isa/opti9xx/opti92x-ad1848.c
r281 r290 1306 1306 1307 1307 if ((codec->res_port = request_region(chip->wss_base + 4, 4, "OPTI93x CODEC")) == NULL) { 1308 snd_printk(KERN_ERR "opti9xx: can't grab port 0x%lx\n", chip->wss_base + 4); 1308 1309 snd_opti93x_free(codec); 1309 1310 return -EBUSY; 1310 1311 } 1311 1312 if (request_dma(dma1, "OPTI93x - 1")) { 1313 snd_printk(KERN_ERR "opti9xx: can't grab DMA1 %d\n", dma1); 1312 1314 snd_opti93x_free(codec); 1313 1315 return -EBUSY; … … 1315 1317 codec->dma1 = chip->dma1; 1316 1318 if (request_dma(dma2, "OPTI93x - 2")) { 1319 snd_printk(KERN_ERR "opti9xx: can't grab DMA2 %d\n", dma2); 1317 1320 snd_opti93x_free(codec); 1318 1321 return -EBUSY; … … 1321 1324 1322 1325 if (request_irq(chip->irq, snd_opti93x_interrupt, SA_INTERRUPT, DRIVER_NAME" - WSS", codec)) { 1326 snd_printk(KERN_ERR "opti9xx: can't grab IRQ %d\n", chip->irq); 1323 1327 snd_opti93x_free(codec); 1324 1328 return -EBUSY; … … 1970 1974 if (hw <= OPTi9XX_HW_82C930) 1971 1975 chip->mc_base -= 0x80; 1976 snd_card_set_dev(card, &pcard->card->dev); 1972 1977 } else { 1973 1978 #endif /* CONFIG_PNP */ … … 2102 2107 } 2103 2108 #endif 2109 strcpy(card->driver, chip->name); 2110 sprintf(card->shortname, "OPTi %s", card->driver); 2111 #if defined(CS4231) || defined(OPTi93X) 2112 sprintf(card->longname, "%s, %s at 0x%lx, irq %d, dma %d&%d", 2113 card->shortname, pcm->name, chip->wss_base + 4, 2114 chip->irq, chip->dma1, chip->dma2); 2115 #else 2116 sprintf(card->longname, "%s, %s at 0x%lx, irq %d, dma %d", 2117 card->shortname, pcm->name, chip->wss_base + 4, 2118 chip->irq, chip->dma1); 2119 #endif /* CS4231 || OPTi93X */ 2104 2120 2105 2121 if (chip->mpu_port <= 0 || chip->mpu_port == SNDRV_AUTO_PORT) … … 2155 2171 } 2156 2172 2157 strcpy(card->driver, chip->name);2158 sprintf(card->shortname, "OPTi %s", card->driver);2159 #if defined(CS4231) || defined(OPTi93X)2160 sprintf(card->longname, "%s soundcard, %s at 0x%lx, irq %d, dma %d&%d",2161 card->shortname, pcm->name, chip->wss_base + 4,2162 chip->irq, chip->dma1, chip->dma2);2163 #else2164 sprintf(card->longname, "%s soundcard, %s at 0x%lx, irq %d, dma %d",2165 card->shortname, pcm->name, chip->wss_base + 4,2166 chip->irq, chip->dma1);2167 #endif /* CS4231 || OPTi93X */2168 2173 if ((error = snd_card_register(card))) { 2169 2174 snd_card_free(card); -
GPL/branches/alsa-resync1/alsa-kernel/isa/sb/emu8000.c
r277 r290 656 656 657 657 /*exported*/ int 658 snd_emu8000_load_chorus_fx(emu8000_t *emu, int mode, const void *buf, long len)658 snd_emu8000_load_chorus_fx(emu8000_t *emu, int mode, const void __user *buf, long len) 659 659 { 660 660 soundfont_chorus_fx_t rec; … … 783 783 784 784 /*exported*/ int 785 snd_emu8000_load_reverb_fx(emu8000_t *emu, int mode, const void *buf, long len)785 snd_emu8000_load_reverb_fx(emu8000_t *emu, int mode, const void __user *buf, long len) 786 786 { 787 787 soundfont_reverb_fx_t rec; … … 1113 1113 !(hw->res_port2 = request_region(hw->port2, 4, "Emu8000-2")) || 1114 1114 !(hw->res_port3 = request_region(hw->port3, 4, "Emu8000-3"))) { 1115 snd_printk(KERN_ERR "sbawe: can't grab ports 0x%lx, 0x%lx, 0x%lx\n", hw->port1, hw->port2, hw->port3); 1115 1116 snd_emu8000_free(hw); 1116 1117 return -EBUSY; -
GPL/branches/alsa-resync1/alsa-kernel/isa/sb/emu8000_callback.c
r210 r290 37 37 static int oss_ioctl(snd_emux_t *emu, int cmd, int p1, int p2); 38 38 #endif 39 static int load_fx(snd_emux_t *emu, int type, int mode, const void *buf, long len);39 static int load_fx(snd_emux_t *emu, int type, int mode, const void __user *buf, long len); 40 40 41 41 static void set_pitch(emu8000_t *hw, snd_emux_voice_t *vp); … … 524 524 525 525 static int 526 load_fx(snd_emux_t *emu, int type, int mode, const void *buf, long len)526 load_fx(snd_emux_t *emu, int type, int mode, const void __user *buf, long len) 527 527 { 528 528 emu8000_t *hw; -
GPL/branches/alsa-resync1/alsa-kernel/isa/sb/emu8000_local.h
r207 r290 33 33 34 34 /* emu8000_patch.c */ 35 int snd_emu8000_sample_new(snd_emux_t *rec, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr, const void *data, long count);35 int snd_emu8000_sample_new(snd_emux_t *rec, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr, const void __user *data, long count); 36 36 int snd_emu8000_sample_free(snd_emux_t *rec, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr); 37 37 void snd_emu8000_sample_reset(snd_emux_t *rec); -
GPL/branches/alsa-resync1/alsa-kernel/isa/sb/emu8000_patch.c
r277 r290 83 83 */ 84 84 static unsigned short 85 read_word(const void *buf, int offset, int mode)85 read_word(const void __user *buf, int offset, int mode) 86 86 { 87 87 unsigned short c; … … 147 147 int 148 148 snd_emu8000_sample_new(snd_emux_t *rec, snd_sf_sample_t *sp, 149 snd_util_memhdr_t *hdr, const void *data, long count)149 snd_util_memhdr_t *hdr, const void __user *data, long count) 150 150 { 151 151 int i; -
GPL/branches/alsa-resync1/alsa-kernel/isa/sb/emu8000_synth.c
r207 r290 72 72 emu->midi_devidx = 1; 73 73 emu->linear_panning = 1; 74 emu->hwdep_idx = 2; /* FIXED */ 74 75 75 76 if (snd_emux_register(emu, dev->card, hw->index, "Emu8000") < 0) { -
GPL/branches/alsa-resync1/alsa-kernel/isa/sb/es968.c
r277 r290 150 150 return error; 151 151 } 152 snd_card_set_dev(card, &pcard->card->dev); 152 153 153 154 if ((error = snd_sbdsp_create(card, port[dev], -
GPL/branches/alsa-resync1/alsa-kernel/isa/sb/sb16.c
r281 r290 82 82 #endif 83 83 static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* 0x220,0x240,0x260,0x280 */ 84 #ifdef TARGET_OS2 85 static long mpu_port[SNDRV_CARDS] = {0x330, 0x300, -1,-1,-1,-1,-1,-1}; 86 #else 87 static long mpu_port[SNDRV_CARDS] = {0x330, 0x300,[2 ... (SNDRV_CARDS - 1)] = -1}; 88 #endif 84 static long mpu_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* 0x330,0x300 */ 89 85 static long fm_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; 90 86 #ifdef SNDRV_SBAWE_EMU8000 … … 175 171 176 172 static snd_card_t *snd_sb16_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; 173 174 #ifdef CONFIG_PNP 177 175 178 176 static struct pnp_card_device_id snd_sb16_pnpids[] = { … … 269 267 MODULE_DEVICE_TABLE(pnp_card, snd_sb16_pnpids); 270 268 269 #endif /* CONFIG_PNP */ 270 271 271 #ifdef SNDRV_SBAWE_EMU8000 272 272 #define DRIVER_NAME "snd-card-sbawe" … … 412 412 return err; 413 413 } 414 snd_card_set_dev(card, &pcard->card->dev); 414 415 } 415 416 #endif … … 484 485 } 485 486 486 if (chip->mpu_port > 0 && chip->mpu_port != SNDRV_AUTO_PORT) { 487 if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_SB, 488 chip->mpu_port, 0, 489 xirq, 0, &chip->rmidi)) < 0) { 490 snd_card_free(card); 491 return -ENXIO; 492 } 493 chip->rmidi_callback = snd_mpu401_uart_interrupt; 494 } 495 496 #ifdef SNDRV_SBAWE_EMU8000 497 if (awe_port[dev] == SNDRV_AUTO_PORT) 498 awe_port[dev] = 0; /* disable */ 499 #endif 500 501 if (fm_port[dev] > 0 && fm_port[dev] != SNDRV_AUTO_PORT) { 502 if (snd_opl3_create(card, fm_port[dev], fm_port[dev] + 2, 503 OPL3_HW_OPL3, 504 fm_port[dev] == port[dev] || fm_port[dev] == 0x388, 505 &opl3) < 0) { 506 snd_printk(KERN_ERR PFX "no OPL device at 0x%lx-0x%lx\n", 507 fm_port[dev], fm_port[dev] + 2); 508 } else { 509 #ifdef SNDRV_SBAWE_EMU8000 510 int seqdev = awe_port[dev] > 0 ? 2 : 1; 511 #else 512 int seqdev = 1; 513 #endif 514 if ((err = snd_opl3_hwdep_new(opl3, 0, seqdev, &synth)) < 0) { 515 snd_card_free(card); 516 return -ENXIO; 517 } 518 } 519 } 520 521 if ((err = snd_sbmixer_new(chip)) < 0) { 522 snd_card_free(card); 523 return -ENXIO; 524 } 525 526 #ifdef CONFIG_SND_SB16_CSP 527 /* CSP chip on SB16ASP/AWE32 */ 528 if ((chip->hardware == SB_HW_16) && csp[dev]) { 529 snd_sb_csp_new(chip, synth != NULL ? 1 : 0, &xcsp); 530 if (xcsp) { 531 chip->csp = xcsp->private_data; 532 chip->hardware = SB_HW_16CSP; 533 } else { 534 snd_printk(KERN_INFO PFX "warning - CSP chip not detected on soundcard #%i\n", dev + 1); 535 } 536 } 537 #endif 538 #ifdef SNDRV_SBAWE_EMU8000 539 if (awe_port[dev] > 0) { 540 if (snd_emu8000_new(card, 1, awe_port[dev], 541 seq_ports[dev], NULL) < 0) { 542 snd_printk(KERN_ERR PFX "fatal error - EMU-8000 synthesizer not detected at 0x%lx\n", awe_port[dev]); 543 snd_card_free(card); 544 return -ENXIO; 545 } 546 } 547 #endif 548 549 /* setup Mic AGC */ 550 spin_lock_irqsave(&chip->mixer_lock, flags); 551 snd_sbmixer_write(chip, SB_DSP4_MIC_AGC, 552 (snd_sbmixer_read(chip, SB_DSP4_MIC_AGC) & 0x01) | 553 (mic_agc[dev] ? 0x00 : 0x01)); 554 spin_unlock_irqrestore(&chip->mixer_lock, flags); 555 556 strcpy(card->driver, 487 strcpy(card->driver, 557 488 #ifdef SNDRV_SBAWE_EMU8000 558 489 awe_port[dev] > 0 ? "SB AWE" : … … 569 500 sprintf(card->longname + strlen(card->longname), "%s%d", 570 501 xdma8 >= 0 ? "&" : "", xdma16); 502 503 if (chip->mpu_port > 0 && chip->mpu_port != SNDRV_AUTO_PORT) { 504 if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_SB, 505 chip->mpu_port, 0, 506 xirq, 0, &chip->rmidi)) < 0) { 507 snd_card_free(card); 508 return -ENXIO; 509 } 510 chip->rmidi_callback = snd_mpu401_uart_interrupt; 511 } 512 513 #ifdef SNDRV_SBAWE_EMU8000 514 if (awe_port[dev] == SNDRV_AUTO_PORT) 515 awe_port[dev] = 0; /* disable */ 516 #endif 517 518 if (fm_port[dev] > 0 && fm_port[dev] != SNDRV_AUTO_PORT) { 519 if (snd_opl3_create(card, fm_port[dev], fm_port[dev] + 2, 520 OPL3_HW_OPL3, 521 acard->fm_res != NULL || fm_port[dev] == port[dev], 522 &opl3) < 0) { 523 snd_printk(KERN_ERR PFX "no OPL device at 0x%lx-0x%lx\n", 524 fm_port[dev], fm_port[dev] + 2); 525 } else { 526 #ifdef SNDRV_SBAWE_EMU8000 527 int seqdev = awe_port[dev] > 0 ? 2 : 1; 528 #else 529 int seqdev = 1; 530 #endif 531 if ((err = snd_opl3_hwdep_new(opl3, 0, seqdev, &synth)) < 0) { 532 snd_card_free(card); 533 return -ENXIO; 534 } 535 } 536 } 537 538 if ((err = snd_sbmixer_new(chip)) < 0) { 539 snd_card_free(card); 540 return -ENXIO; 541 } 542 543 #ifdef CONFIG_SND_SB16_CSP 544 /* CSP chip on SB16ASP/AWE32 */ 545 if ((chip->hardware == SB_HW_16) && csp[dev]) { 546 snd_sb_csp_new(chip, synth != NULL ? 1 : 0, &xcsp); 547 if (xcsp) { 548 chip->csp = xcsp->private_data; 549 chip->hardware = SB_HW_16CSP; 550 } else { 551 snd_printk(KERN_INFO PFX "warning - CSP chip not detected on soundcard #%i\n", dev + 1); 552 } 553 } 554 #endif 555 #ifdef SNDRV_SBAWE_EMU8000 556 if (awe_port[dev] > 0) { 557 if (snd_emu8000_new(card, 1, awe_port[dev], 558 seq_ports[dev], NULL) < 0) { 559 snd_printk(KERN_ERR PFX "fatal error - EMU-8000 synthesizer not detected at 0x%lx\n", awe_port[dev]); 560 snd_card_free(card); 561 return -ENXIO; 562 } 563 } 564 #endif 565 566 /* setup Mic AGC */ 567 spin_lock_irqsave(&chip->mixer_lock, flags); 568 snd_sbmixer_write(chip, SB_DSP4_MIC_AGC, 569 (snd_sbmixer_read(chip, SB_DSP4_MIC_AGC) & 0x01) | 570 (mic_agc[dev] ? 0x00 : 0x01)); 571 spin_unlock_irqrestore(&chip->mixer_lock, flags); 572 571 573 if ((err = snd_card_register(card)) < 0) { 572 574 snd_card_free(card); -
GPL/branches/alsa-resync1/alsa-kernel/isa/sb/sb_common.c
r256 r290 236 236 SA_INTERRUPT | SA_SHIRQ : SA_INTERRUPT, 237 237 "SoundBlaster", (void *) chip)) { 238 snd_printk(KERN_ERR "sb: can't grab irq %d\n", irq); 238 239 snd_sbdsp_free(chip); 239 240 return -EBUSY; … … 245 246 246 247 if ((chip->res_port = request_region(port, 16, "SoundBlaster")) == NULL) { 248 snd_printk(KERN_ERR "sb: can't grab port 0x%lx\n", port); 247 249 snd_sbdsp_free(chip); 248 250 return -EBUSY; … … 251 253 #ifdef CONFIG_ISA 252 254 if (dma8 >= 0 && request_dma(dma8, "SoundBlaster - 8bit")) { 255 snd_printk(KERN_ERR "sb: can't grab DMA8 %d\n", dma8); 253 256 snd_sbdsp_free(chip); 254 257 return -EBUSY; … … 260 263 dma16 = -1; 261 264 } else if (request_dma(dma16, "SoundBlaster - 16bit")) { 265 snd_printk(KERN_ERR "sb: can't grab DMA16 %d\n", dma16); 262 266 snd_sbdsp_free(chip); 263 267 return -EBUSY; -
GPL/branches/alsa-resync1/alsa-kernel/isa/sgalaxy.c
r277 r290 151 151 return -EINVAL; 152 152 153 if (request_irq(irq, snd_sgalaxy_dummy_interrupt, SA_INTERRUPT, "sgalaxy", NULL)) 153 if (request_irq(irq, snd_sgalaxy_dummy_interrupt, SA_INTERRUPT, "sgalaxy", NULL)) { 154 snd_printk(KERN_ERR "sgalaxy: can't grab irq %d\n", irq); 154 155 return -EIO; 156 } 155 157 156 158 outb(tmp | 0x40, port); -
GPL/branches/alsa-resync1/alsa-kernel/isa/wavefront/wavefront.c
r281 r290 450 450 451 451 #ifdef CONFIG_PNP 452 if (isapnp[dev] && snd_wavefront_pnp (dev, acard, pcard, pid) < 0) { 452 if (isapnp[dev]) { 453 if (snd_wavefront_pnp (dev, acard, pcard, pid) < 0) { 453 454 if (cs4232_pcm_port[dev] == SNDRV_AUTO_PORT) { 454 455 snd_printk ("isapnp detection failed\n"); … … 456 457 return -ENODEV; 457 458 } 459 } 460 snd_card_set_dev(card, &pcard->card->dev); 458 461 } 459 462 #endif /* CONFIG_PNP */ -
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.