[alsa-devel] [PATCH V2] ASoC: tegra: set a sensible initial clock rate

Stephen Warren swarren at wwwdotorg.org
Fri Apr 6 19:18:16 CEST 2012


From: Stephen Warren <swarren at nvidia.com>

Initialize the audio clock tree appropriately for some reasonable rate.
This makes sure the PLLs etc. are actually programmed to something
reasonable when the audio driver is loaded.

Signed-off-by: Stephen Warren <swarren at nvidia.com>
---
v2: Use 44100 as the default rate, not 48000, since it's more common,
and consistent with the clock tables in board-dt-tegra*.c.

This patch is ordered after the patch I just sent to add Tegra30 support
to the utils file. However, the dependency is just for context; this
should be independent from that patch.

 sound/soc/tegra/tegra_asoc_utils.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/sound/soc/tegra/tegra_asoc_utils.c b/sound/soc/tegra/tegra_asoc_utils.c
index f59e8b5..266189d 100644
--- a/sound/soc/tegra/tegra_asoc_utils.c
+++ b/sound/soc/tegra/tegra_asoc_utils.c
@@ -152,8 +152,14 @@ int tegra_asoc_utils_init(struct tegra_asoc_utils_data *data,
 		goto err_put_pll_a_out0;
 	}
 
+	ret = tegra_asoc_utils_set_rate(data, 44100, 256 * 44100);
+	if (ret)
+		goto err_put_cdev1;
+
 	return 0;
 
+err_put_cdev1:
+	clk_put(data->clk_cdev1);
 err_put_pll_a_out0:
 	clk_put(data->clk_pll_a_out0);
 err_put_pll_a:
-- 
1.7.0.4



More information about the Alsa-devel mailing list