diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2013-02-05 07:43:39 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-02-05 08:55:24 -0500 |
commit | a92b53179d7d2d004f0379e70d41c56c4f570c5c (patch) | |
tree | 6fc424048ee9058428e7920ab3575e95f4d9e001 /sound/soc/omap/omap-pcm.c | |
parent | a88fedfd342badff3653edcc6b6423e892d1773f (diff) |
ASoC: omap-pcm: No need to set constraint at open time
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>
Diffstat (limited to 'sound/soc/omap/omap-pcm.c')
-rw-r--r-- | sound/soc/omap/omap-pcm.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index 47bdbd415ad8..c722c2ef9665 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c | |||
@@ -174,23 +174,15 @@ static snd_pcm_uframes_t omap_pcm_pointer(struct snd_pcm_substream *substream) | |||
174 | 174 | ||
175 | static int omap_pcm_open(struct snd_pcm_substream *substream) | 175 | static int omap_pcm_open(struct snd_pcm_substream *substream) |
176 | { | 176 | { |
177 | struct snd_pcm_runtime *runtime = substream->runtime; | ||
178 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 177 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
179 | struct omap_pcm_dma_data *dma_data; | 178 | struct omap_pcm_dma_data *dma_data; |
180 | int ret; | ||
181 | 179 | ||
182 | snd_soc_set_runtime_hwparams(substream, &omap_pcm_hardware); | 180 | snd_soc_set_runtime_hwparams(substream, &omap_pcm_hardware); |
183 | 181 | ||
184 | /* Ensure that buffer size is a multiple of period size */ | ||
185 | ret = snd_pcm_hw_constraint_integer(runtime, | ||
186 | SNDRV_PCM_HW_PARAM_PERIODS); | ||
187 | if (ret < 0) | ||
188 | return ret; | ||
189 | |||
190 | dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); | 182 | dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); |
191 | ret = snd_dmaengine_pcm_open(substream, omap_dma_filter_fn, | 183 | |
192 | &dma_data->dma_req); | 184 | return snd_dmaengine_pcm_open(substream, omap_dma_filter_fn, |
193 | return ret; | 185 | &dma_data->dma_req); |
194 | } | 186 | } |
195 | 187 | ||
196 | static int omap_pcm_close(struct snd_pcm_substream *substream) | 188 | static int omap_pcm_close(struct snd_pcm_substream *substream) |