aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/maestro3.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/maestro3.c')
-rw-r--r--sound/pci/maestro3.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c
index 2693b6f731f3..99eb76c56f81 100644
--- a/sound/pci/maestro3.c
+++ b/sound/pci/maestro3.c
@@ -1492,7 +1492,7 @@ static int snd_m3_pcm_hw_params(snd_pcm_substream_t * substream,
1492 /* set buffer address */ 1492 /* set buffer address */
1493 s->buffer_addr = substream->runtime->dma_addr; 1493 s->buffer_addr = substream->runtime->dma_addr;
1494 if (s->buffer_addr & 0x3) { 1494 if (s->buffer_addr & 0x3) {
1495 snd_printk("oh my, not aligned\n"); 1495 snd_printk(KERN_ERR "oh my, not aligned\n");
1496 s->buffer_addr = s->buffer_addr & ~0x3; 1496 s->buffer_addr = s->buffer_addr & ~0x3;
1497 } 1497 }
1498 return 0; 1498 return 0;
@@ -1942,7 +1942,7 @@ static int snd_m3_ac97_wait(m3_t *chip)
1942 return 0; 1942 return 0;
1943 } while (i-- > 0); 1943 } while (i-- > 0);
1944 1944
1945 snd_printk("ac97 serial bus busy\n"); 1945 snd_printk(KERN_ERR "ac97 serial bus busy\n");
1946 return 1; 1946 return 1;
1947} 1947}
1948 1948
@@ -2046,8 +2046,7 @@ static void snd_m3_ac97_reset(m3_t *chip)
2046 outw(0, io + GPIO_DATA); 2046 outw(0, io + GPIO_DATA);
2047 outw(dir | GPO_PRIMARY_AC97, io + GPIO_DIRECTION); 2047 outw(dir | GPO_PRIMARY_AC97, io + GPIO_DIRECTION);
2048 2048
2049 set_current_state(TASK_UNINTERRUPTIBLE); 2049 schedule_timeout_uninterruptible(msecs_to_jiffies(delay1));
2050 schedule_timeout((delay1 * HZ) / 1000);
2051 2050
2052 outw(GPO_PRIMARY_AC97, io + GPIO_DATA); 2051 outw(GPO_PRIMARY_AC97, io + GPIO_DATA);
2053 udelay(5); 2052 udelay(5);
@@ -2055,8 +2054,7 @@ static void snd_m3_ac97_reset(m3_t *chip)
2055 outw(IO_SRAM_ENABLE | SERIAL_AC_LINK_ENABLE, io + RING_BUS_CTRL_A); 2054 outw(IO_SRAM_ENABLE | SERIAL_AC_LINK_ENABLE, io + RING_BUS_CTRL_A);
2056 outw(~0, io + GPIO_MASK); 2055 outw(~0, io + GPIO_MASK);
2057 2056
2058 set_current_state(TASK_UNINTERRUPTIBLE); 2057 schedule_timeout_uninterruptible(msecs_to_jiffies(delay2));
2059 schedule_timeout((delay2 * HZ) / 1000);
2060 2058
2061 if (! snd_m3_try_read_vendor(chip)) 2059 if (! snd_m3_try_read_vendor(chip))
2062 break; 2060 break;
@@ -2101,8 +2099,7 @@ static int __devinit snd_m3_mixer(m3_t *chip)
2101 2099
2102 /* seems ac97 PCM needs initialization.. hack hack.. */ 2100 /* seems ac97 PCM needs initialization.. hack hack.. */
2103 snd_ac97_write(chip->ac97, AC97_PCM, 0x8000 | (15 << 8) | 15); 2101 snd_ac97_write(chip->ac97, AC97_PCM, 0x8000 | (15 << 8) | 15);
2104 set_current_state(TASK_UNINTERRUPTIBLE); 2102 schedule_timeout_uninterruptible(msecs_to_jiffies(100));
2105 schedule_timeout(HZ / 10);
2106 snd_ac97_write(chip->ac97, AC97_PCM, 0); 2103 snd_ac97_write(chip->ac97, AC97_PCM, 0);
2107 2104
2108 memset(&id, 0, sizeof(id)); 2105 memset(&id, 0, sizeof(id));
@@ -2367,7 +2364,7 @@ static int __devinit snd_m3_assp_client_init(m3_t *chip, m3_dma_t *s, int index)
2367 address = 0x1100 + ((data_bytes/2) * index); 2364 address = 0x1100 + ((data_bytes/2) * index);
2368 2365
2369 if ((address + (data_bytes/2)) >= 0x1c00) { 2366 if ((address + (data_bytes/2)) >= 0x1c00) {
2370 snd_printk("no memory for %d bytes at ind %d (addr 0x%x)\n", 2367 snd_printk(KERN_ERR "no memory for %d bytes at ind %d (addr 0x%x)\n",
2371 data_bytes, index, address); 2368 data_bytes, index, address);
2372 return -ENOMEM; 2369 return -ENOMEM;
2373 } 2370 }
@@ -2476,6 +2473,7 @@ snd_m3_chip_init(m3_t *chip)
2476 t |= ASSP_0_WS_ENABLE; 2473 t |= ASSP_0_WS_ENABLE;
2477 outb(t, chip->iobase + ASSP_CONTROL_A); 2474 outb(t, chip->iobase + ASSP_CONTROL_A);
2478 2475
2476 snd_m3_assp_init(chip); /* download DSP code before starting ASSP below */
2479 outb(RUN_ASSP, chip->iobase + ASSP_CONTROL_B); 2477 outb(RUN_ASSP, chip->iobase + ASSP_CONTROL_B);
2480 2478
2481 outb(0x00, io + HARDWARE_VOL_CTRL); 2479 outb(0x00, io + HARDWARE_VOL_CTRL);
@@ -2655,7 +2653,7 @@ snd_m3_create(snd_card_t *card, struct pci_dev *pci,
2655 /* check, if we can restrict PCI DMA transfers to 28 bits */ 2653 /* check, if we can restrict PCI DMA transfers to 28 bits */
2656 if (pci_set_dma_mask(pci, 0x0fffffff) < 0 || 2654 if (pci_set_dma_mask(pci, 0x0fffffff) < 0 ||
2657 pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) { 2655 pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) {
2658 snd_printk("architecture does not support 28bit PCI busmaster DMA\n"); 2656 snd_printk(KERN_ERR "architecture does not support 28bit PCI busmaster DMA\n");
2659 pci_disable_device(pci); 2657 pci_disable_device(pci);
2660 return -ENXIO; 2658 return -ENXIO;
2661 } 2659 }
@@ -2734,14 +2732,13 @@ snd_m3_create(snd_card_t *card, struct pci_dev *pci,
2734 2732
2735 snd_m3_ac97_reset(chip); 2733 snd_m3_ac97_reset(chip);
2736 2734
2737 snd_m3_assp_init(chip);
2738 snd_m3_amp_enable(chip, 1); 2735 snd_m3_amp_enable(chip, 1);
2739 2736
2740 tasklet_init(&chip->hwvol_tq, snd_m3_update_hw_volume, (unsigned long)chip); 2737 tasklet_init(&chip->hwvol_tq, snd_m3_update_hw_volume, (unsigned long)chip);
2741 2738
2742 if (request_irq(pci->irq, snd_m3_interrupt, SA_INTERRUPT|SA_SHIRQ, 2739 if (request_irq(pci->irq, snd_m3_interrupt, SA_INTERRUPT|SA_SHIRQ,
2743 card->driver, (void *)chip)) { 2740 card->driver, (void *)chip)) {
2744 snd_printk("unable to grab IRQ %d\n", pci->irq); 2741 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
2745 snd_m3_free(chip); 2742 snd_m3_free(chip);
2746 return -ENOMEM; 2743 return -ENOMEM;
2747 } 2744 }