aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/mxs
diff options
context:
space:
mode:
authorDong Aisheng <dong.aisheng@linaro.org>2012-07-20 05:20:25 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-07-24 15:18:18 -0400
commitd0ba4c014934cb56f1eabb481ff8026b6d49d33c (patch)
tree73d307109dfaa4fa1b692641ee52d4c8e052ed80 /sound/soc/mxs
parentc2e1d9073fc98f471067c0257a31b4818306ebe1 (diff)
ASoC: mxs-saif: set a base clock rate for EXTMASTER mode work
Set an initial clock rate for the saif internal logic to work properly. This is important when working in EXTMASTER mode that uses the other saif's BITCLK&LRCLK but it still needs a basic clock which should be fast enough for the internal logic. Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/mxs')
-rw-r--r--sound/soc/mxs/mxs-saif.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index fdbb36aa9cf5..b3030718c228 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -427,8 +427,22 @@ static int mxs_saif_hw_params(struct snd_pcm_substream *substream,
427 427
428 /* prepare clk in hw_param, enable in trigger */ 428 /* prepare clk in hw_param, enable in trigger */
429 clk_prepare(saif->clk); 429 clk_prepare(saif->clk);
430 if (saif != master_saif) 430 if (saif != master_saif) {
431 /*
432 * Set an initial clock rate for the saif internal logic to work
433 * properly. This is important when working in EXTMASTER mode
434 * that uses the other saif's BITCLK&LRCLK but it still needs a
435 * basic clock which should be fast enough for the internal
436 * logic.
437 */
438 clk_enable(saif->clk);
439 ret = clk_set_rate(saif->clk, 24000000);
440 clk_disable(saif->clk);
441 if (ret)
442 return ret;
443
431 clk_prepare(master_saif->clk); 444 clk_prepare(master_saif->clk);
445 }
432 446
433 scr = __raw_readl(saif->base + SAIF_CTRL); 447 scr = __raw_readl(saif->base + SAIF_CTRL);
434 448