Skip to content

Commit

Permalink
ASoC: Fix sample rate lookup in WM8993
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown committed Jul 15, 2009
1 parent 82d76f4 commit e465d54
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound/soc/codecs/wm8993.c
Original file line number Diff line number Diff line change
Expand Up @@ -1796,7 +1796,8 @@ static int wm8993_hw_params(struct snd_pcm_substream *substream,
}
dev_dbg(codec->dev, "Selected SAMPLE_RATE of %dHz\n",
sample_rates[best].rate);
clocking3 |= (sample_rates[i].sample_rate << WM8993_SAMPLE_RATE_SHIFT);
clocking3 |= (sample_rates[best].sample_rate
<< WM8993_SAMPLE_RATE_SHIFT);

/* BCLK_DIV */
best = 0;
Expand Down

0 comments on commit e465d54

Please sign in to comment.