summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-tegra/tegra3_i2s.c9
-rw-r--r--sound/soc/tegra/tegra_soc_max98088.c4
-rw-r--r--sound/soc/tegra/tegra_soc_wm8753.c6
-rw-r--r--sound/soc/tegra/tegra_soc_wm8903.c4
4 files changed, 11 insertions, 12 deletions
diff --git a/arch/arm/mach-tegra/tegra3_i2s.c b/arch/arm/mach-tegra/tegra3_i2s.c
index 1bdfc5cd05d7..bc5a6c7dc9c0 100644
--- a/arch/arm/mach-tegra/tegra3_i2s.c
+++ b/arch/arm/mach-tegra/tegra3_i2s.c
@@ -966,12 +966,6 @@ int i2s_clock_enable(int ifc, int fifo_mode)
return err;
}
if (info->i2sprop.i2s_sync_clk) {
- if (clk_enable(info->i2sprop.i2s_sync_clk))
- {
- err = PTR_ERR(info->i2sprop.i2s_sync_clk);
- I2S_DEBUG_PRINT("i2s enable i2s_sync_clk failed \n");
- return err;
- }
clk_set_rate(info->i2sprop.i2s_sync_clk,info->i2sprop.clk_rate);
}
if (info->i2sprop.audio_clk) {
@@ -1023,9 +1017,6 @@ int i2s_clock_disable(int ifc, int fifo_mode)
if (info->clk_refs == 0) {
clk_disable(info->i2sprop.i2s_clk);
info->clk_refs = 0;
- if (info->i2sprop.i2s_sync_clk) {
- clk_disable(info->i2sprop.i2s_sync_clk);
- }
if (info->i2sprop.audio_clk) {
clk_disable(info->i2sprop.audio_clk);
diff --git a/sound/soc/tegra/tegra_soc_max98088.c b/sound/soc/tegra/tegra_soc_max98088.c
index 4c74a5300514..e31e2213bcf8 100644
--- a/sound/soc/tegra/tegra_soc_max98088.c
+++ b/sound/soc/tegra/tegra_soc_max98088.c
@@ -72,6 +72,8 @@ static int tegra_hifi_hw_params(struct snd_pcm_substream *substream,
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
+ struct tegra_i2s_info *info = cpu_dai->private_data;
+ struct tegra_audio_platform_data* i2s_pdata = info->pdata;
int sys_clk;
int err;
int dai_flag = SND_SOC_DAIFMT_NB_NF;
@@ -106,7 +108,7 @@ static int tegra_hifi_hw_params(struct snd_pcm_substream *substream,
/*FIXME: not sure this is the right way.
This should be samplerate times 256 or 128 based on codec need*/
- sys_clk = tegra_das_get_mclk_rate();
+ sys_clk = (unsigned int) i2s_pdata->dev_clk_rate;
err = snd_soc_dai_set_sysclk(codec_dai, 0, sys_clk, SND_SOC_CLOCK_IN);
if (err < 0) {
pr_err("codec_dai clock not set\n");
diff --git a/sound/soc/tegra/tegra_soc_wm8753.c b/sound/soc/tegra/tegra_soc_wm8753.c
index 137ef948f32b..f337877e759f 100644
--- a/sound/soc/tegra/tegra_soc_wm8753.c
+++ b/sound/soc/tegra/tegra_soc_wm8753.c
@@ -195,7 +195,7 @@ static int tegra_hifi_hw_params(struct snd_pcm_substream *substream,
return err;
}
- sys_clk = tegra_das_get_mclk_rate();
+ sys_clk = (unsigned int) i2s_pdata->dev_clk_rate;
err = snd_soc_dai_set_sysclk(codec_dai, 0, sys_clk, SND_SOC_CLOCK_IN);
if (err < 0) {
pr_err("codec_dai clock not set\n");
@@ -328,6 +328,8 @@ static int tegra_voice_hw_params(struct snd_pcm_substream *substream,
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
+ struct tegra_i2s_info *info = cpu_dai->private_data;
+ struct tegra_audio_platform_data* i2s_pdata = info->pdata;
int dai_flag = 0, sys_clk;
int err;
enum dac_dap_data_format data_fmt;
@@ -378,7 +380,7 @@ static int tegra_voice_hw_params(struct snd_pcm_substream *substream,
return err;
}
- sys_clk = tegra_das_get_mclk_rate();
+ sys_clk = (unsigned int) i2s_pdata->dev_clk_rate;
err = snd_soc_dai_set_sysclk(codec_dai, 0, sys_clk, SND_SOC_CLOCK_IN);
if (err < 0) {
pr_err("cpu_dai clock not set\n");
diff --git a/sound/soc/tegra/tegra_soc_wm8903.c b/sound/soc/tegra/tegra_soc_wm8903.c
index 05e6e71797b6..6927c4f2fda9 100644
--- a/sound/soc/tegra/tegra_soc_wm8903.c
+++ b/sound/soc/tegra/tegra_soc_wm8903.c
@@ -76,6 +76,7 @@ static int tegra_hifi_hw_params(struct snd_pcm_substream *substream,
struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
struct snd_soc_codec *codec = codec_dai->codec;
struct tegra_i2s_info *info = cpu_dai->private_data;
+ struct tegra_audio_platform_data* i2s_pdata = info->pdata;
int dai_flag = 0, sys_clk;
int err;
enum dac_dap_data_format data_fmt;
@@ -94,6 +95,7 @@ static int tegra_hifi_hw_params(struct snd_pcm_substream *substream,
else
dai_flag |= SND_SOC_DAIFMT_I2S;
+
err = snd_soc_dai_set_fmt(codec_dai, dai_flag);
if (err < 0) {
pr_err("codec_dai fmt not set \n");
@@ -109,12 +111,14 @@ static int tegra_hifi_hw_params(struct snd_pcm_substream *substream,
/*FIXME: not sure this is the right way.
This should be samplerate times 256 or 128 based on codec need*/
sys_clk = tegra_das_get_mclk_rate();
+
err = snd_soc_dai_set_sysclk(codec_dai, 0, sys_clk, SND_SOC_CLOCK_IN);
if (err < 0) {
pr_err("codec_dai clock not set\n");
return err;
}
+ sys_clk = (unsigned int) i2s_pdata->dev_clk_rate;
err = snd_soc_dai_set_sysclk(cpu_dai, 0, sys_clk, SND_SOC_CLOCK_IN);
if (err < 0) {
pr_err("cpu_dai clock not set\n");