summaryrefslogtreecommitdiff
path: root/sound/soc/tegra/tegra30_ahub.c
diff options
context:
space:
mode:
authorScottPeterson <speterson@nvidia.com>2012-01-17 17:32:11 -0800
committerVarun Colbert <vcolbert@nvidia.com>2012-01-30 13:28:18 -0800
commit2e3c724c167ec5da8b1ed5ab07cda55232ecdf13 (patch)
treed82c4c6da45dd46de1aa0c75393869470fe033e3 /sound/soc/tegra/tegra30_ahub.c
parent6814bf677b18c10cee192e813d3d468b01229a25 (diff)
asoc:tegra: Support I2S slave mode
Support I2S slave mode. Disable pll_p_out1 and pll_a to reduce power when in slave mode. Slave mode disabled by default. Reviewed-on: http://git-master/r/76046 Change-Id: I873a11d54f1e037d99c86ff4cec06ee83064902a Signed-off-by: ScottPeterson <speterson@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/77765 Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'sound/soc/tegra/tegra30_ahub.c')
-rw-r--r--sound/soc/tegra/tegra30_ahub.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/tegra/tegra30_ahub.c b/sound/soc/tegra/tegra30_ahub.c
index 3fceda143da8..710d9465b4b0 100644
--- a/sound/soc/tegra/tegra30_ahub.c
+++ b/sound/soc/tegra/tegra30_ahub.c
@@ -487,6 +487,7 @@ static int __devinit tegra30_ahub_probe(struct platform_device *pdev)
#ifdef CONFIG_PM
int i = 0, cache_idx_rsvd;
#endif
+ int clkm_rate;
if (ahub)
return -ENODEV;
@@ -505,6 +506,11 @@ static int __devinit tegra30_ahub_probe(struct platform_device *pdev)
ret = PTR_ERR(ahub->clk_d_audio);
goto err_free;
}
+ clkm_rate = clk_get_rate(clk_get_parent(ahub->clk_d_audio));
+ while (clkm_rate > 12000000)
+ clkm_rate >>= 1;
+
+ clk_set_rate(ahub->clk_d_audio,clkm_rate);
ahub->clk_apbif = clk_get(&pdev->dev, "apbif");
if (IS_ERR(ahub->clk_apbif)) {