]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pci/es1968.c
Input: i8042 - export i8042_command()
[linux-2.6-omap-h63xx.git] / sound / pci / es1968.c
index 092da53e1464688d877cc1c0a6979fe0fa5258c4..2faf009076bb81c94aedeee60087adedf0aa7304 100644 (file)
@@ -1337,7 +1337,7 @@ static struct esm_memory *snd_es1968_new_memory(struct es1968 *chip, int size)
        struct esm_memory *buf;
        struct list_head *p;
        
-       size = ((size + ESM_MEM_ALIGN - 1) / ESM_MEM_ALIGN) * ESM_MEM_ALIGN;
+       size = ALIGN(size, ESM_MEM_ALIGN);
        mutex_lock(&chip->memory_mutex);
        list_for_each(p, &chip->buf_list) {
                buf = list_entry(p, struct esm_memory, list);
@@ -1554,10 +1554,7 @@ static int snd_es1968_playback_open(struct snd_pcm_substream *substream)
        runtime->hw = snd_es1968_playback;
        runtime->hw.buffer_bytes_max = runtime->hw.period_bytes_max =
                calc_available_memory_size(chip);
-#if 0
-       snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES,
-                                  1024);
-#endif
+
        spin_lock_irq(&chip->substream_lock);
        list_add(&es->list, &chip->substream_list);
        spin_unlock_irq(&chip->substream_lock);
@@ -1613,10 +1610,8 @@ static int snd_es1968_capture_open(struct snd_pcm_substream *substream)
        runtime->hw = snd_es1968_capture;
        runtime->hw.buffer_bytes_max = runtime->hw.period_bytes_max =
                calc_available_memory_size(chip) - 1024; /* keep MIXBUF size */
-#if 0
-       snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES,
-                                  1024);
-#endif
+       snd_pcm_hw_constraint_pow2(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES);
+
        spin_lock_irq(&chip->substream_lock);
        list_add(&es->list, &chip->substream_list);
        spin_unlock_irq(&chip->substream_lock);
@@ -2462,7 +2457,7 @@ static int snd_es1968_free(struct es1968 *chip)
        }
 
        if (chip->irq >= 0)
-               free_irq(chip->irq, (void *)chip);
+               free_irq(chip->irq, chip);
        snd_es1968_free_gameport(chip);
        chip->master_switch = NULL;
        chip->master_volume = NULL;
@@ -2552,8 +2547,8 @@ static int __devinit snd_es1968_create(struct snd_card *card,
                return err;
        }
        chip->io_port = pci_resource_start(pci, 0);
-       if (request_irq(pci->irq, snd_es1968_interrupt, IRQF_DISABLED|IRQF_SHARED,
-                       "ESS Maestro", (void*)chip)) {
+       if (request_irq(pci->irq, snd_es1968_interrupt, IRQF_SHARED,
+                       "ESS Maestro", chip)) {
                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                snd_es1968_free(chip);
                return -EBUSY;