return ret;
 }
 
-/*
- * pdacf_pcm_hw_params - hw_params callback for playback and capture
- */
-static int pdacf_pcm_hw_params(struct snd_pcm_substream *subs,
-                                    struct snd_pcm_hw_params *hw_params)
-{
-       return snd_pcm_lib_malloc_pages(subs, params_buffer_bytes(hw_params));
-}
-
-/*
- * pdacf_pcm_hw_free - hw_free callback for playback and capture
- */
-static int pdacf_pcm_hw_free(struct snd_pcm_substream *subs)
-{
-       return snd_pcm_lib_free_pages(subs);
-}
-
 /*
  * pdacf_pcm_prepare - prepare callback for playback and capture
  */
        .open =         pdacf_pcm_capture_open,
        .close =        pdacf_pcm_capture_close,
        .ioctl =        snd_pcm_lib_ioctl,
-       .hw_params =    pdacf_pcm_hw_params,
-       .hw_free =      pdacf_pcm_hw_free,
        .prepare =      pdacf_pcm_prepare,
        .trigger =      pdacf_pcm_trigger,
        .pointer =      pdacf_pcm_capture_pointer,
                return err;
                
        snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &pdacf_pcm_capture_ops);
-       snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_VMALLOC,
-                                             snd_dma_continuous_data(GFP_KERNEL | GFP_DMA32),
-                                             0, 0);
+       snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_VMALLOC,
+                                      snd_dma_continuous_data(GFP_KERNEL | GFP_DMA32),
+                                      0, 0);
 
        pcm->private_data = chip;
        pcm->info_flags = 0;