diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 11:09:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 11:09:02 -0500 |
commit | 8f0cb147b2fb12427bf6abef7fed2b604557a41e (patch) | |
tree | fb5ba437ee74b900fab9686c8c7df18abcd7640b /sound/isa/gus | |
parent | 8e33ba49765484bc6de3a2f8143733713fa93bc1 (diff) | |
parent | b00e8443c3eece823052d06ae1c7cb797ab0ddf5 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa
Diffstat (limited to 'sound/isa/gus')
-rw-r--r-- | sound/isa/gus/gus_dma.c | 2 | ||||
-rw-r--r-- | sound/isa/gus/gus_io.c | 94 | ||||
-rw-r--r-- | sound/isa/gus/gus_main.c | 25 | ||||
-rw-r--r-- | sound/isa/gus/gus_mem.c | 2 | ||||
-rw-r--r-- | sound/isa/gus/gus_pcm.c | 5 | ||||
-rw-r--r-- | sound/isa/gus/gus_reset.c | 4 | ||||
-rw-r--r-- | sound/isa/gus/gus_simple.c | 2 | ||||
-rw-r--r-- | sound/isa/gus/gus_uart.c | 4 | ||||
-rw-r--r-- | sound/isa/gus/gus_volume.c | 6 | ||||
-rw-r--r-- | sound/isa/gus/interwave.c | 9 |
10 files changed, 70 insertions, 83 deletions
diff --git a/sound/isa/gus/gus_dma.c b/sound/isa/gus/gus_dma.c index de4b56d80b35..ef1b2e9832e4 100644 --- a/sound/isa/gus/gus_dma.c +++ b/sound/isa/gus/gus_dma.c | |||
@@ -199,7 +199,7 @@ int snd_gf1_dma_transfer_block(snd_gus_card_t * gus, | |||
199 | 199 | ||
200 | block = kmalloc(sizeof(*block), atomic ? GFP_ATOMIC : GFP_KERNEL); | 200 | block = kmalloc(sizeof(*block), atomic ? GFP_ATOMIC : GFP_KERNEL); |
201 | if (block == NULL) { | 201 | if (block == NULL) { |
202 | snd_printk("gf1: DMA transfer failure; not enough memory\n"); | 202 | snd_printk(KERN_ERR "gf1: DMA transfer failure; not enough memory\n"); |
203 | return -ENOMEM; | 203 | return -ENOMEM; |
204 | } | 204 | } |
205 | *block = *__block; | 205 | *block = *__block; |
diff --git a/sound/isa/gus/gus_io.c b/sound/isa/gus/gus_io.c index 23e1b5f19e1a..8d5752b23787 100644 --- a/sound/isa/gus/gus_io.c +++ b/sound/isa/gus/gus_io.c | |||
@@ -343,7 +343,7 @@ void snd_gf1_pokew(snd_gus_card_t * gus, unsigned int addr, unsigned short data) | |||
343 | 343 | ||
344 | #ifdef CONFIG_SND_DEBUG | 344 | #ifdef CONFIG_SND_DEBUG |
345 | if (!gus->interwave) | 345 | if (!gus->interwave) |
346 | snd_printk("snd_gf1_pokew - GF1!!!\n"); | 346 | snd_printk(KERN_DEBUG "snd_gf1_pokew - GF1!!!\n"); |
347 | #endif | 347 | #endif |
348 | spin_lock_irqsave(&gus->reg_lock, flags); | 348 | spin_lock_irqsave(&gus->reg_lock, flags); |
349 | outb(SNDRV_GF1_GW_DRAM_IO_LOW, gus->gf1.reg_regsel); | 349 | outb(SNDRV_GF1_GW_DRAM_IO_LOW, gus->gf1.reg_regsel); |
@@ -367,7 +367,7 @@ unsigned short snd_gf1_peekw(snd_gus_card_t * gus, unsigned int addr) | |||
367 | 367 | ||
368 | #ifdef CONFIG_SND_DEBUG | 368 | #ifdef CONFIG_SND_DEBUG |
369 | if (!gus->interwave) | 369 | if (!gus->interwave) |
370 | snd_printk("snd_gf1_peekw - GF1!!!\n"); | 370 | snd_printk(KERN_DEBUG "snd_gf1_peekw - GF1!!!\n"); |
371 | #endif | 371 | #endif |
372 | spin_lock_irqsave(&gus->reg_lock, flags); | 372 | spin_lock_irqsave(&gus->reg_lock, flags); |
373 | outb(SNDRV_GF1_GW_DRAM_IO_LOW, gus->gf1.reg_regsel); | 373 | outb(SNDRV_GF1_GW_DRAM_IO_LOW, gus->gf1.reg_regsel); |
@@ -393,7 +393,7 @@ void snd_gf1_dram_setmem(snd_gus_card_t * gus, unsigned int addr, | |||
393 | 393 | ||
394 | #ifdef CONFIG_SND_DEBUG | 394 | #ifdef CONFIG_SND_DEBUG |
395 | if (!gus->interwave) | 395 | if (!gus->interwave) |
396 | snd_printk("snd_gf1_dram_setmem - GF1!!!\n"); | 396 | snd_printk(KERN_DEBUG "snd_gf1_dram_setmem - GF1!!!\n"); |
397 | #endif | 397 | #endif |
398 | addr &= ~1; | 398 | addr &= ~1; |
399 | count >>= 1; | 399 | count >>= 1; |
@@ -449,30 +449,30 @@ void snd_gf1_print_voice_registers(snd_gus_card_t * gus) | |||
449 | int voice, ctrl; | 449 | int voice, ctrl; |
450 | 450 | ||
451 | voice = gus->gf1.active_voice; | 451 | voice = gus->gf1.active_voice; |
452 | printk(" -%i- GF1 voice ctrl, ramp ctrl = 0x%x, 0x%x\n", voice, ctrl = snd_gf1_i_read8(gus, 0), snd_gf1_i_read8(gus, 0x0d)); | 452 | printk(KERN_INFO " -%i- GF1 voice ctrl, ramp ctrl = 0x%x, 0x%x\n", voice, ctrl = snd_gf1_i_read8(gus, 0), snd_gf1_i_read8(gus, 0x0d)); |
453 | printk(" -%i- GF1 frequency = 0x%x\n", voice, snd_gf1_i_read16(gus, 1)); | 453 | printk(KERN_INFO " -%i- GF1 frequency = 0x%x\n", voice, snd_gf1_i_read16(gus, 1)); |
454 | printk(" -%i- GF1 loop start, end = 0x%x (0x%x), 0x%x (0x%x)\n", voice, snd_gf1_i_read_addr(gus, 2, ctrl & 4), snd_gf1_i_read_addr(gus, 2, (ctrl & 4) ^ 4), snd_gf1_i_read_addr(gus, 4, ctrl & 4), snd_gf1_i_read_addr(gus, 4, (ctrl & 4) ^ 4)); | 454 | printk(KERN_INFO " -%i- GF1 loop start, end = 0x%x (0x%x), 0x%x (0x%x)\n", voice, snd_gf1_i_read_addr(gus, 2, ctrl & 4), snd_gf1_i_read_addr(gus, 2, (ctrl & 4) ^ 4), snd_gf1_i_read_addr(gus, 4, ctrl & 4), snd_gf1_i_read_addr(gus, 4, (ctrl & 4) ^ 4)); |
455 | printk(" -%i- GF1 ramp start, end, rate = 0x%x, 0x%x, 0x%x\n", voice, snd_gf1_i_read8(gus, 7), snd_gf1_i_read8(gus, 8), snd_gf1_i_read8(gus, 6)); | 455 | printk(KERN_INFO " -%i- GF1 ramp start, end, rate = 0x%x, 0x%x, 0x%x\n", voice, snd_gf1_i_read8(gus, 7), snd_gf1_i_read8(gus, 8), snd_gf1_i_read8(gus, 6)); |
456 | printk(" -%i- GF1 volume = 0x%x\n", voice, snd_gf1_i_read16(gus, 9)); | 456 | printk(KERN_INFO" -%i- GF1 volume = 0x%x\n", voice, snd_gf1_i_read16(gus, 9)); |
457 | printk(" -%i- GF1 position = 0x%x (0x%x)\n", voice, snd_gf1_i_read_addr(gus, 0x0a, ctrl & 4), snd_gf1_i_read_addr(gus, 0x0a, (ctrl & 4) ^ 4)); | 457 | printk(KERN_INFO " -%i- GF1 position = 0x%x (0x%x)\n", voice, snd_gf1_i_read_addr(gus, 0x0a, ctrl & 4), snd_gf1_i_read_addr(gus, 0x0a, (ctrl & 4) ^ 4)); |
458 | if (gus->interwave && snd_gf1_i_read8(gus, 0x19) & 0x01) { /* enhanced mode */ | 458 | if (gus->interwave && snd_gf1_i_read8(gus, 0x19) & 0x01) { /* enhanced mode */ |
459 | mode = snd_gf1_i_read8(gus, 0x15); | 459 | mode = snd_gf1_i_read8(gus, 0x15); |
460 | printk(" -%i- GFA1 mode = 0x%x\n", voice, mode); | 460 | printk(KERN_INFO " -%i- GFA1 mode = 0x%x\n", voice, mode); |
461 | if (mode & 0x01) { /* Effect processor */ | 461 | if (mode & 0x01) { /* Effect processor */ |
462 | printk(" -%i- GFA1 effect address = 0x%x\n", voice, snd_gf1_i_read_addr(gus, 0x11, ctrl & 4)); | 462 | printk(KERN_INFO " -%i- GFA1 effect address = 0x%x\n", voice, snd_gf1_i_read_addr(gus, 0x11, ctrl & 4)); |
463 | printk(" -%i- GFA1 effect volume = 0x%x\n", voice, snd_gf1_i_read16(gus, 0x16)); | 463 | printk(KERN_INFO " -%i- GFA1 effect volume = 0x%x\n", voice, snd_gf1_i_read16(gus, 0x16)); |
464 | printk(" -%i- GFA1 effect volume final = 0x%x\n", voice, snd_gf1_i_read16(gus, 0x1d)); | 464 | printk(KERN_INFO " -%i- GFA1 effect volume final = 0x%x\n", voice, snd_gf1_i_read16(gus, 0x1d)); |
465 | printk(" -%i- GFA1 effect acumulator = 0x%x\n", voice, snd_gf1_i_read8(gus, 0x14)); | 465 | printk(KERN_INFO " -%i- GFA1 effect acumulator = 0x%x\n", voice, snd_gf1_i_read8(gus, 0x14)); |
466 | } | 466 | } |
467 | if (mode & 0x20) { | 467 | if (mode & 0x20) { |
468 | printk(" -%i- GFA1 left offset = 0x%x (%i)\n", voice, snd_gf1_i_read16(gus, 0x13), snd_gf1_i_read16(gus, 0x13) >> 4); | 468 | printk(KERN_INFO " -%i- GFA1 left offset = 0x%x (%i)\n", voice, snd_gf1_i_read16(gus, 0x13), snd_gf1_i_read16(gus, 0x13) >> 4); |
469 | printk(" -%i- GFA1 left offset final = 0x%x (%i)\n", voice, snd_gf1_i_read16(gus, 0x1c), snd_gf1_i_read16(gus, 0x1c) >> 4); | 469 | printk(KERN_INFO " -%i- GFA1 left offset final = 0x%x (%i)\n", voice, snd_gf1_i_read16(gus, 0x1c), snd_gf1_i_read16(gus, 0x1c) >> 4); |
470 | printk(" -%i- GFA1 right offset = 0x%x (%i)\n", voice, snd_gf1_i_read16(gus, 0x0c), snd_gf1_i_read16(gus, 0x0c) >> 4); | 470 | printk(KERN_INFO " -%i- GFA1 right offset = 0x%x (%i)\n", voice, snd_gf1_i_read16(gus, 0x0c), snd_gf1_i_read16(gus, 0x0c) >> 4); |
471 | printk(" -%i- GFA1 right offset final = 0x%x (%i)\n", voice, snd_gf1_i_read16(gus, 0x1b), snd_gf1_i_read16(gus, 0x1b) >> 4); | 471 | printk(KERN_INFO " -%i- GFA1 right offset final = 0x%x (%i)\n", voice, snd_gf1_i_read16(gus, 0x1b), snd_gf1_i_read16(gus, 0x1b) >> 4); |
472 | } else | 472 | } else |
473 | printk(" -%i- GF1 pan = 0x%x\n", voice, snd_gf1_i_read8(gus, 0x0c)); | 473 | printk(KERN_INFO " -%i- GF1 pan = 0x%x\n", voice, snd_gf1_i_read8(gus, 0x0c)); |
474 | } else | 474 | } else |
475 | printk(" -%i- GF1 pan = 0x%x\n", voice, snd_gf1_i_read8(gus, 0x0c)); | 475 | printk(KERN_INFO " -%i- GF1 pan = 0x%x\n", voice, snd_gf1_i_read8(gus, 0x0c)); |
476 | } | 476 | } |
477 | 477 | ||
478 | #if 0 | 478 | #if 0 |
@@ -481,45 +481,45 @@ void snd_gf1_print_global_registers(snd_gus_card_t * gus) | |||
481 | { | 481 | { |
482 | unsigned char global_mode = 0x00; | 482 | unsigned char global_mode = 0x00; |
483 | 483 | ||
484 | printk(" -G- GF1 active voices = 0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_ACTIVE_VOICES)); | 484 | printk(KERN_INFO " -G- GF1 active voices = 0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_ACTIVE_VOICES)); |
485 | if (gus->interwave) { | 485 | if (gus->interwave) { |
486 | global_mode = snd_gf1_i_read8(gus, SNDRV_GF1_GB_GLOBAL_MODE); | 486 | global_mode = snd_gf1_i_read8(gus, SNDRV_GF1_GB_GLOBAL_MODE); |
487 | printk(" -G- GF1 global mode = 0x%x\n", global_mode); | 487 | printk(KERN_INFO " -G- GF1 global mode = 0x%x\n", global_mode); |
488 | } | 488 | } |
489 | if (global_mode & 0x02) /* LFO enabled? */ | 489 | if (global_mode & 0x02) /* LFO enabled? */ |
490 | printk(" -G- GF1 LFO base = 0x%x\n", snd_gf1_i_look16(gus, SNDRV_GF1_GW_LFO_BASE)); | 490 | printk(KERN_INFO " -G- GF1 LFO base = 0x%x\n", snd_gf1_i_look16(gus, SNDRV_GF1_GW_LFO_BASE)); |
491 | printk(" -G- GF1 voices IRQ read = 0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_VOICES_IRQ_READ)); | 491 | printk(KERN_INFO " -G- GF1 voices IRQ read = 0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_VOICES_IRQ_READ)); |
492 | printk(" -G- GF1 DRAM DMA control = 0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_DRAM_DMA_CONTROL)); | 492 | printk(KERN_INFO " -G- GF1 DRAM DMA control = 0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_DRAM_DMA_CONTROL)); |
493 | printk(" -G- GF1 DRAM DMA high/low = 0x%x/0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_DRAM_DMA_HIGH), snd_gf1_i_read16(gus, SNDRV_GF1_GW_DRAM_DMA_LOW)); | 493 | printk(KERN_INFO " -G- GF1 DRAM DMA high/low = 0x%x/0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_DRAM_DMA_HIGH), snd_gf1_i_read16(gus, SNDRV_GF1_GW_DRAM_DMA_LOW)); |
494 | printk(" -G- GF1 DRAM IO high/low = 0x%x/0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_DRAM_IO_HIGH), snd_gf1_i_read16(gus, SNDRV_GF1_GW_DRAM_IO_LOW)); | 494 | printk(KERN_INFO " -G- GF1 DRAM IO high/low = 0x%x/0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_DRAM_IO_HIGH), snd_gf1_i_read16(gus, SNDRV_GF1_GW_DRAM_IO_LOW)); |
495 | if (!gus->interwave) | 495 | if (!gus->interwave) |
496 | printk(" -G- GF1 record DMA control = 0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_REC_DMA_CONTROL)); | 496 | printk(KERN_INFO " -G- GF1 record DMA control = 0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_REC_DMA_CONTROL)); |
497 | printk(" -G- GF1 DRAM IO 16 = 0x%x\n", snd_gf1_i_look16(gus, SNDRV_GF1_GW_DRAM_IO16)); | 497 | printk(KERN_INFO " -G- GF1 DRAM IO 16 = 0x%x\n", snd_gf1_i_look16(gus, SNDRV_GF1_GW_DRAM_IO16)); |
498 | if (gus->gf1.enh_mode) { | 498 | if (gus->gf1.enh_mode) { |
499 | printk(" -G- GFA1 memory config = 0x%x\n", snd_gf1_i_look16(gus, SNDRV_GF1_GW_MEMORY_CONFIG)); | 499 | printk(KERN_INFO " -G- GFA1 memory config = 0x%x\n", snd_gf1_i_look16(gus, SNDRV_GF1_GW_MEMORY_CONFIG)); |
500 | printk(" -G- GFA1 memory control = 0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_MEMORY_CONTROL)); | 500 | printk(KERN_INFO " -G- GFA1 memory control = 0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_MEMORY_CONTROL)); |
501 | printk(" -G- GFA1 FIFO record base = 0x%x\n", snd_gf1_i_look16(gus, SNDRV_GF1_GW_FIFO_RECORD_BASE_ADDR)); | 501 | printk(KERN_INFO " -G- GFA1 FIFO record base = 0x%x\n", snd_gf1_i_look16(gus, SNDRV_GF1_GW_FIFO_RECORD_BASE_ADDR)); |
502 | printk(" -G- GFA1 FIFO playback base = 0x%x\n", snd_gf1_i_look16(gus, SNDRV_GF1_GW_FIFO_PLAY_BASE_ADDR)); | 502 | printk(KERN_INFO " -G- GFA1 FIFO playback base = 0x%x\n", snd_gf1_i_look16(gus, SNDRV_GF1_GW_FIFO_PLAY_BASE_ADDR)); |
503 | printk(" -G- GFA1 interleave control = 0x%x\n", snd_gf1_i_look16(gus, SNDRV_GF1_GW_INTERLEAVE)); | 503 | printk(KERN_INFO " -G- GFA1 interleave control = 0x%x\n", snd_gf1_i_look16(gus, SNDRV_GF1_GW_INTERLEAVE)); |
504 | } | 504 | } |
505 | } | 505 | } |
506 | 506 | ||
507 | void snd_gf1_print_setup_registers(snd_gus_card_t * gus) | 507 | void snd_gf1_print_setup_registers(snd_gus_card_t * gus) |
508 | { | 508 | { |
509 | printk(" -S- mix control = 0x%x\n", inb(GUSP(gus, MIXCNTRLREG))); | 509 | printk(KERN_INFO " -S- mix control = 0x%x\n", inb(GUSP(gus, MIXCNTRLREG))); |
510 | printk(" -S- IRQ status = 0x%x\n", inb(GUSP(gus, IRQSTAT))); | 510 | printk(KERN_INFO " -S- IRQ status = 0x%x\n", inb(GUSP(gus, IRQSTAT))); |
511 | printk(" -S- timer control = 0x%x\n", inb(GUSP(gus, TIMERCNTRL))); | 511 | printk(KERN_INFO " -S- timer control = 0x%x\n", inb(GUSP(gus, TIMERCNTRL))); |
512 | printk(" -S- timer data = 0x%x\n", inb(GUSP(gus, TIMERDATA))); | 512 | printk(KERN_INFO " -S- timer data = 0x%x\n", inb(GUSP(gus, TIMERDATA))); |
513 | printk(" -S- status read = 0x%x\n", inb(GUSP(gus, REGCNTRLS))); | 513 | printk(KERN_INFO " -S- status read = 0x%x\n", inb(GUSP(gus, REGCNTRLS))); |
514 | printk(" -S- Sound Blaster control = 0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL)); | 514 | printk(KERN_INFO " -S- Sound Blaster control = 0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL)); |
515 | printk(" -S- AdLib timer 1/2 = 0x%x/0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_ADLIB_TIMER_1), snd_gf1_i_look8(gus, SNDRV_GF1_GB_ADLIB_TIMER_2)); | 515 | printk(KERN_INFO " -S- AdLib timer 1/2 = 0x%x/0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_ADLIB_TIMER_1), snd_gf1_i_look8(gus, SNDRV_GF1_GB_ADLIB_TIMER_2)); |
516 | printk(" -S- reset = 0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_RESET)); | 516 | printk(KERN_INFO " -S- reset = 0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_RESET)); |
517 | if (gus->interwave) { | 517 | if (gus->interwave) { |
518 | printk(" -S- compatibility = 0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_COMPATIBILITY)); | 518 | printk(KERN_INFO " -S- compatibility = 0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_COMPATIBILITY)); |
519 | printk(" -S- decode control = 0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_DECODE_CONTROL)); | 519 | printk(KERN_INFO " -S- decode control = 0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_DECODE_CONTROL)); |
520 | printk(" -S- version number = 0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_VERSION_NUMBER)); | 520 | printk(KERN_INFO " -S- version number = 0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_VERSION_NUMBER)); |
521 | printk(" -S- MPU-401 emul. control A/B = 0x%x/0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_MPU401_CONTROL_A), snd_gf1_i_look8(gus, SNDRV_GF1_GB_MPU401_CONTROL_B)); | 521 | printk(KERN_INFO " -S- MPU-401 emul. control A/B = 0x%x/0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_MPU401_CONTROL_A), snd_gf1_i_look8(gus, SNDRV_GF1_GB_MPU401_CONTROL_B)); |
522 | printk(" -S- emulation IRQ = 0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_EMULATION_IRQ)); | 522 | printk(KERN_INFO " -S- emulation IRQ = 0x%x\n", snd_gf1_i_look8(gus, SNDRV_GF1_GB_EMULATION_IRQ)); |
523 | } | 523 | } |
524 | } | 524 | } |
525 | 525 | ||
diff --git a/sound/isa/gus/gus_main.c b/sound/isa/gus/gus_main.c index 8f2872f8e8f6..4f57ff4ab351 100644 --- a/sound/isa/gus/gus_main.c +++ b/sound/isa/gus/gus_main.c | |||
@@ -113,14 +113,8 @@ static int snd_gus_free(snd_gus_card_t *gus) | |||
113 | snd_gf1_stop(gus); | 113 | snd_gf1_stop(gus); |
114 | snd_gus_init_dma_irq(gus, 0); | 114 | snd_gus_init_dma_irq(gus, 0); |
115 | __hw_end: | 115 | __hw_end: |
116 | if (gus->gf1.res_port1) { | 116 | release_and_free_resource(gus->gf1.res_port1); |
117 | release_resource(gus->gf1.res_port1); | 117 | release_and_free_resource(gus->gf1.res_port2); |
118 | kfree_nocheck(gus->gf1.res_port1); | ||
119 | } | ||
120 | if (gus->gf1.res_port2) { | ||
121 | release_resource(gus->gf1.res_port2); | ||
122 | kfree_nocheck(gus->gf1.res_port2); | ||
123 | } | ||
124 | if (gus->gf1.irq >= 0) | 118 | if (gus->gf1.irq >= 0) |
125 | free_irq(gus->gf1.irq, (void *) gus); | 119 | free_irq(gus->gf1.irq, (void *) gus); |
126 | if (gus->gf1.dma1 >= 0) { | 120 | if (gus->gf1.dma1 >= 0) { |
@@ -252,7 +246,7 @@ static int snd_gus_detect_memory(snd_gus_card_t * gus) | |||
252 | snd_gf1_poke(gus, 0L, 0xaa); | 246 | snd_gf1_poke(gus, 0L, 0xaa); |
253 | snd_gf1_poke(gus, 1L, 0x55); | 247 | snd_gf1_poke(gus, 1L, 0x55); |
254 | if (snd_gf1_peek(gus, 0L) != 0xaa || snd_gf1_peek(gus, 1L) != 0x55) { | 248 | if (snd_gf1_peek(gus, 0L) != 0xaa || snd_gf1_peek(gus, 1L) != 0x55) { |
255 | snd_printk("plain GF1 card at 0x%lx without onboard DRAM?\n", gus->gf1.port); | 249 | snd_printk(KERN_ERR "plain GF1 card at 0x%lx without onboard DRAM?\n", gus->gf1.port); |
256 | return -ENOMEM; | 250 | return -ENOMEM; |
257 | } | 251 | } |
258 | for (idx = 1, d = 0xab; idx < 4; idx++, d++) { | 252 | for (idx = 1, d = 0xab; idx < 4; idx++, d++) { |
@@ -305,20 +299,17 @@ static int snd_gus_init_dma_irq(snd_gus_card_t * gus, int latches) | |||
305 | dma2 = gus->gf1.dma2; | 299 | dma2 = gus->gf1.dma2; |
306 | dma2 = dma2 < 0 ? -dma2 : dma2; | 300 | dma2 = dma2 < 0 ? -dma2 : dma2; |
307 | dma2 = dmas[dma2 & 7]; | 301 | dma2 = dmas[dma2 & 7]; |
308 | #if 0 | ||
309 | printk("dma1 = %i, dma2 = %i\n", gus->gf1.dma1, gus->gf1.dma2); | ||
310 | #endif | ||
311 | dma1 |= gus->equal_dma ? 0x40 : (dma2 << 3); | 302 | dma1 |= gus->equal_dma ? 0x40 : (dma2 << 3); |
312 | 303 | ||
313 | if ((dma1 & 7) == 0 || (dma2 & 7) == 0) { | 304 | if ((dma1 & 7) == 0 || (dma2 & 7) == 0) { |
314 | snd_printk("Error! DMA isn't defined.\n"); | 305 | snd_printk(KERN_ERR "Error! DMA isn't defined.\n"); |
315 | return -EINVAL; | 306 | return -EINVAL; |
316 | } | 307 | } |
317 | irq = gus->gf1.irq; | 308 | irq = gus->gf1.irq; |
318 | irq = irq < 0 ? -irq : irq; | 309 | irq = irq < 0 ? -irq : irq; |
319 | irq = irqs[irq & 0x0f]; | 310 | irq = irqs[irq & 0x0f]; |
320 | if (irq == 0) { | 311 | if (irq == 0) { |
321 | snd_printk("Error! IRQ isn't defined.\n"); | 312 | snd_printk(KERN_ERR "Error! IRQ isn't defined.\n"); |
322 | return -EINVAL; | 313 | return -EINVAL; |
323 | } | 314 | } |
324 | irq |= 0x40; | 315 | irq |= 0x40; |
@@ -406,8 +397,8 @@ static int snd_gus_check_version(snd_gus_card_t * gus) | |||
406 | strcpy(card->longname, "Gravis UltraSound Extreme"); | 397 | strcpy(card->longname, "Gravis UltraSound Extreme"); |
407 | gus->ess_flag = 1; | 398 | gus->ess_flag = 1; |
408 | } else { | 399 | } else { |
409 | snd_printk("unknown GF1 revision number at 0x%lx - 0x%x (0x%x)\n", gus->gf1.port, rev, val); | 400 | snd_printk(KERN_ERR "unknown GF1 revision number at 0x%lx - 0x%x (0x%x)\n", gus->gf1.port, rev, val); |
410 | snd_printk(" please - report to <perex@suse.cz>\n"); | 401 | snd_printk(KERN_ERR " please - report to <perex@suse.cz>\n"); |
411 | } | 402 | } |
412 | } | 403 | } |
413 | } | 404 | } |
@@ -431,7 +422,7 @@ int snd_gus_initialize(snd_gus_card_t *gus) | |||
431 | 422 | ||
432 | if (!gus->interwave) { | 423 | if (!gus->interwave) { |
433 | if ((err = snd_gus_check_version(gus)) < 0) { | 424 | if ((err = snd_gus_check_version(gus)) < 0) { |
434 | snd_printk("version check failed\n"); | 425 | snd_printk(KERN_ERR "version check failed\n"); |
435 | return err; | 426 | return err; |
436 | } | 427 | } |
437 | if ((err = snd_gus_detect_memory(gus)) < 0) | 428 | if ((err = snd_gus_detect_memory(gus)) < 0) |
diff --git a/sound/isa/gus/gus_mem.c b/sound/isa/gus/gus_mem.c index 5eb766dd564b..2e23f2a8c627 100644 --- a/sound/isa/gus/gus_mem.c +++ b/sound/isa/gus/gus_mem.c | |||
@@ -198,7 +198,7 @@ snd_gf1_mem_block_t *snd_gf1_mem_alloc(snd_gf1_mem_t * alloc, int owner, | |||
198 | if (nblock != NULL) { | 198 | if (nblock != NULL) { |
199 | if (size != (int)nblock->size) { | 199 | if (size != (int)nblock->size) { |
200 | /* TODO: remove in the future */ | 200 | /* TODO: remove in the future */ |
201 | snd_printk("snd_gf1_mem_alloc - share: sizes differ\n"); | 201 | snd_printk(KERN_ERR "snd_gf1_mem_alloc - share: sizes differ\n"); |
202 | goto __std; | 202 | goto __std; |
203 | } | 203 | } |
204 | nblock->share++; | 204 | nblock->share++; |
diff --git a/sound/isa/gus/gus_pcm.c b/sound/isa/gus/gus_pcm.c index beb01365dc46..1cc89fb67bf2 100644 --- a/sound/isa/gus/gus_pcm.c +++ b/sound/isa/gus/gus_pcm.c | |||
@@ -333,8 +333,7 @@ static int snd_gf1_pcm_poke_block(snd_gus_card_t *gus, unsigned char *buf, | |||
333 | } | 333 | } |
334 | } | 334 | } |
335 | if (count > 0 && !in_interrupt()) { | 335 | if (count > 0 && !in_interrupt()) { |
336 | set_current_state(TASK_INTERRUPTIBLE); | 336 | schedule_timeout_interruptible(1); |
337 | schedule_timeout(1); | ||
338 | if (signal_pending(current)) | 337 | if (signal_pending(current)) |
339 | return -EAGAIN; | 338 | return -EAGAIN; |
340 | } | 339 | } |
@@ -698,7 +697,7 @@ static int snd_gf1_pcm_playback_close(snd_pcm_substream_t * substream) | |||
698 | gus_pcm_private_t *pcmp = runtime->private_data; | 697 | gus_pcm_private_t *pcmp = runtime->private_data; |
699 | 698 | ||
700 | if (!wait_event_timeout(pcmp->sleep, (atomic_read(&pcmp->dma_count) <= 0), 2*HZ)) | 699 | if (!wait_event_timeout(pcmp->sleep, (atomic_read(&pcmp->dma_count) <= 0), 2*HZ)) |
701 | snd_printk("gf1 pcm - serious DMA problem\n"); | 700 | snd_printk(KERN_ERR "gf1 pcm - serious DMA problem\n"); |
702 | 701 | ||
703 | snd_gf1_dma_done(gus); | 702 | snd_gf1_dma_done(gus); |
704 | return 0; | 703 | return 0; |
diff --git a/sound/isa/gus/gus_reset.c b/sound/isa/gus/gus_reset.c index ef687abc7070..90710969ef7f 100644 --- a/sound/isa/gus/gus_reset.c +++ b/sound/isa/gus/gus_reset.c | |||
@@ -134,7 +134,7 @@ void snd_gf1_smart_stop_voice(snd_gus_card_t * gus, unsigned short voice) | |||
134 | spin_lock_irqsave(&gus->reg_lock, flags); | 134 | spin_lock_irqsave(&gus->reg_lock, flags); |
135 | snd_gf1_select_voice(gus, voice); | 135 | snd_gf1_select_voice(gus, voice); |
136 | #if 0 | 136 | #if 0 |
137 | printk(" -%i- smart stop voice - volume = 0x%x\n", voice, snd_gf1_i_read16(gus, SNDRV_GF1_VW_VOLUME)); | 137 | printk(KERN_DEBUG " -%i- smart stop voice - volume = 0x%x\n", voice, snd_gf1_i_read16(gus, SNDRV_GF1_VW_VOLUME)); |
138 | #endif | 138 | #endif |
139 | snd_gf1_ctrl_stop(gus, SNDRV_GF1_VB_ADDRESS_CONTROL); | 139 | snd_gf1_ctrl_stop(gus, SNDRV_GF1_VB_ADDRESS_CONTROL); |
140 | snd_gf1_ctrl_stop(gus, SNDRV_GF1_VB_VOLUME_CONTROL); | 140 | snd_gf1_ctrl_stop(gus, SNDRV_GF1_VB_VOLUME_CONTROL); |
@@ -148,7 +148,7 @@ void snd_gf1_stop_voice(snd_gus_card_t * gus, unsigned short voice) | |||
148 | spin_lock_irqsave(&gus->reg_lock, flags); | 148 | spin_lock_irqsave(&gus->reg_lock, flags); |
149 | snd_gf1_select_voice(gus, voice); | 149 | snd_gf1_select_voice(gus, voice); |
150 | #if 0 | 150 | #if 0 |
151 | printk(" -%i- stop voice - volume = 0x%x\n", voice, snd_gf1_i_read16(gus, SNDRV_GF1_VW_VOLUME)); | 151 | printk(KERN_DEBUG " -%i- stop voice - volume = 0x%x\n", voice, snd_gf1_i_read16(gus, SNDRV_GF1_VW_VOLUME)); |
152 | #endif | 152 | #endif |
153 | snd_gf1_ctrl_stop(gus, SNDRV_GF1_VB_ADDRESS_CONTROL); | 153 | snd_gf1_ctrl_stop(gus, SNDRV_GF1_VB_ADDRESS_CONTROL); |
154 | snd_gf1_ctrl_stop(gus, SNDRV_GF1_VB_VOLUME_CONTROL); | 154 | snd_gf1_ctrl_stop(gus, SNDRV_GF1_VB_VOLUME_CONTROL); |
diff --git a/sound/isa/gus/gus_simple.c b/sound/isa/gus/gus_simple.c index c122e7be6ceb..dfed85b58b3a 100644 --- a/sound/isa/gus/gus_simple.c +++ b/sound/isa/gus/gus_simple.c | |||
@@ -136,7 +136,7 @@ static void do_volume_envelope(snd_gus_card_t *gus, snd_gus_voice_t *voice) | |||
136 | snd_gf1_select_voice(gus, voice->number); | 136 | snd_gf1_select_voice(gus, voice->number); |
137 | snd_gf1_ctrl_stop(gus, SNDRV_GF1_VB_VOLUME_CONTROL); | 137 | snd_gf1_ctrl_stop(gus, SNDRV_GF1_VB_VOLUME_CONTROL); |
138 | snd_gf1_write16(gus, SNDRV_GF1_VW_VOLUME, voice->gf1_volume); | 138 | snd_gf1_write16(gus, SNDRV_GF1_VW_VOLUME, voice->gf1_volume); |
139 | printk("gf1_volume = 0x%x\n", voice->gf1_volume); | 139 | /* printk("gf1_volume = 0x%x\n", voice->gf1_volume); */ |
140 | spin_unlock_irqrestore(&gus->reg_lock, flags); | 140 | spin_unlock_irqrestore(&gus->reg_lock, flags); |
141 | return; | 141 | return; |
142 | } | 142 | } |
diff --git a/sound/isa/gus/gus_uart.c b/sound/isa/gus/gus_uart.c index 1bc2da8784e0..fbc95e99105c 100644 --- a/sound/isa/gus/gus_uart.c +++ b/sound/isa/gus/gus_uart.c | |||
@@ -104,7 +104,7 @@ static int snd_gf1_uart_output_open(snd_rawmidi_substream_t * substream) | |||
104 | gus->midi_substream_output = substream; | 104 | gus->midi_substream_output = substream; |
105 | spin_unlock_irqrestore(&gus->uart_cmd_lock, flags); | 105 | spin_unlock_irqrestore(&gus->uart_cmd_lock, flags); |
106 | #if 0 | 106 | #if 0 |
107 | snd_printk("write init - cmd = 0x%x, stat = 0x%x\n", gus->gf1.uart_cmd, snd_gf1_uart_stat(gus)); | 107 | snd_printk(KERN_DEBUG "write init - cmd = 0x%x, stat = 0x%x\n", gus->gf1.uart_cmd, snd_gf1_uart_stat(gus)); |
108 | #endif | 108 | #endif |
109 | return 0; | 109 | return 0; |
110 | } | 110 | } |
@@ -126,7 +126,7 @@ static int snd_gf1_uart_input_open(snd_rawmidi_substream_t * substream) | |||
126 | for (i = 0; i < 1000 && (snd_gf1_uart_stat(gus) & 0x01); i++) | 126 | for (i = 0; i < 1000 && (snd_gf1_uart_stat(gus) & 0x01); i++) |
127 | snd_gf1_uart_get(gus); /* clean Rx */ | 127 | snd_gf1_uart_get(gus); /* clean Rx */ |
128 | if (i >= 1000) | 128 | if (i >= 1000) |
129 | snd_printk("gus midi uart init read - cleanup error\n"); | 129 | snd_printk(KERN_ERR "gus midi uart init read - cleanup error\n"); |
130 | } | 130 | } |
131 | spin_unlock_irqrestore(&gus->uart_cmd_lock, flags); | 131 | spin_unlock_irqrestore(&gus->uart_cmd_lock, flags); |
132 | #if 0 | 132 | #if 0 |
diff --git a/sound/isa/gus/gus_volume.c b/sound/isa/gus/gus_volume.c index 3d36f6c8ee6a..b3382fec5298 100644 --- a/sound/isa/gus/gus_volume.c +++ b/sound/isa/gus/gus_volume.c | |||
@@ -119,7 +119,7 @@ unsigned short snd_gf1_translate_freq(snd_gus_card_t * gus, unsigned int freq16) | |||
119 | freq16 = 50; | 119 | freq16 = 50; |
120 | if (freq16 & 0xf8000000) { | 120 | if (freq16 & 0xf8000000) { |
121 | freq16 = ~0xf8000000; | 121 | freq16 = ~0xf8000000; |
122 | snd_printk("snd_gf1_translate_freq: overflow - freq = 0x%x\n", freq16); | 122 | snd_printk(KERN_ERR "snd_gf1_translate_freq: overflow - freq = 0x%x\n", freq16); |
123 | } | 123 | } |
124 | return ((freq16 << 9) + (gus->gf1.playback_freq >> 1)) / gus->gf1.playback_freq; | 124 | return ((freq16 << 9) + (gus->gf1.playback_freq >> 1)) / gus->gf1.playback_freq; |
125 | } | 125 | } |
@@ -203,14 +203,14 @@ unsigned short snd_gf1_compute_freq(unsigned int freq, | |||
203 | fc = (freq << 10) / rate; | 203 | fc = (freq << 10) / rate; |
204 | if (fc > 97391L) { | 204 | if (fc > 97391L) { |
205 | fc = 97391; | 205 | fc = 97391; |
206 | snd_printk("patch: (1) fc frequency overflow - %u\n", fc); | 206 | snd_printk(KERN_ERR "patch: (1) fc frequency overflow - %u\n", fc); |
207 | } | 207 | } |
208 | fc = (fc * 44100UL) / mix_rate; | 208 | fc = (fc * 44100UL) / mix_rate; |
209 | while (scale--) | 209 | while (scale--) |
210 | fc <<= 1; | 210 | fc <<= 1; |
211 | if (fc > 65535L) { | 211 | if (fc > 65535L) { |
212 | fc = 65535; | 212 | fc = 65535; |
213 | snd_printk("patch: (2) fc frequency overflow - %u\n", fc); | 213 | snd_printk(KERN_ERR "patch: (2) fc frequency overflow - %u\n", fc); |
214 | } | 214 | } |
215 | return (unsigned short) fc; | 215 | return (unsigned short) fc; |
216 | } | 216 | } |
diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c index 358cba9d738f..f703a9f4257c 100644 --- a/sound/isa/gus/interwave.c +++ b/sound/isa/gus/interwave.c | |||
@@ -437,7 +437,7 @@ static void __devinit snd_interwave_detect_memory(snd_gus_card_t * gus) | |||
437 | for (i = 0; i < 8; ++i) | 437 | for (i = 0; i < 8; ++i) |
438 | iwave[i] = snd_gf1_peek(gus, bank_pos + i); | 438 | iwave[i] = snd_gf1_peek(gus, bank_pos + i); |
439 | #ifdef CONFIG_SND_DEBUG_ROM | 439 | #ifdef CONFIG_SND_DEBUG_ROM |
440 | printk("ROM at 0x%06x = %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n", bank_pos, | 440 | printk(KERN_DEBUG "ROM at 0x%06x = %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n", bank_pos, |
441 | iwave[0], iwave[1], iwave[2], iwave[3], | 441 | iwave[0], iwave[1], iwave[2], iwave[3], |
442 | iwave[4], iwave[5], iwave[6], iwave[7]); | 442 | iwave[4], iwave[5], iwave[6], iwave[7]); |
443 | #endif | 443 | #endif |
@@ -447,7 +447,7 @@ static void __devinit snd_interwave_detect_memory(snd_gus_card_t * gus) | |||
447 | for (i = 0; i < sizeof(struct rom_hdr); i++) | 447 | for (i = 0; i < sizeof(struct rom_hdr); i++) |
448 | csum += snd_gf1_peek(gus, bank_pos + i); | 448 | csum += snd_gf1_peek(gus, bank_pos + i); |
449 | #ifdef CONFIG_SND_DEBUG_ROM | 449 | #ifdef CONFIG_SND_DEBUG_ROM |
450 | printk("ROM checksum = 0x%x (computed)\n", csum); | 450 | printk(KERN_DEBUG "ROM checksum = 0x%x (computed)\n", csum); |
451 | #endif | 451 | #endif |
452 | if (csum != 0) | 452 | if (csum != 0) |
453 | continue; /* not valid rom */ | 453 | continue; /* not valid rom */ |
@@ -638,10 +638,7 @@ static void snd_interwave_free(snd_card_t *card) | |||
638 | if (iwcard == NULL) | 638 | if (iwcard == NULL) |
639 | return; | 639 | return; |
640 | #ifdef SNDRV_STB | 640 | #ifdef SNDRV_STB |
641 | if (iwcard->i2c_res) { | 641 | release_and_free_resource(iwcard->i2c_res); |
642 | release_resource(iwcard->i2c_res); | ||
643 | kfree_nocheck(iwcard->i2c_res); | ||
644 | } | ||
645 | #endif | 642 | #endif |
646 | if (iwcard->irq >= 0) | 643 | if (iwcard->irq >= 0) |
647 | free_irq(iwcard->irq, (void *)iwcard); | 644 | free_irq(iwcard->irq, (void *)iwcard); |