]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - sound/pci/atiixp_modem.c
Merge tag 'mips_5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
[linux.git] / sound / pci / atiixp_modem.c
index 6f088c1949f335c93b92933c9202f73366d529a7..ae88217d685a96ee1a7e6946d7e6257fdc3fb696 100644 (file)
@@ -783,9 +783,6 @@ static int snd_atiixp_pcm_hw_params(struct snd_pcm_substream *substream,
        int err;
        int i;
 
-       err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
-       if (err < 0)
-               return err;
        dma->buf_addr = substream->runtime->dma_addr;
        dma->buf_bytes = params_buffer_bytes(hw_params);
 
@@ -812,7 +809,6 @@ static int snd_atiixp_pcm_hw_free(struct snd_pcm_substream *substream)
        struct atiixp_dma *dma = substream->runtime->private_data;
 
        atiixp_clear_dma_packets(chip, dma, substream);
-       snd_pcm_lib_free_pages(substream);
        return 0;
 }
 
@@ -936,7 +932,6 @@ static int snd_atiixp_capture_close(struct snd_pcm_substream *substream)
 static const struct snd_pcm_ops snd_atiixp_playback_ops = {
        .open =         snd_atiixp_playback_open,
        .close =        snd_atiixp_playback_close,
-       .ioctl =        snd_pcm_lib_ioctl,
        .hw_params =    snd_atiixp_pcm_hw_params,
        .hw_free =      snd_atiixp_pcm_hw_free,
        .prepare =      snd_atiixp_playback_prepare,
@@ -948,7 +943,6 @@ static const struct snd_pcm_ops snd_atiixp_playback_ops = {
 static const struct snd_pcm_ops snd_atiixp_capture_ops = {
        .open =         snd_atiixp_capture_open,
        .close =        snd_atiixp_capture_close,
-       .ioctl =        snd_pcm_lib_ioctl,
        .hw_params =    snd_atiixp_pcm_hw_params,
        .hw_free =      snd_atiixp_pcm_hw_free,
        .prepare =      snd_atiixp_capture_prepare,
@@ -994,9 +988,8 @@ static int snd_atiixp_pcm_new(struct atiixp_modem *chip)
        strcpy(pcm->name, "ATI IXP MC97");
        chip->pcmdevs[ATI_PCMDEV_ANALOG] = pcm;
 
-       snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             &chip->pci->dev,
-                                             64*1024, 128*1024);
+       snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV,
+                                      &chip->pci->dev, 64*1024, 128*1024);
 
        return 0;
 }
@@ -1053,11 +1046,11 @@ static int snd_atiixp_mixer_new(struct atiixp_modem *chip, int clock)
        struct snd_ac97_template ac97;
        int i, err;
        int codec_count;
-       static struct snd_ac97_bus_ops ops = {
+       static const struct snd_ac97_bus_ops ops = {
                .write = snd_atiixp_ac97_write,
                .read = snd_atiixp_ac97_read,
        };
-       static unsigned int codec_skip[NUM_ATI_CODECS] = {
+       static const unsigned int codec_skip[NUM_ATI_CODECS] = {
                ATI_REG_ISR_CODEC0_NOT_READY,
                ATI_REG_ISR_CODEC1_NOT_READY,
                ATI_REG_ISR_CODEC2_NOT_READY,
@@ -1194,7 +1187,7 @@ static int snd_atiixp_create(struct snd_card *card,
                             struct pci_dev *pci,
                             struct atiixp_modem **r_chip)
 {
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free =     snd_atiixp_dev_free,
        };
        struct atiixp_modem *chip;
@@ -1234,8 +1227,8 @@ static int snd_atiixp_create(struct snd_card *card,
                return -EBUSY;
        }
        chip->irq = pci->irq;
+       card->sync_irq = chip->irq;
        pci_set_master(pci);
-       synchronize_irq(chip->irq);
 
        if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) {
                snd_atiixp_free(chip);