aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/es1968.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/es1968.c')
-rw-r--r--sound/pci/es1968.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c
index ecdcada90ca2..ac8294e21cc1 100644
--- a/sound/pci/es1968.c
+++ b/sound/pci/es1968.c
@@ -1462,13 +1462,13 @@ snd_es1968_init_dmabuf(es1968_t *chip)
1462 snd_dma_pci_data(chip->pci), 1462 snd_dma_pci_data(chip->pci),
1463 chip->total_bufsize, &chip->dma); 1463 chip->total_bufsize, &chip->dma);
1464 if (err < 0 || ! chip->dma.area) { 1464 if (err < 0 || ! chip->dma.area) {
1465 snd_printk("es1968: can't allocate dma pages for size %d\n", 1465 snd_printk(KERN_ERR "es1968: can't allocate dma pages for size %d\n",
1466 chip->total_bufsize); 1466 chip->total_bufsize);
1467 return -ENOMEM; 1467 return -ENOMEM;
1468 } 1468 }
1469 if ((chip->dma.addr + chip->dma.bytes - 1) & ~((1 << 28) - 1)) { 1469 if ((chip->dma.addr + chip->dma.bytes - 1) & ~((1 << 28) - 1)) {
1470 snd_dma_free_pages(&chip->dma); 1470 snd_dma_free_pages(&chip->dma);
1471 snd_printk("es1968: DMA buffer beyond 256MB.\n"); 1471 snd_printk(KERN_ERR "es1968: DMA buffer beyond 256MB.\n");
1472 return -ENOMEM; 1472 return -ENOMEM;
1473 } 1473 }
1474 } 1474 }
@@ -1741,11 +1741,11 @@ static void __devinit es1968_measure_clock(es1968_t *chip)
1741 1741
1742 /* search 2 APUs (although one apu is enough) */ 1742 /* search 2 APUs (although one apu is enough) */
1743 if ((apu = snd_es1968_alloc_apu_pair(chip, ESM_APU_PCM_PLAY)) < 0) { 1743 if ((apu = snd_es1968_alloc_apu_pair(chip, ESM_APU_PCM_PLAY)) < 0) {
1744 snd_printk("Hmm, cannot find empty APU pair!?\n"); 1744 snd_printk(KERN_ERR "Hmm, cannot find empty APU pair!?\n");
1745 return; 1745 return;
1746 } 1746 }
1747 if ((memory = snd_es1968_new_memory(chip, CLOCK_MEASURE_BUFSIZE)) == NULL) { 1747 if ((memory = snd_es1968_new_memory(chip, CLOCK_MEASURE_BUFSIZE)) == NULL) {
1748 snd_printk("cannot allocate dma buffer - using default clock %d\n", chip->clock); 1748 snd_printk(KERN_ERR "cannot allocate dma buffer - using default clock %d\n", chip->clock);
1749 snd_es1968_free_apu_pair(chip, apu); 1749 snd_es1968_free_apu_pair(chip, apu);
1750 return; 1750 return;
1751 } 1751 }
@@ -1806,7 +1806,7 @@ static void __devinit es1968_measure_clock(es1968_t *chip)
1806 else 1806 else
1807 t += stop_time.tv_usec - start_time.tv_usec; 1807 t += stop_time.tv_usec - start_time.tv_usec;
1808 if (t == 0) { 1808 if (t == 0) {
1809 snd_printk("?? calculation error..\n"); 1809 snd_printk(KERN_ERR "?? calculation error..\n");
1810 } else { 1810 } else {
1811 offset *= 1000; 1811 offset *= 1000;
1812 offset = (offset / t) * 1000 + ((offset % t) * 1000) / t; 1812 offset = (offset / t) * 1000 + ((offset % t) * 1000) / t;
@@ -2090,7 +2090,7 @@ static void snd_es1968_ac97_reset(es1968_t *chip)
2090 outw(inw(ioaddr + 0x3c) & 0xfffc, ioaddr + 0x3c); 2090 outw(inw(ioaddr + 0x3c) & 0xfffc, ioaddr + 0x3c);
2091 2091
2092#if 0 /* the loop here needs to be much better if we want it.. */ 2092#if 0 /* the loop here needs to be much better if we want it.. */
2093 snd_printk("trying software reset\n"); 2093 snd_printk(KERN_INFO "trying software reset\n");
2094 /* try and do a software reset */ 2094 /* try and do a software reset */
2095 outb(0x80 | 0x7c, ioaddr + 0x30); 2095 outb(0x80 | 0x7c, ioaddr + 0x30);
2096 for (w = 0;; w++) { 2096 for (w = 0;; w++) {
@@ -2461,8 +2461,7 @@ static int __devinit snd_es1968_create_gameport(es1968_t *chip, int dev)
2461 chip->gameport = gp = gameport_allocate_port(); 2461 chip->gameport = gp = gameport_allocate_port();
2462 if (!gp) { 2462 if (!gp) {
2463 printk(KERN_ERR "es1968: cannot allocate memory for gameport\n"); 2463 printk(KERN_ERR "es1968: cannot allocate memory for gameport\n");
2464 release_resource(r); 2464 release_and_free_resource(r);
2465 kfree_nocheck(r);
2466 return -ENOMEM; 2465 return -ENOMEM;
2467 } 2466 }
2468 2467
@@ -2488,8 +2487,7 @@ static void snd_es1968_free_gameport(es1968_t *chip)
2488 gameport_unregister_port(chip->gameport); 2487 gameport_unregister_port(chip->gameport);
2489 chip->gameport = NULL; 2488 chip->gameport = NULL;
2490 2489
2491 release_resource(r); 2490 release_and_free_resource(r);
2492 kfree_nocheck(r);
2493 } 2491 }
2494} 2492}
2495#else 2493#else
@@ -2564,7 +2562,7 @@ static int __devinit snd_es1968_create(snd_card_t * card,
2564 /* check, if we can restrict PCI DMA transfers to 28 bits */ 2562 /* check, if we can restrict PCI DMA transfers to 28 bits */
2565 if (pci_set_dma_mask(pci, 0x0fffffff) < 0 || 2563 if (pci_set_dma_mask(pci, 0x0fffffff) < 0 ||
2566 pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) { 2564 pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) {
2567 snd_printk("architecture does not support 28bit PCI busmaster DMA\n"); 2565 snd_printk(KERN_ERR "architecture does not support 28bit PCI busmaster DMA\n");
2568 pci_disable_device(pci); 2566 pci_disable_device(pci);
2569 return -ENXIO; 2567 return -ENXIO;
2570 } 2568 }
@@ -2599,7 +2597,7 @@ static int __devinit snd_es1968_create(snd_card_t * card,
2599 chip->io_port = pci_resource_start(pci, 0); 2597 chip->io_port = pci_resource_start(pci, 0);
2600 if (request_irq(pci->irq, snd_es1968_interrupt, SA_INTERRUPT|SA_SHIRQ, 2598 if (request_irq(pci->irq, snd_es1968_interrupt, SA_INTERRUPT|SA_SHIRQ,
2601 "ESS Maestro", (void*)chip)) { 2599 "ESS Maestro", (void*)chip)) {
2602 snd_printk("unable to grab IRQ %d\n", pci->irq); 2600 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
2603 snd_es1968_free(chip); 2601 snd_es1968_free(chip);
2604 return -EBUSY; 2602 return -EBUSY;
2605 } 2603 }