diff options
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r-- | sound/soc/codecs/wm9081.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c index 83e3148c258b..86fc57e25f97 100644 --- a/sound/soc/codecs/wm9081.c +++ b/sound/soc/codecs/wm9081.c | |||
@@ -702,9 +702,10 @@ static int configure_clock(struct snd_soc_codec *codec) | |||
702 | * performance. */ | 702 | * performance. */ |
703 | for (i = 0; i < ARRAY_SIZE(clk_sys_rates); i++) { | 703 | for (i = 0; i < ARRAY_SIZE(clk_sys_rates); i++) { |
704 | target = wm9081->fs * clk_sys_rates[i].ratio; | 704 | target = wm9081->fs * clk_sys_rates[i].ratio; |
705 | new_sysclk = target; | ||
705 | if (target >= wm9081->bclk && | 706 | if (target >= wm9081->bclk && |
706 | target > 3000000) | 707 | target > 3000000) |
707 | new_sysclk = target; | 708 | break; |
708 | } | 709 | } |
709 | } else if (wm9081->fs) { | 710 | } else if (wm9081->fs) { |
710 | for (i = 0; i < ARRAY_SIZE(clk_sys_rates); i++) { | 711 | for (i = 0; i < ARRAY_SIZE(clk_sys_rates); i++) { |
@@ -1102,7 +1103,8 @@ static int wm9081_hw_params(struct snd_pcm_substream *substream, | |||
1102 | } | 1103 | } |
1103 | dev_dbg(codec->dev, "Selected SAMPLE_RATE of %dHz\n", | 1104 | dev_dbg(codec->dev, "Selected SAMPLE_RATE of %dHz\n", |
1104 | sample_rates[best].rate); | 1105 | sample_rates[best].rate); |
1105 | clk_ctrl2 |= (sample_rates[i].sample_rate << WM9081_SAMPLE_RATE_SHIFT); | 1106 | clk_ctrl2 |= (sample_rates[best].sample_rate |
1107 | << WM9081_SAMPLE_RATE_SHIFT); | ||
1106 | 1108 | ||
1107 | /* BCLK_DIV */ | 1109 | /* BCLK_DIV */ |
1108 | best = 0; | 1110 | best = 0; |