ASoC: omap-pcm: No need to set constraint at open time
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Tue, 5 Feb 2013 12:43:39 +0000 (13:43 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 5 Feb 2013 13:55:24 +0000 (13:55 +0000)
The same constraint is going to be set in the snd_dmaengine_pcm_open()
function, so there is no need to set it here as well.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/omap/omap-pcm.c

index 47bdbd415ad87af59686327ad3be8f25c48bf2a4..c722c2ef9665c9d6b0e3082077a77755bd4d95c9 100644 (file)
@@ -174,23 +174,15 @@ static snd_pcm_uframes_t omap_pcm_pointer(struct snd_pcm_substream *substream)
 
 static int omap_pcm_open(struct snd_pcm_substream *substream)
 {
-       struct snd_pcm_runtime *runtime = substream->runtime;
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct omap_pcm_dma_data *dma_data;
-       int ret;
 
        snd_soc_set_runtime_hwparams(substream, &omap_pcm_hardware);
 
-       /* 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)
-               return ret;
-
        dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
-       ret = snd_dmaengine_pcm_open(substream, omap_dma_filter_fn,
-                                    &dma_data->dma_req);
-       return ret;
+
+       return snd_dmaengine_pcm_open(substream, omap_dma_filter_fn,
+                                     &dma_data->dma_req);
 }
 
 static int omap_pcm_close(struct snd_pcm_substream *substream)
This page took 0.034134 seconds and 5 git commands to generate.