summaryrefslogtreecommitdiff
path: root/sound/soc/tegra
diff options
context:
space:
mode:
authorKen Chang <kenc@nvidia.com>2011-12-09 08:05:51 +0800
committerVarun Wadekar <vwadekar@nvidia.com>2011-12-15 11:53:40 +0530
commitdf107dd9440b5942717225ea8a58f68672cfd7ff (patch)
tree63cf3617e52f769e16fcadfaa17224fa79707cea /sound/soc/tegra
parent2a7a660504da6d13a0198d3c12dbe33843838392 (diff)
asoc: tegra: init cache values for i2s register
init i2s->reg_cache[] by reading i2s regs in probe function. bug 911332 Change-Id: I58711b5b8a1866878e9de02144396883df6ff3da Signed-off-by: Ken Chang <kenc@nvidia.com> Reviewed-on: http://git-master/r/69081 Reviewed-by: Scott Peterson <speterson@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Diffstat (limited to 'sound/soc/tegra')
-rw-r--r--sound/soc/tegra/tegra30_i2s.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c
index 81b47600f52f..a789dbba3c48 100644
--- a/sound/soc/tegra/tegra30_i2s.c
+++ b/sound/soc/tegra/tegra30_i2s.c
@@ -447,10 +447,19 @@ static int tegra30_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
static int tegra30_i2s_probe(struct snd_soc_dai *dai)
{
struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai);
+ int i;
dai->capture_dma_data = &i2s->capture_dma_data;
dai->playback_dma_data = &i2s->playback_dma_data;
+ tegra30_i2s_enable_clocks(i2s);
+
+ /*cache the POR values of i2s regs*/
+ for (i = 0; i < ((TEGRA30_I2S_CIF_TX_CTRL>>2) + 1); i++)
+ i2s->reg_cache[i] = tegra30_i2s_read(i2s, i<<2);
+
+ tegra30_i2s_disable_clocks(i2s);
+
return 0;
}