aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-05-22 19:01:05 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-05-23 05:24:15 -0400
commit0154724d487586241c1ad57cfd348ed2ff2274e2 (patch)
treed81fe5a259c7a3dd908b6e6f48e46082145aca7d /sound/soc
parent86ed3669f068b514ab85ffd548456a342b3fb8d3 (diff)
ASoC: Fix WM9081 PowerPC compiler issues
Ensure that we always set a new sysclk when using the FLL in master mode and pick out the correct value for the sample rate in hw_params(). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/wm9081.c6
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;