ASoC: ux500_pcm: No need to use snd_dmaengine_pcm_set_data()
[cascardo/linux.git] / sound / soc / ux500 / ux500_pcm.c
index 846fa82..1ab36fa 100644 (file)
@@ -111,15 +111,6 @@ static int ux500_pcm_open(struct snd_pcm_substream *substream)
                snd_soc_set_runtime_hwparams(substream,
                                        &ux500_pcm_hw_capture);
 
-       /* ensure that buffer size is a multiple of period size */
-       ret = snd_pcm_hw_constraint_integer(runtime,
-                                       SNDRV_PCM_HW_PARAM_PERIODS);
-       if (ret < 0) {
-               dev_err(dev, "%s: Error: snd_pcm_hw_constraints failed (%d)\n",
-                       __func__, ret);
-               return ret;
-       }
-
        dev_dbg(dev, "%s: Set hw-struct for %s.\n", __func__,
                snd_pcm_stream_str(substream));
        runtime->hw = (stream_id == SNDRV_PCM_STREAM_PLAYBACK) ?
@@ -164,20 +155,6 @@ static int ux500_pcm_open(struct snd_pcm_substream *substream)
                return ret;
        }
 
-       snd_dmaengine_pcm_set_data(substream, dma_cfg);
-
-       return 0;
-}
-
-static int ux500_pcm_close(struct snd_pcm_substream *substream)
-{
-       struct snd_soc_pcm_runtime *rtd = substream->private_data;
-       struct snd_soc_dai *dai = rtd->cpu_dai;
-
-       dev_dbg(dai->dev, "%s: Enter\n", __func__);
-
-       snd_dmaengine_pcm_close(substream);
-
        return 0;
 }
 
@@ -255,7 +232,7 @@ static int ux500_pcm_mmap(struct snd_pcm_substream *substream,
 
 static struct snd_pcm_ops ux500_pcm_ops = {
        .open           = ux500_pcm_open,
-       .close          = ux500_pcm_close,
+       .close          = snd_dmaengine_pcm_close,
        .ioctl          = snd_pcm_lib_ioctl,
        .hw_params      = ux500_pcm_hw_params,
        .hw_free        = ux500_pcm_hw_free,