ALSA: spi: Use managed buffer allocation
[linux-2.6-block.git] / sound / spi / at73c213.c
index 4de1ba9a418d990bc8d4d06edcbf589bc8cb1d98..8b1b5c86cebffe027f8a843a23d81f72f9fd8a37 100644 (file)
@@ -242,13 +242,7 @@ static int snd_at73c213_pcm_hw_params(struct snd_pcm_substream *substream,
        val = SSC_BFINS(TFMR_DATNB, channels - 1, val);
        ssc_writel(chip->ssc->regs, TFMR, val);
 
-       return snd_pcm_lib_malloc_pages(substream,
-                                       params_buffer_bytes(hw_params));
-}
-
-static int snd_at73c213_pcm_hw_free(struct snd_pcm_substream *substream)
-{
-       return snd_pcm_lib_free_pages(substream);
+       return 0;
 }
 
 static int snd_at73c213_pcm_prepare(struct snd_pcm_substream *substream)
@@ -324,7 +318,6 @@ static const struct snd_pcm_ops at73c213_playback_ops = {
        .close          = snd_at73c213_pcm_close,
        .ioctl          = snd_pcm_lib_ioctl,
        .hw_params      = snd_at73c213_pcm_hw_params,
-       .hw_free        = snd_at73c213_pcm_hw_free,
        .prepare        = snd_at73c213_pcm_prepare,
        .trigger        = snd_at73c213_pcm_trigger,
        .pointer        = snd_at73c213_pcm_pointer,
@@ -347,7 +340,7 @@ static int snd_at73c213_pcm_new(struct snd_at73c213 *chip, int device)
 
        snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &at73c213_playback_ops);
 
-       snd_pcm_lib_preallocate_pages_for_all(chip->pcm,
+       snd_pcm_set_managed_buffer_all(chip->pcm,
                        SNDRV_DMA_TYPE_DEV, &chip->ssc->pdev->dev,
                        64 * 1024, 64 * 1024);
 out: