]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
ASoC: core: Move snd_soc_set_runtime_hwparams() to soc-pcm.c
authorLars-Peter Clausen <lars@metafoo.de>
Tue, 14 May 2013 09:05:30 +0000 (11:05 +0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 14 May 2013 12:52:43 +0000 (16:52 +0400)
snd_soc_set_runtime_hwparams() is the only PCM related function that lives in
soc-core.c. All other PCM related functions live in soc-pcm.c, so move
snd_soc_set_runtime_hwparams() over as well for a bit more consistency.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/soc-core.c
sound/soc/soc-pcm.c

index 308895a438d6b89689cb45bba7fc82f80b14c478..9d95ef531308ed003a41ec2a1a7da770d6ef2e56 100644 (file)
@@ -2219,29 +2219,6 @@ int snd_soc_test_bits(struct snd_soc_codec *codec, unsigned short reg,
 }
 EXPORT_SYMBOL_GPL(snd_soc_test_bits);
 
-/**
- * snd_soc_set_runtime_hwparams - set the runtime hardware parameters
- * @substream: the pcm substream
- * @hw: the hardware parameters
- *
- * Sets the substream runtime hardware parameters.
- */
-int snd_soc_set_runtime_hwparams(struct snd_pcm_substream *substream,
-       const struct snd_pcm_hardware *hw)
-{
-       struct snd_pcm_runtime *runtime = substream->runtime;
-       runtime->hw.info = hw->info;
-       runtime->hw.formats = hw->formats;
-       runtime->hw.period_bytes_min = hw->period_bytes_min;
-       runtime->hw.period_bytes_max = hw->period_bytes_max;
-       runtime->hw.periods_min = hw->periods_min;
-       runtime->hw.periods_max = hw->periods_max;
-       runtime->hw.buffer_bytes_max = hw->buffer_bytes_max;
-       runtime->hw.fifo_size = hw->fifo_size;
-       return 0;
-}
-EXPORT_SYMBOL_GPL(snd_soc_set_runtime_hwparams);
-
 /**
  * snd_soc_cnew - create new control
  * @_template: control template
index 73bb8eefa4913d2b77b468a5dabe22566c61687b..058b4037845150debc27effb1ee8be24a791d0f8 100644 (file)
 
 #define DPCM_MAX_BE_USERS      8
 
+/**
+ * snd_soc_set_runtime_hwparams - set the runtime hardware parameters
+ * @substream: the pcm substream
+ * @hw: the hardware parameters
+ *
+ * Sets the substream runtime hardware parameters.
+ */
+int snd_soc_set_runtime_hwparams(struct snd_pcm_substream *substream,
+       const struct snd_pcm_hardware *hw)
+{
+       struct snd_pcm_runtime *runtime = substream->runtime;
+       runtime->hw.info = hw->info;
+       runtime->hw.formats = hw->formats;
+       runtime->hw.period_bytes_min = hw->period_bytes_min;
+       runtime->hw.period_bytes_max = hw->period_bytes_max;
+       runtime->hw.periods_min = hw->periods_min;
+       runtime->hw.periods_max = hw->periods_max;
+       runtime->hw.buffer_bytes_max = hw->buffer_bytes_max;
+       runtime->hw.fifo_size = hw->fifo_size;
+       return 0;
+}
+EXPORT_SYMBOL_GPL(snd_soc_set_runtime_hwparams);
+
 /* DPCM stream event, send event to FE and all active BEs. */
 static int dpcm_dapm_stream_event(struct snd_soc_pcm_runtime *fe, int dir,
        int event)