ASoC: h1940_uda1380: Don't modify runtime->hw
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 3 Feb 2014 16:24:21 +0000 (17:24 +0100)
committerMark Brown <broonie@linaro.org>
Mon, 3 Feb 2014 18:41:59 +0000 (18:41 +0000)
Individual components are not supposed to modify the runtime->hw struct itself
as it is manged by the ASoC core. If a component wants to limit the list of
supported rates it should set a rate constraint. The h1940_uda1380 already does
this, so it is safe to just remove the code that modifies runtime->hw.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/samsung/h1940_uda1380.c

index 0003b661ab62cbf9ed344a3570f11b491871165f..88b09e022503d94f6774dcfbc2822a2e054a0800 100644 (file)
@@ -66,10 +66,6 @@ static int h1940_startup(struct snd_pcm_substream *substream)
 {
        struct snd_pcm_runtime *runtime = substream->runtime;
 
-       runtime->hw.rate_min = hw_rates.list[0];
-       runtime->hw.rate_max = hw_rates.list[hw_rates.count - 1];
-       runtime->hw.rates = SNDRV_PCM_RATE_KNOT;
-
        return snd_pcm_hw_constraint_list(runtime, 0,
                                        SNDRV_PCM_HW_PARAM_RATE,
                                        &hw_rates);