ALSA: sparc: Use managed buffer allocation
[linux-2.6-microblaze.git] / sound / sparc / dbri.c
index 4911103..315d5a0 100644 (file)
@@ -2099,12 +2099,6 @@ static int snd_dbri_hw_params(struct snd_pcm_substream *substream,
        if (ret != 0)
                return ret;
 
-       if ((ret = snd_pcm_lib_malloc_pages(substream,
-                               params_buffer_bytes(hw_params))) < 0) {
-               printk(KERN_ERR "malloc_pages failed with %d\n", ret);
-               return ret;
-       }
-
        /* hw_params can get called multiple times. Only map the DMA once.
         */
        if (info->dvma_buffer == 0) {
@@ -2151,7 +2145,7 @@ static int snd_dbri_hw_free(struct snd_pcm_substream *substream)
                info->pipe = -1;
        }
 
-       return snd_pcm_lib_free_pages(substream);
+       return 0;
 }
 
 static int snd_dbri_prepare(struct snd_pcm_substream *substream)
@@ -2248,9 +2242,8 @@ static int snd_dbri_pcm(struct snd_card *card)
        pcm->info_flags = 0;
        strcpy(pcm->name, card->shortname);
 
-       snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS,
-                                             NULL,
-                                             64 * 1024, 64 * 1024);
+       snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS,
+                                      NULL, 64 * 1024, 64 * 1024);
        return 0;
 }