From ac0a08f74a9970bf8cfc84c7c50a6ba58e3ecb4b Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Sat, 23 May 2009 00:01:05 +0100 Subject: [PATCH] --- yaml --- r: 148299 b: refs/heads/master c: 0154724d487586241c1ad57cfd348ed2ff2274e2 h: refs/heads/master i: 148297: f4785c0c126cb45a48c535df5b7ca8b8eeb39a8b 148295: 8e7bffe60c7012ff9b06e7edc97c4d7473b925d9 v: v3 --- [refs] | 2 +- trunk/sound/soc/codecs/wm9081.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 490ca66c576f..17ebbc320235 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 86ed3669f068b514ab85ffd548456a342b3fb8d3 +refs/heads/master: 0154724d487586241c1ad57cfd348ed2ff2274e2 diff --git a/trunk/sound/soc/codecs/wm9081.c b/trunk/sound/soc/codecs/wm9081.c index 83e3148c258b..86fc57e25f97 100644 --- a/trunk/sound/soc/codecs/wm9081.c +++ b/trunk/sound/soc/codecs/wm9081.c @@ -702,9 +702,10 @@ static int configure_clock(struct snd_soc_codec *codec) * performance. */ for (i = 0; i < ARRAY_SIZE(clk_sys_rates); i++) { target = wm9081->fs * clk_sys_rates[i].ratio; + new_sysclk = target; if (target >= wm9081->bclk && target > 3000000) - new_sysclk = target; + break; } } else if (wm9081->fs) { for (i = 0; i < ARRAY_SIZE(clk_sys_rates); i++) { @@ -1102,7 +1103,8 @@ static int wm9081_hw_params(struct snd_pcm_substream *substream, } dev_dbg(codec->dev, "Selected SAMPLE_RATE of %dHz\n", sample_rates[best].rate); - clk_ctrl2 |= (sample_rates[i].sample_rate << WM9081_SAMPLE_RATE_SHIFT); + clk_ctrl2 |= (sample_rates[best].sample_rate + << WM9081_SAMPLE_RATE_SHIFT); /* BCLK_DIV */ best = 0;