diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-07-15 05:01:30 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-07-15 05:01:30 -0400 |
commit | e465d544fab81aa122f86a50418f4be7f1fcf066 (patch) | |
tree | 682a1ebba53d1954ddf49d8ffe3e1f4f19fc8240 /sound/soc/codecs/wm8993.c | |
parent | 82d76f4d9fbf7d951d63e7056fd9911ada507bd1 (diff) |
ASoC: Fix sample rate lookup in WM8993
We need to use the best value we picked, not the last value we
looked at.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8993.c')
-rw-r--r-- | sound/soc/codecs/wm8993.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c index 3e5c65a1ea8b..f9c49b3e559c 100644 --- a/sound/soc/codecs/wm8993.c +++ b/sound/soc/codecs/wm8993.c | |||
@@ -1796,7 +1796,8 @@ static int wm8993_hw_params(struct snd_pcm_substream *substream, | |||
1796 | } | 1796 | } |
1797 | dev_dbg(codec->dev, "Selected SAMPLE_RATE of %dHz\n", | 1797 | dev_dbg(codec->dev, "Selected SAMPLE_RATE of %dHz\n", |
1798 | sample_rates[best].rate); | 1798 | sample_rates[best].rate); |
1799 | clocking3 |= (sample_rates[i].sample_rate << WM8993_SAMPLE_RATE_SHIFT); | 1799 | clocking3 |= (sample_rates[best].sample_rate |
1800 | << WM8993_SAMPLE_RATE_SHIFT); | ||
1800 | 1801 | ||
1801 | /* BCLK_DIV */ | 1802 | /* BCLK_DIV */ |
1802 | best = 0; | 1803 | best = 0; |